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

Commit f5933ec

Browse files
committed
reduce pydantic opticalflow model - DataSourceMixin
1 parent c7c0660 commit f5933ec

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

nowcasting_dataset/config/gcp.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ input_data:
7676
# ------------------------- Optical Flow ---------------
7777
opticalflow:
7878
opticalflow_zarr_path: gs://solar-pv-nowcasting-data/satellite/EUMETSAT/SEVIRI_RSS/OSGB36/all_zarr_int16_single_timestep.zarr
79-
opticalflow_history_minutes: 5
80-
opticalflow_forecast_minutes: 120
79+
history_minutes: 5
80+
forecast_minutes: 120
8181
opticalflow_input_image_size_pixels: 102
8282
opticalflow_output_image_size_pixels: 24
8383
opticalflow_source_data_source_class_name: SatelliteDataSource

nowcasting_dataset/config/model.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,16 @@ class OpticalFlow(DataSourceMixin):
202202
" satellite.satellite_zarr_path."
203203
),
204204
)
205-
opticalflow_history_minutes: int = Field(
206-
5,
207-
description=(
208-
"Duration of historical data to use when computing the optical flow field."
209-
" For example, set to 5 to use just two images: the t-1 and t0 images. Set to 10 to"
210-
" compute the optical flow field separately for the image pairs (t-2, t-1), and"
211-
" (t-1, t0) and to use the mean optical flow field."
212-
),
213-
)
214-
opticalflow_forecast_minutes: int = Field(
215-
120, description="Duration of the optical flow predictions."
216-
)
205+
206+
# history_minutes, set in DataSourceMixin.
207+
# Duration of historical data to use when computing the optical flow field.
208+
# For example, set to 5 to use just two images: the t-1 and t0 images. Set to 10 to
209+
# compute the optical flow field separately for the image pairs (t-2, t-1), and
210+
# (t-1, t0) and to use the mean optical flow field.
211+
212+
# forecast_minutes, set in DataSourceMixin.
213+
# Duration of the optical flow predictions.
214+
217215
opticalflow_meters_per_pixel: int = METERS_PER_PIXEL_FIELD
218216
opticalflow_input_image_size_pixels: int = Field(
219217
IMAGE_SIZE_PIXELS * 2,

nowcasting_dataset/config/on_premises.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ input_data:
6666
# ------------------------- Optical Flow ---------------
6767
opticalflow:
6868
opticalflow_zarr_path: /mnt/storage_ssd_8tb/data/ocf/solar_pv_nowcasting/nowcasting_dataset_pipeline/satellite/EUMETSAT/SEVIRI_RSS/zarr/v2/eumetsat_zarr_*
69-
opticalflow_history_minutes: 5
70-
opticalflow_forecast_minutes: 120
69+
history_minutes: 5
70+
forecast_minutes: 120
7171
opticalflow_input_image_size_pixels: 102
7272
opticalflow_output_image_size_pixels: 24
7373
opticalflow_source_data_source_class_name: SatelliteDataSource

0 commit comments

Comments
 (0)