def test_power_tracking_perturbed(power_tracking, solarposition): """A day with perturbed values is not marked as tracking.""" power_tracking.iloc[6:18] = 10 expected = pd.Series(True, index=power_tracking.index) expected.iloc[0:24] = False assert_series_equal( expected, orientation.tracking_nrel(power_tracking, solarposition['zenith'] < 87)) assert_series_equal( expected, orientation.tracking_nrel(power_tracking, solarposition['zenith'] < 87, peak_min=100))
def test_power_tracking_old_pvlib(power_tracking_old_pvlib, solarposition): """simulated power from a single axis tracker is identified as sunny with tracking=True""" # copy of `test_power_tracking` but with older pvlib API # TODO: remove when minimum pvlib version is >= 0.9.0 assert orientation.tracking_nrel(power_tracking_old_pvlib, solarposition['zenith'] < 87).all()
def test_power_tracking_perturbed_old_pvlib(power_tracking_old_pvlib, solarposition): """A day with perturbed values is not marked as tracking.""" # copy of `test_power_tracking_perturbed` but with older pvlib API # TODO: remove when minimum pvlib version is >= 0.9.0 power_tracking_old_pvlib.iloc[6:18] = 10 expected = pd.Series(True, index=power_tracking_old_pvlib.index) expected.iloc[0:24] = False assert_series_equal( expected, orientation.tracking_nrel(power_tracking_old_pvlib, solarposition['zenith'] < 87)) assert_series_equal( expected, orientation.tracking_nrel(power_tracking_old_pvlib, solarposition['zenith'] < 87, peak_min=100))
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()
def test_power_tracking(power_tracking, solarposition): """simulated power from a single axis tracker is identified as sunny with tracking=True""" assert orientation.tracking_nrel(power_tracking, solarposition['zenith'] < 87).all()
def test_ghi_not_tracking(clearsky, solarposition): """If we pass GHI measurements and tracking=True then no days are sunny.""" assert (~orientation.tracking_nrel(clearsky['ghi'], solarposition['zenith'] < 87)).all()