Changeset 29124 for branches/eam_branches/ipp-20100823/psModules
- Timestamp:
- Sep 7, 2010, 9:16:10 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823
- Files:
-
- 8 edited
-
. (modified) (1 prop)
-
psModules/src/imcombine/pmSubtractionStamps.c (modified) (1 diff)
-
psModules/src/objects/models/pmModel_SERSIC.c (modified) (2 diffs)
-
psModules/src/objects/pmSourceIO_CMF_PS1_DV2.c (modified) (2 diffs)
-
psModules/src/objects/pmSourceIO_CMF_PS1_SV1.c (modified) (1 diff)
-
psModules/src/objects/pmSourceIO_CMF_PS1_V3.c (modified) (3 diffs)
-
psModules/src/objects/pmSourceMoments.c (modified) (1 diff)
-
psModules/src/objects/pmSourcePhotometry.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823
-
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionStamps.c
r29004 r29124 830 830 } 831 831 832 #if 1832 #if 0 833 833 { 834 834 psFits *fits = NULL; -
branches/eam_branches/ipp-20100823/psModules/src/objects/models/pmModel_SERSIC.c
r29004 r29124 252 252 float Rminor = Rmajor * (axes.minor / axes.major); 253 253 254 fprintf (stderr, "guess index: %f : %f, %f -> %f, %f\n", index, axes.major, axes.minor, Rmajor, Rminor);254 // fprintf (stderr, "guess index: %f : %f, %f -> %f, %f\n", index, axes.major, axes.minor, Rmajor, Rminor); 255 255 256 256 axes.major = Rmajor; … … 346 346 psF64 radius = axes.major * sqrt (2.0) * pow(zn, 0.5 / PAR[PM_PAR_7]); 347 347 348 fprintf (stderr, "sersic model %f %f, n %f, radius: %f, zn: %f, f/Io: %f, major: %f\n", PAR[PM_PAR_XPOS], PAR[PM_PAR_YPOS], PAR[PM_PAR_7], radius, zn, flux/PAR[PM_PAR_I0], axes.major);348 // fprintf (stderr, "sersic model %f %f, n %f, radius: %f, zn: %f, f/Io: %f, major: %f\n", PAR[PM_PAR_XPOS], PAR[PM_PAR_YPOS], PAR[PM_PAR_7], radius, zn, flux/PAR[PM_PAR_I0], axes.major); 349 349 350 350 psAssert (isfinite(radius), "fix this code: z should not be nan for %f", PAR[PM_PAR_7]); -
branches/eam_branches/ipp-20100823/psModules/src/objects/pmSourceIO_CMF_PS1_DV2.c
r29004 r29124 186 186 psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX_SIG",PS_DATA_F32, "Sigma of PSF instrumental magnitude", source->psfFluxErr); 187 187 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag); 188 // XXX replace with AP_FLUX (& ERR)? psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag); 189 188 190 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RADIUS", PS_DATA_F32, "radius used for aperture mags", apRadius); 189 191 psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", peakMag); … … 214 216 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_XY", PS_DATA_F32, "second moments (X*Y)", mxy); 215 217 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_YY", PS_DATA_F32, "second moments (Y*Y)", myy); 218 219 float Mrf = source->moments ? source->moments->Mrf : NAN; 220 float Mrh = source->moments ? source->moments->Mrh : NAN; 221 float Krf = source->moments ? source->moments->KronFlux : NAN; 222 float dKrf = source->moments ? source->moments->KronFluxErr : NAN; 223 224 float Kinner = source->moments ? source->moments->KronFinner : NAN; 225 float Kouter = source->moments ? source->moments->KronFouter : NAN; 226 227 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_R1", PS_DATA_F32, "first radial moment", Mrf); 228 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_RH", PS_DATA_F32, "half radial moment", Mrh); 229 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX", PS_DATA_F32, "Kron Flux (in 2.5 R1)", Krf); 230 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_ERR", PS_DATA_F32, "Kron Flux Error", dKrf); 231 232 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_INNER", PS_DATA_F32, "Kron Flux (in 1.0 R1)", Kinner); 233 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_OUTER", PS_DATA_F32, "Kron Flux (in 4.0 R1)", Kouter); 216 234 217 235 psMetadataAdd (row, PS_LIST_TAIL, "DIFF_NPOS", PS_DATA_S32, "nPos (n pix > 3 sigma)", diffStats.nGood); -
branches/eam_branches/ipp-20100823/psModules/src/objects/pmSourceIO_CMF_PS1_SV1.c
r29004 r29124 198 198 psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX_SIG",PS_DATA_F32, "Sigma of PSF instrumental flux", source->psfFluxErr); 199 199 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag); 200 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RAW", PS_DATA_F32, "magnitude in reported aperture", source->apMagRaw); 200 201 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RADIUS", PS_DATA_F32, "radius used for aperture mags", apRadius); 201 202 psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", peakMag); -
branches/eam_branches/ipp-20100823/psModules/src/objects/pmSourceIO_CMF_PS1_V3.c
r29012 r29124 179 179 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RAW", PS_DATA_F32, "magnitude in reported aperture", source->apMagRaw); 180 180 psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RADIUS", PS_DATA_F32, "radius used for aperture mags", apRadius); 181 // XXX need ap_mag error 181 182 psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", peakMag); 182 183 psMetadataAdd (row, PS_LIST_TAIL, "CAL_PSF_MAG", PS_DATA_F32, "PSF Magnitude using supplied calibration", calMag); … … 204 205 float Myy = source->moments ? source->moments->Myy : NAN; 205 206 207 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_XX", PS_DATA_F32, "second moments (X^2)", Mxx); 208 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_XY", PS_DATA_F32, "second moments (X*Y)", Mxy); 209 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_YY", PS_DATA_F32, "second moments (Y*Y)", Myy); 210 211 float M_c3 = source->moments ? 1.0*source->moments->Mxxx - 3.0*source->moments->Mxyy : NAN; 212 float M_s3 = source->moments ? 3.0*source->moments->Mxxy - 1.0*source->moments->Myyy : NAN; 213 float M_c4 = source->moments ? 1.0*source->moments->Mxxxx - 6.0*source->moments->Mxxyy + 1.0*source->moments->Myyyy : NAN; 214 float M_s4 = source->moments ? 4.0*source->moments->Mxxxy - 4.0*source->moments->Mxyyy : NAN; 215 216 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3C", PS_DATA_F32, "third momemt cos theta", M_c3); 217 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3S", PS_DATA_F32, "third momemt sin theta", M_s3); 218 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4C", PS_DATA_F32, "fourth momemt cos theta", M_c4); 219 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4S", PS_DATA_F32, "fourth momemt sin theta", M_s4); 220 206 221 float Mrf = source->moments ? source->moments->Mrf : NAN; 207 222 float Mrh = source->moments ? source->moments->Mrh : NAN; … … 211 226 float Kinner = source->moments ? source->moments->KronFinner : NAN; 212 227 float Kouter = source->moments ? source->moments->KronFouter : NAN; 213 214 float M_c3 = source->moments ? 1.0*source->moments->Mxxx - 3.0*source->moments->Mxyy : NAN;215 float M_s3 = source->moments ? 3.0*source->moments->Mxxy - 1.0*source->moments->Myyy : NAN;216 float M_c4 = source->moments ? 1.0*source->moments->Mxxxx - 6.0*source->moments->Mxxyy + 1.0*source->moments->Myyyy : NAN;217 float M_s4 = source->moments ? 4.0*source->moments->Mxxxy - 4.0*source->moments->Mxyyy : NAN;218 219 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_XX", PS_DATA_F32, "second moments (X^2)", Mxx);220 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_XY", PS_DATA_F32, "second moments (X*Y)", Mxy);221 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_YY", PS_DATA_F32, "second moments (Y*Y)", Myy);222 223 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3C", PS_DATA_F32, "third momemt cos theta", M_c3);224 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3S", PS_DATA_F32, "third momemt sin theta", M_s3);225 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4C", PS_DATA_F32, "fourth momemt cos theta", M_c4);226 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4S", PS_DATA_F32, "fourth momemt sin theta", M_s4);227 228 228 229 psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_R1", PS_DATA_F32, "first radial moment", Mrf); -
branches/eam_branches/ipp-20100823/psModules/src/objects/pmSourceMoments.c
r29004 r29124 77 77 // well: 78 78 psF32 sky = 0.0; 79 if (source->moments == NULL) { 80 source->moments = pmMomentsAlloc(); 81 } 79 82 // XXX if (source->moments == NULL) { 80 83 // XXX source->moments = pmMomentsAlloc(); -
branches/eam_branches/ipp-20100823/psModules/src/objects/pmSourcePhotometry.c
r29004 r29124 148 148 149 149 // for PSFs, correct both apMag and psfMag to same system, consistent with infinite flux star in aperture RADIUS 150 // XXX add a flag for "ap_mag is corrected?" 150 151 if ((mode & PM_SOURCE_PHOT_APCORR) && isPSF && psf && psf->ApTrend) { 151 152 // the source peak pixel is guaranteed to be on the image, and only minimally different from the source center … … 292 293 293 294 // measure apMag 295 // XXX save the apFlux and apFluxErr 296 // XXX note that these fluxes/mags are uncorrected for masked pixels 297 // XXX raise a bit if the aperture has a masked pixel (not marked)? 294 298 for (int iy = 0; iy < image->numRows; iy++) { 295 299 for (int ix = 0; ix < image->numCols; ix++) {
Note:
See TracChangeset
for help on using the changeset viewer.
