Changeset 23295
- Timestamp:
- Mar 12, 2009, 11:38:13 AM (17 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 26 edited
-
camera_exp.pl (modified) (1 diff)
-
chip_imfile.pl (modified) (1 diff)
-
detrend_correct_imfile.pl (modified) (1 diff)
-
detrend_norm_apply.pl (modified) (1 diff)
-
detrend_norm_calc.pl (modified) (1 diff)
-
detrend_norm_exp.pl (modified) (1 diff)
-
detrend_process_exp.pl (modified) (1 diff)
-
detrend_process_imfile.pl (modified) (1 diff)
-
detrend_reject_exp.pl (modified) (1 diff)
-
detrend_resid_exp.pl (modified) (5 diffs)
-
detrend_resid_imfile.pl (modified) (1 diff)
-
detrend_stack.pl (modified) (1 diff)
-
diff_skycell.pl (modified) (1 diff)
-
dist_advancerun.pl (modified) (1 diff)
-
dist_component.pl (modified) (4 diffs)
-
fake_imfile.pl (modified) (1 diff)
-
magic_destreak.pl (modified) (1 diff)
-
magic_mask.pl (modified) (1 diff)
-
magic_process.pl (modified) (1 diff)
-
magic_tree.pl (modified) (1 diff)
-
register_exp.pl (modified) (1 diff)
-
register_imfile.pl (modified) (4 diffs)
-
stack_skycell.pl (modified) (1 diff)
-
summit_copy.pl (modified) (1 diff)
-
warp_overlap.pl (modified) (1 diff)
-
warp_skycell.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r23186 r23295 367 367 my $exit_code = shift; # Exit code to add 368 368 369 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 370 369 371 carp($msg); 370 372 if (defined $cam_id and not $no_update) { -
trunk/ippScripts/scripts/chip_imfile.pl
r23186 r23295 248 248 # run_state, outputImage, and outroot are globals 249 249 250 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 251 250 252 carp($msg); 251 253 if (defined $chip_id and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_correct_imfile.pl
r23186 r23295 124 124 my $exit_code = shift; # Exit code to add 125 125 126 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 127 126 128 carp($msg); 127 129 if (defined $det_id and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r23229 r23295 196 196 my $exit_code = shift; # Exit code to add 197 197 198 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 199 198 200 carp($msg); 199 201 if (defined $det_id and defined $iter and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_norm_calc.pl
r23229 r23295 230 230 my $exit_code = shift; # Exit code to add 231 231 232 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 233 232 234 carp($msg); 233 235 if (defined $det_id and defined $iter and not $no_update) { -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r23186 r23295 183 183 my $exit_code = shift; # Exit code to add 184 184 185 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 186 185 187 carp($msg); 186 188 if (defined $det_id and defined $iter and not $no_update) { -
trunk/ippScripts/scripts/detrend_process_exp.pl
r23186 r23295 198 198 my $exit_code = shift; # Exit code to add 199 199 200 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 201 200 202 carp($msg); 201 203 if (defined $det_id and defined $exp_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r23186 r23295 185 185 my $exit_code = shift; # Exit code to add 186 186 187 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 188 187 189 carp($msg); 188 190 if (defined $det_id and defined $exp_id and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_reject_exp.pl
r23186 r23295 336 336 my $exit_code = shift; # Exit code to add 337 337 338 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 339 338 340 carp($msg); 339 341 if (defined $det_id and defined $iter and not $no_update) { -
trunk/ippScripts/scripts/detrend_resid_exp.pl
r23229 r23295 107 107 } 108 108 if (@$stdout_buf == 0) { 109 &my_die("No normalizations were found", $det_id, $iter, $PS_EXIT_PROG_ERROR);109 &my_die("No normalizations were found", $det_id, $iter, $PS_EXIT_PROG_ERROR); 110 110 } 111 111 … … 126 126 print "saving norms to $normsName\n"; 127 127 foreach my $norm (@$normsMD) { 128 my $class_id = $norm->{class_id};129 my $normalization = $norm->{norm};130 131 $norms{$class_id} = $normalization;132 printf $normsFile "$class_id F32 $normalization\n", 128 my $class_id = $norm->{class_id}; 129 my $normalization = $norm->{norm}; 130 131 $norms{$class_id} = $normalization; 132 printf $normsFile "$class_id F32 $normalization\n", 133 133 } 134 134 close $normsFile; … … 153 153 } 154 154 if (@$stdout_buf == 0) { 155 &my_die("No imfiles were found", $det_id, $iter, $PS_EXIT_PROG_ERROR);155 &my_die("No imfiles were found", $det_id, $iter, $PS_EXIT_PROG_ERROR); 156 156 } 157 157 … … 168 168 # also, write out the modified metadata set 169 169 foreach my $mdItem (@$metadata) { 170 if ($mdItem->{class} ne "metadata") {171 carp "MD element ", $mdItem->{name}, " isn't of type METADATA --- ignored.\n";172 next;173 }174 my %hash;# Hash element175 my $mdComponents = $mdItem->{value}; # Components of the metadata176 177 # determine the class_id for this block:178 my $class_id;179 foreach my $data (@$mdComponents) {180 unless ($data->{name} eq "class_id") { next; }181 $class_id = $data->{value};182 last;183 }184 185 # a new metadata block186 print $statFile "rawResidImfile METADATA\n";187 188 # modify and save the data in this block:189 foreach my $data (@$mdComponents) {190 my $norm = $norms{$class_id};191 192 # fields to modify by the normalization:193 if ($data->{name} eq "bg") { $data->{value} *= $norm; }194 if ($data->{name} eq "bg_stdev") { $data->{value} *= $norm; }195 if ($data->{name} eq "bg_mean_stdev") { $data->{value} *= $norm; }196 if ($data->{name} eq "bg_skewness") { $data->{value} *= $norm; }197 if ($data->{name} eq "bg_kurtosis") { $data->{value} *= $norm; }198 if ($data->{name} eq "bin_stdev") { $data->{value} *= $norm; }199 200 # write out the metadata, save on the array of hashes201 print $statFile " $data->{name} $data->{type} $data->{value}\n";202 $hash{$data->{name}} = $data->{value};203 }204 print $statFile "END\n";205 push @files, \%hash;170 if ($mdItem->{class} ne "metadata") { 171 carp "MD element ", $mdItem->{name}, " isn't of type METADATA --- ignored.\n"; 172 next; 173 } 174 my %hash; # Hash element 175 my $mdComponents = $mdItem->{value}; # Components of the metadata 176 177 # determine the class_id for this block: 178 my $class_id; 179 foreach my $data (@$mdComponents) { 180 unless ($data->{name} eq "class_id") { next; } 181 $class_id = $data->{value}; 182 last; 183 } 184 185 # a new metadata block 186 print $statFile "rawResidImfile METADATA\n"; 187 188 # modify and save the data in this block: 189 foreach my $data (@$mdComponents) { 190 my $norm = $norms{$class_id}; 191 192 # fields to modify by the normalization: 193 if ($data->{name} eq "bg") { $data->{value} *= $norm; } 194 if ($data->{name} eq "bg_stdev") { $data->{value} *= $norm; } 195 if ($data->{name} eq "bg_mean_stdev") { $data->{value} *= $norm; } 196 if ($data->{name} eq "bg_skewness") { $data->{value} *= $norm; } 197 if ($data->{name} eq "bg_kurtosis") { $data->{value} *= $norm; } 198 if ($data->{name} eq "bin_stdev") { $data->{value} *= $norm; } 199 200 # write out the metadata, save on the array of hashes 201 print $statFile " $data->{name} $data->{type} $data->{value}\n"; 202 $hash{$data->{name}} = $data->{value}; 203 } 204 print $statFile "END\n"; 205 push @files, \%hash; 206 206 } 207 207 close $statFile; … … 633 633 my $exit_code = shift; # Exit code to add 634 634 635 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 636 635 637 carp($msg); 636 638 if (defined $det_id and defined $iter and defined $exp_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_resid_imfile.pl
r23186 r23295 251 251 my $exit_code = shift; # Exit code to add 252 252 253 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 254 253 255 carp($msg); 254 256 if (defined $det_id and defined $iter and defined $exp_id and not $no_update) { -
trunk/ippScripts/scripts/detrend_stack.pl
r23186 r23295 251 251 my $exit_code = shift; # Exit code to add 252 252 253 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 254 253 255 carp($msg); 254 256 if (defined $det_id and defined $iter and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/diff_skycell.pl
r23186 r23295 276 276 my $exit_code = shift; # Exit code to add 277 277 278 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 279 278 280 warn($msg); 279 281 if (defined $diff_id and defined $skycell_id and not $no_update) { -
trunk/ippScripts/scripts/dist_advancerun.pl
r23250 r23295 130 130 my $exit_code = shift; # Exit code to add 131 131 132 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 133 132 134 my $command = "$disttool -updaterun"; 133 135 $command .= " -dist_id $dist_id"; -
trunk/ippScripts/scripts/dist_component.pl
r23255 r23295 122 122 if (-e $tmpdir) { 123 123 if (-d $tmpdir) { 124 my $rc = system "rm -r $tmpdir"; 124 my $rc = system "rm -r $tmpdir"; 125 125 &my_die("cannot rm $tmpdir return code: $rc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if $rc; 126 126 } else { … … 272 272 my $clean_mdc = join "", @data; 273 273 274 my $mdlist = $mdcParser->parse($clean_mdc) or 274 my $mdlist = $mdcParser->parse($clean_mdc) or 275 275 &my_die("failed to parse clean.mdc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR); 276 276 … … 293 293 next if $rule eq "STAGE"; 294 294 my $keep_on_clean = $product_list->{$rule}; 295 my $fn = $ipprc->filename($rule, $path_base, $component) or 296 &my_die("Missing entry from camera config: $rule", $dist_id, $component, 295 my $fn = $ipprc->filename($rule, $path_base, $component) or 296 &my_die("Missing entry from camera config: $rule", $dist_id, $component, 297 297 $PS_EXIT_CONFIG_ERROR); 298 298 # printf "%-16.16s\t%s\t%s\n", $rule, $clean, $fn; … … 323 323 my $exit_code = shift; # Exit code to add 324 324 325 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 326 325 327 my $command = "$disttool -addprocessedcomponent"; 326 328 $command .= " -dist_id $dist_id"; -
trunk/ippScripts/scripts/fake_imfile.pl
r23186 r23295 206 206 my $exit_code = shift; # Exit code to add 207 207 208 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 209 208 210 carp($msg); 209 211 if (defined $exp_id and defined $fake_id and defined $class_id and not $no_update) { -
trunk/ippScripts/scripts/magic_destreak.pl
r23186 r23295 267 267 my $exit_code = shift; # Exit code to add 268 268 269 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 270 269 271 my $command = "$magicdstool -adddestreakedfile"; 270 272 $command .= " -magic_ds_id $magic_ds_id"; -
trunk/ippScripts/scripts/magic_mask.pl
r23186 r23295 146 146 my $exit_code = shift; # Exit code to add 147 147 148 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 149 148 150 carp($msg); 149 151 if (defined $magic_id and not $no_update) { -
trunk/ippScripts/scripts/magic_process.pl
r23186 r23295 332 332 my $exit_code = shift; # Exit code to add 333 333 334 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 335 334 336 carp($msg); 335 337 if (defined $magic_id and defined $node and not $no_update) { -
trunk/ippScripts/scripts/magic_tree.pl
r23186 r23295 290 290 my $exit_code = shift; # Exit code to add 291 291 292 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 293 292 294 carp($msg); 293 295 if (defined $magic_id and not $no_update) { -
trunk/ippScripts/scripts/register_exp.pl
r23186 r23295 187 187 my $exit_code = shift; 188 188 189 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 190 189 191 carp($msg); 190 192 if (defined $exp_id and not $no_update) { -
trunk/ippScripts/scripts/register_imfile.pl
r23294 r23295 94 94 print "STDOUT:\n$out1"; 95 95 print "STDERR:\n$err1"; 96 &my_die("Unable to perform ppStats on exposure id $exp_id: " . $h1->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $h1->result() ) unless $result1;96 &my_die("Unable to perform ppStats on exposure id $exp_id: " . $h1->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, ($h1->result() or $PS_EXIT_PROG_ERROR) ) unless $result1; 97 97 98 98 print "[Running " . join(' ', @command2) . "]\n"; … … 103 103 print "STDOUT:\n$out2"; 104 104 print "STDERR:\n$err2"; 105 &my_die("Unable to perform ppStatsFromMetadata on exposure id $exp_id: " . $h2->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $h2->result() ) unless $result2;105 &my_die("Unable to perform ppStatsFromMetadata on exposure id $exp_id: " . $h2->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, ($h2->result() or $PS_EXIT_PROG_ERROR) ) unless $result2; 106 106 chomp $out2; 107 107 $cmdflags = $out2; … … 128 128 129 129 # determine solar-system parameters 130 my $longitude = &value_for_flag ($cmdflags, "-longitude");131 my $latitude = &value_for_flag ($cmdflags, "-latitude");132 my $elevation = &value_for_flag ($cmdflags, "-elevation");133 my $ra = &value_for_flag ($cmdflags, "-ra");134 my $dec = &value_for_flag ($cmdflags, "-decl");135 my $dateobs = &value_for_flag ($cmdflags, "-dateobs");130 my $longitude = &value_for_flag($cmdflags, "-longitude"); 131 my $latitude = &value_for_flag($cmdflags, "-latitude"); 132 my $elevation = &value_for_flag($cmdflags, "-elevation"); 133 my $ra = &value_for_flag($cmdflags, "-ra"); 134 my $dec = &value_for_flag($cmdflags, "-decl"); 135 my $dateobs = &value_for_flag($cmdflags, "-dateobs"); 136 136 137 137 # if the needed data is available, pass it to sunmoon: … … 212 212 213 213 # for failed imfiles, we insert UNKNOWN for inst, telescope, class_id 214 215 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 214 216 215 217 carp($msg); -
trunk/ippScripts/scripts/stack_skycell.pl
r23186 r23295 296 296 my $exit_code = shift; # Exit code to add 297 297 298 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 299 298 300 carp($msg); 299 301 -
trunk/ippScripts/scripts/summit_copy.pl
r20310 r23295 136 136 my $exit_code = shift; # Exit code to add 137 137 138 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 139 138 140 warn $msg; 139 141 unless ($no_update) { -
trunk/ippScripts/scripts/warp_overlap.pl
r23186 r23295 186 186 my $warp_id = shift; # Warp identifier 187 187 my $exit_code = shift; # Exit code to add 188 189 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 188 190 189 191 carp($msg); -
trunk/ippScripts/scripts/warp_skycell.pl
r23186 r23295 288 288 my $exit_code = shift; # Exit code to add 289 289 290 $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code; 291 290 292 warn($msg); 291 293 if (defined $warp_id and defined $skycell_id and defined $tess_dir and not $no_update) {
Note:
See TracChangeset
for help on using the changeset viewer.
