Changeset 27838 for branches/tap_branches/ippScripts/scripts/addstar_run.pl
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/addstar_run.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ippScripts/scripts/addstar_run.pl
r25816 r27838 8 8 use Sys::Hostname; 9 9 my $host = hostname(); 10 my $date = `date`; 10 11 print "\n\n"; 11 print "Starting script $0 on $host \n\n";12 print "Starting script $0 on $host at $date\n\n"; 12 13 13 14 use DateTime; … … 63 64 defined $add_id and 64 65 defined $outroot and 66 defined $camroot and 65 67 defined $camera; 66 68 … … 104 106 if (defined $dvodbReal) { 105 107 106 ## addstar can either save the full set of detections, or just 107 ## the image metadata, in the dvodb. this is set in the 108 ## database table addRun 109 110 # addstar requires the user to have a valid .ptolemyrc which 111 # in turn points at ippconfig/dvo.site 108 ## addstar can either save the full set of detections, or just 109 ## the image metadata, in the dvodb. this is set in the 110 ## database table addRun 112 111 113 # get the names for the camera and the real input file 114 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 115 my $realFile = $ipprc->file_resolve($fpaObjects); 112 # addstar requires the user to have a valid .ptolemyrc which 113 # in turn points at ippconfig/dvo.site 116 114 117 # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default) 118 my $command = "$addstar -update"; # XXX optionally set -update? 119 $command .= " -D CAMERA $camdir"; 120 $command .= " -D CATDIR $dvodbReal"; 121 $command .= " $realFile"; 122 $command .= " -use-name $fpaObjects"; # DVO wants the neb-name as a file reference 123 $command .= " -image" if $image_only; 124 125 my $mjd_addstar_start = DateTime->now->mjd; # MJD of starting script 126 127 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 128 run(command => $command, verbose => $verbose); 129 unless ($success) { 130 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 131 &my_die("Unable to perform addstar: $error_code", $add_id, $error_code); 132 } 133 $dtime_addstar = 86400.0*(DateTime->now->mjd - $mjd_addstar_start); # MJD of starting script 115 # get the names for the camera and the real input file 116 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 117 my $realFile = $ipprc->file_resolve($fpaObjects) or &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR); 118 119 # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default) 120 my $command = "$addstar -update"; # XXX optionally set -update? 121 $command .= " -D CAMERA $camdir"; 122 $command .= " -D CATDIR $dvodbReal"; 123 $command .= " $realFile"; 124 $command .= " -use-name $fpaObjects"; # DVO wants the neb-name as a file reference 125 $command .= " -image" if $image_only; 126 127 my $mjd_addstar_start = DateTime->now->mjd; # MJD of starting script 128 129 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 130 run(command => $command, verbose => $verbose); 131 unless ($success) { 132 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 133 &my_die("Unable to perform addstar: $error_code", $add_id, $error_code); 134 } 135 $dtime_addstar = 86400.0*(DateTime->now->mjd - $mjd_addstar_start); # MJD of starting script 134 136 } 135 137 } … … 166 168 carp($msg); 167 169 if (defined $add_id and not $no_update) { 168 # This needs to be updated when addtool is written. BROKEN169 170 my $command = "$addtool -add_id $add_id"; 170 $command .= " -addprocessedexp";171 $command .= " -fault $exit_code";172 $command .= " -path_base $outroot" if defined $outroot;173 $command .= (" -dtime_script" . ((DateTime->now->mjd - $mjd_start) * 86400));171 $command .= " -addprocessedexp"; 172 $command .= " -fault $exit_code"; 173 $command .= " -path_base $outroot" if defined $outroot; 174 $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400)); 174 175 $command .= " -dbname $dbname" if defined $dbname; 175 176 system ($command);
Note:
See TracChangeset
for help on using the changeset viewer.
