Skip to content

Commit

Permalink
scale sat data by 1024
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Sep 16, 2024
1 parent 159e38b commit b61bf20
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pvnet_app/data/satellite.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,17 @@ def preprocess_sat_data(t0):
# non-nan timestamp
extend_satellite_data_with_nans(t0)

return all_datetimes, data_freq_minutes
# scale the satellite data
scale_satellite_data()

return all_datetimes, data_freq_minutes


def scale_satellite_data():
"""Scale the satellite data to be between 0 and 1 """

for file in [sat_5_path, sat_15_path]:
if os.path.exists(file):
ds_sat = xr.open_zarr(sat_path)
ds_sat = ds_sat / 1024
ds_sat.to_zarr(sat_path)

0 comments on commit b61bf20

Please sign in to comment.