Changeset 31302 for branches/czw_branch/20110406
- Timestamp:
- Apr 15, 2011, 4:01:30 PM (15 years ago)
- Location:
- branches/czw_branch/20110406
- Files:
-
- 9 edited
-
ippScripts/scripts/diff_skycell.pl (modified) (1 diff)
-
ippconfig/recipes/ppSub.config (modified) (2 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 diff)
-
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)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20110406/ippScripts/scripts/diff_skycell.pl
r30843 r31302 265 265 my $do_photom = 1; 266 266 my $dump_config = 1; 267 if ($reduction eq 'NOCONVDIFF') { 268 $do_photom = 0; 269 } 267 270 if ($run_state eq 'new') { 268 271 $configuration = prepare_output("PPSUB.CONFIG", $outroot, 1); -
branches/czw_branch/20110406/ippconfig/recipes/ppSub.config
r31163 r31302 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 -
branches/czw_branch/20110406/ippconfig/recipes/reductionClasses.mdc
r31253 r31302 217 217 END 218 218 219 WARPQSTACK METADATA 220 DIFF_PPSUB STR WARPQSTACK 221 DIFF_PSPHOT STR DIFF 222 JPEG_BIN1 STR PPIMAGE_J1 223 JPEG_BIN2 STR PPIMAGE_J2 224 END 225 226 NOCONVDIFF METADATA 227 DIFF_PPSUB STR UNCONVOLVED 228 DIFF_PSPHOT STR DIFF 229 JPEG_BIN1 STR PPIMAGE_J1 230 JPEG_BIN2 STR PPIMAGE_J2 231 END 232 219 233 # reduction classes for different stacks 220 234 # regular stacks -
branches/czw_branch/20110406/ppSub/src/ppSubDefineOutput.c
r31156 r31302 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 -
branches/czw_branch/20110406/ppSub/src/ppSubLoop.c
r30619 r31302 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)) { -
branches/czw_branch/20110406/ppSub/src/ppSubMakePSF.c
r31156 r31302 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 -
branches/czw_branch/20110406/ppSub/src/ppSubReadoutPhotometry.c
r30619 r31302 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 -
branches/czw_branch/20110406/ppSub/src/ppSubReadoutSubtract.c
r30619 r31302 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 -
branches/czw_branch/20110406/ppSub/src/ppSubThreshold.c
r30619 r31302 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.");
Note:
See TracChangeset
for help on using the changeset viewer.
