ism3d.utils.io.dct2fits

ism3d.utils.io.dct2fits(dct, outname='dct2fits')[source]

save a non-nested dictionary into a FITS binary table note: not every Python object can be dumped into a FITS column,

e.g. a dictionary type can be aded into a column of a astropy/Table, but the Table can’be saved into FITS.

example:

gmake.dct2fits(dat_dct,save_npy=True)

for npy np.save(outname.replace(‘.fits’,’.npy’),dct)

note: we decide to save dct to HDF5 by default for a couple of reasons from now.

FITS is always stored in big-endian byte order, will cause some troubles with casacore/galario I/O performance is worse The “table” approach doesn’t support nesting / DatType may changed during the dct2fits->fits2dct process