Skip to content
Snippets Groups Projects
Commit 98ad1370 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Implemented generic computation of anomalies on arbitrary time-scale.

parent a3672cc0
No related branches found
No related tags found
No related merge requests found
...@@ -250,9 +250,7 @@ class EoDataset(torch.utils.data.Dataset): ...@@ -250,9 +250,7 @@ class EoDataset(torch.utils.data.Dataset):
# standardized anomaly = (x(t) - mean(x, t)) / std(x, t) # standardized anomaly = (x(t) - mean(x, t)) / std(x, t)
if standard: if standard:
anomalies[time] = (anomalies[time] / anomalies[time] /= ds.isel(time=time_scale).std(dim='time')
ds.isel(time=time_scale).std(dim='time')
)
# concatenate anomalies and sort chronologically # concatenate anomalies and sort chronologically
anomalies = xr.concat(anomalies.values(), dim='time') anomalies = xr.concat(anomalies.values(), dim='time')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment