Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 7458260

Browse files
Merge pull request #418 from openclimatefix/bug/303-gsp-threshold
set GSP threshold to > 0 for
2 parents 7d1d557 + 1656180 commit 7458260

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nowcasting_dataset/data_sources/gsp/gsp_data_source.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class GSPDataSource(ImageDataSource):
4646
# end datetime, this can be None
4747
end_dt: Optional[datetime] = None
4848
# the threshold where we only taken gsp's with a maximum power, above this value.
49-
threshold_mw: int = 20
49+
threshold_mw: int = 0
5050
# get the data for the gsp at the center too.
5151
# This can be turned off if the center of the bounding box is of a pv system
5252
get_center: bool = True
@@ -93,7 +93,7 @@ def load(self):
9393
self.zarr_path, start_dt=self.start_dt, end_dt=self.end_dt
9494
)
9595

96-
# drop any gsp below 20 MW (or set threshold). This is to get rid of any small GSP where
96+
# drop any gsp below a threshold mw. This is to get rid of any small GSP where
9797
# predicting the solar output will be harder.
9898
self.gsp_power, self.metadata = drop_gsp_by_threshold(
9999
self.gsp_power, self.metadata, threshold_mw=self.threshold_mw
@@ -378,7 +378,7 @@ def drop_gsp_by_threshold(gsp_power: pd.DataFrame, meta_data: pd.DataFrame, thre
378378
"""
379379
maximum_gsp = gsp_power.max()
380380

381-
keep_index = maximum_gsp >= threshold_mw
381+
keep_index = maximum_gsp > threshold_mw
382382

383383
logger.debug(f"Dropping {sum(~keep_index)} GSPs as maximum is not greater {threshold_mw} MW")
384384
logger.debug(f"Keeping {sum(keep_index)} GSPs as maximum is greater {threshold_mw} MW")

0 commit comments

Comments
 (0)