ftsdata.hdf5_ftsdata_writer

ftsdata.hdf5_ftsdata_writer(fts_data, filename, mode='w', file_kwargs=None, dset_mask='MASK', dset_uncertainty='UNCERT', dset_hits='HITS', dset_flags=None, wcs_relax=True, key_uncertainty_type='UTYPE', planes=['XY', 'XYZ', 'Z'], percentiles_num=100, mip_levels=None, permuted=None, dtype='float32', **kwargs)[source]

Write an FTSData object to an IDIA HDF5 file.

Parameters:
filenamestr

Name of the HDF5 file to write.

modestr

the open mode for the h5py.File object, by default ‘w’

file_kwargs, dict, optionnal

additionnal keyword for h5py.File object, by default None

dset_mask, dset_uncertainty, dset_flags, dset_hitsstr or None, optional

If it is a string append this attribute to the dataset dictionnary as ndarray. Flags are not supported at this time. If None this attribute is not appended. Default is 'MASK' for mask, 'UNCERT' for uncertainty, 'HITS' for hits and None for flags.

wcs_relaxbool

Value of the relax parameter to use in converting the WCS to a FITS header using to_header. The common CTYPE RA---TAN-SIP and DEC--TAN-SIP requires relax=True for the -SIP part of the CTYPE to be preserved.

key_uncertainty_typestr, optional

The header key name for the class name of the uncertainty (if any) that is used to store the uncertainty type in the uncertainty hdu. Default is UTYPE.

planes: list of str

list of planes on which we retrieve statistic, default (‘XY’, ‘XYZ’, ‘Z’). See Notes

percentiles_num: int

number of percentiles for the returned statistic, default 100

mip_level: list of int, optionnal

list of ‘Multum In Parvo’ level to be returned, must be of power of 2, default None

permuted: list of str, optionnal

list of permuttation plane to be returned, default None

dtype: str

dataset dtype, default float32

**kwargs

additionnal keyword argument for the h5py.Dataset, see Note

Notes

Usual kwargs could be : kwargs={‘chunks’: True, ‘compression’: “gzip”, ‘compression_opts’:9, ‘shuffle’:True} However, the best compromise in perfomance/size on disk is obtained with kwargs=hdf5plugin.Bitshuffle()