File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
pvanalytics/tests/features Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ def ac_power_series():
3838@pytest .fixture
3939def modeled_midday_series (ac_power_series ):
4040 # Get the modeled sunrise and sunset for the location
41+ dates = ac_power_series .index .normalize ().unique ()
4142 modeled_sunrise_sunset_df = pvlib .solarposition .sun_rise_set_transit_spa (
42- ac_power_series .index , 39.742 , - 105.1727 )
43- modeled_sunrise_sunset_df .index = modeled_sunrise_sunset_df .index .date
44- modeled_sunrise_sunset_df = modeled_sunrise_sunset_df .drop_duplicates ()
43+ dates , 39.742 , - 105.1727 )
4544 # Take the 'transit' column as the midday point between sunrise and
4645 # sunset for each day in the modeled irradiance series
4746 modeled_midday_series = modeled_sunrise_sunset_df ['transit' ]
47+ modeled_midday_series .index = dates .date
4848 return modeled_midday_series
4949
5050
You can’t perform that action at this time.
0 commit comments