Skip to content

Commit

Permalink
Merge pull request #40 from openclimatefix/no_sat_scaling
Browse files Browse the repository at this point in the history
remove satellite scaling
  • Loading branch information
peterdudfield authored Aug 30, 2024
2 parents 89a6ae8 + 883aa82 commit e2c8558
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ocf_data_sampler/torch_datasets/pvnet_uk_regional.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
from ocf_datapipes.utils.consts import (
NWP_MEANS,
NWP_STDS,
RSS_MEAN,
RSS_STD,
)

from ocf_datapipes.training.common import concat_xr_time_utc, normalize_gsp
Expand Down Expand Up @@ -379,9 +377,9 @@ def process_and_combine_datasets(
numpy_modalities.append({BatchKey.nwp: nwp_numpy_modalities})

if "sat" in dataset_dict:
# Standardise
# TODO: Since satellite is in range 0-1 already, so we don't need to standardize
da_sat = (dataset_dict["sat"] - RSS_MEAN) / RSS_STD
# Satellite is already in the range [0-1] so no need to standardise
da_sat = dataset_dict["sat"]

# Convert to NumpyBatch
numpy_modalities.append(convert_satellite_to_numpy_batch(da_sat))

Expand Down Expand Up @@ -540,6 +538,5 @@ def get_sample(self, t0: pd.Timestamp, gsp_id: int) -> NumpyBatch:
assert gsp_id in self.location_lookup

location = self.location_lookup[gsp_id]


return self._get_sample(t0, location)

0 comments on commit e2c8558

Please sign in to comment.