Esempio n. 1
0
def test_ashraeiam_scalar():
    thetas = -45.
    iam = pvsystem.ashraeiam(thetas, .05)
    expected = 0.97928932
    assert_allclose(iam, expected, equal_nan=True)
    thetas = np.nan
    iam = pvsystem.ashraeiam(thetas, .05)
    expected = np.nan
    assert_allclose(iam, expected, equal_nan=True)
Esempio n. 2
0
def test_ashraeiam():
    thetas = np.linspace(-90, 90, 9)
    iam = pvsystem.ashraeiam(.05, thetas)
    expected = np.array([
        nan, 0.9193437, 0.97928932, 0.99588039, 1., 0.99588039, 0.97928932,
        0.9193437, nan
    ])
    assert np.isclose(iam, expected, equal_nan=True).all()
Esempio n. 3
0
def test_ashraeiam():
    thetas = np.array(
        [-90., -67.5, -45., -22.5, 0., 22.5, 45., 67.5, 89., 90., np.nan])
    iam = pvsystem.ashraeiam(thetas, .05)
    expected = np.array([
        0, 0.9193437, 0.97928932, 0.99588039, 1., 0.99588039, 0.97928932,
        0.9193437, 0, 0, np.nan
    ])
    assert_allclose(iam, expected, equal_nan=True)
Esempio n. 4
0
def test_ashraeiam():
    thetas = pd.Series(np.linspace(-180,180,361))
    iam = pvsystem.ashraeiam(.05, thetas)
Esempio n. 5
0
def test_ashraeiam():
    thetas = np.linspace(-90, 90, 9)
    iam = pvsystem.ashraeiam(.05, thetas)
    expected = np.array([        nan,  0.9193437 ,  0.97928932,  0.99588039,  1.        ,
        0.99588039,  0.97928932,  0.9193437 ,         nan])
    assert np.isclose(iam, expected, equal_nan=True).all()
Esempio n. 6
0
def test_ashraeiam():
    thetas = np.array([-90. , -67.5, -45. , -22.5,   0. ,  22.5,  45. ,  67.5, 89.,  90. , np.nan])
    iam = pvsystem.ashraeiam(thetas, .05)
    expected = np.array([        0,  0.9193437 ,  0.97928932,  0.99588039,  1.        ,
        0.99588039,  0.97928932,  0.9193437 ,         0, 0,  np.nan])
    assert_allclose(iam, expected, equal_nan=True)
def test_proper():
	IAM=ashraeiam(.05,pd.DataFrame(list(range(90)))	)
	assert(np.size(IAM)==90)