create
- astrodata.create(*args, **kwargs)[source]
Return an
AstroData
object from data.- Parameters:
phu (fits.PrimaryHDU or fits.Header or dict or list) – FITS primary HDU or header, or something that can be used to create a fits.Header (a dict, a list of “cards”).
extensions (list of HDUs) – List of HDU objects.
- Returns:
An AstroData instance.
- Return type:
astrodata.AstroData
- Raises:
ValueError – If
phu
is not a valid object.
Example
>>> from astrodata import create >>> ad = create(phu=fits.PrimaryHDU(), extensions=[fits.ImageHDU()])