Changeset 35545 for branches/eam_branches/ipp-20130419/pstamp/scripts
- Timestamp:
- May 9, 2013, 11:25:56 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pstamp/scripts
- Files:
-
- 9 edited
-
. (modified) (1 prop)
-
psmkreq (modified) (1 diff)
-
pstamp_checkdependent.pl (modified) (2 diffs)
-
pstamp_insert_request.pl (modified) (1 diff)
-
pstamp_job_run.pl (modified) (1 diff)
-
pstamp_request_file (modified) (5 diffs)
-
pstamp_server_status (modified) (3 diffs)
-
pstamp_webrequest.pl (modified) (1 diff)
-
pstampparse.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pstamp/scripts
- Property svn:mergeinfo changed
/trunk/pstamp/scripts merged: 35432,35438-35440,35486-35487,35497-35498,35504
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130419/pstamp/scripts/psmkreq
r35353 r35545 1 1 #!/bin/env perl 2 2 ### 3 ### ps tamprequest3 ### psmkreq 4 4 ### 5 ### Program to make a postage stamp request table for a set of coordinates 5 ### Program to make a postage stamp request table for a set of coordinates using supplied command 6 ### line options and defaults 6 7 ### 7 8 -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_checkdependent.pl
r34716 r35545 344 344 } 345 345 346 if (0) { 346 347 my $tess_id = $metadata->{tess_id}; 347 348 if ($tess_id eq 'RINGS.V0') { … … 349 350 return $PSTAMP_GONE 350 351 } 352 } 351 353 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 352 354 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) { -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_insert_request.pl
r29173 r35545 128 128 run(command => $command, verbose => $verbose); 129 129 unless ($success) { 130 my $status = $error_code >> 8; 130 131 print STDERR @$stderr_buf; 131 die("Unable to perform pstamptool -getwebrequestnum: $error_code");132 die("Unable to perform $command: $error_code : $status"); 132 133 } 133 134 my $webreq_num = ${$stdout_buf}[0]; -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_job_run.pl
r35398 r35545 151 151 } elsif ($params->{cmf}) { 152 152 $argString .= " -write_cmf"; 153 $fileArgs .= " -sources $params->{cmf}"; 153 154 push @file_list, $params->{cmf}; 154 155 } else { -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_request_file
r35362 r35545 18 18 $output, # Name of output table 19 19 $req_name, 20 $email, 20 21 $help 21 22 ); … … 25 26 'output|o=s' => \$output, 26 27 'req_name|r=s' => \$req_name, 27 'help|h' => \$help, 28 'email=s' => \$email, 29 'help|h' => \$help, 28 30 ) or pod2usage( 2 ); 29 31 … … 66 68 ]; 67 69 70 my $email_column_num = 3; 71 68 72 # Specification of columns to write 69 73 my $columns = [ … … 165 169 $req_name = $header->[0]->{value}; 166 170 } 171 if ($email) { 172 $header->[$email_column_num]->{value} = $email; 173 } 174 167 175 168 176 die "no request name defined" unless defined $req_name; … … 302 310 303 311 $$r_extver = $vals[1]; 304 if ($ extver > 1) {312 if ($$r_extver > 1) { 305 313 die "number of header columns in input $nvals does not equal expected number of header words $nhead" 306 314 if (@vals != @$header); -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_server_status
r33016 r35545 65 65 66 66 67 my $serverRunning = 0; 67 68 my $command = "$pantasks_client < $pantasks_script"; 68 69 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 69 70 run(command => $command, verbose => $verbose); 70 unless ($success) { 71 if ($success) { 72 $serverRunning = 1; 73 } else { 71 74 $error_code = (($error_code >> 8) or 1); 72 if ($error_code == 12 ) {73 print "Postage Stamp Server is not running\n ";75 if ($error_code == 12 || $error_code == 13) { 76 print "Postage Stamp Server is not running\n<br>"; 74 77 #print "Postage Stamp Server will be down for maintenance it will back shortly.\n"; 75 exit 0;78 # exit 0; 76 79 } else { 77 warn(" $command failed. exit status: $error_code");78 exit $error_code;80 warn("\nError: $command failed. exit status: $error_code\n"); 81 # exit $error_code; 79 82 } 80 83 } … … 119 122 } else { 120 123 print STDERR "Controller state not found"; 121 exit 1;124 # exit 1; 122 125 } 123 126 print "$br$br\n"; 124 } els e{127 } elsif ($serverRunning) { 125 128 print STDERR "Scheduler state not found"; 126 exit 1;129 # exit 1; 127 130 } 128 131 … … 148 151 print "Task pstamp.job.run not found.<br />\n"; 149 152 } 150 } els e{151 print "Task pstamp.request.run not found. \n";153 } elsif ($serverRunning) { 154 print "Task pstamp.request.run not found.<br >\n"; 152 155 } 153 156 } -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_webrequest.pl
r35354 r35545 71 71 } 72 72 73 # make a request file 73 # make a request file in a sub directory of the current directory 74 74 my $cur_dir = getcwd(); 75 75 76 76 #print STDERR "cur_dir is $cur_dir\n"; 77 77 78 # put file in directory for the current date 78 79 my $datestr = strftime "%Y/%m/%d", gmtime; 79 80 my $datedir = "$cur_dir/webreq/$datestr"; -
branches/eam_branches/ipp-20130419/pstamp/scripts/pstampparse.pl
r35398 r35545 360 360 361 361 my $wholefile = 0; 362 if (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0) { 362 if (($row->{WIDTH} == 0 && $row->{HEIGHT} == 0) || 363 (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0)) { 363 364 # Secret code for returning the whole file 364 365 $wholefile = 1; … … 628 629 my $h = $row->{HEIGHT}; 629 630 my $coord_mask = $row->{COORD_MASK}; 631 630 632 my $wholeFile = 0; 631 if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) { 632 # Center of 0, 0 in pixel coordinates is interpreted to mean 633 # return the entire file 634 if ($x == 0 && $y == 0) { 635 $roi_string = "-wholefile"; 636 $wholeFile = 1; 633 # For historical reasons there are two ways to specify that the entire file be returned 634 # rather than a postage stamp ... 635 if ($w == 0 and $h == 0) { 636 # ... The right way: width and height both zero ... 637 $wholeFile = 1; 638 } else { 639 if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) { 640 if ($x == 0 && $y == 0) { 641 # ... and pixel coordinate center of 0, 0 642 # I made this one up without thinking through the API clearly. 643 # allowing width and height to do it works much better 644 $wholeFile = 1; 645 } else { 646 $roi_string = "-pixcenter $x $y"; 647 } 637 648 } else { 638 $roi_string = "-pixcenter $x $y"; 639 } 649 $roi_string = "-skycenter $x $y"; 650 } 651 } 652 653 if ($wholeFile) { 654 $roi_string = "-wholefile"; 655 } elsif ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) { 656 $roi_string .= " -pixrange $w $h"; 640 657 } else { 641 $roi_string = "-skycenter $x $y";642 }643 if (!$wholeFile) {644 if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {645 $roi_string .= " -pixrange $w $h";646 } else {647 658 $roi_string .= " -arcrange $w $h"; 648 }649 659 } 650 660 … … 1005 1015 my $command = "$pstamptool -getdependent -stage $stage -stage_id $stage_id -imagedb $imagedb -component $component -outdir $outdir"; 1006 1016 $command .= " -need_magic" if $need_magic; 1007 $command .= ' -hold' if $action eq 'PREVIEW';1017 # $command .= ' -hold' if $action eq 'PREVIEW'; 1008 1018 1009 1019 if ($label) {
Note:
See TracChangeset
for help on using the changeset viewer.
