image package


image.image module

class image.image.Image(filename='', data=None, ivar=None, chisq=None, header=SIMPLE = T / conforms to FITS standard BITPIX = 8 / array data type NAXIS = 0 / number of array dimensions EXTEND = T, extrahead=None, reads=None, flags=None)[source]

Image is the basic class for raw and partially reduced CHARIS data. It must have at least the following boolean attribute references:

self.destriped (default False) self.flatfielded (default False)
It must have at least the following other attribute references: (default None) self.ivar (default None) self.header (default None), self.ivar, and self.header should be numpy ndarrays, which can be read from and written to a fits file with the load and write methods. If not ndarrays, they should be None.

Image may be initialized with the name of the raw file to read, through a call to Image.load().

Image initialization


filename: string

Name of input file

data: ndarray

Numpy ndarray containing your data. Can be multi-dimensional.

ivar: ndarray

Numpy ndarray containing the inverse variance of the data. Should be same shape as data

chisq: ndarray

Numpy ndarray containing chisq value for each ramp fit to the data. Should be same shape as data

header: `PrimaryHDU` header

Empty header instance

extraheader: `PrimaryHDU` header

Placeholder for header from original ramp

reads: ndarray

flags: ndarray


Read the first HDU with data from filename into, and HDU[0].header into self.header. If there is more than one HDU with data, attempt to read the second HDU with data into self.ivar.


filename: string

Name of input file

loadbadpixmap: boolean

When True, loads the bad pixel map at calibrations/mask.fits

write(outfilename, clobber=True)[source]

Creates a primary HDU using and self.header, and attempts to write to outfilename. If self.ivar is not None, append self.ivar as a second HDU before writing to a file. clobber is provided as a keyword to fits.HDUList.writeto.


filename: string

Name of destination file

clobber: boolean

When True, overwrites if file already exists

image.psflet module

class image.psflet.PSFlet(size, mode='Gaussian')[source]

Class PSFlet

add_psflet(y, x, lam)[source]

image.testcases module

class image.testcases.ImageTests(methodName='runTest')[source]


Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.


Module contents