utils
Shared utilities for IO implementations.
Functions
| Name | Description |
|---|---|
| cf_time_values | Time labels, decoding CF units such as ‘milliseconds since 2017-09-18’. |
| convert_attr_units | Convert one attr to the units patch attrs use, dropping the file’s units. |
| decode_cf_time |
Decode stored times by the CF units (and calendar) in attrs.
|
| 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. |
| parse_units | Return the unit string if it parses as units, else None (scans don’t crash). |
| require_grid | Refuse dimensions a format stores only as a grid, saying how to make one. |
| resolve_keyed_source | Return the one source a native logical key names. |
| selection_windows | Return bounding array windows and residual coordinate indexers. |
| should_snap | Return whether the all/none or named-coordinate option enables snapping. |
| slice_dataset | Read the positional sample windows of a stored array. |
| step_from_rate | The time step a file states as a sampling rate in Hz. |
| stored_coord |
Return a coordinate a file stores as labels, on a grid if snap names it.
|
| validate_windows |
Return FiberIO.read_array windows, refusing a spelling which is not one.
|
| windows_to_slices |
Turn FiberIO.read_array windows into one slice per axis.
|