aotpy.io.fits package
Submodules
aotpy.io.fits.compat module
aotpy.io.fits.reader module
aotpy.io.fits.utils module
This module contains classes and functions that aid in handling AOT FITS files.
- class aotpy.io.fits.utils.FITSFileImage(path: str | PathLike, index: int | None = None, *, read_data=True, **kwargs)[source]
Bases:
_FITSExternalImageDescribes an external FITS file present locally, containing multidimensional data and metadata related to it.
FITSFileImage remembers the path from which the data came from, enabling future referencing of that path.
- Parameters:
path – Path to FITS file that contains multidimensional data.
index (int, optional) – Index of the HDU that contains the image data. If omitted, the first HDU containing image data is assumed.
**kwargs – Keyword arguments passed on as options to the file handling function.
- class aotpy.io.fits.utils.FITSURLImage(url: str, index: int | None = None, *, read_data=True, **kwargs)[source]
Bases:
_FITSExternalImageDescribes an external FITS file available via URL, containing multidimensional data and metadata related to it.
FITSURLImage remembers the URL from which the data came from, enabling future referencing of that URL.
- Parameters:
url – URL to FITS file that contains multidimensional data.
index (int, optional) – Index of the HDU that contains the image data. If omitted, the first HDU containing image data is assumed.
**kwargs – Keyword arguments passed on as options to the file handling function.
- aotpy.io.fits.utils.card_from_metadatum(md: Metadatum) Card[source]
Get Card from Metadatum.
- Parameters:
md – Metadatum to convert to Card.
- aotpy.io.fits.utils.image_from_fits_file(path: str | PathLike, index: int | None = None, *, name: str | None = None, **kwargs) Image[source]
Get Image from FITS file specified on path or URL.
- Parameters:
path – Path/URL to FITS file that contains multidimensional data.
index (int, optional) – Index of the HDU that contains the image data. If omitted, the first HDU containing image data is assumed.
name (str, optional) – Name of the Image. If None, the name is the same as in the file.
**kwargs – Keyword arguments passed on as options to the file handling function.
- aotpy.io.fits.utils.image_from_hdu(hdu: ImageHDU, *, name: str | None = None) Image[source]
Get Image from specified HDU.
- Parameters:
hdu – HDU from which Image is to be extracted.
name (str, optional) – Name of the Image. If None, the name is the same as in the HDU.
- aotpy.io.fits.utils.image_from_hdus(hdus: HDUList, index: int | None = None, *, name: str | None = None) Image[source]
Get Image from specified path or URL.
- Parameters:
hdus – List of HDUs from which Image is to be extracted.
index (int, optional) – Index of the HDU that contains the image data. If omitted, the first HDU containing image data is assumed.
name (str, optional) – Name of the Image. If None, the name is the same as in the HDU.
aotpy.io.fits.writer module
This module contains classes and functions that enable writing AOT FITS files.
- class aotpy.io.fits.writer.AOTFITSWriter(system: AOSystem)[source]
Bases:
SystemWriter
Module contents
A package for handling FITS files using the AOT format.