Changeset 25027 for branches/pap/ippScripts/scripts/detrend_norm_calc.pl
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/detrend_norm_calc.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ippScripts/scripts/detrend_norm_calc.pl
r23688 r25027 33 33 34 34 # Parse command-line arguments 35 my ($det_id, $iter, $det Type, $outroot, $dbname, $verbose, $no_update, $no_op, $redirect );35 my ($det_id, $iter, $det_type, $outroot, $dbname, $verbose, $no_update, $no_op, $redirect ); 36 36 GetOptions( 37 37 'det_id|d=s' => \$det_id, # Detrend id 38 38 'iteration|i=s' => \$iter, # Iteration 39 'det_type|t=s' => \$det Type, # Detrend type39 'det_type|t=s' => \$det_type, # Detrend type 40 40 'outroot|w=s' => \$outroot, # output file base name 41 41 'dbname|d=s' => \$dbname, # Database name … … 52 52 defined $det_id and 53 53 defined $iter and 54 defined $det Type and54 defined $det_type and 55 55 defined $outroot; 56 57 # force det_type to be upper-case in this script 58 my $det_type = uc($det_type); 56 59 57 60 my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $det_id, $iter, $PS_EXIT_CONFIG_ERROR ); # IPP configuration … … 64 67 # Define which detrend types we normalise 65 68 use constant NORMALIZE => { 66 'bias' => 0, 67 'dark' => 0, 68 'dark_premask' => 0, 69 'shutter' => 0, 70 'flat_premask' => 1, 71 'domeflat_premask' => 1, 72 'skyflat_premask' => 1, 73 'flat_raw' => 1, 74 'domeflat_raw' => 1, 75 'skyflat_raw' => 1, 76 'flat' => 1, 77 'domeflat' => 1, 78 'skyflat' => 1, 79 'fringe' => 0, 80 'mask' => 0, 81 'darkmask' => 0, 82 'flatmask' => 0, 83 '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, 84 88 }; 85 89 86 &my_die("Unrecognised detrend type: $det Type", $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}; 87 91 88 92 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files … … 124 128 125 129 my $norms; # MDC with normalisations 126 if (NORMALIZE()->{ lc($detType)} and not $no_op) {130 if (NORMALIZE()->{$det_type} and not $no_op) { 127 131 128 132 my %matrix; # Matrix of statistics as a function of exposures and classes
Note:
See TracChangeset
for help on using the changeset viewer.
