Changeset 35545 for branches/eam_branches/ipp-20130419/pstamp
- Timestamp:
- May 9, 2013, 11:25:56 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pstamp
- Files:
-
- 12 edited
- 29 copied
-
scripts (modified) (1 prop)
-
scripts/psmkreq (modified) (1 diff)
-
scripts/pstamp_checkdependent.pl (modified) (2 diffs)
-
scripts/pstamp_insert_request.pl (modified) (1 diff)
-
scripts/pstamp_job_run.pl (modified) (1 diff)
-
scripts/pstamp_request_file (modified) (5 diffs)
-
scripts/pstamp_server_status (modified) (3 diffs)
-
scripts/pstamp_webrequest.pl (modified) (1 diff)
-
scripts/pstampparse.pl (modified) (3 diffs)
-
src/ppstampMakeStamp.c (modified) (2 diffs)
-
src/ppstampParseCamera.c (modified) (2 diffs)
-
src/pstampdump.c (modified) (2 diffs)
-
test/gpc1 (copied) (copied from trunk/pstamp/test/gpc1 )
-
test/gpc1/chip.bycoord.norelease.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.bycoord.norelease.txt )
-
test/gpc1/chip.bycoord.preview.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.bycoord.preview.txt )
-
test/gpc1/chip.bycoord.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.bycoord.txt )
-
test/gpc1/chip.bydiff.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.bydiff.txt )
-
test/gpc1/chip.byexp.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.byexp.txt )
-
test/gpc1/chip.byid.txt (copied) (copied from trunk/pstamp/test/gpc1/chip.byid.txt )
-
test/gpc1/diff.bydiff.txt (copied) (copied from trunk/pstamp/test/gpc1/diff.bydiff.txt )
-
test/gpc1/diff.byid.inverse.txt (copied) (copied from trunk/pstamp/test/gpc1/diff.byid.inverse.txt )
-
test/gpc1/diff.byid.txt (copied) (copied from trunk/pstamp/test/gpc1/diff.byid.txt )
-
test/gpc1/extver.1.txt (copied) (copied from trunk/pstamp/test/gpc1/extver.1.txt )
-
test/gpc1/raw.bycoord.txt (copied) (copied from trunk/pstamp/test/gpc1/raw.bycoord.txt )
-
test/gpc1/raw.byexp.txt (copied) (copied from trunk/pstamp/test/gpc1/raw.byexp.txt )
-
test/gpc1/raw.byid.txt (copied) (copied from trunk/pstamp/test/gpc1/raw.byid.txt )
-
test/gpc1/stack.bycoord.3pi.txt (copied) (copied from trunk/pstamp/test/gpc1/stack.bycoord.3pi.txt )
-
test/gpc1/stack.bydiff.txt (copied) (copied from trunk/pstamp/test/gpc1/stack.bydiff.txt )
-
test/gpc1/stack.byid.txt (copied) (copied from trunk/pstamp/test/gpc1/stack.byid.txt )
-
test/gpc1/stack.byskycell.txt (copied) (copied from trunk/pstamp/test/gpc1/stack.byskycell.txt )
-
test/gpc1/stack.md08.txt (copied) (copied from trunk/pstamp/test/gpc1/stack.md08.txt )
-
test/gpc1/test_qub_ps_request_20130426_225546.tbl (copied) (copied from trunk/pstamp/test/gpc1/test_qub_ps_request_20130426_225546.tbl )
-
test/gpc1/tests_todo (copied) (copied from trunk/pstamp/test/gpc1/tests_todo )
-
test/gpc1/warp.bycoord.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.bycoord.txt )
-
test/gpc1/warp.bycoord.wrongskycell.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.bycoord.wrongskycell.txt )
-
test/gpc1/warp.bydiff.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.bydiff.txt )
-
test/gpc1/warp.byexp.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.byexp.txt )
-
test/gpc1/warp.byid.noverlap.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.byid.noverlap.txt )
-
test/gpc1/warp.byid.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.byid.txt )
-
test/gpc1/warp.byskycell.txt (copied) (copied from trunk/pstamp/test/gpc1/warp.byskycell.txt )
-
test/maketestreq (copied) (copied from trunk/pstamp/test/maketestreq )
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) { -
branches/eam_branches/ipp-20130419/pstamp/src/ppstampMakeStamp.c
r34596 r35545 359 359 360 360 if (options->writeCMF) { 361 pmReadout * astromReadout = NULL;361 pmReadout *sourcesReadout = NULL; 362 362 if (astrom->fpa != input->fpa) { 363 astromReadout = pmFPAviewThisReadout(srcView, astrom->fpa); 364 } 365 if (!copySources(outReadout, astromReadout, astromReadout, extractRegion)) { 363 sourcesReadout = pmFPAviewThisReadout(srcView, astrom->fpa); 364 } else { 365 sourcesReadout = readout; 366 } 367 if (!copySources(outReadout, sourcesReadout, sourcesReadout, extractRegion)) { 366 368 psError(PS_ERR_UNKNOWN, false, "failed to extract sources from region of interest.\n"); 367 369 status = false; … … 784 786 785 787 // first look for detections in the input readout. Those would have come from the -sources file 788 if (!inReadout->analysis) { 789 psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no analysis metadata found on input\n"); 790 return false; 791 } 786 792 pmDetections *inDetections = psMetadataLookupPtr (&status, inReadout->analysis, "PSPHOT.DETECTIONS"); 787 793 if (!inDetections) { -
branches/eam_branches/ipp-20130419/pstamp/src/ppstampParseCamera.c
r35395 r35545 101 101 } 102 102 if (astrom) { 103 psLogMsg ("ppstamp", 3, "Using supplied astrometry \n");103 psLogMsg ("ppstamp", 3, "Using supplied astrometry.\n"); 104 104 } else { 105 psLogMsg ("ppstamp", 3, "Using header astrometry \n");105 psLogMsg ("ppstamp", 3, "Using header astrometry.\n"); 106 106 } 107 107 … … 119 119 // see if -sources file was supplied. 120 120 // If so define the file. 121 psPtr sourcesFile = psMetadataLookup Str(&status, config->arguments, "SOURCES");121 psPtr sourcesFile = psMetadataLookupPtr(&status, config->arguments, "SOURCES"); 122 122 if (sourcesFile) { 123 123 pmFPAfile *sources = pmFPAfileBindFromArgs(&status, input, config, "PPSTAMP.INPUT.SOURCES", "SOURCES"); -
branches/eam_branches/ipp-20130419/pstamp/src/pstampdump.c
r27259 r35545 94 94 if (!strcmp(extname, "PS1_PS_REQUEST")) { 95 95 psString extver = psMetadataLookupStr(NULL, header, "EXTVER"); 96 psString action = psMetadataLookupStr(NULL, header, "ACTION"); 97 psString email = psMetadataLookupStr(NULL, header, "EMAIL"); 96 98 if (!extver) { 97 99 // work around bug in MOPS request files … … 105 107 } 106 108 } 107 printf("%s %s %s\n", extname, extver, req_name); 109 if (!strcmp(extver, "1")) { 110 printf("%s %s %s\n", extname, extver, req_name); 111 } else { 112 if (!action) { 113 psErrorStackPrint(stderr, "failed to find action in fits header of: %s\n", fileName); 114 return PS_EXIT_DATA_ERROR; 115 } 116 if (!email) { 117 psErrorStackPrint(stderr, "failed to find action in fits header of: %s\n", email); 118 return PS_EXIT_DATA_ERROR; 119 } 120 printf("%s %s %s %s %s\n", extname, extver, req_name, action, email); 121 } 108 122 } else if (!strcmp(extname, "PS1_PS_RESULTS")) { 109 123 psS64 req_id = psMetadataLookupS64(NULL, header, "REQ_ID");
Note:
See TracChangeset
for help on using the changeset viewer.
