Changeset 24764 for trunk/ippScripts/scripts/detrend_norm_apply.pl
- Timestamp:
- Jul 12, 2009, 11:06:44 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_norm_apply.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_apply.pl
r24742 r24764 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',92 ' darktest' => 'dark',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', 93 96 }; 94 97 95 98 # convert supplied detrend type to a controlled namespace 96 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless exists DETTYPE()->{ lc($det_type)};97 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}; 98 101 99 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); … … 107 110 $ipprc->outroot_prepare($outroot); 108 111 109 my $outFile = ($det_type_real eq " mask") ? 'PPIMAGE.OUTPUT.DETMASK' : 'PPIMAGE.OUTPUT';; # XXXX something of a hack (too many places to control things...)110 111 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...) 112 115 113 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); … … 123 126 124 127 # we cannot use ppImage to load a normalized mask : just copy it and build the jpeg images 125 if ($det_type_real eq ' mask') {128 if ($det_type_real eq 'MASK') { 126 129 $RECIPE_PPIMAGE = 'PPIMAGE_BIN'; 127 130 my $input_real = $ipprc->file_resolve($input_uri, 0); … … 135 138 $command .= " -recipe PPSTATS $RECIPE_PPSTATS"; 136 139 $command .= " -F PPIMAGE.OUTPUT $outFile" unless $outFile eq 'PPIMAGE.OUTPUT'; 137 $command .= ' -isfringe' if $det_type_real eq ' fringe';138 $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'; 139 142 $command .= " -tracedest $traceDest -log $logDest"; 140 143 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
