Truncate#
- class caput.pipeline.tasklib.io.Truncate[source]#
Bases:
caput.pipeline.tasklib.base.ContainerTaskPrecision truncate data prior to saving with compression.
If no configuration is provided, will look for preset values for the input container. Any properties defined in the config will override the presets.
If available, each specified dataset will be truncated relative to a (specified) weight dataset with the truncation increasing the variance up to the specified maximum in variance_increase. If there is no specified weight dataset then the truncation falls back to using the fixed_precision.
- Attributes:
- dataset
dict[str, bool |float|dict[str,float]] Datasets to be truncated as keys. Possible values are:
bool: Whether or not to truncate, using default fixed precision.float: Truncate to this relative precision.dict: Specify values for weight_dataset, fixed_precision, variance_increase.
- ensure_chunkedbool
If True, ensure datasets are chunked according to their dataset_spec.
- dataset
Methods#
|
Truncate the incoming data. |