combine¶
combine
¶
Combine multiple cfdb datasets into a single output file.
combine(datasets, output_path, sel=None, overlap='last', compression=None, compression_level=None, include_data_vars=None, exclude_data_vars=None)
¶
Combine multiple cfdb datasets into a single output file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
datasets
|
list
|
List of file paths (str/Path) or open Dataset objects. |
required |
output_path
|
str or Path
|
Path for the new combined cfdb file. |
required |
sel
|
dict or None
|
Location-based selection applied to each input dataset before combining. Works like Dataset.select_loc(). Keys are coordinate names, values are slices or values for location-based indexing. |
None
|
overlap
|
str
|
How to handle data variables when there are overlapping coordinate values: - 'last': last dataset wins (default, most performant) - 'first': first dataset wins (skip if data already written) - 'error': raise ValueError on overlap |
'last'
|
compression
|
str or None
|
Compression algorithm ('zstd' or 'lz4'). Inherited from first dataset if None. |
None
|
compression_level
|
int or None
|
Compression level. Inherited from first dataset if None. |
None
|
include_data_vars
|
list or None
|
Only include these data variables. |
None
|
exclude_data_vars
|
list or None
|
Exclude these data variables. |
None
|
Returns:
| Type | Description |
|---|---|
Dataset
|
The output dataset (open for reading and writing). |