prose.Image.__init__#
- Image.__init__(fitspath=None, data=None, header=None, verbose=True, telescope=None, **kwargs)#
Object containing image data and metadata
When a FITS path (or header) is provided, keyword values are used to identify and instantiate a
Telescopeobject. Image attributes then use this object to retrieve specific image information such as ra, dec, untis… etc- Parameters:
fitspath (str or Path, optional) – file path , by default None
data (numpy.ndarray, optional) – image data, by default None
header (dict-like, optional) – image metadata, by default None
Example
from prose.tutorials import image_sample # loading and showing an example image image = image_sample("05 38 44.851", "+04 32 47.68") image.show()
[38;5;12mINFO[0m Querying https://archive.stsci.edu/cgi-bin/dss_form
<Axes: >
image.header[0:10] # the 10 first lines
SIMPLE = T /FITS: Compliance BITPIX = 16 /FITS: I*2 Data NAXIS = 2 /FITS: 2-D Image Data NAXIS1 = 713 /FITS: X Dimension NAXIS2 = 714 /FITS: Y Dimension EXTEND = T /FITS: File can contain extensions DATE = '2023-04-14 ' /FITS: Creation Date ORIGIN = 'STScI/MAST' /GSSS: STScI Digitized Sky Survey SURVEY = 'POSSI-O ' /GSSS: Sky Survey REGION = 'XO538 ' /GSSS: Region Name
Once this object is instantiated, its parameters are mapped to the ones of the telescope, detected from the header information. This exposes conveniant attributres, for example:
print(f"pixel scale : {image.pixel_scale:.2f}\nFOV: {image.fov}\nnight: {image.night_date}\n")
pixel scale : 1.01 arcsec FOV: [0.20003263 0.20031318] deg night: 1955-11-22
some of them being directly translated into astropy Quantity or datetime object.