Changeset 13937 for trunk/ippScripts/scripts/detrend_resid.pl
- Timestamp:
- Jun 21, 2007, 2:10:11 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_resid.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_resid.pl
r13926 r13937 34 34 35 35 my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend, 36 $input_uri, $camera, $mode, $dbname, $workdir, $ no_update, $no_op);36 $input_uri, $camera, $mode, $dbname, $workdir, $reduction, $no_update, $no_op); 37 37 GetOptions( 38 38 'det_id|d=s' => \$det_id, … … 47 47 'dbname|d=s' => \$dbname, # Database name 48 48 'workdir|w=s' => \$workdir, # Working directory, for output files 49 'reduction=s' => \$reduction, # Reduction class 49 50 'no-update' => \$no_update, 50 51 'no-op' => \$no_op, … … 67 68 $ipprc->define_camera($camera); 68 69 69 # Recipes to use, as a function of the detrend type 70 use constant RECIPES => { 71 'master' => { # We're creating a master --- already processed the input 72 'bias' => 'PPIMAGE_B', # Bias only 73 'dark' => 'PPIMAGE_D', # Dark only 74 'shutter' => 'PPIMAGE_S', # Shutter only 75 'flat' => 'PPIMAGE_F', # Flat-field only 76 'domeflat' => 'PPIMAGE_F', # Flat-field only 77 'skyflat' => 'PPIMAGE_F', # Flat-field only 78 'fringe' => 'PPIMAGE_R', # Fringe only 79 }, 80 'verify' => { # We're checking the master --- input is not already processed 81 'bias' => 'PPIMAGE_OB', # Bias only 82 'dark' => 'PPIMAGE_OBD', # Dark only 83 'shutter' => 'PPIMAGE_OBDS', # Shutter only 84 'flat' => 'PPIMAGE_OBDSF', # Flat-field only 85 'domeflat' => 'PPIMAGE_OBDSF', # Flat-field only 86 'skyflat' => 'PPIMAGE_OBDSF', # Flat-field only 87 'fringe' => 'PPIMAGE_OBDSFR', # Fringe only 88 }, 89 }; 70 $reduction = 'DETREND' unless defined $reduction; 71 my $recipe; # Name of recipe to use 72 if ($mode eq 'master') { 73 $recipe = $det_type . '_RESID'; 74 } elsif ($mode eq 'verify') { 75 $recipe = $det_type . '_VERIFY'; 76 } else { 77 &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 78 } 79 $recipe = $ipprc->reduction($reduction, $recipe); 90 80 91 81 # Flags to specify the particular detrend to use … … 113 103 $ppImage .= " -dbname $dbname" if defined $dbname; 114 104 115 # Recipe to use in processing116 &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR) unless defined RECIPES->{$mode};117 my $recipe = RECIPES->{$mode}->{lc($det_type)};118 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR) unless defined $recipe;119 120 105 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir; 121 106 … … 183 168 my $bg_mean_stdev = ($stats->bg_mean_stdev() or 'NAN'); 184 169 my $bin_stdev = ($binnedStats->bg_stdev() or 'NAN'); 185 my $fringe_0 = (${$stats->fringe() [0]}or 'NAN');186 my $fringe_1 = (${$stats->fringe_err() [0]}or 'NAN');170 my $fringe_0 = (${$stats->fringe()}[0] or 'NAN'); 171 my $fringe_1 = (${$stats->fringe_err()}[0] or 'NAN'); 187 172 my $fringe_2 = 'NAN'; 188 173
Note:
See TracChangeset
for help on using the changeset viewer.
