Changeset 23186 for trunk/ippScripts/scripts/calibrate_dvo.pl
- Timestamp:
- Mar 4, 2009, 4:17:15 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/calibrate_dvo.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/calibrate_dvo.pl
r20100 r23186 52 52 my $caltool = can_run('caltool') or (warn "Can't find caltool" and $missing_tools = 1); 53 53 54 if ($missing_tools) { 54 if ($missing_tools) { 55 55 warn ("Can't find required tools"); 56 exit($PS_EXIT_CONFIG_ERROR); 56 exit($PS_EXIT_CONFIG_ERROR); 57 57 } 58 58 … … 74 74 cache_run(command => $command, verbose => 1); 75 75 76 unless ($success) { 76 unless ($success) { 77 77 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 78 78 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RESORT", $status, $dbname); … … 83 83 { 84 84 foreach my $filter (@filters) { 85 my $command = "$relphot $filter";86 $command .= "-D CATDIR $dvodb";87 $command .= "-region $RAs $RAe $DECs $DECe";85 my $command = "$relphot $filter"; 86 $command .= "-D CATDIR $dvodb"; 87 $command .= "-region $RAs $RAe $DECs $DECe"; 88 88 89 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =90 cache_run(command => $command, verbose => 1);89 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 90 cache_run(command => $command, verbose => 1); 91 91 92 unless ($success) { 93 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);94 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELPHOT", $status, $dbname);95 }92 unless ($success) { 93 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 94 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELPHOT", $status, $dbname); 95 } 96 96 } 97 97 } … … 101 101 if (0) { 102 102 foreach my $filter (@filters) { 103 my $command = "$uniphot $filter";104 $command .= "-D CATDIR $dvodb";105 $command .= "-region $RAs $RAe $DECs $DECe";103 my $command = "$uniphot $filter"; 104 $command .= "-D CATDIR $dvodb"; 105 $command .= "-region $RAs $RAe $DECs $DECe"; 106 106 107 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =108 cache_run(command => $command, verbose => 1);107 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 108 cache_run(command => $command, verbose => 1); 109 109 110 unless ($success) { 111 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);112 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "UNIPHOT", $status, $dbname);113 }110 unless ($success) { 111 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 112 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "UNIPHOT", $status, $dbname); 113 } 114 114 } 115 115 } … … 121 121 122 122 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 123 cache_run(command => $command, verbose => 1);123 cache_run(command => $command, verbose => 1); 124 124 125 unless ($success) { 126 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);127 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELASTRO.OBJECTS", $status, $dbname);125 unless ($success) { 126 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 127 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELASTRO.OBJECTS", $status, $dbname); 128 128 } 129 129 } … … 135 135 136 136 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 137 cache_run(command => $command, verbose => 1);137 cache_run(command => $command, verbose => 1); 138 138 139 unless ($success) { 140 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);141 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELASTRO.IMAGES", $status, $dbname);139 unless ($success) { 140 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 141 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RELASTRO.IMAGES", $status, $dbname); 142 142 } 143 143 } … … 169 169 my $region = shift; 170 170 my $last_step = shift; 171 my $status = shift;172 my $dbname = shift;171 my $status = shift; 172 my $dbname = shift; 173 173 174 174 carp($msg); 175 175 if (defined $cal_id && defined $region && defined $last_step && defined $status and not $no_update) { 176 176 my $command = "$caltool -addcalrun"; 177 $command .= " -cal_id $cal_id";177 $command .= " -cal_id $cal_id"; 178 178 $command .= " -region $region"; 179 $command .= " -last_step $last_step";180 $command .= " -state $status";179 $command .= " -last_step $last_step"; 180 $command .= " -state $status"; 181 181 $command .= " -dbname $dbname" if defined $dbname; 182 182 system ($command);
Note:
See TracChangeset
for help on using the changeset viewer.
