Changeset 27839 for branches/simmosaic_branches/ppSub/src/ppSubLoop.c
- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_branches/ppSub/src
- Property svn:ignore
-
old new 13 13 ppSubErrorCodes.c 14 14 ppSubVersionDefinitions.h 15 ppSubConvolve
-
- Property svn:ignore
-
branches/simmosaic_branches/ppSub/src/ppSubLoop.c
r24672 r27839 27 27 28 28 pmConfigCamerasCull(config, NULL); 29 pmConfigRecipesCull(config, "PPSUB,PPSTATS,PSPHOT, MASKS,JPEG");29 pmConfigRecipesCull(config, "PPSUB,PPSTATS,PSPHOT,PSASTRO,MASKS,JPEG"); 30 30 31 31 … … 43 43 44 44 if (!ppSubSetMasks(config)) { 45 psError( PS_ERR_UNKNOWN, false, "Unable to set masks.");45 psError(psErrorCodeLast(), false, "Unable to set masks."); 46 46 return false; 47 47 } 48 48 49 49 if (!ppSubMatchPSFs(data)) { 50 psError( PS_ERR_UNKNOWN, false, "Unable to match PSFs.");50 psError(psErrorCodeLast(), false, "Unable to match PSFs."); 51 51 return false; 52 52 } … … 55 55 return true; 56 56 } 57 // generate the residual stamp grid for visualization 58 if (!ppSubResidualSampleJpeg(config)) { 59 psError(psErrorCodeLast(), false, "Unable to update."); 60 return false; 61 } 57 62 58 63 psMetadataAddF32(data->stats, PS_LIST_TAIL, "TIME_MATCH", 0, "Time to match PSFs", … … 65 70 } 66 71 72 if (!ppSubLowThreshold(data)) { 73 psError(psErrorCodeLast(), false, "Unable to threshold images."); 74 return false; 75 } 76 67 77 // Set up subtraction files 68 78 if (!ppSubFilesIterateDown(config, PPSUB_FILES_SUB)) { … … 72 82 73 83 if (!ppSubDefineOutput("PPSUB.OUTPUT", config)) { 74 psError( PS_ERR_UNKNOWN, false, "Unable to define output.");84 psError(psErrorCodeLast(), false, "Unable to define output."); 75 85 return false; 76 86 } 77 87 78 88 if (!data->quality && !ppSubMakePSF(data)) { 79 psError(PS_ERR_UNKNOWN, false, "Unable to generate PSF."); 80 return false; 89 psError(psErrorCodeLast(), false, "Unable to generate PSF."); 90 return false; 91 } 92 93 // Now we've got a PSF, blow away detections in case they're confused with real output detections 94 { 95 pmFPAview *view = ppSubViewReadout(); // View to readout 96 pmReadout *out = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT"); 97 if (psMetadataLookup(out->analysis, "PSPHOT.DETECTIONS")) { 98 psMetadataRemoveKey(out->analysis, "PSPHOT.DETECTIONS"); 99 } 100 psFree(view); 81 101 } 82 102 83 103 if (!ppSubReadoutSubtract(config)) { 84 psError( PS_ERR_UNKNOWN, false, "Unable to subtract images.");104 psError(psErrorCodeLast(), false, "Unable to subtract images."); 85 105 return false; 86 106 } … … 94 114 // Higher order background subtraction using psphot 95 115 if (!ppSubBackground(config)) { 96 psError( PS_ERR_UNKNOWN, false, "Unable to subtract background.");116 psError(psErrorCodeLast(), false, "Unable to subtract background."); 97 117 return false; 98 118 } … … 100 120 // Perform Variance correction (rescale within a modest range) 101 121 if (!ppSubVarianceRescale(config)) { 102 psError( PS_ERR_UNKNOWN, false, "Unable to rescale variance.");122 psError(psErrorCodeLast(), false, "Unable to rescale variance."); 103 123 return false; 104 124 } … … 110 130 111 131 if (!data->quality && !ppSubReadoutPhotometry("PPSUB.OUTPUT", data)) { 112 psError( PS_ERR_UNKNOWN, false, "Unable to perform photometry.");132 psError(psErrorCodeLast(), false, "Unable to perform photometry."); 113 133 return false; 114 134 } … … 121 141 // Perform statistics on the cell 122 142 if (!ppSubReadoutStats(data)) { 123 psError(PS_ERR_UNKNOWN, false, "Unable to collect statistics"); 124 return false; 125 } 126 143 psError(psErrorCodeLast(), false, "Unable to collect statistics"); 144 return false; 145 } 146 147 // generate the binned image used to write the jpeg 127 148 if (!ppSubReadoutJpeg(config)) { 128 psError( PS_ERR_UNKNOWN, false, "Unable to update.");149 psError(psErrorCodeLast(), false, "Unable to update."); 129 150 return false; 130 151 } … … 138 159 139 160 if (data->inverse && !ppSubDefineOutput("PPSUB.INVERSE", config)) { 140 psError( PS_ERR_UNKNOWN, false, "Unable to define inverse.");161 psError(psErrorCodeLast(), false, "Unable to define inverse."); 141 162 return false; 142 163 } 143 164 144 165 if (!ppSubReadoutInverse(config)) { 145 psError( PS_ERR_UNKNOWN, false, "Unable to invert images.");166 psError(psErrorCodeLast(), false, "Unable to invert images."); 146 167 return false; 147 168 } … … 159 180 160 181 if (!data->quality && !ppSubReadoutPhotometry("PPSUB.INVERSE", data)) { 161 psError( PS_ERR_UNKNOWN, false, "Unable to perform photometry.");182 psError(psErrorCodeLast(), false, "Unable to perform photometry."); 162 183 return false; 163 184 }
Note:
See TracChangeset
for help on using the changeset viewer.
