IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2006, 5:07:09 PM (20 years ago)
Author:
Paul Price
Message:

In the process of updating the SDRS to match the current implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/modules/ModulesSDRS.tex

    r6434 r6757  
    1 %%% $Id: ModulesSDRS.tex,v 1.75 2006-02-16 18:57:51 eugene Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.76 2006-04-01 03:07:09 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    103103All modules need to load some configuration information defining
    104104parameters which may be configured at run-time.  We break these
    105 parameters down into three levels:
     105parameters down into four levels:
    106106\begin{itemize}
    107107\item Options for the particular site installation of the
    108108  pipeline: the {\it site};
    109 \item Options specifying the instrument setup, and in particular the
    110   format of the FITS file: the {\it camera}; and
     109\item Options specifying the instrument setup: the {\it camera};
     110\item Options specifying the format of the FITS file: the {\it
     111  format}; and
    111112\item Options specifying the particular parameter choices that affect
    112113  the details of an analysis: the {\it recipe}.
     
    205206\end{verbatim}
    206207
    207 \subsubsection{Camera Configuration}
    208 
    209 The camera configuration is somewhat complicated and involved, since
    210 it must not only specify how to translate the pixels from a FITS file
    211 into a focal plane hierarchy (\S\ref{sec:focalplane}), but it must
    212 also specify how to derive the various values the IPP needs
    213 (\S\ref{sec:concepts}).  Moreover, it must be able to do these for the
    214 great variety of cameras in use in the astronomical community.
     208\subsubsection{Camera configuration}
     209
     210The camera configuration file is a fairly simple configuration file
     211containing information particular to a particular camera, regardless
     212of the file format used to represent that camera.  The camera configuration
     213consists of the following elements:
     214\begin{itemize}
     215\item \code{FORMATS} of type \code{METADATA}: this contains a list of
     216  known FITS file formats with the file names (of type \code{STR}) of
     217  the configuration files;
     218\item \code{FPA} of type \code{METADATA}: this contains a list of
     219  chips, each with a string list (type \code{STR} of the component
     220  cells; and
     221\item \code{RECIPES} of type \code{METADATA}: this contains a list of
     222  recipes used for the camera with the file names (of type \code{STR}
     223  of the configuration files.
     224\end{itemize}
     225
     226An example camera configuration file:
     227
     228\begin{verbatim}
     229# Camera configuration file for MegaCam: describes the camera
     230
     231# File formats that we know about
     232FORMATS         METADATA
     233        RAW     STR     megacam_raw.config
     234        SPLICE  STR     megacam_splice.config
     235        SPLIT   STR     megacam_split.config
     236END
     237
     238
     239# Description of camera --- all the chips and the cells that comprise them
     240FPA     METADATA
     241        ccd00   STR     left right
     242        ccd01   STR     left right
     243        ccd02   STR     left right
     244        ccd03   STR     left right
     245        ccd04   STR     left right
     246        ccd05   STR     left right
     247        ccd06   STR     left right
     248        ccd07   STR     left right
     249        ccd08   STR     left right
     250        ccd09   STR     left right
     251        ccd10   STR     left right
     252        ccd11   STR     left right
     253        ccd12   STR     left right
     254        ccd13   STR     left right
     255        ccd14   STR     left right
     256        ccd15   STR     left right
     257        ccd16   STR     left right
     258        ccd17   STR     left right
     259        ccd18   STR     left right
     260        ccd19   STR     left right
     261        ccd20   STR     left right
     262        ccd21   STR     left right
     263        ccd22   STR     left right
     264        ccd23   STR     left right
     265        ccd24   STR     left right
     266        ccd25   STR     left right
     267        ccd26   STR     left right
     268        ccd27   STR     left right
     269        ccd28   STR     left right
     270        ccd29   STR     left right
     271        ccd30   STR     left right
     272        ccd31   STR     left right
     273        ccd32   STR     left right
     274        ccd33   STR     left right
     275        ccd34   STR     left right
     276        ccd35   STR     left right
     277END
     278
     279
     280# Recipe options
     281RECIPES         METADATA
     282        PHASE2          STR     phase2.config           # Phase 2 recipe details
     283        PSPHOT          STR     psphot.config           # psphot details
     284END
     285\end{verbatim}
     286
     287
     288\subsubsection{FITS file format}
     289
     290The FITS file format configuration files are somewhat complicated and
     291involved, since they must not only specify how to translate the pixels
     292from a FITS file into a focal plane hierarchy
     293(\S\ref{sec:focalplane}), but must also specify how to derive the
     294various values the IPP needs (\S\ref{sec:concepts}).  Moreover, they
     295must be able to do these for the great variety of cameras in use in
     296the astronomical community.
    215297
    216298Example camera configuration files are included in an appendix, but
     
    231313segments and binary data segments.  The headers describe the format
    232314and layout of the data segments.  The first of these groups is
    233 traditionally called the 'primary header unit' (PHU) and the rest are
    234 referred to as 'extensions'.  The header segments may contain
     315traditionally called the ``primary header unit'' (PHU) and the rest are
     316referred to as ``extensions''.  The header segments may contain
    235317extensive documentary information related to the interpretation of the
    236318data.  Although the FITS format defines a standard representation of
     
    246328In the simplest case, the camera consists of a single chip consisting
    247329of a single cell always read with a single readout.  In this case, the
    248 image data could be written as part of the primary data unit.  In a
     330image data could be written as part of the primary header unit.  In a
    249331more complex case with multiple chips and multiple cells, the data may
    250332be organized in several ways.  The data may be distributed into
     
    260342entire FITS file corresponds to (FPA, chip, or cell), and what level
    261343the extensions correspond to (chip, cell or no extensions at all).
    262 Knowing these, and having a list of the components, we can construct
     344Knowing these, and having a list of the extensions, we can construct
    263345the focal plane hierarchy.
    264346
     
    274356To define the hierarchy, we specify the following keywords:
    275357\begin{itemize}
    276 
    277 \item \code{PHU} of type \code{STR}: May be one of \code{FPA},
    278   \code{CHIP}, or \code{CHIP}.  This specifies the focal plane level
    279   of the Primary Header Unit, and hence the entire FITS file (the
    280   'class' of the file) .
    281 
    282 \item \code{EXTENSIONS} of type \code{STR}: May be one of \code{CHIP},
    283   \code{CELL} or \code{NONE}, though not of a level higher than that
    284   specified by the \code{PHU}.  This specifies what each extension
    285   represents.
    286 
    287 \item \code{CONTENTS} which may be of type \code{METADATA} or
    288   \code{STR}, depending upon the \code{PHU} and \code{EXTENSIONS},
    289   specifies what the contents of the FITS file are:
     358\item \code{RULE} of type \code{METADATA}: contains headers with their
     359  respective values that are required to be in the PHU of any FITS
     360  file of this type.
     361
     362\item \code{FILE} of type \code{METADATA}: contains information on
     363  the global format of the FITS file with the following entries:
    290364  \begin{itemize}
    291     \item \code{PHU=FPA, EXTENSIONS=CHIP}: Type \code{METADATA} with
    292       the component keywords being the extension names and the values
    293       the names of the cells, separated by commas or whitespace.
    294     \item \code{PHU=FPA, EXTENSIONS=CELL}: Type \code{METADATA} with
    295       the component keywords being the extension names and the values
    296       the chip name and the cell type, separated by a colon.
    297     \item \code{PHU=FPA, EXTENSIONS=NONE}: Type \code{METADATA} with
    298       the component keywords being the chip names and the values the
    299       names of the cells, separated by commas or whitespace.
    300     \item \code{PHU=CHIP, EXTENSIONS=CELL}: Type \code{METADATA} with
    301       the component keywords being the extension names and the values
    302       the corresponding cell type.
    303     \item \code{PHU=CHIP, EXTENSIONS=NONE}: Type \code{STR} with the
    304       value being the cell types separated by commas or whitespace.
     365  \item \code{PHU} of type \code{STR}: May be one of \code{FPA},
     366    \code{CHIP}, or \code{CHIP}.  This specifies the focal plane level
     367    of the Primary Header Unit, and hence the entire FITS file (the
     368    'class' of the file).
     369
     370  \item \code{EXTENSIONS} of type \code{STR}: May be one of
     371    \code{CHIP}, \code{CELL} or \code{NONE}, though not of a level
     372    higher than that specified by the \code{PHU}.  This specifies what
     373    each extension represents.
     374
     375  \item \code{FPA.NAME} of type \code{STR}: Specifies a header keyword
     376    in the primary header for a unique identifier for the FPA name
     377    (e.g., an observation number).
     378
     379  \item \code{CHIP.NAME} of type \code{STR}: Need only be included if
     380    \code{PHU} is \code{CHIP} or \code{CELL}.  Specifies a header
     381    keyword in the primary header for a unique identifier for the chip
     382    name (e.g., the CCD identification number or name).
     383
     384  \item \code{CELL.NAME} of type \code{STR}: Need only be included if
     385    \code{PHU} is \code{CELL}.  Specifies a header keyword in the
     386    primary header for a unique identifier for the cell name (e.g.,
     387    the amplifier identification).
    305388  \end{itemize}
    306 \item \code{CELLS} of type \code{METADATA} with the component keywords
    307   being the cell names or types, each of type \code{METADATA}.  Within
    308   each cell should be specified various PS concept values appropriate
    309   for each cell.
     389
     390\item \code{CONTENTS} of type \code{METADATA}: Specifies what the
     391  contents of the FITS file are.  Each entry is an extension name with
     392  the corresponding value being a string listing the source and the
     393  cell type, separated by a colon (e.g., \code{ccd01:left
     394  ccd01:right}).  If \code{EXTENSIONS=NONE} then the \code{CONTENTS}
     395  is ignored (since there are no extensions to list).
     396
     397\item \code{CELLS} of type \code{METADATA}: specifies the cell types.
     398  Entries are the cell types, each of type \code{METADATA}, with the
     399  values being PS concept values appropriate for each cell type (more
     400  detail later) \tbd{link to more detail}.  In the event that
     401  \code{EXTENSIONS=NONE}, the \code{CELLS} is used as a list of all
     402  cells present in the file.
     403
     404\item \code{TRANSLATION} of type \code{METADATA}
     405
     406\item \code{DEFAULTS} of type \code{METADATA}
     407
     408\item \code{DATABASE} of type \code{METADATA}
     409
     410\item \code{FORMATS} of type \code{METADATA}
     411
    310412\end{itemize}
    311413
     
    313415
    314416\begin{verbatim}
     417# The raw MegaCam data comes off the telescope with each of the chips stored in extensions of a MEF file.
     418
     419# How to identify this type
     420RULE    METADATA
     421        TELESCOP        STR     CFHT 3.6m
     422        DETECTOR        STR     MegaCam
     423        EXTEND          BOOL    T
     424        NEXTEND         S32     72
     425END
     426
    315427# How to read this data
    316 PHU             STR     FPA     # The FITS file represents an entire FPA
    317 EXTENSIONS      STR     CELL    # The extensions represent cells
    318  
     428FORMAT  METADATA
     429        PHU             STR     FPA     # The FITS file represents an entire FPA
     430        EXTENSIONS      STR     CELL    # The extensions represent cells
     431        FPA.NAME        STR     EXPNUM  # A PHU keyword for unique identifier within the hierarchy level
     432END
     433
    319434# What's in the FITS file?
    320 CONTENTS        METADATA
    321         # Extension name, chip name:type
    322         amp00   STR     ccd00:left
    323         amp01   STR     ccd00:right
    324         amp02   STR     ccd01:left
    325         amp03   STR     ccd01:right
    326         amp04   STR     ccd02:left
     435CONTENTS        METADATA
     436        # Extension name, chip name:type
     437        amp00           STR     ccd00:left
     438        amp01           STR     ccd00:right
     439        amp02           STR     ccd01:left
     440        amp03           STR     ccd01:right
     441        amp04           STR     ccd02:left
     442        amp05           STR     ccd02:right
     443        amp06           STR     ccd03:left
     444        amp07           STR     ccd03:right
     445        amp08           STR     ccd04:left
     446        amp09           STR     ccd04:right
     447        amp10           STR     ccd05:left
     448        amp11           STR     ccd05:right
     449        amp12           STR     ccd06:left
     450        amp13           STR     ccd06:right
     451        amp14           STR     ccd07:left
     452        amp15           STR     ccd07:right
     453        amp16           STR     ccd08:left
     454        amp17           STR     ccd08:right
     455        amp18           STR     ccd09:left
     456        amp19           STR     ccd09:right
     457        amp20           STR     ccd10:left
     458        amp21           STR     ccd10:right
     459        amp22           STR     ccd11:left
     460        amp23           STR     ccd11:right
     461        amp24           STR     ccd12:left
     462        amp25           STR     ccd12:right
     463        amp26           STR     ccd13:left
     464        amp27           STR     ccd13:right
     465        amp28           STR     ccd14:left
     466        amp29           STR     ccd14:right
     467        amp30           STR     ccd15:left
     468        amp31           STR     ccd15:right
     469        amp32           STR     ccd16:left
     470        amp33           STR     ccd16:right
     471        amp34           STR     ccd17:left
     472        amp35           STR     ccd17:right
     473        amp36           STR     ccd18:left
     474        amp37           STR     ccd18:right
     475        amp38           STR     ccd19:left
     476        amp39           STR     ccd19:right
     477        amp40           STR     ccd20:left
     478        amp41           STR     ccd20:right
     479        amp42           STR     ccd21:left
     480        amp43           STR     ccd21:right
     481        amp44           STR     ccd22:left
     482        amp45           STR     ccd22:right
     483        amp46           STR     ccd23:left
     484        amp47           STR     ccd23:right
     485        amp48           STR     ccd24:left
     486        amp49           STR     ccd24:right
     487        amp50           STR     ccd25:left
     488        amp51           STR     ccd25:right
     489        amp52           STR     ccd26:left
     490        amp53           STR     ccd26:right
     491        amp54           STR     ccd27:left
     492        amp55           STR     ccd27:right
     493        amp56           STR     ccd28:left
     494        amp57           STR     ccd28:right
     495        amp58           STR     ccd29:left
     496        amp59           STR     ccd29:right
     497        amp60           STR     ccd30:left
     498        amp61           STR     ccd30:right
     499        amp62           STR     ccd31:left
     500        amp63           STR     ccd31:right
     501        amp64           STR     ccd32:left
     502        amp65           STR     ccd32:right
     503        amp66           STR     ccd33:left
     504        amp67           STR     ccd33:right
     505        amp68           STR     ccd34:left
     506        amp69           STR     ccd34:right
     507        amp70           STR     ccd35:left
     508        amp71           STR     ccd35:right
    327509END
    328510
    329511# Specify the cell data
    330 CELLS   METADATA
    331         left    METADATA        # Left amplifier
    332                 CELL.BIASSEC            STR     BIASSEC
    333                 CELL.TRIMSEC            STR     DATASEC
    334                 CELL.PARITY             S32     1
    335         END
    336         right   METADATA        # Right amplifier
    337                 # This cell is read out in the opposite direction
    338                 CELL.BIASSEC            STR     BIASSEC
    339                 CELL.TRIMSEC            STR     [1025:2048,1:2048]
    340                 CELL.PARITY             S32     -1
    341         END
     512CELLS   METADATA
     513        left    METADATA        # Left amplifier
     514                CELL.NAME               STR     LeftSide
     515                CELL.BIASSEC.SOURCE     STR     HEADER
     516                CELL.TRIMSEC.SOURCE     STR     HEADER
     517                CELL.BIASSEC            STR     BIASSEC
     518                CELL.TRIMSEC            STR     DATASEC
     519                CELL.XPARITY            S32     1 # We could have specified this as a DEFAULT, but this works
     520                CELL.X0                 S32     1
     521                CELL.Y0                 S32     1
     522        END
     523        right   METADATA        # Right amplifier
     524                CELL.NAME               STR     RightSide
     525                CELL.BIASSEC.SOURCE     STR     HEADER
     526                CELL.TRIMSEC.SOURCE     STR     HEADER
     527                CELL.BIASSEC            STR     BIASSEC
     528                CELL.TRIMSEC            STR     DATASEC
     529                CELL.XPARITY            S32     -1 # This cell is read out in the opposite direction
     530                CELL.X0                 S32     2048
     531                CELL.Y0                 S32     1
     532        END
     533END
     534
     535# How to translate PS concepts into FITS headers
     536TRANSLATION     METADATA
     537        FPA.NAME                STR     EXPNUM
     538        FPA.AIRMASS             STR     AIRMASS
     539        FPA.FILTER              STR     FILTER
     540        FPA.POSANGLE            STR     ROTANGLE
     541        FPA.RA                  STR     RA
     542        FPA.DEC                 STR     DEC
     543        FPA.RADECSYS            STR     RADECSYS
     544        CELL.EXPOSURE           STR     EXPTIME
     545        CELL.DARKTIME           STR     DARKTIME
     546        CELL.GAIN               STR     GAIN
     547        CELL.READNOISE          STR     RDNOISE
     548        CELL.SATURATION         STR     SATURATE
     549        CELL.TIME               STR     MJD-OBS
     550        CELL.XBIN               STR     CCDBIN1
     551        CELL.YBIN               STR     CCDBIN2
     552END
     553
     554# Default PS concepts that may be specified by value
     555DEFAULTS        METADATA
     556        CELL.READDIR            S32     1               # Cell is read in x direction
     557        CELL.BAD                S32     0
     558        CELL.TIMESYS            STR     UTC
     559        CELL.YPARITY            S32     1
     560END
     561
     562# How to translation PS concepts into database lookups
     563DATABASE        METADATA
     564        TYPE            dbEntry         TABLE           COLUMN          GIVENDBCOL      GIVENPS
     565#       FPA.BIAS        METADATA
     566#               TABLE   STR     Camera
     567#               COLUMN  STR     gain
     568#               chipId  STR     {CHIP.NAME}
     569#               cellId  STR     {CELL.NAME}
     570#               time    STR     {CELL.TIME}
     571#       END
     572#       CELL.GAIN       dbEntry         Camera          gain            chipId,cellId   CHIP.NAME,CELL.NAME
     573#       CELL.READNOISE  dbEntry         Camera          readNoise       chipId,cellId   CHIP.NAME,CELL.NAME
     574
     575# A database entry refers to a particular column (COLUMN) in a
     576# particular table (TABLE), given certain PS concepts (GIVENPS) that
     577# match certain database columns (GIVENDBCOL).
     578END
     579
     580
     581# Where there might be some ambiguity, specify the format
     582FORMATS         METADATA
     583        FPA.RA          STR     HOURS
     584        FPA.DEC         STR     DEGREES
     585        CELL.TIME       STR     MJD
     586#       CELL.BINNING    STR     SEPARATE
     587        CELL.X0         STR     FORTRAN
     588        CELL.Y0         STR     FORTRAN
    342589END
    343590\end{verbatim}
Note: See TracChangeset for help on using the changeset viewer.