API Reference

API Reference#

This page provides an auto-generated summary of xbitinfo’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

xbitinfo#

get_bitinformation(ds[, dim, axis, label, ...])

Wrap BitInformation.jl.bitinformation().

get_keepbits(info_per_bit[, inflevel])

Get the number of mantissa bits to keep.

get_prefect_flow([paths])

Create prefect.Flow for paths to be:

Bitrounding#

xr_bitround(da, keepbits)

Apply bitrounding based on keepbits from xbitinfo.xbitinfo.get_keepbits() for xarray.Dataset or xarray.DataArray wrapping numcodecs.bitround

jl_bitround(da, keepbits)

Apply bitrounding based on keepbits from xbitinfo.xbitinfo.get_keepbits() for xarray.Dataset or xarray.DataArray wrapping BitInformation.jl.round.

bitround_along_dim(ds, info_per_bit, dim[, ...])

Apply bitrounding on slices along dim based on inflevels.

Save compressed#

get_chunksizes(da[, for_cdo, time_dim, chunks])

Get chunksizes for xarray.DataArray for to_netcdf(encoding) from original file.

ToCompressed_Netcdf(xarray_obj)

Save to compressed netcdf wrapping xarray.Dataset.to_netcdf() with xbitinfo.save_compressed.get_compress_encoding_nc().

get_compress_encoding_nc(ds[, compression, ...])

Generate encoding for xarray.Dataset.to_netcdf().

ToCompressed_Zarr(xarray_obj)

Save to compressed zarr wrapping xarray.Dataset.to_zarr() with xbitinfo.save_compressed.get_compress_encoding_zarr().

get_compress_encoding_zarr(ds[, compressor])

Generate encoding for xarray.Dataset.to_zarr().

Graphics#

plot_bitinformation(bitinfo[, cmap, crop])

Plot bitwise information content as in Klöwer et al. 2021 Figure 2.

plot_distribution(ds[, nbins, cmap, offset, ...])

Plot statistical distributions of all variables as in Klöwer et al. 2021 Figure SI 1.

add_bitinfo_labels(da, info_per_bit[, ...])

Helper function for visualization of Figure 3 in Klöwer et al. 2021.