astro.instrument.ChipLayout (version @(#)$Revision: 1.15 $)
index
/astro-wise/AWEHOME/AWBASE/astro/instrument/ChipLayout.py

 
Modules
       
numpy
pylab

 
Classes
       
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.

 
class ChipLayoutError(exceptions.Exception)
    
Method resolution order:
ChipLayoutError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x719220>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
Functions
       
plot_chip(panel)
Plot an entire chip including prescan/overscan regions
plot_region(panel)
Plot a region like a chip or prescan/overscan region

 
Data
        __version__ = '@(#)$Revision: 1.15 $'