anemoi-datasets 0.5.23__py3-none-any.whl → 0.5.25__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anemoi/datasets/_version.py +2 -2
- anemoi/datasets/commands/finalise-additions.py +2 -1
- anemoi/datasets/commands/finalise.py +2 -1
- anemoi/datasets/commands/init-additions.py +2 -1
- anemoi/datasets/commands/load-additions.py +2 -1
- anemoi/datasets/commands/load.py +2 -1
- anemoi/datasets/create/__init__.py +24 -33
- anemoi/datasets/create/input/__init__.py +0 -20
- anemoi/datasets/create/sources/accumulations.py +7 -6
- anemoi/datasets/create/sources/grib.py +1 -1
- anemoi/datasets/create/sources/patterns.py +1 -1
- anemoi/datasets/data/dataset.py +29 -0
- anemoi/datasets/data/misc.py +74 -16
- anemoi/datasets/data/observations/__init__.py +316 -0
- anemoi/datasets/data/observations/legacy_obs_dataset.py +200 -0
- anemoi/datasets/data/observations/multi.py +64 -0
- anemoi/datasets/data/padded.py +227 -0
- anemoi/datasets/data/records/__init__.py +442 -0
- anemoi/datasets/data/records/backends/__init__.py +157 -0
- anemoi/datasets/data/subset.py +5 -0
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/METADATA +3 -3
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/RECORD +26 -20
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/WHEEL +1 -1
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/entry_points.txt +0 -0
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/licenses/LICENSE +0 -0
- {anemoi_datasets-0.5.23.dist-info → anemoi_datasets-0.5.25.dist-info}/top_level.txt +0 -0
anemoi/datasets/_version.py
CHANGED
anemoi/datasets/commands/load.py
CHANGED
|
@@ -44,7 +44,7 @@ from .check import check_data_values
|
|
|
44
44
|
from .chunks import ChunkFilter
|
|
45
45
|
from .config import build_output
|
|
46
46
|
from .config import loader_config
|
|
47
|
-
from .input import
|
|
47
|
+
from .input import InputBuilder
|
|
48
48
|
from .statistics import Summary
|
|
49
49
|
from .statistics import TmpStatistics
|
|
50
50
|
from .statistics import check_variance
|
|
@@ -101,7 +101,9 @@ def json_tidy(o: Any) -> Any:
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def build_statistics_dates(
|
|
104
|
-
dates: list[datetime.datetime],
|
|
104
|
+
dates: list[datetime.datetime],
|
|
105
|
+
start: Optional[datetime.datetime],
|
|
106
|
+
end: Optional[datetime.datetime],
|
|
105
107
|
) -> tuple[str, str]:
|
|
106
108
|
"""Compute the start and end dates for the statistics.
|
|
107
109
|
|
|
@@ -551,36 +553,16 @@ class HasElementForDataMixin:
|
|
|
551
553
|
|
|
552
554
|
self.output = build_output(config.output, parent=self)
|
|
553
555
|
|
|
554
|
-
self.input =
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
The main configuration.
|
|
565
|
-
output_config : Any
|
|
566
|
-
The output configuration.
|
|
567
|
-
|
|
568
|
-
Returns
|
|
569
|
-
-------
|
|
570
|
-
Any
|
|
571
|
-
The input builder.
|
|
572
|
-
"""
|
|
573
|
-
builder = build_input(
|
|
574
|
-
main_config.input,
|
|
575
|
-
data_sources=main_config.get("data_sources", {}),
|
|
576
|
-
order_by=output_config.order_by,
|
|
577
|
-
flatten_grid=output_config.flatten_grid,
|
|
578
|
-
remapping=build_remapping(output_config.remapping),
|
|
579
|
-
use_grib_paramid=main_config.build.use_grib_paramid,
|
|
580
|
-
)
|
|
581
|
-
LOG.debug("✅ INPUT_BUILDER")
|
|
582
|
-
LOG.debug(builder)
|
|
583
|
-
return builder
|
|
556
|
+
self.input = InputBuilder(
|
|
557
|
+
config.input,
|
|
558
|
+
data_sources=config.get("data_sources", {}),
|
|
559
|
+
order_by=self.output.order_by,
|
|
560
|
+
flatten_grid=self.output.flatten_grid,
|
|
561
|
+
remapping=build_remapping(self.output.remapping),
|
|
562
|
+
use_grib_paramid=config.build.use_grib_paramid,
|
|
563
|
+
)
|
|
564
|
+
LOG.debug("✅ INPUT_BUILDER")
|
|
565
|
+
LOG.debug(self.input)
|
|
584
566
|
|
|
585
567
|
|
|
586
568
|
class Init(Actor, HasRegistryMixin, HasStatisticTempMixin, HasElementForDataMixin):
|
|
@@ -1541,7 +1523,16 @@ class Statistics(Actor, HasStatisticTempMixin, HasRegistryMixin):
|
|
|
1541
1523
|
if not all(self.registry.get_flags(sync=False)):
|
|
1542
1524
|
raise Exception(f"❗Zarr {self.path} is not fully built, not writing statistics into dataset.")
|
|
1543
1525
|
|
|
1544
|
-
for k in [
|
|
1526
|
+
for k in [
|
|
1527
|
+
"mean",
|
|
1528
|
+
"stdev",
|
|
1529
|
+
"minimum",
|
|
1530
|
+
"maximum",
|
|
1531
|
+
"sums",
|
|
1532
|
+
"squares",
|
|
1533
|
+
"count",
|
|
1534
|
+
"has_nans",
|
|
1535
|
+
]:
|
|
1545
1536
|
self.dataset.add_dataset(name=k, array=stats[k], dimensions=("variable",))
|
|
1546
1537
|
|
|
1547
1538
|
self.registry.add_to_history("compute_statistics_end")
|
|
@@ -104,23 +104,3 @@ class InputBuilder:
|
|
|
104
104
|
Trace string.
|
|
105
105
|
"""
|
|
106
106
|
return f"InputBuilder({group_of_dates})"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def build_input(config: dict, data_sources: Union[dict, list], **kwargs: Any) -> InputBuilder:
|
|
110
|
-
"""Build an InputBuilder instance.
|
|
111
|
-
|
|
112
|
-
Parameters
|
|
113
|
-
----------
|
|
114
|
-
config : dict
|
|
115
|
-
Configuration dictionary.
|
|
116
|
-
data_sources : Union[dict, list]
|
|
117
|
-
Data sources.
|
|
118
|
-
**kwargs : Any
|
|
119
|
-
Additional keyword arguments.
|
|
120
|
-
|
|
121
|
-
Returns
|
|
122
|
-
-------
|
|
123
|
-
InputBuilder
|
|
124
|
-
An instance of InputBuilder.
|
|
125
|
-
"""
|
|
126
|
-
return InputBuilder(config, data_sources, **kwargs)
|
|
@@ -459,12 +459,13 @@ class AccumulationFromStart(Accumulation):
|
|
|
459
459
|
A tuple representing the MARS date-time step.
|
|
460
460
|
"""
|
|
461
461
|
assert user_date is None, user_date
|
|
462
|
-
assert not frequency, frequency
|
|
463
462
|
|
|
464
463
|
steps = (step1 + add_step, step2 + add_step)
|
|
465
464
|
if steps[0] == 0:
|
|
466
465
|
steps = (steps[1],)
|
|
467
466
|
|
|
467
|
+
assert frequency == 0 or frequency == (step2 - step1), frequency
|
|
468
|
+
|
|
468
469
|
return (
|
|
469
470
|
base_date.year * 10000 + base_date.month * 100 + base_date.day,
|
|
470
471
|
base_date.hour * 100 + base_date.minute,
|
|
@@ -824,6 +825,11 @@ def _compute_accumulations(
|
|
|
824
825
|
step1, step2 = user_accumulation_period
|
|
825
826
|
assert step1 < step2, user_accumulation_period
|
|
826
827
|
|
|
828
|
+
if accumulations_reset_frequency is not None:
|
|
829
|
+
AccumulationClass = AccumulationFromLastReset
|
|
830
|
+
else:
|
|
831
|
+
AccumulationClass = AccumulationFromStart if data_accumulation_period in (0, None) else AccumulationFromLastStep
|
|
832
|
+
|
|
827
833
|
if data_accumulation_period is None:
|
|
828
834
|
data_accumulation_period = user_accumulation_period[1] - user_accumulation_period[0]
|
|
829
835
|
|
|
@@ -838,11 +844,6 @@ def _compute_accumulations(
|
|
|
838
844
|
|
|
839
845
|
base_times = [t // 100 if t > 100 else t for t in base_times]
|
|
840
846
|
|
|
841
|
-
if accumulations_reset_frequency is not None:
|
|
842
|
-
AccumulationClass = AccumulationFromLastReset
|
|
843
|
-
else:
|
|
844
|
-
AccumulationClass = AccumulationFromStart if data_accumulation_period in (0, None) else AccumulationFromLastStep
|
|
845
|
-
|
|
846
847
|
mars_date_time_steps = AccumulationClass.mars_date_time_steps(
|
|
847
848
|
dates=dates,
|
|
848
849
|
step1=step1,
|
|
@@ -124,7 +124,7 @@ def execute(
|
|
|
124
124
|
dates = [d.isoformat() for d in dates]
|
|
125
125
|
|
|
126
126
|
for path in given_paths:
|
|
127
|
-
paths = Pattern(path
|
|
127
|
+
paths = Pattern(path).substitute(*args, date=dates, allow_extra=True, **kwargs)
|
|
128
128
|
|
|
129
129
|
for name in ("grid", "area", "rotation", "frame", "resol", "bitmap"):
|
|
130
130
|
if name in kwargs:
|
|
@@ -79,6 +79,6 @@ def iterate_patterns(
|
|
|
79
79
|
kwargs["date"] = dates
|
|
80
80
|
|
|
81
81
|
for path in given_paths:
|
|
82
|
-
paths = Pattern(path
|
|
82
|
+
paths = Pattern(path).substitute(allow_extra=True, **kwargs)
|
|
83
83
|
for path in _expand(paths):
|
|
84
84
|
yield path, dates
|
anemoi/datasets/data/dataset.py
CHANGED
|
@@ -179,6 +179,19 @@ class Dataset(ABC, Sized):
|
|
|
179
179
|
if "start" in kwargs or "end" in kwargs:
|
|
180
180
|
start = kwargs.pop("start", None)
|
|
181
181
|
end = kwargs.pop("end", None)
|
|
182
|
+
padding = kwargs.pop("padding", None)
|
|
183
|
+
|
|
184
|
+
if padding:
|
|
185
|
+
if padding != "empty":
|
|
186
|
+
raise ValueError(f"Only 'empty' padding is supported, got {padding=}")
|
|
187
|
+
from .padded import Padded
|
|
188
|
+
|
|
189
|
+
frequency = kwargs.pop("frequency", self.frequency)
|
|
190
|
+
return (
|
|
191
|
+
Padded(self, start, end, frequency, dict(start=start, end=end, frequency=frequency))
|
|
192
|
+
._subset(**kwargs)
|
|
193
|
+
.mutate()
|
|
194
|
+
)
|
|
182
195
|
|
|
183
196
|
from .subset import Subset
|
|
184
197
|
|
|
@@ -724,6 +737,9 @@ class Dataset(ABC, Sized):
|
|
|
724
737
|
"""Return the grid shape of the dataset."""
|
|
725
738
|
return (self.shape[-1],)
|
|
726
739
|
|
|
740
|
+
def empty_item(self) -> NDArray[Any]:
|
|
741
|
+
return np.zeros((*self.shape[1:-1], 0), dtype=self.dtype)
|
|
742
|
+
|
|
727
743
|
def _check(self) -> None:
|
|
728
744
|
"""Check for overridden private methods in the dataset."""
|
|
729
745
|
common = Dataset.__dict__.keys() & self.__class__.__dict__.keys()
|
|
@@ -1075,3 +1091,16 @@ class Dataset(ABC, Sized):
|
|
|
1075
1091
|
The dataset names.
|
|
1076
1092
|
"""
|
|
1077
1093
|
pass
|
|
1094
|
+
|
|
1095
|
+
def get_latitudes(self, i):
|
|
1096
|
+
return self.get_aux(i)[0]
|
|
1097
|
+
|
|
1098
|
+
def get_longitudes(self, i):
|
|
1099
|
+
return self.get_aux(i)[1]
|
|
1100
|
+
|
|
1101
|
+
def get_timedeltas(self, i):
|
|
1102
|
+
return self.get_aux(i)[2]
|
|
1103
|
+
|
|
1104
|
+
def get_aux(self, i):
|
|
1105
|
+
# need to decide if Fields datasets need to implement this
|
|
1106
|
+
raise NotImplementedError(f"get_aux is not implemented for this dataset, {type(self)}")
|
anemoi/datasets/data/misc.py
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import calendar
|
|
12
12
|
import datetime
|
|
13
13
|
import logging
|
|
14
|
+
import os
|
|
14
15
|
from pathlib import PurePath
|
|
15
16
|
from typing import TYPE_CHECKING
|
|
16
17
|
from typing import Any
|
|
@@ -22,6 +23,7 @@ from typing import Union
|
|
|
22
23
|
|
|
23
24
|
import numpy as np
|
|
24
25
|
import zarr
|
|
26
|
+
from anemoi.utils.config import load_any_dict_format
|
|
25
27
|
from anemoi.utils.config import load_config as load_settings
|
|
26
28
|
from numpy.typing import NDArray
|
|
27
29
|
|
|
@@ -108,7 +110,10 @@ def round_datetime(d: np.datetime64, dates: NDArray[np.datetime64], up: bool) ->
|
|
|
108
110
|
|
|
109
111
|
|
|
110
112
|
def _as_date(
|
|
111
|
-
d: Union[int, str, np.datetime64, datetime.date],
|
|
113
|
+
d: Union[int, str, np.datetime64, datetime.date],
|
|
114
|
+
dates: NDArray[np.datetime64],
|
|
115
|
+
last: bool,
|
|
116
|
+
frequency: Optional[datetime.timedelta] = None,
|
|
112
117
|
) -> np.datetime64:
|
|
113
118
|
"""Convert a date to a numpy datetime64 object, rounding to the nearest date in a list of dates.
|
|
114
119
|
|
|
@@ -120,6 +125,8 @@ def _as_date(
|
|
|
120
125
|
The list of dates.
|
|
121
126
|
last : bool
|
|
122
127
|
Whether to round to the last date.
|
|
128
|
+
frequency : Optional[datetime.timedelta]
|
|
129
|
+
The frequency of the dataset.
|
|
123
130
|
|
|
124
131
|
Returns
|
|
125
132
|
-------
|
|
@@ -142,30 +149,49 @@ def _as_date(
|
|
|
142
149
|
pass
|
|
143
150
|
|
|
144
151
|
if isinstance(d, int):
|
|
152
|
+
delta = frequency
|
|
153
|
+
if delta is None:
|
|
154
|
+
delta = np.timedelta64(1, "s")
|
|
155
|
+
delta = np.timedelta64(delta, "s")
|
|
156
|
+
|
|
145
157
|
if len(str(d)) == 4:
|
|
146
158
|
year = d
|
|
147
159
|
if last:
|
|
148
|
-
|
|
160
|
+
year = year + 1
|
|
161
|
+
npdate = np.datetime64(f"{year:04}-01-01T00:00:00")
|
|
162
|
+
return _as_date(npdate - delta, dates, last, frequency)
|
|
149
163
|
else:
|
|
150
|
-
return _as_date(np.datetime64(f"{year:04}-01-01T00:00:00"), dates, last)
|
|
164
|
+
return _as_date(np.datetime64(f"{year:04}-01-01T00:00:00"), dates, last, frequency)
|
|
151
165
|
|
|
152
166
|
if len(str(d)) == 6:
|
|
153
167
|
year = d // 100
|
|
154
168
|
month = d % 100
|
|
155
169
|
if last:
|
|
156
|
-
|
|
157
|
-
|
|
170
|
+
month = month + 1
|
|
171
|
+
if month > 12:
|
|
172
|
+
month = 1
|
|
173
|
+
year += 1
|
|
174
|
+
npdate = np.datetime64(f"{year:04}-{month:02}-01T00:00:00")
|
|
175
|
+
return _as_date(npdate - delta, dates, last, frequency)
|
|
158
176
|
else:
|
|
159
|
-
return _as_date(np.datetime64(f"{year:04}-{month:02}-01T00:00:00"), dates, last)
|
|
177
|
+
return _as_date(np.datetime64(f"{year:04}-{month:02}-01T00:00:00"), dates, last, frequency)
|
|
160
178
|
|
|
161
179
|
if len(str(d)) == 8:
|
|
162
180
|
year = d // 10000
|
|
163
181
|
month = (d % 10000) // 100
|
|
164
182
|
day = d % 100
|
|
165
183
|
if last:
|
|
166
|
-
|
|
184
|
+
day = day + 1
|
|
185
|
+
if day > calendar.monthrange(year, month)[1]:
|
|
186
|
+
day = 1
|
|
187
|
+
month += 1
|
|
188
|
+
if month > 12:
|
|
189
|
+
month = 1
|
|
190
|
+
year += 1
|
|
191
|
+
npdate = np.datetime64(f"{year:04}-{month:02}-{day:02}T00:00:00")
|
|
192
|
+
return _as_date(npdate - delta, dates, last, frequency)
|
|
167
193
|
else:
|
|
168
|
-
return _as_date(np.datetime64(f"{year:04}-{month:02}-{day:02}T00:00:00"), dates, last)
|
|
194
|
+
return _as_date(np.datetime64(f"{year:04}-{month:02}-{day:02}T00:00:00"), dates, last, frequency)
|
|
169
195
|
|
|
170
196
|
if isinstance(d, str):
|
|
171
197
|
|
|
@@ -201,19 +227,20 @@ def _as_date(
|
|
|
201
227
|
np.datetime64(f"{year:04}-{month:02}-{day:02}T{hour:02}:{minute:02}:{second:02}"),
|
|
202
228
|
dates,
|
|
203
229
|
last,
|
|
230
|
+
frequency,
|
|
204
231
|
)
|
|
205
232
|
|
|
206
233
|
if "-" in d:
|
|
207
234
|
assert ":" not in d
|
|
208
235
|
bits = d.split("-")
|
|
209
236
|
if len(bits) == 1:
|
|
210
|
-
return _as_date(int(bits[0]), dates, last)
|
|
237
|
+
return _as_date(int(bits[0]), dates, last, frequency)
|
|
211
238
|
|
|
212
239
|
if len(bits) == 2:
|
|
213
|
-
return _as_date(int(bits[0]) * 100 + int(bits[1]), dates, last)
|
|
240
|
+
return _as_date(int(bits[0]) * 100 + int(bits[1]), dates, last, frequency)
|
|
214
241
|
|
|
215
242
|
if len(bits) == 3:
|
|
216
|
-
return _as_date(int(bits[0]) * 10000 + int(bits[1]) * 100 + int(bits[2]), dates, last)
|
|
243
|
+
return _as_date(int(bits[0]) * 10000 + int(bits[1]) * 100 + int(bits[2]), dates, last, frequency)
|
|
217
244
|
|
|
218
245
|
if ":" in d:
|
|
219
246
|
assert len(d) == 5
|
|
@@ -225,12 +252,16 @@ def _as_date(
|
|
|
225
252
|
month = first.month
|
|
226
253
|
day = first.day
|
|
227
254
|
|
|
228
|
-
return _as_date(np.datetime64(f"{year:04}-{month:02}-{day:02}T{hour}:00:00"), dates, last)
|
|
255
|
+
return _as_date(np.datetime64(f"{year:04}-{month:02}-{day:02}T{hour}:00:00"), dates, last, frequency)
|
|
229
256
|
|
|
230
257
|
raise NotImplementedError(f"Unsupported date: {d} ({type(d)})")
|
|
231
258
|
|
|
232
259
|
|
|
233
|
-
def as_first_date(
|
|
260
|
+
def as_first_date(
|
|
261
|
+
d: Union[int, str, np.datetime64, datetime.date],
|
|
262
|
+
dates: NDArray[np.datetime64],
|
|
263
|
+
frequency: Optional[datetime.timedelta] = None,
|
|
264
|
+
) -> np.datetime64:
|
|
234
265
|
"""Convert a date to the first date in a list of dates.
|
|
235
266
|
|
|
236
267
|
Parameters
|
|
@@ -239,16 +270,22 @@ def as_first_date(d: Union[int, str, np.datetime64, datetime.date], dates: NDArr
|
|
|
239
270
|
The date to convert.
|
|
240
271
|
dates : NDArray[np.datetime64]
|
|
241
272
|
The list of dates.
|
|
273
|
+
frequency : Optional[datetime.timedelta]
|
|
274
|
+
The frequency of the dataset.
|
|
242
275
|
|
|
243
276
|
Returns
|
|
244
277
|
-------
|
|
245
278
|
np.datetime64
|
|
246
279
|
The first date.
|
|
247
280
|
"""
|
|
248
|
-
return _as_date(d, dates, last=False)
|
|
281
|
+
return _as_date(d, dates, last=False, frequency=frequency)
|
|
249
282
|
|
|
250
283
|
|
|
251
|
-
def as_last_date(
|
|
284
|
+
def as_last_date(
|
|
285
|
+
d: Union[int, str, np.datetime64, datetime.date],
|
|
286
|
+
dates: NDArray[np.datetime64],
|
|
287
|
+
frequency: Optional[datetime.timedelta] = None,
|
|
288
|
+
) -> np.datetime64:
|
|
252
289
|
"""Convert a date to the last date in a list of dates.
|
|
253
290
|
|
|
254
291
|
Parameters
|
|
@@ -257,13 +294,15 @@ def as_last_date(d: Union[int, str, np.datetime64, datetime.date], dates: NDArra
|
|
|
257
294
|
The date to convert.
|
|
258
295
|
dates : NDArray[np.datetime64]
|
|
259
296
|
The list of dates.
|
|
297
|
+
frequency : Optional[datetime.timedelta]
|
|
298
|
+
The frequency of the dataset.
|
|
260
299
|
|
|
261
300
|
Returns
|
|
262
301
|
-------
|
|
263
302
|
np.datetime64
|
|
264
303
|
The last date.
|
|
265
304
|
"""
|
|
266
|
-
return _as_date(d, dates, last=True)
|
|
305
|
+
return _as_date(d, dates, last=True, frequency=frequency)
|
|
267
306
|
|
|
268
307
|
|
|
269
308
|
def _concat_or_join(datasets: List["Dataset"], kwargs: Dict[str, Any]) -> Tuple["Dataset", Dict[str, Any]]:
|
|
@@ -317,6 +356,18 @@ def _open(a: Union[str, PurePath, Dict[str, Any], List[Any], Tuple[Any, ...]]) -
|
|
|
317
356
|
from .stores import Zarr
|
|
318
357
|
from .stores import zarr_lookup
|
|
319
358
|
|
|
359
|
+
if isinstance(a, str) and len(a.split(".")) in [2, 3]:
|
|
360
|
+
|
|
361
|
+
metadata_path = os.path.join(a, "metadata.json")
|
|
362
|
+
if os.path.exists(metadata_path):
|
|
363
|
+
metadata = load_any_dict_format(metadata_path)
|
|
364
|
+
if "backend" not in metadata:
|
|
365
|
+
raise ValueError(f"Metadata for {a} does not contain 'backend' key")
|
|
366
|
+
|
|
367
|
+
from anemoi.datasets.data.records import open_records_dataset
|
|
368
|
+
|
|
369
|
+
return open_records_dataset(a, backend=metadata["backend"])
|
|
370
|
+
|
|
320
371
|
if isinstance(a, Dataset):
|
|
321
372
|
return a.mutate()
|
|
322
373
|
|
|
@@ -454,6 +505,13 @@ def _open_dataset(*args: Any, **kwargs: Any) -> "Dataset":
|
|
|
454
505
|
for a in args:
|
|
455
506
|
sets.append(_open(a))
|
|
456
507
|
|
|
508
|
+
if "observations" in kwargs:
|
|
509
|
+
from .observations import observations_factory
|
|
510
|
+
|
|
511
|
+
assert not sets, sets
|
|
512
|
+
|
|
513
|
+
return observations_factory(args, kwargs).mutate()
|
|
514
|
+
|
|
457
515
|
if "xy" in kwargs:
|
|
458
516
|
# Experimental feature, may be removed
|
|
459
517
|
from .xy import xy_factory
|