Changeset 35537 for branches/eam_branches/ipp-20130419
- Timestamp:
- May 8, 2013, 5:07:02 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pswarp/src
- Files:
-
- 4 edited
-
pswarp.h (modified) (2 diffs)
-
pswarpLoop.c (modified) (3 diffs)
-
pswarpLoopBackground.c (modified) (1 diff)
-
pswarpTransformReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarp.h
r35535 r35537 98 98 bool pswarpLoopBackground (pmConfig *config, psMetadata *stats); 99 99 psExit pswarpExitCode(psExit exitValue); 100 bool pswarpTransformReadout (pmReadout *output, pmReadout *input, pmConfig *config );100 bool pswarpTransformReadout (pmReadout *output, pmReadout *input, pmConfig *config, bool backgroundWarp); 101 101 bool pswarpTransformSources(pmReadout *output, pmReadout *input, pmConfig *config); 102 102 … … 198 198 bool pswarpLoadAstrometry (pmFPAfile *target, pmFPAfile *astrom, pmConfig *config); 199 199 200 bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config );200 bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config, bool backgroundWarp); 201 201 bool pswarpMakePSF (pmConfig *config, pmFPAfile *output, psMetadata *stats); 202 202 bool pswarpUpdateStatistics (pmFPA *output, psMetadata *stats, pmFPA *input, pmFPA *astrom, pmConfig *config); -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c
r35536 r35537 121 121 } 122 122 123 // psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "SET.VALUE", PS_META_REPLACE, "test", (i + 1)*1.0); 124 pswarpTransformToTarget(output->fpa, readout, config); 123 pswarpTransformToTarget(output->fpa, readout, config, false); 125 124 126 125 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { … … 169 168 // once the output fpa elements have been built, loop over the fpa and generate stats 170 169 // for each readout 171 bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config ) {170 bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config, bool backgroundWarp) { 172 171 173 172 pmFPAview *view = pmFPAviewAlloc(0); … … 186 185 pmReadout *readout; 187 186 while ((readout = pmFPAviewNextReadout(view, output, 1)) != NULL) { 188 pswarpTransformReadout (readout, input, config );187 pswarpTransformReadout (readout, input, config, backgroundWarp); 189 188 } 190 189 } -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoopBackground.c
r35536 r35537 142 142 143 143 // transform the actual BKGMODEL pixels from readout to output 144 // XXX replace the use of this temporary metadata item with an argument? 145 // XXX move the source transform out of pswarpTransformReadout? 146 psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", true); 147 pswarpTransformToTarget (output->fpa, readout, config); 148 psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", false); 144 pswarpTransformToTarget (output->fpa, readout, config, true); 149 145 150 146 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { // Readout -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpTransformReadout.c
r35535 r35537 16 16 * NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT 17 17 */ 18 bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config )18 bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config, bool backgroundWarp) 19 19 { 20 20 // XXX this implementation currently ignores the use of the region … … 47 47 } 48 48 psAssert(mdok, "MASK.INPUT was not defined"); 49 50 bool backgroundWarp = psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING");51 49 52 50 if (!input->covariance) { … … 208 206 psFree(interp); 209 207 210 if (goodPixels > 0 && psMetadataLookupBool(&mdok, recipe, "SOURCES")) { 211 if (!psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) { 212 if (!pswarpTransformSources(output, input, config)) { 213 psError(psErrorCodeLast(), false, "Unable to interpolate image."); 214 return false; 208 if (goodPixels > 0 && !backgroundWarp && psMetadataLookupBool(&mdok, recipe, "SOURCES")) { 209 if (!pswarpTransformSources(output, input, config)) { 210 psError(psErrorCodeLast(), false, "Unable to transform sources."); 211 return false; 215 212 } 216 }217 213 } 218 214
Note:
See TracChangeset
for help on using the changeset viewer.
