utils

module of dascore.io source

Shared utilities for IO implementations.

Functions

Name Description
build_patches Trim a data source to a selection and build the resulting patch list.
convert_attr_units Convert one attr to the units patch attrs use, dropping the file’s units.
drop_blank_attrs Drop the named attrs whose value is blank, in place.
get_attr_names Return the attr names a reader’s attr class accepts from a file header.
get_exact_coord Return an exact coordinate, including for non-monotonic values.
get_gridded_coord Return a stored coordinate array forced onto an even grid.
resolve_keyed_source Return the one source a source_patch_key names.
slice_dataset Read the sample windows of an array stored in dims order.
windows_to_slices Turn FiberIO.read_array windows into one slice per dimension.