openclimatefix / nowcasting_dataset

Prepare batches of data for training machine learning solar electricity nowcasting data
https://nowcasting-dataset.readthedocs.io/en/stable/
MIT License
24 stars 6 forks source link

Bug: `drop_pv_systems_which_produce_overnight` expects normalised data, but it doesn't receive normalised data. #664

Open JackKelly opened 2 years ago

JackKelly commented 2 years ago

Describe the bug nowcasting_dataset.data_sources.pv.pv_data_source.drop_pv_systems_which_produce_overnight expected power values to be normalised. But, when drop_pv_systems_which_produce_overnight is called, it is given raw un-normalised power values.

peterdudfield commented 2 years ago

Why does it matter if its normalised or not?

JackKelly commented 2 years ago

Here's the code (nowcasting_dataset/data_sources/pv/pv_data_source.py):

image

Note that the threshold (defined on line 546) is a "normalised" threshold. If the PV power isn't normalised, then the threshold is way too low to have much effect!

I'm pretty confident this is a "real" bug :slightly_smiling_face:

peterdudfield commented 2 years ago

ah i forgot about the threshold - thanks