Changeset 36048
- Timestamp:
- Aug 27, 2013, 2:42:06 PM (13 years ago)
- Location:
- trunk/pstamp/scripts
- Files:
-
- 3 edited
-
pstamp_get_image_job.pl (modified) (3 diffs)
-
pstamp_job_run.pl (modified) (6 diffs)
-
pstampparse.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_get_image_job.pl
r33015 r36048 65 65 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 66 66 67 my $data = $mdcParser->parse(join "", (<INPUT>)) or my_die("failed to parse metadata config doc", $PS_EXIT_UNKNOWN_ERROR); 67 my $data = $mdcParser->parse(join "", (<INPUT>)) 68 or my_die("failed to parse metadata config doc", $PS_EXIT_UNKNOWN_ERROR); 69 68 70 my $components = parse_md_list($data); 69 71 my $n = scalar @$components; … … 83 85 print STDERR "stage_id is $stage_id\n"; 84 86 print STDERR "path_base is $path_base\n"; 85 print STDERR "path_base is $path_base\n";86 87 print STDERR "CAMERA is $camera\n"; 87 88 print STDERR "magicked is " . (defined $magicked ? $magicked : "undefined") . "\n"; … … 89 90 90 91 if (!$camera or !$path_base or !$component or !$stage_id or !$stage) { 91 my_die(" failed to parse params from: $params_file", $PS_EXIT_UNKNOWN_ERROR);92 my_die("One or more parameters are missing in: $params_file", $PS_EXIT_UNKNOWN_ERROR); 92 93 } 93 94 -
trunk/pstamp/scripts/pstamp_job_run.pl
r36018 r36048 562 562 } 563 563 564 # stack_summary stage does not currently use proper file rules. 565 # The parser defers handlint this to us.. 566 564 567 sub update_stack_summary_filenames { 565 568 my $params = shift; … … 570 573 $params->{mask} = $path_base . ".mask.b1.fits"; 571 574 $params->{weight} = $path_base . ".variance.b1.fits"; 575 $params->{jpeg} = $path_base . ".image.0.b1.jpeg"; 572 576 $params->{exp} = $path_base . ".exp.b1.fits"; 573 577 $params->{num} = $path_base . ".num.b1.fits"; 574 575 578 } 576 579 … … 580 583 my $result; 581 584 my $resolved = $ipprc->file_resolve($src); 582 if ($ipprc->file_exists($resolved)) { 585 if ($resolved and $ipprc->file_exists($resolved)) { 586 print "Copying $src to $dest\n" if $verbose;; 583 587 $result = copy($resolved, $dest); 584 588 } else { … … 602 606 my ($outputBase, $r_options, $params) = @_; 603 607 608 print "Just copying files for $job_id.\n"; 609 604 610 my $options = $$r_options; 605 611 if ($options & $PSTAMP_SELECT_IMAGE) { … … 616 622 } 617 623 } 624 if ($options & $PSTAMP_SELECT_JPEG) { 625 if (!myCopy("$outputBase.jpg", $params->{jpeg}, 'jpeg', 0)) { 626 $options &= ~$PSTAMP_SELECT_JPEG; 627 } 628 } 618 629 if ($options & $PSTAMP_SELECT_EXP) { 619 630 if (!myCopy("$outputBase.exp.fits", $params->{exp}, 'exp', 0)) { … … 628 639 629 640 $$r_options = $options; 641 642 print "Done with copy.\n"; 630 643 631 644 return 0; -
trunk/pstamp/scripts/pstampparse.pl
r36017 r36048 297 297 } 298 298 if ($job_type eq 'get_image') { 299 unless ($req_type eq 'byid' or $req_type eq 'byexp' or ($req_type eq 'byskycell' and $stage eq 'stack')) { 300 print STDERR "REQ_TYPE must be 'byid' or 'byexp' or byskcyell for stacks for JOB_TYPE 'get_image'\n"; 299 # get_image jobs are quite expensive in terms of space so we are currently restricting them 300 unless ($req_type eq 'byid' or $req_type eq 'byexp' 301 or ($req_type eq 'byskycell' and $stage eq 'stack') 302 or ($stage eq 'stack_summary')) { 303 print STDERR "REQ_TYPE must be 'byid' or 'byexp' JOB_TYPE 'get_image' for IMG_TYPE $stage\n"; 301 304 insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST); 302 305 return 0; … … 306 309 my $component = $row->{COMPONENT}; 307 310 if (!defined $component or (lc($component) eq "null") or (lc($component) eq "all")) { 308 if ($job_type eq 'get_image' ) {311 if ($job_type eq 'get_image' and ! ($stage eq 'stack' or $stage eq 'stack_summary')) { 309 312 $row->{COMPONENT} = 'all'; 310 313 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
