Changeset 24764 for trunk/ippScripts/scripts/detrend_norm_calc.pl
- Timestamp:
- Jul 12, 2009, 11:06:44 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_norm_calc.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_calc.pl
r24741 r24764 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 ' 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, 85 88 }; 86 89 87 &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}; 88 91 89 92 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files … … 125 128 126 129 my $norms; # MDC with normalisations 127 if (NORMALIZE()->{ lc($detType)} and not $no_op) {130 if (NORMALIZE()->{$det_type} and not $no_op) { 128 131 129 132 my %matrix; # Matrix of statistics as a function of exposures and classes
Note:
See TracChangeset
for help on using the changeset viewer.
