Changeset 25027 for branches/pap/ippScripts/scripts/detrend_norm_apply.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_apply.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ippScripts/scripts/detrend_norm_apply.pl
r23688 r25027 62 62 defined $outroot; 63 63 64 # force det_type to be upper-case in this script 65 $det_type = uc($det_type); 66 64 67 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 65 68 … … 72 75 # Define which detrend types we normalise 73 76 use constant DETTYPE => { 74 'bias' => 'bias', 75 'dark' => 'dark', 76 'dark_premask' => 'dark', 77 'shutter' => 'shutter', 78 'flat_premask' => 'flat', 79 'domeflat_premask' => 'flat', 80 'skyflat_premask' => 'flat', 81 'flat_raw' => 'flat', 82 'domeflat_raw' => 'flat', 83 'skyflat_raw' => 'flat', 84 'flat' => 'flat', 85 'domeflat' => 'flat', 86 'skyflat' => 'flat', 87 'fringe' => 'fringe', 88 'mask' => 'mask', 89 'darkmask' => 'mask', 90 'flatmask' => 'mask', 91 'ctemask' => 'mask', 77 'BIAS' => 'BIAS', 78 'DARK' => 'DARK', 79 'DARK_PREMASK' => 'DARK', 80 'SHUTTER' => 'SHUTTER', 81 'FLAT_PREMASK' => 'FLAT', 82 'DOMEFLAT_PREMASK' => 'FLAT', 83 'SKYFLAT_PREMASK' => 'FLAT', 84 'FLAT_RAW' => 'FLAT', 85 'DOMEFLAT_RAW' => 'FLAT', 86 'SKYFLAT_RAW' => 'FLAT', 87 'FLAT' => 'FLAT', 88 'DOMEFLAT' => 'FLAT', 89 'SKYFLAT' => 'FLAT', 90 'FRINGE' => 'FRINGE', 91 'MASK' => 'MASK', 92 'DARKMASK' => 'MASK', 93 'FLATMASK' => 'MASK', 94 'CTEMASK' => 'MASK', 95 'DARKTEST' => 'DARK', 92 96 }; 93 97 94 98 # convert supplied detrend type to a controlled namespace 95 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless exists DETTYPE()->{ lc($det_type)};96 my $det_type_real = DETTYPE()->{ lc($det_type)};99 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless exists DETTYPE()->{$det_type}; 100 my $det_type_real = DETTYPE()->{$det_type}; 97 101 98 102 &my_die("Couldn't find input file: $input_uri\n", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri); … … 106 110 $ipprc->outroot_prepare($outroot); 107 111 108 my $outFile = ($det_type_real eq " mask") ? 'PPIMAGE.OUTPUT.DETMASK' : 'PPIMAGE.OUTPUT';; # XXXX something of a hack (too many places to control things...)109 110 my $RECIPE_PPSTATS = ($det_type_real eq " dark") ? 'DARKSTATS' : 'DETSTATS';; # XXXX something of a hack (too many places to control things...)112 my $outFile = ($det_type_real eq "MASK") ? 'PPIMAGE.OUTPUT.DETMASK' : 'PPIMAGE.OUTPUT';; # XXXX something of a hack (too many places to control things...) 113 114 my $RECIPE_PPSTATS = ($det_type_real eq "DARK") ? 'DARKSTATS' : 'DETSTATS';; # XXXX something of a hack (too many places to control things...) 111 115 112 116 my $output = $ipprc->filename($outFile, $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); … … 122 126 123 127 # we cannot use ppImage to load a normalized mask : just copy it and build the jpeg images 124 if ($det_type_real eq ' mask') {128 if ($det_type_real eq 'MASK') { 125 129 $RECIPE_PPIMAGE = 'PPIMAGE_BIN'; 126 130 my $input_real = $ipprc->file_resolve($input_uri, 0); … … 134 138 $command .= " -recipe PPSTATS $RECIPE_PPSTATS"; 135 139 $command .= " -F PPIMAGE.OUTPUT $outFile" unless $outFile eq 'PPIMAGE.OUTPUT'; 136 $command .= ' -isfringe' if $det_type_real eq ' fringe';137 $command .= ' -isdark' if $det_type_real eq ' dark';140 $command .= ' -isfringe' if $det_type_real eq 'FRINGE'; 141 $command .= ' -isdark' if $det_type_real eq 'DARK'; 138 142 $command .= " -tracedest $traceDest -log $logDest"; 139 143 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
