- Timestamp:
- Jul 20, 2012, 6:34:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/psModules/src/objects/pmSourceIO_CMF.c.in
r34183 r34185 89 89 // by the time we call this function, all values should be assigned. let's use asserts to be sure in some cases. 90 90 for (int i = 0; i < sources->n; i++) { 91 pmSource *source = (pmSource *) sources->data[i]; 91 // this is the source associated with this image 92 pmSource *thisSource = sources->data[i]; 93 94 // this is the "real" version of this source 95 pmSource *source = thisSource->parent ? thisSource->parent : thisSource; 92 96 93 97 // If source->seq is -1, source was generated in this analysis. If source->seq is … … 128 132 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_MAG_SIG", PS_DATA_F32, "Sigma of PSF instrumental magnitude", source->psfMagErr); 129 133 130 @ALL,!PS1_V1 @psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX", PS_DATA_F32, "PSF fit instrumental flux (counts)", source->psfFlux);131 @ALL,!PS1_V1 @psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX_SIG",PS_DATA_F32, "Sigma of PSF instrumental flux", source->psfFluxErr);134 @ALL,!PS1_V1,!PS1_V2@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX", PS_DATA_F32, "PSF fit instrumental flux (counts)", source->psfFlux); 135 @ALL,!PS1_V1,!PS1_V2@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX_SIG",PS_DATA_F32, "Sigma of PSF instrumental flux", source->psfFluxErr); 132 136 133 137 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag); … … 195 199 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS", PS_DATA_U32, "psphot analysis flags", source->mode); 196 200 @>PS1_V2,PS1_SV1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2", PS_DATA_U32, "psphot analysis flags", source->mode2); 197 @>PS1_V2,PS1_SV1,PS1_DV?@ psMetadataAdd (row, PS_LIST_TAIL, "PADDING2", PS_DATA_S32, "more padding", 0); 201 @>PS1_V2@ psMetadataAdd (row, PS_LIST_TAIL, "PADDING2", PS_DATA_S32, "more padding", 0); 202 @PS1_SV1@ // XXX do I need PADDING2 or not? 198 203 199 204 // XXX not sure how to get this : need to load Nimages with weight? … … 383 388 @PS1_DV2@ source->diffStats->Rm = psMetadataLookupF32 (&status, row, "DIFF_R_M"); 384 389 @PS1_DV2@ source->diffStats->SNm = psMetadataLookupF32 (&status, row, "DIFF_SN_M"); 385 @ DV1,DV2@ }390 @PS1_DV?@ } 386 391 387 392 @ALL@ source->mode = psMetadataLookupU32 (&status, row, "FLAGS"); … … 589 594 } 590 595 591 bool pmSourcesRead_CMF_ PS1_@CMFMODE@_XSRC(psFits *fits, psMetadata *hduHeader, psArray *sources, long *sourceIndex)596 bool pmSourcesRead_CMF_@CMFMODE@_XSRC(psFits *fits, psMetadata *hduHeader, psArray *sources, long *sourceIndex) 592 597 { 593 598 PS_ASSERT_PTR_NON_NULL(fits, false); … … 813 818 814 819 if (k < model->params->n) { 815 psMetadataAdd (row, PS_LIST_TAIL, name, PS_DATA_F32, "", model->params->data.F32[k]);820 psMetadataAddF32 (row, PS_LIST_TAIL, name, 0, "", model->params->data.F32[k]); 816 821 } else { 817 psMetadataAddF32 (row, PS_LIST_TAIL, name, PS_DATA_F32, "", NAN);822 psMetadataAddF32 (row, PS_LIST_TAIL, name, 0, "", NAN); 818 823 } 819 824 } … … 859 864 } 860 865 861 bool pmSourcesRead_CMF_ PS1_@CMFMODE@_XFIT(psFits *fits, psMetadata *hduHeader, psArray *sources, long *sourceIndex)866 bool pmSourcesRead_CMF_@CMFMODE@_XFIT(psFits *fits, psMetadata *hduHeader, psArray *sources, long *sourceIndex) 862 867 { 863 868 PS_ASSERT_PTR_NON_NULL(fits, false); … … 961 966 // **** write out the radial flux values for the sources for a given matched-PSF image 962 967 // **** how do we distinguish the matched-PSF images from the non-matched version 963 bool pmSourcesWrite_CMF_ PS1_@CMFMODE@_XRAD(psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname, psMetadata *recipe)968 bool pmSourcesWrite_CMF_@CMFMODE@_XRAD(psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname, psMetadata *recipe) 964 969 { 965 970 bool status = false; … … 1104 1109 } 1105 1110 1106 bool pmSourcesRead_CMF_ PS1_@CMFMODE@_XRAD(psFits *fits, pmReadout *readout, psMetadata *hduHeader, psArray *sources, long *sourceIndex)1111 bool pmSourcesRead_CMF_@CMFMODE@_XRAD(psFits *fits, pmReadout *readout, psMetadata *hduHeader, psArray *sources, long *sourceIndex) 1107 1112 { 1108 1113 PS_ASSERT_PTR_NON_NULL(fits, false);
Note:
See TracChangeset
for help on using the changeset viewer.
