Changeset 25050
- Timestamp:
- Aug 11, 2009, 2:36:22 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 9 edited
-
ippScripts/scripts/ipp_cleanup.pl (modified) (22 diffs)
-
ippScripts/scripts/stack_skycell.pl (modified) (8 diffs)
-
ippTools/share/dettool_pendingcleanup_normalizedimfile.sql (modified) (1 diff)
-
ippTools/share/dettool_pendingcleanup_stacked.sql (modified) (1 diff)
-
ippconfig/recipes/psastro.config (modified) (1 diff)
-
psModules/src/astrom/pmAstrometryWCS.c (modified) (7 diffs)
-
psModules/src/astrom/pmAstrometryWCS.h (modified) (1 diff)
-
psModules/src/camera/pmFPA.h (modified) (1 diff)
-
psastro/src/psastroChipAstrom.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup/ippScripts/scripts/ipp_cleanup.pl
r24972 r25050 767 767 } 768 768 769 # # if there are no detProcessedImfiles (@$stdout_buf == 0), the reset the state to 'new' 770 # if (@$stdout_buf == 0) { 771 # my $command = "$dettool -det_id $stage_id -updateprocessedimfile -data_state new"; 772 # $command .= " -dbname $dbname" if defined $dbname; 773 774 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 775 # run(command => $command, verbose => $verbose); 776 # unless ($success) { 777 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 778 # &my_die("Unable to perform dettool: $error_code", "$stage", $stage_id, $error_code); 779 # } 780 # exit 0; 781 # } 782 783 if (@$stdout_buf == 0) { 784 exit 0; #silently abort. I need to fix this for propers 769 # if there are no detProcessedImfiles (@$stdout_buf == 0), the reset the state to 'new' 770 if (@$stdout_buf == 0) { 771 exit 0; # Silently exit if there's nothing to do. I don't know how we'd ever get here, but let's be safe. 785 772 } 786 773 … … 831 818 addFilename (\@files, "PPIMAGE.OUTPUT.MASK", $path_base, $class_id); 832 819 addFilename (\@files, "PPIMAGE.OUTPUT.VARIANCE", $path_base, $class_id); 833 # addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);834 # addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);835 # addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);836 820 if ($mode eq "goto_purged") { 837 821 # additional files to remove for 'purge' mode 838 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id); 839 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id); 840 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 841 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); 842 addFilename (\@files, "PPIMAGE.JPEG1", $path_base, $class_id); 843 addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id); 822 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 823 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); 844 824 addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id); 845 # addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);846 825 } 847 826 … … 960 939 # goto_scrubbed now requires the config file to not be present 961 940 if ($mode eq "goto_cleaned") { 962 my $config_file = $ipprc->filename("PS ASTRO.CONFIG", $path_base);941 my $config_file = $ipprc->filename("PSIMAGE.CONFIG", $path_base); 963 942 964 943 if (!$config_file or ! -e $config_file) { … … 968 947 } 969 948 elsif ($mode eq "goto_scrubbed") { 970 my $config_file = $ipprc->filename("PS ASTRO.CONFIG", $path_base);949 my $config_file = $ipprc->filename("PSIMAGE.CONFIG", $path_base); 971 950 972 951 if ($config_file and -e $config_file) { … … 978 957 my @files = (); 979 958 # delete the temporary image datafiles 980 addFilename (\@files, "PSASTRO.OUTPUT", $path_base);959 # I can't find anything to put here 981 960 if ($mode eq "goto_purged") { 982 961 # additional files to remove for 'purge' mode 983 962 addFilename (\@files, "PPIMAGE.JPEG1", $path_base); 984 963 addFilename (\@files, "PPIMAGE.JPEG2", $path_base); 985 addFilename (\@files, "PSASTRO.STATS", $path_base);986 964 } 987 965 # actual command to delete the files … … 1092 1070 1093 1071 my $status = 1; 1072 1094 1073 # if ($mode eq "goto_cleaned") { 1095 1074 # my $config_file = $ipprc->filename("PPMERGE.CONFIG", $path_base, $stage_id); … … 1112 1091 # } 1113 1092 # } 1093 1114 1094 if ($status) { 1115 1095 # delete the temporary image datafiles 1116 # addFilename(\@files, "PPMERGE.OUTPUT", $path_base, $stage_id); 1096 # There's no convenient way to get the detrend type, so I'm queueing all of them for deletion. 1097 # I understand that they all point to the same filename right now, but that may not be true in 1098 # the future. 1099 addFilename(\@files, "PPMERGE.OUTPUT.MASK", $path_base, $stage_id); 1100 addFilename(\@files, "PPMERGE.OUTPUT.BIAS", $path_base, $stage_id); 1101 addFilename(\@files, "PPMERGE.OUTPUT.DARK", $path_base, $stage_id); 1102 addFilename(\@files, "PPMERGE.OUTPUT.SHUTTER", $path_base, $stage_id); 1103 addFilename(\@files, "PPMERGE.OUTPUT.FLAT", $path_base, $stage_id); 1104 addFilename(\@files, "PPMERGE.OUTPUT.FRINGE", $path_base, $stage_id); 1105 1106 1117 1107 addFilename(\@files, "PPMERGE.OUTPUT.SIGMA", $path_base, $stage_id); 1118 1108 addFilename(\@files, "PPMERGE.OUTPUT.COUNT", $path_base, $stage_id); … … 1120 1110 if ($mode eq "goto_purged") { 1121 1111 # additional files to remove for 'purge' mode 1122 # Nothing? 1112 # addFilename(\@files, "PPMERGE.OUTPUT", $path_base, $stage_id); 1123 1113 } 1124 1114 … … 1241 1231 } 1242 1232 } else { 1243 # since 'camera' has only a single imfile, we can just update the run1244 1233 my $command = "$dettool -updatenormalizedstat -det_id $stage_id -iteration $iteration -class_id $class_id -data_state $error_state"; 1245 1234 $command .= " -dbname $dbname" if defined $dbname; … … 1296 1285 if ($stage eq "detrend.norm.imfile") { 1297 1286 die "--stage_id required for stage $stage\n" if !$stage_id; 1298 # this stage uses ' camtool'1287 # this stage uses 'dettool' 1299 1288 my $dettool = can_run('dettool') or die "Can't find dettool"; 1300 1289 … … 1341 1330 if ($status) { 1342 1331 my @files = (); 1343 # delete the temporary image datafiles 1344 addFilename (\@files, "PPIMAGE.OUTPUT", $path_base); 1345 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base); 1346 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base); 1332 1347 1333 if ($mode eq "goto_purged") { 1348 1334 # additional files to remove for 'purge' mode 1349 addFilename (\@files, "PPIMAGE.JPEG1", $path_base); 1350 addFilename (\@files, "PPIMAGE.JPEG2", $path_base); 1335 addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base); 1336 addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base); 1337 1338 addFilename (\@files, "PPIMAGE.OUTPUT", $path_base); 1339 addFilename (\@files, "PPIMAGE.STATS", $path_base); 1351 1340 } 1352 1341 # actual command to delete the files … … 1426 1415 if ($stage eq "detrend.norm.exp") { 1427 1416 die "--stage_id required for stage $stage\n" if !$stage_id; 1428 # this stage uses ' camtool'1417 # this stage uses 'dettool' 1429 1418 my $dettool = can_run('dettool') or die "Can't find dettool"; 1430 1419 … … 1439 1428 &my_die("Unable to perform dettool: $error_code", "$stage", $stage_id, $error_code); 1440 1429 } 1441 # This is a hack to bomb out until I can diagnose why pantasks wants to keep running this 1430 1442 1431 if (@$stdout_buf == 0) { 1443 1432 exit 0; … … 1458 1447 # goto_scrubbed now requires the config file to not be present 1459 1448 if ($mode eq "goto_cleaned") { 1460 my $config_file = $ipprc->filename("P SASTRO.CONFIG", $path_base);1449 my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base); 1461 1450 1462 1451 if (!$config_file or ! -e $config_file) { … … 1466 1455 } 1467 1456 elsif ($mode eq "goto_scrubbed") { 1468 my $config_file = $ipprc->filename("P SASTRO.CONFIG", $path_base);1457 my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base); 1469 1458 1470 1459 if ($config_file and -e $config_file) { … … 1476 1465 my @files = (); 1477 1466 # delete the temporary image datafiles 1478 # addFilename (\@files, "PSASTRO.OUTPUT", $path_base);1479 1467 if ($mode eq "goto_purged") { 1480 1468 # additional files to remove for 'purge' mode 1481 1469 addFilename (\@files, "PPIMAGE.JPEG1", $path_base); 1482 1470 addFilename (\@files, "PPIMAGE.JPEG2", $path_base); 1483 # addFilename (\@files, "PSASTRO.STATS", $path_base);1484 1471 } 1485 1472 # actual command to delete the files … … 1576 1563 } 1577 1564 1578 # if there are no detProcessedImfiles (@$stdout_buf == 0), the reset the state to 'new'1579 # if (@$stdout_buf == 0) {1580 # my $command = "$dettool -det_id $stage_id -updateresidimfile -data_state new";1581 # $command .= " -dbname $dbname" if defined $dbname;1582 1583 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =1584 # run(command => $command, verbose => $verbose);1585 # unless ($success) {1586 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);1587 # &my_die("Unable to perform dettool: $error_code", "$stage", $stage_id, $error_code);1588 # }1589 # exit 0;1590 # }1591 1592 1565 if (@$stdout_buf == 0) { 1593 exit 0; #silently abort. I need to fix this for propers1566 exit 0; 1594 1567 } 1595 1568 … … 1639 1612 # delete the temporary image datafiles 1640 1613 addFilename (\@files, "PPIMAGE.OUTPUT", $path_base, $class_id); 1641 # addFilename (\@files, "PPIMAGE.CHIP", $path_base, $class_id);1642 # addFilename (\@files, "PPIMAGE.CHIP.MASK", $path_base, $class_id);1643 # addFilename (\@files, "PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);1644 1614 if ($mode eq "goto_purged") { 1645 1615 # additional files to remove for 'purge' mode 1646 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA1", $path_base, $class_id); 1647 # addFilename (\@files, "PPIMAGE.OUTPUT.FPA2", $path_base, $class_id); 1648 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 1649 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); 1650 addFilename (\@files, "PPIMAGE.JPEG1", $path_base, $class_id); 1651 addFilename (\@files, "PPIMAGE.JPEG2", $path_base, $class_id); 1616 addFilename (\@files, "PPIMAGE.BIN1", $path_base, $class_id); 1617 addFilename (\@files, "PPIMAGE.BIN2", $path_base, $class_id); 1652 1618 addFilename (\@files, "PPIMAGE.STATS", $path_base, $class_id); 1653 # addFilename (\@files, "PPIMAGE.CONFIG", $path_base, $class_id);1654 1619 } 1655 1620 … … 1758 1723 my $iteration = $exp->{iteration}; 1759 1724 my $path_base = $exp->{path_base}; 1760 1725 # my $class_id = $exp->{class_id} 1761 1726 my $status = 1; 1762 1727 # don't clean up unless the data needed to update is available 1763 1728 # goto_scrubbed now requires the config file to not be present 1764 1729 if ($mode eq "goto_cleaned") { 1765 my $config_file = $ipprc->filename("P SASTRO.CONFIG", $path_base);1730 my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base); 1766 1731 1767 1732 if (!$config_file or ! -e $config_file) { … … 1771 1736 } 1772 1737 elsif ($mode eq "goto_scrubbed") { 1773 my $config_file = $ipprc->filename("P SASTRO.CONFIG", $path_base);1738 my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base); 1774 1739 1775 1740 if ($config_file and -e $config_file) { … … 1781 1746 my @files = (); 1782 1747 # delete the temporary image datafiles 1783 addFilename (\@files, "PSASTRO.OUTPUT", $path_base);1784 1748 if ($mode eq "goto_purged") { 1785 1749 # additional files to remove for 'purge' mode 1786 addFilename (\@files, "PPIMAGE.JPEG1", $path_base); 1787 addFilename (\@files, "PPIMAGE.JPEG2", $path_base); 1788 addFilename (\@files, "PSASTRO.STATS", $path_base); 1750 addFilename (\@files, "PPIMAGE.JPEG1", $path_base);#, $class_id); 1751 addFilename (\@files, "PPIMAGE.JPEG2", $path_base);#, $class_id); 1789 1752 } 1790 1753 # actual command to delete the files … … 1876 1839 foreach my $file (@$files) { 1877 1840 print STDERR "unlinking $file\n"; 1878 print TMPLOG "$file\n"; 1841 print TMPLOG "$stage $stage_id $file"; 1842 my $ff = $file; 1843 $ff =~ s%^file://%%; 1844 unless (-e $ff) { 1845 print TMPLOG "\t File not found\n"; 1846 } 1847 else { 1848 print TMPLOG "\n"; 1849 } 1850 1879 1851 $ipprc->file_delete($file); 1880 1852 } -
branches/czw_branch/cleanup/ippScripts/scripts/stack_skycell.pl
r23745 r25050 65 65 66 66 my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $stack_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 67 $| = 1; 68 print "I've set up: $stack_id\n"; 67 69 68 70 # XXX camera is not known here; cannot use filerules... … … 107 109 &my_die("Stack list contains less than two elements", $stack_id, $PS_EXIT_SYS_ERROR) unless 108 110 scalar @$files >= 2; 111 112 print "I've loaded my inputs: $stack_id\n"; 109 113 110 114 # Parse the list of input files to get the tesselation, skycell identifiers and camera … … 146 150 } 147 151 152 print "I've configured everything: $stack_id\n"; 153 148 154 # Generate MDC file with the inputs 149 155 my $tess_base = basename($tess_id); … … 180 186 print $listFile "END\n\n"; 181 187 } 188 189 print "I've checked everything: $stack_id\n"; 182 190 183 191 # Get the output filenames … … 200 208 201 209 my $cmdflags; 210 202 211 203 212 # Perform stacking … … 265 274 # &my_die("Couldn't find expected output file: $bin2Name", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); 266 275 } 267 276 277 print "I've stacked $listName: $stack_id\n"; 268 278 } 269 279 … … 298 308 } 299 309 310 print "I've updated teh database: $stack_id\n"; 311 300 312 301 313 my $my_die_called = 0; … … 372 384 } 373 385 386 print "I've reached the end of processing with a code of $?: $stack_id\n"; 374 387 375 388 END { -
branches/czw_branch/cleanup/ippTools/share/dettool_pendingcleanup_normalizedimfile.sql
r24972 r25050 1 SELECT 1 SELECT DISTINCT 2 2 detNormalizedImfile.*, 3 3 rawExp.camera -
branches/czw_branch/cleanup/ippTools/share/dettool_pendingcleanup_stacked.sql
r24972 r25050 1 SELECT 1 SELECT DISTINCT 2 2 detStackedImfile.*, 3 3 rawExp.camera -
branches/czw_branch/cleanup/ippconfig/recipes/psastro.config
r24654 r25050 3 3 PSASTRO.ONLY.REFSTARS BOOL FALSE # skip all but refstar matches 4 4 PSASTRO.SAVE.REFMATCH BOOL FALSE # save refstar matches as table in output smf file 5 6 # select which WCS style to use on output images. 7 PSASTRO.WCS.USECDKEYS BOOL FALSE 5 8 6 9 # perform single-chip astrometry? -
branches/czw_branch/cleanup/psModules/src/astrom/pmAstrometryWCS.c
r24951 r25050 289 289 // test the CDELTi varient 290 290 if (pcKeys) { 291 wcs-> useCDkeys = 0;291 wcs->wcsCDkeys = 0; 292 292 wcs->cdelt1 = psMetadataLookupF64 (&status, header, "CDELT1"); 293 293 wcs->cdelt2 = psMetadataLookupF64 (&status, header, "CDELT2"); … … 335 335 // test the CDi_j varient 336 336 if (cdKeys) { 337 wcs-> useCDkeys = 1;337 wcs->wcsCDkeys = 1; 338 338 wcs->trans->x->coeff[1][0] = psMetadataLookupF64 (&status, header, "CD1_1"); // == PC1_1 339 339 wcs->trans->x->coeff[0][1] = psMetadataLookupF64 (&status, header, "CD1_2"); // == PC1_2 … … 377 377 // XXX make it optional to write out CDi_j terms, or other versions 378 378 // apply CDELT1,2 (degrees / pixel) to yield PCi,j terms of order unity 379 if (!(wcs-> useCDkeys)) {379 if (!(wcs->wcsCDkeys)) { 380 380 381 381 double cdelt1 = wcs->cdelt1; … … 419 419 } 420 420 } 421 if (wcs-> useCDkeys) {421 if (wcs->wcsCDkeys) { 422 422 423 423 psMetadataAddF64 (header, PS_LIST_TAIL, "CD1_1", PS_META_REPLACE, "", wcs->trans->x->coeff[1][0]); … … 555 555 fpa->toSky->R -= 2.0*M_PI; 556 556 557 fpa->wcsCDkeys = wcs->wcsCDkeys; 558 557 559 psTrace ("psastro", 5, "toFPA: %f %f (%f,%f),(%f,%f)\n", 558 560 chip->toFPA->x->coeff[0][0], chip->toFPA->y->coeff[0][0], … … 702 704 wcs->cdelt2 = hypot (wcs->trans->y->coeff[1][0], wcs->trans->y->coeff[0][1]); 703 705 706 wcs->wcsCDkeys = fpa->wcsCDkeys; 704 707 psFree (toTPA); 705 708 … … 942 945 wcs->trans = psPlaneTransformAlloc (nXorder, nYorder); 943 946 wcs->toSky = NULL; 944 wcs-> useCDkeys = 0;947 wcs->wcsCDkeys = 0; 945 948 946 949 memset (wcs->ctype1, 0, PM_ASTROM_WCS_TYPE_SIZE); -
branches/czw_branch/cleanup/psModules/src/astrom/pmAstrometryWCS.h
r24951 r25050 23 23 double crpix1, crpix2; 24 24 double cdelt1, cdelt2; 25 bool useCDkeys;25 bool wcsCDkeys; 26 26 psProjection *toSky; 27 27 psPlaneTransform *trans; -
branches/czw_branch/cleanup/psModules/src/camera/pmFPA.h
r21363 r25050 48 48 psPlaneTransform *toTPA; ///< Transformation from focal plane to tangent plane, or NULL 49 49 psProjection *toSky; ///< Projection from tangent plane to sky, or NULL 50 bool wcsCDkeys; 50 51 // Information 51 52 psMetadata *concepts; ///< FPA-level concepts -
branches/czw_branch/cleanup/psastro/src/psastroChipAstrom.c
r24036 r25050 97 97 // write the elapsed time here; this will be updated in psastroMosaicAstrometry, if called 98 98 psMetadataAddF32 (updates, PS_LIST_TAIL, "DT_ASTR", PS_META_REPLACE, "elapsed psastro time", psTimerMark ("psastroAnalysis")); 99 99 100 fpa->wcsCDkeys = psMetadataLookupBool(&status, recipe , "PSASTRO.WCS.USECDKEYS"); 100 101 pmAstromWriteWCS (updates, fpa, chip, NONLIN_TOL); 101 102
Note:
See TracChangeset
for help on using the changeset viewer.
