IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2009, 5:20:29 PM (17 years ago)
Author:
watersc1
Message:

Finished up my edits to the detrend cleanup, and some changes to my
copy of burntool and the pslib astrometry. Detrend cleanup has not
been tested yet. That's up next.

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

  • branches/czw_branch/cleanup/ippScripts/scripts/ipp_cleanup.pl

    r24902 r24951  
    827827            addFilename (\@files, "PPIMAGE.OUTPUT.MASK", $path_base, $class_id);
    828828            addFilename (\@files, "PPIMAGE.OUTPUT.VARIANCE", $path_base, $class_id);
    829             addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);
    830             addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);
    831             addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
     829#            addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);
     830#            addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);
     831#            addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
    832832            if ($mode eq "goto_purged") {
    833833                # additional files to remove for 'purge' mode
    834                 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);
    835                 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);
     834#                addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);
     835#                addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);
    836836                addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id);
    837837                addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id);
     
    839839                addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id);
    840840                addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id);
    841                 addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);
     841#                addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);
    842842            }
    843843
     
    866866                &my_die("Unable to perform dettool: $error_code", "$stage", $stage_id, $error_code);
    867867            }
     868
    868869        } else {
    869870
     
    880881        }
    881882    }
     883
     884    # Check to see if we can mark the whole detRunSummary object as cleaned.
     885
     886    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     887    $command .= " -dbname $dbname" if defined $dbname;
     888    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     889    unless ($success) {
     890        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     891        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     892    }
     893    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     894        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     895    $exps = parse_md_list($metadata) or
     896        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     897
     898    foreach my $exp (@$exps) {
     899        my $iteration = $exp->{iteration};
     900        my $command;
     901        if ($mode eq "goto_cleaned") {
     902            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     903        }
     904        if ($mode eq "goto_scrubbed") {
     905            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     906        }
     907        if ($mode eq "goto_purged") {
     908            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     909        }
     910        $command .= " -dbname $dbname" if defined $dbname;
     911        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     912            run(command => $command, verbose => $verbose);
     913        unless ($success) {
     914            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     915            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     916        }
     917    }
     918   
    882919    exit 0;
    883920}
     
    9731010        }
    9741011    }
     1012    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1013
     1014    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1015    $command .= " -dbname $dbname" if defined $dbname;
     1016    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1017    unless ($success) {
     1018        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1019        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1020    }
     1021    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1022        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1023    $exps = parse_md_list($metadata) or
     1024        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1025
     1026    foreach my $exp (@$exps) {
     1027        my $iteration = $exp->{iteration};
     1028        my $command;
     1029        if ($mode eq "goto_cleaned") {
     1030            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1031        }
     1032        if ($mode eq "goto_scrubbed") {
     1033            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1034        }
     1035        if ($mode eq "goto_purged") {
     1036            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1037        }
     1038        $command .= " -dbname $dbname" if defined $dbname;
     1039        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1040            run(command => $command, verbose => $verbose);
     1041        unless ($success) {
     1042            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1043            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1044        }
     1045    }
     1046
    9751047    exit 0;
    9761048}
     
    10731145        }
    10741146    }
     1147    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1148
     1149    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1150    $command .= " -dbname $dbname" if defined $dbname;
     1151    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1152    unless ($success) {
     1153        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1154        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1155    }
     1156    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1157        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1158    $exps = parse_md_list($metadata) or
     1159        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1160
     1161    foreach my $exp (@$exps) {
     1162        my $iteration = $exp->{iteration};
     1163        my $command;
     1164        if ($mode eq "goto_cleaned") {
     1165            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1166        }
     1167        if ($mode eq "goto_scrubbed") {
     1168            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1169        }
     1170        if ($mode eq "goto_purged") {
     1171            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1172        }
     1173        $command .= " -dbname $dbname" if defined $dbname;
     1174        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1175            run(command => $command, verbose => $verbose);
     1176        unless ($success) {
     1177            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1178            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1179        }
     1180    }
     1181
    10751182    exit 0;
    10761183}
     
    11321239        }
    11331240    }
     1241    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1242
     1243    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1244    $command .= " -dbname $dbname" if defined $dbname;
     1245    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1246    unless ($success) {
     1247        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1248        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1249    }
     1250    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1251        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1252    $exps = parse_md_list($metadata) or
     1253        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1254
     1255    foreach my $exp (@$exps) {
     1256        my $iteration = $exp->{iteration};
     1257        my $command;
     1258        if ($mode eq "goto_cleaned") {
     1259            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1260        }
     1261        if ($mode eq "goto_scrubbed") {
     1262            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1263        }
     1264        if ($mode eq "goto_purged") {
     1265            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1266        }
     1267        $command .= " -dbname $dbname" if defined $dbname;
     1268        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1269            run(command => $command, verbose => $verbose);
     1270        unless ($success) {
     1271            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1272            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1273        }
     1274    }
     1275
    11341276    exit 0;
    11351277
     
    12261368        }
    12271369    }
     1370    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1371
     1372    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1373    $command .= " -dbname $dbname" if defined $dbname;
     1374    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1375    unless ($success) {
     1376        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1377        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1378    }
     1379    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1380        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1381    $exps = parse_md_list($metadata) or
     1382        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1383
     1384    foreach my $exp (@$exps) {
     1385        my $iteration = $exp->{iteration};
     1386        my $command;
     1387        if ($mode eq "goto_cleaned") {
     1388            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1389        }
     1390        if ($mode eq "goto_scrubbed") {
     1391            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1392        }
     1393        if ($mode eq "goto_purged") {
     1394            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1395        }
     1396        $command .= " -dbname $dbname" if defined $dbname;
     1397        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1398            run(command => $command, verbose => $verbose);
     1399        unless ($success) {
     1400            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1401            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1402        }
     1403    }
     1404
    12281405    exit 0;
    12291406}
     
    13061483            # delete the temporary image datafiles
    13071484            addFilename (\@files, "PPIMAGE.OUTPUT", $path_base, $class_id);
    1308             addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);
    1309             addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);
    1310             addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
     1485#            addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);
     1486#            addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);
     1487#            addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
    13111488            if ($mode eq "goto_purged") {
    13121489                # additional files to remove for 'purge' mode
    1313                 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);
    1314                 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);
     1490#                addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id);
     1491#                addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id);
    13151492                addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id);
    13161493                addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id);
     
    13181495                addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id);
    13191496                addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id);
    1320                 addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);
     1497#                addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);
    13211498            }
    13221499
     
    13571534        }
    13581535    }
     1536    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1537
     1538    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1539    $command .= " -dbname $dbname" if defined $dbname;
     1540    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1541    unless ($success) {
     1542        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1543        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1544    }
     1545    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1546        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1547    $exps = parse_md_list($metadata) or
     1548        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1549
     1550    foreach my $exp (@$exps) {
     1551        my $iteration = $exp->{iteration};
     1552        my $command;
     1553        if ($mode eq "goto_cleaned") {
     1554            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1555        }
     1556        if ($mode eq "goto_scrubbed") {
     1557            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1558        }
     1559        if ($mode eq "goto_purged") {
     1560            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1561        }
     1562        $command .= " -dbname $dbname" if defined $dbname;
     1563        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1564            run(command => $command, verbose => $verbose);
     1565        unless ($success) {
     1566            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1567            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1568        }
     1569    }
     1570
    13591571    exit 0;
    13601572}
     
    14491661        }
    14501662    }
     1663    # Check to see if we can mark the whole detRunSummary object as cleaned.
     1664
     1665    $command = "$dettool -pendingcleanup_detrunsummary -det_id $stage_id";
     1666    $command .= " -dbname $dbname" if defined $dbname;
     1667    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     1668    unless ($success) {
     1669        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1670        &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1671    }
     1672    $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     1673        &my_die("Unable to parse metadata config doc", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1674    $exps = parse_md_list($metadata) or
     1675        &my_die("Unable to parse metadata list", "$stage (detRunSummary)", $stage_id, $PS_EXIT_PROG_ERROR);
     1676
     1677    foreach my $exp (@$exps) {
     1678        my $iteration = $exp->{iteration};
     1679        my $command;
     1680        if ($mode eq "goto_cleaned") {
     1681            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state cleaned";
     1682        }
     1683        if ($mode eq "goto_scrubbed") {
     1684            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state scrubbed";
     1685        }
     1686        if ($mode eq "goto_purged") {
     1687            $command = "$dettool -updatedetrunsummary -det_id $stage_id -iteration $iteration -data_state purged";
     1688        }
     1689        $command .= " -dbname $dbname" if defined $dbname;
     1690        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1691            run(command => $command, verbose => $verbose);
     1692        unless ($success) {
     1693            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1694            &my_die("Unable to perform dettool: $error_code", "$stage (detRunSummary)", $stage_id, $error_code);
     1695        }
     1696    }
     1697
    14511698    exit 0;
    14521699}
Note: See TracChangeset for help on using the changeset viewer.