Changeset 31435
- Timestamp:
- May 4, 2011, 3:59:42 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
- 14 copied
-
dbconfig/changes.txt (modified) (1 diff, 1 prop)
-
dbconfig/lap.md (copied) (copied from branches/czw_branch/20110406/dbconfig/lap.md )
-
ippScripts/Build.PL (modified) (1 diff)
-
ippScripts/MANIFEST (modified) (1 diff)
-
ippScripts/scripts/diff_skycell.pl (modified) (3 diffs)
-
ippScripts/scripts/lap_science.pl (copied) (copied from branches/czw_branch/20110406/ippScripts/scripts/lap_science.pl )
-
ippScripts/scripts/magic_destreak.pl (modified) (1 diff)
-
ippTasks/lap.pro (copied) (copied from branches/czw_branch/20110406/ippTasks/lap.pro )
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/laptool_definerun.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_definerun.sql )
-
ippTools/share/laptool_exposures.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_exposures.sql )
-
ippTools/share/laptool_inactiveexp.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_inactiveexp.sql )
-
ippTools/share/laptool_listsequence.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_listsequence.sql )
-
ippTools/share/laptool_pendingchipexp.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_pendingchipexp.sql )
-
ippTools/share/laptool_pendingexp.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_pendingexp.sql )
-
ippTools/share/laptool_pendingrun.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_pendingrun.sql )
-
ippTools/share/laptool_stacks.sql (copied) (copied from branches/czw_branch/20110406/ippTools/share/laptool_stacks.sql )
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 diff, 1 prop)
-
ippTools/share/stacktool_sassskyfile.sql (modified) (1 diff)
-
ippTools/src (modified) (2 props)
-
ippTools/src/Makefile.am (modified) (3 diffs)
-
ippTools/src/difftool.c (modified) (1 diff)
-
ippTools/src/difftoolConfig.c (modified) (1 diff)
-
ippTools/src/laptool.c (copied) (copied from branches/czw_branch/20110406/ippTools/src/laptool.c )
-
ippTools/src/laptool.h (copied) (copied from branches/czw_branch/20110406/ippTools/src/laptool.h )
-
ippTools/src/laptoolConfig.c (copied) (copied from branches/czw_branch/20110406/ippTools/src/laptoolConfig.c )
-
ippTools/src/magictool.c (modified) (1 prop)
-
ippconfig/recipes/ppSub.config (modified) (2 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 diff, 1 prop)
-
ppStack/src/ppStackCombineFinal.c (modified) (2 diffs)
-
ppStack/src/ppStackCombineInitial.c (modified) (1 diff)
-
ppStack/src/ppStackLoop.c (modified) (1 diff)
-
ppStack/src/ppStackReject.c (modified) (2 diffs)
-
ppSub/src/ppSubDefineOutput.c (modified) (3 diffs)
-
ppSub/src/ppSubLoop.c (modified) (6 diffs)
-
ppSub/src/ppSubMakePSF.c (modified) (1 diff)
-
ppSub/src/ppSubReadoutPhotometry.c (modified) (1 diff)
-
ppSub/src/ppSubReadoutSubtract.c (modified) (2 diffs)
-
ppSub/src/ppSubThreshold.c (modified) (2 diffs)
-
psLib/src/db/psDB.c (modified) (1 diff)
-
psModules/src/imcombine/pmStackReject.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/changes.txt
- Property svn:mergeinfo deleted
r31408 r31435 2131 2131 2132 2132 UPDATE dbversion set schema_version = '1.1.70', updated= CURRENT_TIMESTAMP(); 2133 -
trunk/ippScripts/Build.PL
r30373 r31435 117 117 scripts/skycell_jpeg.pl 118 118 scripts/diffphot.pl 119 scripts/lap_science.pl 119 120 )], 120 121 dist_abstract => 'Scripts for running the Pan-STARRS IPP', -
trunk/ippScripts/MANIFEST
r30049 r31435 45 45 scripts/ipp_cluster_load_monitor.pl 46 46 scripts/skycell_jpeg.pl 47 scripts/lap_science.pl 47 48 t/00_distribution.t -
trunk/ippScripts/scripts/diff_skycell.pl
r30843 r31435 31 31 my $ppSub = can_run('ppSub') or (warn "Can't find ppSub" and $missing_tools = 1); 32 32 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 33 my $nebInsert = can_run('neb-insert') or (warn "Can't find neb-insert" and $missing_tools = 1); 33 34 if ($missing_tools) { 34 35 warn("Can't find required tools."); … … 265 266 my $do_photom = 1; 266 267 my $dump_config = 1; 268 if ($reduction eq 'NOCONVDIFF') { 269 $do_photom = 0; 270 } 267 271 if ($run_state eq 'new') { 268 272 $configuration = prepare_output("PPSUB.CONFIG", $outroot, 1); … … 380 384 } 381 385 } 386 if ($reduction eq 'NOCONVDIFF') { 387 my $refConv = prepare_output("PPSUB.REF.CONV", $outroot, 0); 388 my $templateFile = $ipprc->file_resolve($template,0); 389 $command = "$nebInsert $refConv $templateFile"; 390 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 391 run(command => $command, verbose => $verbose); 392 unless ($success) { 393 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 394 &my_die("Unable to perform neb-insert: $error_code", $diff_id, $skycell_id, $error_code); 395 } 396 } 397 398 382 399 } elsif ($run_state eq 'update') { 383 400 &my_die("Update resulted in poor quality image: $quality", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR); -
trunk/ippScripts/scripts/magic_destreak.pl
r30694 r31435 360 360 $command .= " -chip_mask $ch_mask" if defined $ch_mask; 361 361 $command .= " -weight $weight" if defined $weight; 362 $command .= " -sources $sources" if defined $sources; 362 if ((defined($sources))&&($ipprc->file_exists($sources))) { 363 $command .= " -sources $sources" if defined $sources; 364 } 365 else { 366 print "Did not add sources because they do not appear to exist. This may be an error.\n"; 367 } 363 368 $command .= " -skycelllist $skycell_list" if defined $skycell_list; 364 369 $command .= " -replace" if $replace; -
trunk/ippTools/share/Makefile.am
r31375 r31435 414 414 diffphottool_advance.sql \ 415 415 diffphottool_revert.sql \ 416 diffphottool_data.sql 416 diffphottool_data.sql \ 417 laptool_definerun.sql \ 418 laptool_exposures.sql \ 419 laptool_inactiveexp.sql \ 420 laptool_listsequence.sql \ 421 laptool_pendingchipexp.sql \ 422 laptool_pendingexp.sql \ 423 laptool_pendingrun.sql \ 424 laptool_stacks.sql 425 -
trunk/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed
/branches/czw_branch/20110406/ippTools/share/pxadmin_create_tables.sql (added) merged: 31396,31407,31434
r31375 r31435 1891 1891 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1892 1892 1893 -- Tables for large area processing 1894 1895 CREATE TABLE lapSequence ( 1896 seq_id BIGINT AUTO_INCREMENT, -- Identifier for the processing sequence 1897 name VARCHAR(64) NOT NULL, -- short name of the sequence 1898 description VARCHAR(255) NOT NULL, -- longer description of the sequence 1899 PRIMARY KEY(seq_id), 1900 KEY(name) 1901 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1902 1903 CREATE TABLE lapRun ( 1904 lap_id BIGINT AUTO_INCREMENT, -- Identifier for the processing run 1905 seq_id BIGINT NOT NULL, -- Identifier to match to the sequence 1906 tess_id VARCHAR(64) NOT NULL, -- tessellation id to use 1907 projection_cell VARCHAR(64) NOT NULL, -- projection cell from the tessellation to consider 1908 filter VARCHAR(64) NOT NULL, -- filter 1909 state VARCHAR(64) NOT NULL, -- state of run 1910 label VARCHAR(64) NOT NULL, -- processing label 1911 dist_group VARCHAR(64) NOT NULL, -- distribution group for products of this run 1912 registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered 1913 fault SMALLINT NOT NULL, -- fault code 1914 quick_sass_id BIGINT, -- stackAssociation id for quick stack 1915 final_sass_id BIGINT, -- stackAssociation id for final stack 1916 PRIMARY KEY(lap_id), 1917 KEY(seq_id), 1918 KEY(projection_cell), 1919 KEY(filter), 1920 KEY(state), 1921 KEY(label), 1922 KEY(fault), 1923 FOREIGN KEY(seq_id) REFERENCES lapSequence(seq_id), 1924 FOREIGN KEY(quick_sass_id) REFERENCES stackAssociation(sass_id), 1925 FOREIGN KEY(final_sass_id) REFERENCES stackAssociation(sass_id) 1926 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1927 1928 CREATE TABLE lapExp ( 1929 lap_id BIGINT NOT NULL, -- Link back to processing run 1930 exp_id BIGINT NOT NULL, -- exposure definition 1931 chip_id BIGINT, -- processing id from chipRun 1932 pair_id BIGINT, -- companion chip_id 1933 private TINYINT DEFAULT 0, -- denotes this exposure is private 1934 pairwise TINYINT DEFAULT 0, -- denotes if this exposure should be pairwise diffed 1935 active TINYINT DEFAULT 0, -- denotes if this exposure is currently in use 1936 data_state VARCHAR(64) NOT NULL, -- state of exposure 1937 PRIMARY KEY (lap_id), 1938 KEY (exp_id), 1939 KEY (chip_id), 1940 KEY (pair_id), 1941 KEY (data_state), 1942 FOREIGN KEY (lap_id) REFERENCES lapRun(lap_id), 1943 FOREIGN KEY (exp_id) REFERENCES rawExp(exp_id), 1944 FOREIGN KEY (chip_id,exp_id) REFERENCES chipRun(chip_id,exp_id), 1945 FOREIGN KEY (pair_id) REFERENCES chipRun(chip_id) 1946 ) ENGINE=innodb DEFAULT CHARSET=latin1; 1947 1893 1948 -- This comment line is here to avoid empty query error. 1894 1949 -- Another way to avoid that problem is to omit the semicolon above but I think that is untidy. - Property svn:mergeinfo changed
-
trunk/ippTools/share/stacktool_sassskyfile.sql
r28375 r31435 18 18 where stack_id = stackRun.stack_id limit 1 19 19 ) as camera 20 FROM stack Run21 JOIN stack SumSkyfile USING(stack_id)22 JOIN stack AssociationMapUSING(stack_id)23 JOIN stackAssociation USING(sass_id)20 FROM stackAssociation 21 JOIN stackAssociationMap USING(sass_id) 22 JOIN stackRun USING(stack_id) 23 LEFT JOIN stackSumSkyfile USING(stack_id) -
trunk/ippTools/src
- Property svn:ignore
-
old new 42 42 diffphottool 43 43 minidvodbtool 44 laptool
-
- Property svn:mergeinfo changed
/branches/czw_branch/20110406/ippTools/src (added) merged: 31253,31338,31385,31396-31397,31407,31409,31417,31428-31430,31433-31434
- Property svn:ignore
-
trunk/ippTools/src/Makefile.am
r29528 r31435 28 28 pubtool \ 29 29 diffphottool \ 30 minidvodbtool 30 minidvodbtool \ 31 laptool 31 32 32 33 pkginclude_HEADERS = \ … … 76 77 pubtool.h \ 77 78 diffphottool.h \ 78 minidvodbtool.h 79 minidvodbtool.h \ 80 laptool.h 79 81 80 82 lib_LTLIBRARIES = libpxtools.la … … 290 292 minidvodbtoolConfig.c 291 293 294 laptool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) 295 laptool_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la 296 laptool_SOURCES = \ 297 laptool.c \ 298 laptoolConfig.c 299 292 300 clean-local: 293 301 -rm -f TAGS -
trunk/ippTools/src/difftool.c
r31237 r31435 1625 1625 PXOPT_COPY_S64(config->args, selectWhere, "-exp_id", "inputRawExp.exp_id", "=="); 1626 1626 PXOPT_COPY_S64(config->args, selectWhere, "-template_exp_id", "templateRawExp.exp_id", "=="); 1627 PXOPT_COPY_S64(config->args, selectWhere, "-template_warp_id", "templateWarpRun.warp_id", "=="); 1627 1628 PXOPT_COPY_STR(config->args, selectWhere, "-filter", "inputRawExp.filter", "=="); 1628 1629 PXOPT_COPY_STR(config->args, selectWhere, "-obs_mode", "inputRawExp.obs_mode", "=="); -
trunk/ippTools/src/difftoolConfig.c
r31237 r31435 278 278 psMetadataAddBool(definewarpwarpArgs, PS_LIST_TAIL, "-not-bothways", 0, "only do the single-direction subtraction?", false); 279 279 psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL, "-template_exp_id", 0, "search by template exposure ID", 0); 280 psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL, "-template_warp_id", 0, "search by template warp ID", 0); 280 281 psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-filter", 0, "search by filter", NULL); 281 282 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-distance", 0, "limit distance between input and template (deg)", NAN); -
trunk/ippTools/src/magictool.c
- Property svn:mergeinfo changed
/branches/czw_branch/20110406/ippTools/src/magictool.c (added) merged: 31434
- Property svn:mergeinfo changed
-
trunk/ippconfig/recipes/ppSub.config
r31163 r31435 76 76 INVERSE BOOL FALSE # Generate inverse subtraction? 77 77 PHOTOMETRY BOOL FALSE # Perform photometry? 78 NOCONVOLVE BOOL FALSE # Skip convolution? 79 78 80 79 81 FORCED.PHOTOMETRY.BOTH BOOL FALSE # forced photometry on input sources? … … 141 143 FORCED.PHOTOMETRY.BOTH BOOL TRUE # forced photometry on input sources 142 144 END 145 146 # Difference of warp - quickstack 147 WARPQSTACK METADATA 148 DUAL BOOL TRUE # Dual convolution? 149 INVERSE BOOL FALSE # Generate inverse subtraction? 150 PHOTOMETRY BOOL TRUE # Perform photometry? 151 152 # penalty of 1.0 153 # DUAL convolution is more sensitive to the number of kernels 154 # do not provide as many orders as for SINGLE 155 # @ISIS.WIDTHS F32 2.4 5.0 10.0 # Gaussian kernel FWHM values 156 @ISIS.WIDTHS F32 1.5 3.0 6.0 # Gaussian kernel FWHM values 157 # @ISIS.WIDTHS F32 2.0 3.0 5.0 # Gaussian kernel FWHM values 158 # @ISIS.WIDTHS F32 2.1 4.2 8.4 # Gaussian kernel FWHM values 159 @ISIS.ORDERS S32 2 2 2 # Polynomial orders for ISIS kernels 160 161 SCALE.REF F32 5.0 # FWHM reference for kernel parameter scaling 162 KERNEL.SIZE S32 15 # Kernel half-size (pixels) 163 STAMP.FOOTPRINT S32 15 # Size of stamps (pixels) 164 END 165 166 # Do no convolution 167 UNCONVOLVED METADATA 168 DUAL BOOL FALSE # Dual convolution? 169 INVERSE BOOL FALSE # Generate inverse subtraction? 170 PHOTOMETRY BOOL FALSE # Perform photometry? 171 NOCONVOLVE BOOL TRUE 172 CONVOLVE.TARGET STR SINGLE2 # convolution direction 173 END 174 175 # Difference of warp - junkstack 176 WARPJSTACK METADATA 177 DUAL BOOL FALSE # Dual convolution? 178 INVERSE BOOL FALSE # Generate inverse subtraction? 179 PHOTOMETRY BOOL TRUE # Perform photometry? 180 CONVOLVE.TARGET STR SINGLE1 # convolution direction 181 END 182 143 183 144 184 #PR image class -
trunk/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed
/branches/czw_branch/20110406/ippconfig/recipes/reductionClasses.mdc (added) merged: 31253,31302,31434
r31379 r31435 218 218 END 219 219 220 WARPQSTACK METADATA 221 DIFF_PPSUB STR WARPQSTACK 222 DIFF_PSPHOT STR DIFF 223 JPEG_BIN1 STR PPIMAGE_J1 224 JPEG_BIN2 STR PPIMAGE_J2 225 END 226 227 NOCONVDIFF METADATA 228 DIFF_PPSUB STR UNCONVOLVED 229 DIFF_PSPHOT STR DIFF 230 JPEG_BIN1 STR PPIMAGE_J1 231 JPEG_BIN2 STR PPIMAGE_J2 232 END 233 220 234 # reduction classes for different stacks 221 235 # regular stacks - Property svn:mergeinfo changed
-
trunk/ppStack/src/ppStackCombineFinal.c
r31158 r31435 1 1 #include "ppStack.h" 2 2 3 //#define TESTING // Enable test output 3 // This is the doomsday switch. 4 // #define TESTING // Enable test output 4 5 5 6 bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options, … … 29 30 reject->data[i] = pmStackRejectGrow(options->rejected->data[i], numCols, numRows, poorFrac, 30 31 options->regions->data[i], options->kernels->data[i]); 31 if (!reject->data[i]) {32 psError(psErrorCodeLast(), false, "Unable to grow rejected pixels for image %d", i);33 psFree(reject);34 return false;35 }36 32 } else { 37 33 reject->data[i] = psMemIncrRefCounter(options->rejected->data[i]); -
trunk/ppStack/src/ppStackCombineInitial.c
r31203 r31435 1 1 #include "ppStack.h" 2 2 3 //#define TESTING // Enable test output 3 // This is the doomsday switch. 4 // #define TESTING // Enable test output 4 5 5 6 bool ppStackCombineInitial(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config) -
trunk/ppStack/src/ppStackLoop.c
r31414 r31435 123 123 } 124 124 else { 125 // Since we haven't convolved, I believe we do need to normalize here. We also cannot grow.126 if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, false)) {125 // Since we haven't convolved, I believe we do need to normalize here. 126 if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true)) { 127 127 psError(psErrorCodeLast(), false, "Unable to perform final combination."); 128 128 psFree(stack); -
trunk/ppStack/src/ppStackReject.c
r31203 r31435 1 1 #include "ppStack.h" 2 2 3 // This is the doomsday switch. 3 4 // #define TESTING 4 5 … … 13 14 /* } */ 14 15 16 15 17 int num = options->num; // Number of inputs 18 19 // Construct a small convolution kernel to aid in rejection 20 if (!options->convolve) { 21 for (int i = 0; i < num; i++) { 22 psArray *regions = psArrayAllocEmpty(1); 23 psRegion *region = psRegionAlloc(0,options->numCols - 1, 0, options->numRows - 1); 24 regions = psArrayAdd(regions,1, region); 25 26 psArray *kernels = psArrayAllocEmpty(1); 27 psVector *fwhms = psVectorAllocEmpty(1, PS_TYPE_F32); 28 psVectorAppend(fwhms,5.0); // Should be a parameter 29 psVector *orders = psVectorAllocEmpty(1, PS_TYPE_S32); 30 psVectorAppend(orders,0); 31 pmSubtractionKernels *kernel = pmSubtractionKernelsISIS(15,0,fwhms,orders,0,*region,PM_SUBTRACTION_MODE_2); 32 kernels = psArrayAdd(kernels, 1, kernel); 33 34 kernel->solution1 = psVectorAlloc(3, PS_TYPE_F64); 35 psVectorSet(kernel->solution1, 1, 1.0); 36 psVectorSet(kernel->solution1, 2, 1.0); 37 psVectorSet(kernel->solution1, 3, 1.0); 38 kernel->solution2 = psVectorAlloc(3, PS_TYPE_F64); 39 psVectorSet(kernel->solution2, 1, 1.0); 40 psVectorSet(kernel->solution1, 2, 1.0); 41 psVectorSet(kernel->solution1, 3, 1.0); 42 43 options->kernels->data[i] = kernels; 44 options->regions->data[i] = regions; 45 } 46 } 47 16 48 17 49 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe -
trunk/ppSub/src/ppSubDefineOutput.c
r31156 r31435 44 44 45 45 // Convolved input images 46 pmReadout *inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout 47 pmReadout *refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout 46 psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE); 47 bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images. 48 49 pmReadout *inConv; 50 if (noConvolve) { 51 inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input readout 52 } 53 else { 54 inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout 55 } 56 pmReadout *refConv; 57 if (noConvolve) { 58 refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference readout 59 } 60 else { 61 refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout 62 } 48 63 psFree(view); 49 64 … … 60 75 kernels = psMetadataLookupPtr(&mdok, analysis, PM_SUBTRACTION_ANALYSIS_KERNEL); 61 76 } 62 if (!kernels ) {77 if (!kernels && !noConvolve) { 63 78 psError(PPSUB_ERR_UNKNOWN, true, "Unable to find SUBTRACTION.KERNEL"); 64 79 psFree(outRO); … … 66 81 } 67 82 psAssert (hdu, "unable to find HDU"); 68 psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description); 83 if (!noConvolve) { 84 psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description); 85 } 69 86 outHDU->header = psMetadataCopy(outHDU->header, hdu->header); 70 87 -
trunk/ppSub/src/ppSubLoop.c
r30619 r31435 107 107 108 108 // XXX if it exists, use the POS1, POS2 successs for the FWHMs 109 if (!ppSubMatchPSFs(data)) { 109 psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE); 110 bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images. 111 if (noConvolve) { 112 psWarning("not matching PSFs because NOCONVOLVE is TRUE\n"); 113 } else { 114 if (!ppSubMatchPSFs(data)) { 110 115 psError(psErrorCodeLast(), false, "Unable to match PSFs."); 111 116 success = false; 112 117 goto ESCAPE; 113 } 118 } 119 } 120 114 121 115 122 if (data->quality) { … … 132 139 133 140 // Close input files 141 if (!noConvolve) { 134 142 if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) { 135 143 psError(PPSUB_ERR_IO, false, "Unable to close input files."); … … 137 145 goto ESCAPE; 138 146 } 139 147 } 140 148 if (!ppSubLowThreshold(data)) { 141 149 psError(psErrorCodeLast(), false, "Unable to threshold images."); … … 157 165 } 158 166 167 if (!noConvolve) { 159 168 if (!data->quality && !ppSubMakePSF(data)) { 160 169 psError(psErrorCodeLast(), false, "Unable to generate PSF."); … … 162 171 goto ESCAPE; 163 172 } 164 173 } 165 174 // Now we've got a PSF, blow away detections in case they're confused with real output detections 166 175 { … … 187 196 } 188 197 // dumpout(config, "diff.2a.fits"); 189 198 if (noConvolve) { 199 if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) { 200 psError(PPSUB_ERR_IO, false, "Unable to close input files."); 201 success = false; 202 goto ESCAPE; 203 } 204 } 205 190 206 // Higher order background subtraction using psphot 191 207 if (!ppSubBackground(config)) { -
trunk/ppSub/src/ppSubMakePSF.c
r31156 r31435 37 37 38 38 bool reverse = psMetadataLookupBool(NULL, config->arguments, "REVERSE"); // Reverse sense of subtraction? 39 39 40 40 bool mdok = false; // Status of MD lookup 41 41 pmReadout *minuend = NULL; // Image that will be positive following subtraction 42 42 pmFPAfile *minuendFile = NULL; // File for minuend image 43 43 pmFPAview *view = ppSubViewReadout(); // View to readout 44 if (reverse) { 44 45 psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSUB_RECIPE); // Recipe for ppSub 46 bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images. 47 48 if (!noConvolve) { 49 printf("Using Convolved images because NOCONVOLVE is FALSE\n"); 50 if (reverse) { 45 51 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); 46 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV");47 } else {52 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV"); 53 } else { 48 54 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); 49 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV"); 55 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV"); 56 } 57 } 58 else { 59 psWarning("Not using Convolved images because NOCONVOLVE is TRUE\n"); 60 if (reverse) { 61 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); 62 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF"); 63 } else { 64 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); 65 minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT"); 66 } 50 67 } 51 68 -
trunk/ppSub/src/ppSubReadoutPhotometry.c
r30619 r31435 60 60 // grab the PSF information from the pmFPAfile PSPHOT.PSF.LOAD 61 61 pmFPAfile *psfFile = psMetadataLookupPtr(&mdok, config->files, "PSPHOT.PSF.LOAD"); // PSF file 62 62 63 ppSubCopyPSF (photFile, psfFile, view); 63 64 -
trunk/ppSub/src/ppSubReadoutSubtract.c
r30619 r31435 31 31 32 32 bool reverse = psMetadataLookupBool(&mdok, config->arguments, "REVERSE"); // Reverse sense of subtraction? 33 bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images. 33 34 bool addPair = psMetadataLookupBool(&mdok, recipe, "ADD.NOT.SUBTRACT"); // add instead of subtracting 34 35 … … 38 39 pmReadout *minuend = NULL; // Positive image 39 40 pmReadout *subtrahend = NULL; // Negative image 40 if (reverse) { 41 if (!noConvolve) { 42 printf("Using Convolved images because NOCONVOLVE is FALSE\n"); 43 if (reverse) { 41 44 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); 42 45 subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); 43 } else {46 } else { 44 47 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); 45 48 subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); 49 } 50 } 51 else { 52 psWarning("Not using Convolved images because NOCONVOLVE is TRUE\n"); 53 if (reverse) { 54 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); 55 subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); 56 } else { 57 minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); 58 subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); 59 } 46 60 } 47 61 -
trunk/ppSub/src/ppSubThreshold.c
r30619 r31435 95 95 96 96 // Input images 97 pmReadout *in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image 97 bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); 98 99 pmReadout *in; 100 if (noConvolve) { 101 in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input image 102 } 103 else { 104 in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image 105 } 98 106 if (!in) { 99 107 psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout."); … … 102 110 } 103 111 104 pmReadout *ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image 112 pmReadout *ref; 113 if (noConvolve) { 114 ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference image 115 } 116 else { 117 ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image 118 } 105 119 if (!ref) { 106 120 psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout."); -
trunk/psLib/src/db/psDB.c
r30995 r31435 1043 1043 pType = psDBMySQLToPType(field[i].type, field[i].flags); 1044 1044 if (!pType) { 1045 psError(PS_ERR_UNKNOWN, false, "Failed to lookup type. ");1045 psError(PS_ERR_UNKNOWN, false, "Failed to lookup type. %d %d %d",i,field[i].type, field[i].flags); 1046 1046 psFree(md); 1047 1047 mysql_free_result(result); -
trunk/psModules/src/imcombine/pmStackReject.c
r31203 r31435 127 127 128 128 if (!subRegions || !subKernels) { 129 psTrace("psModules.imcombine",2,"Do not have the necessary kernels and regions, returning input pixels."); 129 130 psPixels *out = psPixelsCopy(NULL,in); 130 131 return out;
Note:
See TracChangeset
for help on using the changeset viewer.
