| | |
- CCD
- ChipLayout
- exceptions.Exception(exceptions.BaseException)
-
- ChipLayoutError
class CCD |
| |
Describe the properties of a CCD such as name and geometry, both in the
focal plane and projected on the sky. |
| |
Methods defined here:
- __init__(self, name=None, naxis=[0, 0], crval=[0, 0], crpix=[0, 0], cd=[0, 0, 0, 0])
- construct_pc_matrix(self)
- set_cd(self)
- set_cd_matrix(self)
- set_crpix(self)
- set_crpix_matrix(self)
- set_crval(self)
- set_crval_matrix(self)
- set_naxis(self)
- set_naxis_matrix(self)
- set_properties(self)
- translate_crpix(self)
- translate_naxis(self)
|
class ChipLayout |
| | |
Methods defined here:
- __init__(self, instrument_id, chip_config=None, chip_list=None, highlight=[], prescan=True, overscan=True, center=True, pad=0.050000000000000003)
- ChipLayout constructor. The instrument is required, chip_config is
optional and defaults to the base chip configuration with
multi-config instruments (it is ignored for non-multi-config
instruments), overscan and pad are also optional.
instrument_id: canonical name of the instrument
chip_config: chip configuration key (0..n)
chip_list: list of chip names to be plotted (defaults to all
chip names for the selected instrument)
highlight: list of chip names to highlight with respect to
all the other chips plotted (defaults to no chips
highlighted)
prescan: plot prescan regions
overscan: plot overscan regions
center: plot the center position
pad: percentage to pad the axes with blank space beyond
any data regions
Examples:
awe> from astro.instrument.ChipLayout import ChipLayout
awe> cl = ChipLayout('SUP', 2, pad=0.2)
awe> cl.show()
awe> cl = ChipLayout('WFI', chip_list=['ccd50', 'ccd52'], prescan=0)
awe> cl.show()
awe> ChipLayout('WFC', prescan=0, overscan=0).show()
- create(self, show=False, filename='')
- Method to create the mosaic (chip layout) of any supported instrument.
This function plots the mosaic of a given instrument as it should
appear in a viewer. Typically, the plot should also be valid on the
sky (with North up and East to the left), but this depends on the
state of the translator for a given instrument. The translator
specifies a very specific configuation of the instrument which may not
be anything like a given exposure mosaic.
The plot consists of a schematic representation of the science region
of each chip in black lines with the reference pixel (1,1) denoted by a
black square. The center of the mosaic (e.g., pointing center or
optical axis) is denoted by a red `x' symbol (this actually denotes
the origin of the CRPIXn values). Each chip's name is printed in its
center. If the overscan switch was set (default), the chip's prescan
regions are plotted in magenta lines and the chip's overscan regions
are plotted in blue lines.
NOTE: The reference pixel does not necessarily mark the read direction
of a given chip. Look at the astro.main.Chip module for
explaination of the orientation with respect to read direction
and astro.instrument.HeaderTranslator<instrument_id> for the
specific orientations of each chip of your instrument.
TODO: - Possibly add support to ignore all focal-plane geometries
(translations and rotations) and plot chips as they are seen as
individual data arrays (i.e., single-extension FITS image in a
viewer). This would allow comparison of chips to each other and
to itself in a viewer.
- Also, plot chip layouts of more than one configuration on
multi-config instruments to compare how the apparent focal
plane changes.
- save(self, filename)
- Method to save the plot of the chip layout.
This method simply calls the create() method with PyLab's interactive
mode off and saves the resulting plot.
- show(self)
- Method to show the plot of the mosaic (chip layout) of any supported
instrument.
This method simply calls the create(show=True) method with PyLab's
interactive mode on.
|
|