Changeset 29004 for trunk/psModules/src/objects/pmSourceIO_CMF_PS1_V2.c
- Timestamp:
- Aug 20, 2010, 1:14:11 PM (16 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/objects/pmSourceIO_CMF_PS1_V2.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
- Property svn:mergeinfo deleted
-
trunk/psModules/src/objects/pmSourceIO_CMF_PS1_V2.c
r27818 r29004 28 28 #include "pmFPAfile.h" 29 29 30 #include "pmTrend2D.h" 31 #include "pmResiduals.h" 32 #include "pmGrowthCurve.h" 30 33 #include "pmSpan.h" 34 #include "pmFootprintSpans.h" 31 35 #include "pmFootprint.h" 32 36 #include "pmPeaks.h" 33 37 #include "pmMoments.h" 34 #include "pmGrowthCurve.h" 35 #include "pmResiduals.h" 36 #include "pmTrend2D.h" 38 #include "pmModelFuncs.h" 39 #include "pmModel.h" 40 #include "pmModelUtils.h" 41 #include "pmModelClass.h" 42 #include "pmSourceMasks.h" 43 #include "pmSourceExtendedPars.h" 44 #include "pmSourceDiffStats.h" 45 #include "pmSource.h" 46 #include "pmSourceFitModel.h" 37 47 #include "pmPSF.h" 38 #include "pmModel.h" 39 #include "pmSource.h" 40 #include "pmModelClass.h" 48 #include "pmPSFtry.h" 49 41 50 #include "pmSourceIO.h" 42 51 … … 45 54 // followed by a zero-size matrix, followed by the table data 46 55 47 bool pmSourcesWrite_CMF_PS1_V2 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname )56 bool pmSourcesWrite_CMF_PS1_V2 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname, psMetadata *recipe) 48 57 { 49 58 PS_ASSERT_PTR_NON_NULL(fits, false); … … 182 191 psMetadataAdd (row, PS_LIST_TAIL, "PSF_MINOR", PS_DATA_F32, "PSF width (minor axis)", axes.minor); 183 192 psMetadataAdd (row, PS_LIST_TAIL, "PSF_THETA", PS_DATA_F32, "PSF orientation angle", axes.theta); 184 psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF", PS_DATA_F32, "PSF coverage/quality factor", source->pixWeight );193 psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF", PS_DATA_F32, "PSF coverage/quality factor", source->pixWeightNotBad); 185 194 psMetadataAdd (row, PS_LIST_TAIL, "PSF_NDOF", PS_DATA_S32, "degrees of freedom", nDOF); 186 195 psMetadataAdd (row, PS_LIST_TAIL, "PSF_NPIX", PS_DATA_S32, "number of pixels in fit", nPix); … … 314 323 source->peak = pmPeakAlloc(PAR[PM_PAR_XPOS], PAR[PM_PAR_YPOS], peakFlux, PM_PEAK_LONE); 315 324 source->peak->flux = peakFlux; 325 source->peak->xf = PAR[PM_PAR_XPOS]; // more accurate position 326 source->peak->yf = PAR[PM_PAR_YPOS]; // more accurate position 316 327 source->peak->dx = dPAR[PM_PAR_XPOS]; 317 328 source->peak->dy = dPAR[PM_PAR_YPOS]; 318 source->peak->SN = sqrt(source->peak->flux); // XXX a proxy: various functions sort by peak S/N 319 320 source->pixWeight = psMetadataLookupF32 (&status, row, "PSF_QF"); 329 if (isfinite (source->errMag) && (source->errMag > 0.0)) { 330 source->peak->SN = 1.0 / source->errMag; 331 } else { 332 source->peak->SN = sqrt(source->peak->flux); // an alternate proxy: various functions sort by peak S/N 333 } 334 335 source->pixWeightNotBad = psMetadataLookupF32 (&status, row, "PSF_QF"); 321 336 source->crNsigma = psMetadataLookupF32 (&status, row, "CR_NSIGMA"); 322 337 source->extNsigma = psMetadataLookupF32 (&status, row, "EXT_NSIGMA"); … … 578 593 579 594 // XXX this layout is still the same as PS1_DEV_1 580 bool pmSourcesWrite_CMF_PS1_V2_XFIT (psFits *fits, pmReadout *readout, psArray *sources, char *extname)595 bool pmSourcesWrite_CMF_PS1_V2_XFIT(psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname) 581 596 { 582 597 … … 627 642 assert (model); 628 643 644 // skip models which were not actually fitted 645 if (model->flags & PM_MODEL_STATUS_BADARGS) continue; 646 629 647 PAR = model->params->data.F32; 630 648 dPAR = model->dparams->data.F32;
Note:
See TracChangeset
for help on using the changeset viewer.
