IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3842


Ignore:
Timestamp:
May 4, 2005, 12:08:08 PM (21 years ago)
Author:
jhoblitt
Message:

add Paul/megacam example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/t/02_examples.t

    r3487 r3842  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 02_examples.t,v 1.3 2005-03-24 00:13:02 jhoblitt Exp $
     5# $Id: 02_examples.t,v 1.4 2005-05-04 22:08:08 jhoblitt Exp $
    66
    77use strict;
     
    1212#$::RD_TRACE = 1;
    1313
    14 use Test::More tests => 5;
     14use Test::More tests => 6;
    1515use PS::IPP::Metadata::Config;
    1616
     
    285285    ok( defined( $config ), "GENE example");
    286286}
     287
     288{
     289my $example = q{
     290# The raw MegaCam data comes off the telescope with each of the chips stored in extensions of a MEF file.
     291
     292# How to identify this type
     293RULE    METADATA
     294        TELESCOP        STR     CFHT 3.6m
     295        DETECTOR        STR     MegaCam
     296        EXTEND          BOOL    T
     297        NEXTEND         S32     72
     298END
     299
     300# How to read this data
     301PHU             STR     FPA     # The FITS file represents an entire FPA
     302EXTENSIONS      STR     CELLS   # The extensions represent cells
     303EXTENSION_KEY   STR     EXTNAME # You get the extensions by looking at the EXTNAME header
     304IDENTIFIER      STR     OBSID   # We identify the observation by the observation Id in the header
     305
     306# What's in the FITS file?
     307CONTENTS        METADATA
     308        TYPE    CELL    CHIP    CELLTYPE
     309        # Extension name, chip
     310        amp00   CELL    ccd00   science
     311        amp01   CELL    ccd00   science
     312        amp02   CELL    ccd01   science
     313        amp03   CELL    ccd01   science
     314        guide   CELL    guide   guide           # A guide CCD thrown in, just for fun
     315END
     316
     317# Specify the cell data
     318CELLS   METADATA
     319        science METADATA        # A science CCD
     320                TYPE    LOCATION        SOURCE  VALUE
     321                BIASSEC LOCATION        VALUE   [1:10,1:4096];[1035:1084,1:4096]
     322                TRIMSEC LOCATION        VALUE   [11:1034,1:4096]
     323        #       BIASSEC LOCATION        HEADER  BIASSEC
     324        #       TRIMSEC LOCATION        HEADER  TRIMSEC
     325        END
     326        guide   METADATA        # A guide CCD
     327                TYPE    LOCATION        SOURCE  VALUE
     328                BIASSEC LOCATION        VALUE   [1:10,1:1024];[1035:1084,1:1024]
     329                TRIMSEC LOCATION        VALUE   [11:1034,1:1024]
     330        #       BIASSEC LOCATION        HEADER  BIASSEC
     331        #       TRIMSEC LOCATION        HEADER  TRIMSEC
     332        END
     333               
     334END
     335
     336
     337# How to translate PS concepts into FITS headers
     338TRANSLATION     METADATA
     339        AIRMASS         STR             AIRMASS
     340        EXPTIME         STR             EXPOSURE
     341        DARKTIME        STR             EXPOSURE # No specific darktime header; use exposure time
     342        FILTER          STR             FILTER
     343        DATE-OBS        STR             DATE-OBS
     344        TIME-OBS        STR             TIME-OBS
     345        POSANGLE        STR             POSANG
     346        RA              STR             OBJ-RA
     347        DEC             STR             OBJ-DEC
     348END
     349
     350# Default PS concepts that may be specified by value
     351DEFAULTS        METADATA
     352        RADECSYS        STR             ICRS
     353END
     354
     355# How to translation PS concepts into database lookups
     356DATABASE        METADATA
     357        TYPE            dbEntry         TABLE           COLUMN          GIVENDBCOL      GIVENPS
     358        GAIN            dbEntry         Camera          gain            chipId,cellId   CHIP,CELL
     359        READNOISE       dbEntry         Camera          readNoise       chipId,cellId   CHIP,CELL
     360
     361# A database entry refers to a particular column (COLUMN) in a
     362# particular table (TABLE), given certain PS concepts (GIVENPS) that
     363# match certain database columns (GIVENDBCOL).
     364
     365END
     366};
     367    my $config = $config_parser->parse( $example );
     368
     369    ok( defined( $config ), "Paul/megacam example");
     370}
Note: See TracChangeset for help on using the changeset viewer.