IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2008, 2:48:20 PM (18 years ago)
Author:
eugene
Message:

add the premask types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r18048 r18128  
    6464my $RECIPE_PPSTATS = 'CHIPSTATS'; # Recipe to use with ppStats
    6565
    66 my $isMaskType = 0;
    67 if (lc($det_type) eq "mask") { $isMaskType = 1; }
    68 if (lc($det_type) eq "darkmask") { $isMaskType = 1; }
    69 if (lc($det_type) eq "flatmask") { $isMaskType = 1; }
     66# Define which detrend types we normalise
     67use constant DETTYPE => {
     68    'bias'             => 'bias',
     69    'dark'             => 'dark',   
     70    'dark_premask'     => 'dark',
     71    'shutter'          => 'shutter',
     72    'flat'             => 'flat',
     73    'domeflat'         => 'flat',
     74    'skyflat'          => 'flat',   
     75    'flat_premask'     => 'flat',
     76    'domeflat_premask' => 'flat',
     77    'skyflat_premask'  => 'flat',
     78    'fringe'           => 'fringe',   
     79    'mask'             => 'mask',
     80    'darkmask'         => 'mask',
     81    'flatmask'         => 'mask',
     82    };
     83
     84# convert supplied detrend type to a controlled namespace
     85&my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless exists DETTYPE()->{lc($det_type)};
     86my $det_type_real = DETTYPE()->{lc($det_type)};
    7087
    7188# values to extract from output metadata and the stats to calculate
     
    98115$ipprc->outroot_prepare($outroot);
    99116
    100 my $outFile = $isMaskType ? 'PPIMAGE.OUTPUT.DETMASK' : 'PPIMAGE.OUTPUT';; # XXXX something of a hack (too many places to control things...)
     117my $outFile = ($det_type_real eq "mask") ? 'PPIMAGE.OUTPUT.DETMASK' : 'PPIMAGE.OUTPUT';; # XXXX something of a hack (too many places to control things...)
    101118
    102119my $output    = $ipprc->filename($outFile,        $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     
    113130    $command .= " -recipe PPSTATS $RECIPE_PPSTATS";
    114131    $command .= " -F PPIMAGE.OUTPUT $outFile" unless $outFile eq 'PPIMAGE.OUTPUT';
    115     $command .= ' -isfringe' if lc($det_type) eq 'fringe';
    116     $command .= ' -isdark' if lc($det_type) eq 'dark';
     132    $command .= ' -isfringe' if $det_type_real eq 'fringe';
     133    $command .= ' -isdark' if $det_type_real eq 'dark';
    117134    $command .= " -tracedest $traceDest -log $logDest";
    118135    $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.