Changeset 21122
- Timestamp:
- Jan 15, 2009, 3:37:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_20090108/ppStack/src/ppStackSources.c
r21118 r21122 67 67 pmCell *cell = pmFPAviewThisCell(view, file->fpa); // Cell of interest 68 68 69 #if 1 70 // Excise bright sources that might be saturated 71 psArray *sources = sourceLists->data[i]; // Sources for image 72 for (int j = 0; j < sources->n; j++) { 73 pmSource *source = sources->data[j]; // Source of interest 74 if (source && source->psfMag < MIN_MAG) { 75 psFree(source); 76 sources->data[j] = NULL; 77 } 78 } 79 #endif 80 81 82 #if 0 69 #ifdef TESTING 83 70 pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout 84 71 pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image … … 184 171 continue; 185 172 } 186 187 #if 1188 float x = source->modelPSF->params->data.F32[PM_PAR_XPOS],189 y = source->modelPSF->params->data.F32[PM_PAR_YPOS]; // Coordinates of source190 if (x > 2187 && x < 2191 && y > 2280 && y < 2284) {191 fprintf(stderr, "Image %d source: (%f,%f) %f --> %f\n",192 i, x, y, source->psfMag, source->psfMag + magCorr);193 }194 #endif195 196 173 source->psfMag += magCorr; 197 174 } 198 199 #if 0200 // Size of fake image; set by hand because it's trouble to get it from other places201 pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout202 pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image203 pmReadoutFakeFromSources(fake, FAKE_COLS, FAKE_ROWS, sources, NULL, NULL, psf, 5, 0, false, true);204 psString name = NULL;205 psStringAppend(&name, "corrected_%03d.fits", i);206 psFits *fits = psFitsOpen(name, "w");207 psFree(name);208 psFitsWriteImage(fits, NULL, fake->image, 0, NULL);209 psFitsClose(fits);210 psFree(fake);211 #endif212 213 175 } 214 176 psFree(trans);
Note:
See TracChangeset
for help on using the changeset viewer.
