Skip to content

Commit

Permalink
add check solar coords check to pvent samples
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Aug 14, 2024
1 parent c12f674 commit 3f64342
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/torch_datasets/test_pvnet_uk_regional.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def test_pvnet(pvnet_config_filename):

assert isinstance(sample, dict)

for key in [BatchKey.nwp, BatchKey.satellite_actual, BatchKey.gsp]:
for key in [
BatchKey.nwp, BatchKey.satellite_actual, BatchKey.gsp,
BatchKey.gsp_solar_azimuth, BatchKey.gsp_solar_elevation,
]:
assert key in sample

for nwp_source in ["ukv"]:
Expand All @@ -48,6 +51,9 @@ def test_pvnet(pvnet_config_filename):
assert sample[BatchKey.nwp]["ukv"][NWPBatchKey.nwp].shape == (4, 1, 2, 2)
# 3 hours of 30 minute data (inclusive)
assert sample[BatchKey.gsp].shape == (7,)
# Solar angles have same shape as GSP data
assert sample[BatchKey.gsp_solar_azimuth].shape == (7,)
assert sample[BatchKey.gsp_solar_elevation].shape == (7,)



0 comments on commit 3f64342

Please sign in to comment.