Changeset 14874 for trunk/pswarp/src/pswarpLoop.c
- Timestamp:
- Sep 17, 2007, 4:19:23 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r14768 r14874 198 198 } 199 199 200 // We need a new PSF model for the warped frame 201 // It would be good to generate this analytically, but that's going to be tricky. 202 // We have a list of sources, so we could use those to redetermine the PSF model. 203 // Until Gene makes the necessary adaptations to psphot, we will simply redetermine the PSF model from 204 // scratch. 205 if (psMetadataLookupBool(&mdok, config->arguments, "PSF")) { 206 psMetadata *psphotRecipe = psMetadataLookupPtr(NULL, config->recipes, 207 PSPHOT_RECIPE); // Recipe for psphot 208 if (!psphotRecipe) { 209 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find %s recipe.", PSPHOT_RECIPE); 210 return false; 211 } 212 213 psMetadataAddStr(psphotRecipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE, 214 "Break point for psphot operations", "PSFMODEL"); 215 216 pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT"); 217 pmFPACopy(photFile->fpa, outFPA); 218 219 pmFPAview *view = pmFPAviewAlloc(0); // View into skycell 220 if (!psphotReadout(config, view)) { 221 psError(psErrorCodeLast(), false, "Unable to determine PSF for warped image.\n"); 222 psFree(view); 223 return false; 224 } 225 psFree(view); 226 227 pmFPAfileActivate(config->files, false, "PSPHOT.INPUT"); 228 } 229 200 230 output->data_exists = true; 201 231 outCell->data_exists = true; 202 232 outChip->data_exists = true; 203 233 204 #if 0205 float gain = 0.0, readnoise = 0.0, saturation = INFINITY, exposure = 0.0, darktime = 0.0;206 double mjd = 0.0;207 #endif208 209 #if 0210 // XXX Hack so that INSTRUME header keyword and the like are not updated properly211 // If INSTRUME (etc) is updated, then the FITS file with the warped image will be often212 // recognised as coming from the old camera, not the new, warped camera.213 // The proper solution to this, I believe, would be to define a skycell derivative of the214 // old camera, so that the skycell can be recognised as coming from the old camera (and would215 // also therefore inherit all its recipes, which would be good), rather than having a completely216 // different camera. That will take some work; the below solution should be good enough for now.217 {218 psMetadataItem *item; // Concepts item to update219 220 item = psMetadataLookup(outFPA->concepts, "FPA.INSTRUMENT");221 psFree(item->data.V);222 item->data.V = NULL;223 224 item = psMetadataLookup(outFPA->concepts, "FPA.DETECTOR");225 psFree(item->data.V);226 item->data.V = NULL;227 }228 #endif229 234 230 235 // Perform statistics on the output image
Note:
See TracChangeset
for help on using the changeset viewer.
