Image¶
This module contains the Image abstract class, with the SDSS and SDSS-LSST class that inherit from it. The Image abstract class is meant to be a base class for future expansion of the code for other sources of images. The SDSS image class should function as a catch all for any source of FITS images, not just SDSS images. All that is needed to use the SDSS image class is a FITS image and a RA, and DEC value to pinpoint the object of interest.
The LSST image class for now only works with SDSS images in a certain folder structure. However, this is provided in order to help any future developers
This package can be extended by sub classing Image and implementing the required methods, and _IMAGE_TYPE.
-
class
pawlikMorphLSST.Image.
Image
(filename=None) Abstract base class for images
-
abstract
getHeader
()
-
abstract
getImage
()
-
abstract
-
pawlikMorphLSST.Image.
readImage
(filename: str, ra: float, dec: float, npix=128, header=False) - Helper function that can be used to read images directly without need
to manually create Image class.
- Parameters
filename (sty) – location of image to read
ra (float) – RA, right ascension of object of interest in image
dec (float) – DEC, declination of object of interest in image
npix (int, optional) – Size of cutout to return from larger image. Default is 128
header (bool, optional) – If true return header information as well. Default is False
- Returns
img (np.ndarray, 2D, float) – Cutout image.
If header=True then also returns the header from the FITS file.
-
class
pawlikMorphLSST.Image.
sdssImage
(*args, **kwargs) Class for SDSS images, as ingested by standard ‘method’
-
getHeader
() → astropy.io.fits.header.Header Returns the image header
- Returns
self.header – The header for the cutout.
- Return type
astropy.io.fits.Header
-
getImage
() → numpy.ndarray Returns the cutout image
- Returns
self.image – The cutout image centered on the view provided in setview.
- Return type
np.ndarray, float (2D)
-
setView
(ra=None, dec=None, npix=128) - Get the correct view in larger image, and create the cutout on the
correct view
- Parameters
ra (float) – RA position
dec (float) – DEC position
npix (int) – Size to make cutout
-
-
class
pawlikMorphLSST.Image.
lsstImage
(*args, **kwargs) Class for SDSS images ingested via LSST dataButler.
Some metadata not available, this includes wcs, and pixel value conversion information (bscale, bzero etc). Shouldn’t really recreate butler on each image call…
This code is far from the optimal way to read images. https://github.com/LSSTScienceCollaborations/StackClub
The above source maybe of help for future developer.
-
getHeader
()
-
getImage
()
-
setView
(ra, dec, run, camCol, field, filter='r', npix=128)
-