arrakis.utils.fitsutils ======================= .. py:module:: arrakis.utils.fitsutils .. autoapi-nested-parse:: FITS utilities .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: arrakis.utils.fitsutils.fix_header arrakis.utils.fitsutils.getfreq arrakis.utils.fitsutils.head2dict Module Contents --------------- .. py:function:: fix_header(cutout_header: astropy.io.fits.Header, original_header: astropy.io.fits.Header) -> astropy.io.fits.Header Make cutout header the same as original header :Parameters: * **cutout_header** (*fits.Header*) -- Cutout header * **original_header** (*fits.Header*) -- Original header :returns: Fixed header :rtype: fits.Header .. !! processed by numpydoc !! .. py:function:: getfreq(cube: str | pathlib.Path, outdir: pathlib.Path | None = None, filename: str | pathlib.Path | None = None) -> astropy.units.Quantity | tuple[astropy.units.Quantity, pathlib.Path] Get list of frequencies from FITS data. Gets the frequency list from a given cube. Can optionally save frequency list to disk. :Parameters: **cube** (*str*) -- File to get spectral axis from. Kwargs: outdir (str): Where to save the output file. If not given, data will not be saved to disk. filename (str): Name of frequency list file. Requires 'outdir' to also be specified. :returns: Frequencies of each channel in the input cube. :rtype: freq (list) .. !! processed by numpydoc !! .. py:function:: head2dict(h: astropy.io.fits.Header) -> dict[str, Any] Convert FITS header to a dict. Writes a cutout, as stored in source_dict, to disk. The file location should already be specified in source_dict. This format is intended for parallel use with pool.map syntax. :Parameters: **h** -- An astropy FITS header. :returns: The FITS head converted to a dict. :rtype: data (dict) .. !! processed by numpydoc !!