Changeset 18396 for trunk/ppSub/src/ppSubReadout.c
- Timestamp:
- Jul 1, 2008, 4:18:12 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubReadout.c
r18289 r18396 13 13 #define WCS_TOLERANCE 0.001 // Tolerance for WCS 14 14 #define TESTING // For test output 15 16 #define SOURCE_MASK (PM_SOURCE_MODE_FAIL | PM_SOURCE_MODE_DEFECT | PM_SOURCE_MODE_SATURATED | \ 17 PM_SOURCE_MODE_CR_LIMIT) // Mask to apply to input sources 15 18 16 19 … … 307 310 } 308 311 312 #if 0 313 // XXX Under development 314 315 // QA: photometry of known sources with measured PSF 316 if (sourcesRO && psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) { 317 sources = psMetadataLookupPtr(&mdok, sourcesRO->analysis, "PSPHOT.SOURCES"); 318 319 320 321 // For each source, need to: 322 // * generate appropriate model 323 // * select pixels 324 // * define fit radius 325 // Don't need to measure sky (psphotFitSourcesLinear does that) 326 327 psArray *dummy = psArrayAlloc(1); // Dummy array of sources, for psphotFitSourcesLinear with 1 source 328 for (long i = 0; i < sources->n; i++) { 329 pmSource *source = sources->data[i]; 330 if (!source || (source->mode & SOURCE_MASK)) { 331 continue; 332 } 333 334 float origMag = source->psfMag; // Original magnitude 335 336 // Coordinates of source 337 float x = source->modelPSF->params->data.F32[PM_PAR_XPOS]; 338 float y = source->modelPSF->params->data.F32[PM_PAR_YPOS]; 339 340 model = pmModelFromPSFforXY(psf, x, y, NAN); 341 if (!fakeModel) { 342 psWarning("Can't generate model"); 343 continue; 344 } 345 if (!pmSourceDefinePixels(fakeSource, readout, x, y, fakeRadius)) { 346 psErrorClear(); 347 continue; 348 } 349 pmModel *pmModelFromPSFforXY ( 350 const pmPSF *psf, 351 float Xo, 352 float Yo, 353 float Io 354 ); 355 356 bool pmSourceDefinePixels( 357 pmSource *mySource, ///< source to be re-defined 358 const pmReadout *readout, ///< base the source on this readout 359 psF32 x, ///< center coords of source 360 psF32 y, ///< center coords of source 361 psF32 Radius ///< size of box on source 362 ); 363 364 365 bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, bool final) { 366 367 } 368 #endif 369 309 370 // Photometry stage 2: find and measure sources on the subtracted image 310 371 if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
Note:
See TracChangeset
for help on using the changeset viewer.
