Esempio n. 1
0
def test_clearsky_ghi_fixed(clearsky, solarposition):
    """Identify every day as fixed, since clearsky GHI is sunny."""
    assert orientation.fixed_nrel(
        clearsky['ghi'],
        solarposition['zenith'] < 87,
        r2_min=0.94,
    ).all()
Esempio n. 2
0
def test_perturbed_ghi_fixed(clearsky, solarposition):
    """If the clearsky for one day is perturbed then that day is not sunny."""
    ghi = clearsky['ghi']
    ghi.iloc[0:24] = 1
    expected = pd.Series(True, ghi.index)
    expected[0:24] = False
    assert_series_equal(expected,
                        orientation.fixed_nrel(ghi,
                                               solarposition['zenith'] < 87),
                        check_names=False)
Esempio n. 3
0
def test_stuck_tracker_profile(solarposition, clearsky):
    """Test POA irradiance at a awkward orientation (high tilt and
    oriented West)."""
    poa = irradiance.get_total_irradiance(
        surface_tilt=45,
        surface_azimuth=270,
        **clearsky,
        solar_zenith=solarposition['apparent_zenith'],
        solar_azimuth=solarposition['azimuth'])
    assert not orientation.tracking_nrel(
        poa['poa_global'],
        solarposition['zenith'] < 87,
    ).any()
    # by restricting the data to the middle of the day (lower zenith
    # angles) we should classify the system as fixed
    assert orientation.fixed_nrel(poa['poa_global'],
                                  solarposition['zenith'] < 70).all()