RawFile¶
-
class
mpdaf.drs.
RawFile
(filename)[source]¶ Bases:
object
RawFile class manages input/output for raw FITS file.
Parameters: filename : str
The raw FITS file name.
Attributes
filename (str) The raw FITS file name. None if any. channels (dict) List of extension (extname,Channel) primary_header ( astropy.io.fits.Header
) The primary headernx (int) Lengths of data in X ny (int) Lengths of data in Y next (int) Number of extensions Methods Summary
get_channel
(extname)Return a Channel object. get_channels_extname_list
()Return the list of existing channels names. get_keywords
(key)Return the keyword value. info
()Print information. plot
([title, channels, area, scale, vmin, …])Plot the raw images. plot_white_image
([mask, channels])Reconstructs the white image of the FOV using a mask file and plots this image. reconstruct_white_image
([mask, channels])Reconstructs the white image of the FOV using a mask file. Methods Documentation
-
get_channel
(extname)[source]¶ Return a Channel object.
Parameters: extname : str
The extension name.
Returns: out :
mpdaf.drs.Channel
-
plot
(title=None, channels='all', area=None, scale='linear', vmin=None, vmax=None, zscale=False, colorbar=None, figsize=None, **kwargs)[source]¶ Plot the raw images.
Parameters: title : str
Figure title (None by default).
channels : list or ‘all’
List of channel names. All by default.
area : list
list of pixels
[pmin,pmax,qmin,qmax]
to zoom.scale : str
‘linear’ | ‘log’ | ‘sqrt’ | ‘arcsinh’ | ‘power’ The stretch function to use for the scaling (default is ‘linear’).
vmin : float
Minimum pixel value to use for the scaling. If None, vmin is set to min of data.
vmax : float
Maximum pixel value to use for the scaling. If None, vmax is set to max of data.
zscale : bool
If true, vmin and vmax are computed using the IRAF zscale algorithm.
colorbar : str
If ‘h’/’v’, a horizontal/vertical colorbar is added.
figsize: tuple
width, height of the figure.
kwargs : dict
Additional options passed to
Image.plot
.
-
plot_white_image
(mask=None, channels='all')[source]¶ Reconstructs the white image of the FOV using a mask file and plots this image.
Parameters: mask : str
Mask used to extract the data for each slice. Must be a FITS file with one extension per channel, and extension names which match the ones from the raw file. Defaults to
PAE_July2013.fits.gz
which comes with Mpdaf.channels : list or ‘all’
List of channel names. All by default.
-
reconstruct_white_image
(mask=None, channels='all')[source]¶ Reconstructs the white image of the FOV using a mask file.
Parameters: mask : str
Mask used to extract the data for each slice. Must be a FITS file with one extension per channel, and extension names which match the ones from the raw file. Defaults to
PAE_July2013.fits.gz
which comes with Mpdaf.channels : list or ‘all’
List of channel names. All by default.
Returns:
-