Changeset 26100 for trunk/ippScripts/scripts/addstar_run.pl
- Timestamp:
- Nov 12, 2009, 1:17:51 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/addstar_run.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/addstar_run.pl
r25816 r26100 104 104 if (defined $dvodbReal) { 105 105 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 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 112 109 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); 110 # addstar requires the user to have a valid .ptolemyrc which 111 # in turn points at ippconfig/dvo.site 116 112 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 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); 116 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 134 134 } 135 135 } … … 166 166 carp($msg); 167 167 if (defined $add_id and not $no_update) { 168 # This needs to be updated when addtool is written. BROKEN169 168 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));169 $command .= " -addprocessedexp"; 170 $command .= " -fault $exit_code"; 171 $command .= " -path_base $outroot" if defined $outroot; 172 $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400)); 174 173 $command .= " -dbname $dbname" if defined $dbname; 175 174 system ($command);
Note:
See TracChangeset
for help on using the changeset viewer.
