IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2009, 11:06:44 AM (17 years ago)
Author:
eugene
Message:

make the use of det_type consistently upper-case in the scripts; change detType to det_type as needed

File:
1 edited

Legend:

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

    r24741 r24764  
    3333
    3434# Parse command-line arguments
    35 my ($det_id, $iter, $detType, $outroot, $dbname, $verbose, $no_update, $no_op, $redirect );
     35my ($det_id, $iter, $det_type, $outroot, $dbname, $verbose, $no_update, $no_op, $redirect );
    3636GetOptions(
    3737    'det_id|d=s'        => \$det_id,    # Detrend id
    3838    'iteration|i=s'     => \$iter,      # Iteration
    39     'det_type|t=s'      => \$detType,   # Detrend type
     39    'det_type|t=s'      => \$det_type,   # Detrend type
    4040    'outroot|w=s'       => \$outroot,   # output file base name
    4141    'dbname|d=s'        => \$dbname,    # Database name
     
    5252    defined $det_id  and
    5353    defined $iter    and
    54     defined $detType and
     54    defined $det_type and
    5555    defined $outroot;
     56
     57# force det_type to be upper-case in this script
     58my $det_type = uc($det_type);
    5659
    5760my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $det_id, $iter, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
     
    6467# Define which detrend types we normalise
    6568use constant NORMALIZE => {
    66     'bias'             => 0,
    67     'dark'             => 0,
    68     'dark_premask'     => 0,
    69     'darktest'         => 0,
    70     'shutter'          => 0,
    71     'flat_premask'    => 1,
    72     'domeflat_premask' => 1,
    73     'skyflat_premask'  => 1,
    74     'flat_raw'         => 1,
    75     'domeflat_raw'     => 1,
    76     'skyflat_raw'      => 1,
    77     'flat'             => 1,
    78     'domeflat'         => 1,
    79     'skyflat'          => 1,
    80     'fringe'           => 0,
    81     'mask'             => 0,
    82     'darkmask'         => 0,
    83     'flatmask'         => 0,
    84     'ctemask'          => 0,
     69    'BIAS'             => 0,
     70    'DARK'             => 0,
     71    'DARK_PREMASK'     => 0,
     72    'SHUTTER'          => 0,
     73    'FLAT_PREMASK'     => 1,
     74    'DOMEFLAT_PREMASK' => 1,
     75    'SKYFLAT_PREMASK' => 1,
     76    'FLAT_RAW'         => 1,
     77    'DOMEFLAT_RAW'     => 1,
     78    'SKYFLAT_RAW'      => 1,
     79    'FLAT'             => 1,
     80    'DOMEFLAT'         => 1,
     81    'SKYFLAT'          => 1,
     82    'FRINGE'           => 0,
     83    'MASK'             => 0,
     84    'DARKMASK'         => 0,
     85    'FLATMASK'         => 0,
     86    'CTEMASK'          => 0,
     87    'DARKTEST'         => 0,
    8588    };
    8689
    87 &my_die("Unrecognised detrend type: $detType", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless exists NORMALIZE()->{lc($detType)};
     90&my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless exists NORMALIZE()->{$det_type};
    8891
    8992my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
     
    125128
    126129my $norms;                      # MDC with normalisations
    127 if (NORMALIZE()->{lc($detType)} and not $no_op) {
     130if (NORMALIZE()->{$det_type} and not $no_op) {
    128131
    129132    my %matrix; # Matrix of statistics as a function of exposures and classes
Note: See TracChangeset for help on using the changeset viewer.