Changeset 3842
- Timestamp:
- May 4, 2005, 12:08:08 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Metadata-Config/t/02_examples.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Metadata-Config/t/02_examples.t
r3487 r3842 3 3 # Copyright (C) 2005 Joshua Hoblitt 4 4 # 5 # $Id: 02_examples.t,v 1. 3 2005-03-24 00:13:02jhoblitt Exp $5 # $Id: 02_examples.t,v 1.4 2005-05-04 22:08:08 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 #$::RD_TRACE = 1; 13 13 14 use Test::More tests => 5;14 use Test::More tests => 6; 15 15 use PS::IPP::Metadata::Config; 16 16 … … 285 285 ok( defined( $config ), "GENE example"); 286 286 } 287 288 { 289 my $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 293 RULE METADATA 294 TELESCOP STR CFHT 3.6m 295 DETECTOR STR MegaCam 296 EXTEND BOOL T 297 NEXTEND S32 72 298 END 299 300 # How to read this data 301 PHU STR FPA # The FITS file represents an entire FPA 302 EXTENSIONS STR CELLS # The extensions represent cells 303 EXTENSION_KEY STR EXTNAME # You get the extensions by looking at the EXTNAME header 304 IDENTIFIER STR OBSID # We identify the observation by the observation Id in the header 305 306 # What's in the FITS file? 307 CONTENTS 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 315 END 316 317 # Specify the cell data 318 CELLS 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 334 END 335 336 337 # How to translate PS concepts into FITS headers 338 TRANSLATION 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 348 END 349 350 # Default PS concepts that may be specified by value 351 DEFAULTS METADATA 352 RADECSYS STR ICRS 353 END 354 355 # How to translation PS concepts into database lookups 356 DATABASE 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 365 END 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.
