from_mult_files#
- classmethod caput.containers.tod.TOData.from_mult_files(files: caput.memdata._memh5.FileLike | collections.abc.Sequence[caput.memdata._memh5.FileLike], data_group: caput.memdata._memh5.GroupLike | None = None, start: int | dict | None = None, stop: int | dict | None = None, datasets: collections.abc.Sequence[str] | None = None, dataset_filter: collections.abc.Callable | None = None, **kwargs: Any) TOData[source]#
Create new data object by concatenating a series of files.
Accepts any parameter supported by
concatenate()(which controls the concatenation) or this class’s constructor (which controls the initialization of each file). By default, each file is opened with ondisk=True and mode=’r’.- Parameters:
- files
FileLike These are assumed to be identical in every way except along the axis representing time, over which they are concatenated. All other data and attributes are simply copied from the first entry of the list.
- data_group
GroupLike Underlying hdf5 like container that will store the data for the BaseData instance.
- start
int|dict, optional In the aggregate datasets at what index to start. Every thing before this index is excluded. If provided as a dict, the keys should be
data_list[0].time_axes.- stop
int|dict, optional In the aggregate datasets at what index to stop. Every thing after this index is excluded. If provided as a dict, the keys should be
data_list[0].time_axes.- datasets
list[str], optional Which datasets to include. Default is all of them.
- dataset_filter
callable(), optional Function for preprocessing all datasets. Useful for changing data types etc. Takes a dataset as an argument and should return a dataset (either h5py or memdata). Optionally may accept a second argument that is slice along the time axis, which the filter should apply.
- **kwargsAny
Other keyword arguments are passed on to the class’s from_file method.
- files
- Returns:
- dataset
TOData Concatenated time-ordered data.
- dataset