IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ippScripts/scripts/calibrate_dvo.pl

    r20100 r23352  
    5252my $caltool  = can_run('caltool')  or (warn "Can't find caltool"  and $missing_tools = 1);
    5353
    54 if ($missing_tools) { 
     54if ($missing_tools) {
    5555    warn ("Can't find required tools");
    56     exit($PS_EXIT_CONFIG_ERROR); 
     56    exit($PS_EXIT_CONFIG_ERROR);
    5757}
    5858
     
    7474        cache_run(command => $command, verbose => 1);
    7575
    76     unless ($success) { 
     76    unless ($success) {
    7777        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    7878        &my_die ("Unable to perform addstar -resort on region $region: $error_code", $cal_id, $region, "RESORT", $status, $dbname);
     
    8383{
    8484    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";
    8888
    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);
    9191
    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        }
    9696    }
    9797}
     
    101101if (0) {
    102102    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";
    106106
    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);
    109109
    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        }
    114114    }
    115115}
     
    121121
    122122    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    123         cache_run(command => $command, verbose => 1);
     123        cache_run(command => $command, verbose => 1);
    124124
    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);
    128128    }
    129129}
     
    135135
    136136    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    137         cache_run(command => $command, verbose => 1);
     137        cache_run(command => $command, verbose => 1);
    138138
    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);
    142142    }
    143143}
     
    169169    my $region    = shift;
    170170    my $last_step = shift;
    171     my $status    = shift;
    172     my $dbname    = shift;
     171    my $status    = shift;
     172    my $dbname    = shift;
    173173
    174174    carp($msg);
    175175    if (defined $cal_id && defined $region && defined $last_step && defined $status and not $no_update) {
    176176        my $command = "$caltool -addcalrun";
    177         $command .= " -cal_id $cal_id";
     177        $command .= " -cal_id $cal_id";
    178178        $command .= " -region $region";
    179         $command .= " -last_step $last_step";
    180         $command .= " -state $status";
     179        $command .= " -last_step $last_step";
     180        $command .= " -state $status";
    181181        $command .= " -dbname $dbname" if defined $dbname;
    182182        system ($command);
Note: See TracChangeset for help on using the changeset viewer.