Changeset 36209
- Timestamp:
- Oct 13, 2013, 1:32:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CFF.c
r36157 r36209 94 94 float X = psMetadataLookupF32 (&status, row, "X"); 95 95 float Y = psMetadataLookupF32 (&status, row, "Y"); 96 97 float apRadius = psMetadataLookupS32 (&status, row, "AP_RADIUS"); 96 float flux = psMetadataLookupF32 (&status, row, "FLUX"); // guess at the instrumental flux 97 98 float apRadius = psMetadataLookupF32 (&status, row, "AP_RADIUS"); 98 99 float kronRadius = psMetadataLookupF32 (&status, row, "KRON_RADIUS"); 99 float petRadius = psMetadataLookup U32 (&status, row, "PETRO_RADIUS");100 bool fitGalaxy = psMetadataLookupU 32(&status, row, "FIT_GALAXY");101 bool psfStar = psMetadataLookupU 32(&status, row, "PSF_STAR");102 103 float Rmajor = psMetadataLookup U32 (&status, row, "R_MAJOR");104 float Rminor = psMetadataLookup U32 (&status, row, "R_MINOR");105 float theta = psMetadataLookup U32 (&status, row, "THETA");106 float Sindex = psMetadataLookup U32 (&status, row, "INDEX");100 float petRadius = psMetadataLookupF32 (&status, row, "PETRO_RADIUS"); 101 bool fitGalaxy = psMetadataLookupU8 (&status, row, "FIT_GALAXY"); 102 bool psfStar = psMetadataLookupU8 (&status, row, "PSF_STAR"); 103 104 float Rmajor = psMetadataLookupF32 (&status, row, "R_MAJOR"); 105 float Rminor = psMetadataLookupF32 (&status, row, "R_MINOR"); 106 float theta = psMetadataLookupF32 (&status, row, "THETA"); 107 float Sindex = psMetadataLookupF32 (&status, row, "INDEX"); 107 108 108 109 pmSource *source = pmSourceAlloc (); … … 149 150 pmPSF_AxesToModel (PAR, axes, modelType); 150 151 151 float peakFlux = 1.0;152 source->peak = pmPeakAlloc(X, Y, peakFlux, PM_PEAK_LONE);153 source->peak->xf = X; // more accurate position154 source->peak->yf = Y; // more accurate position152 // peak->detValue, rawFlux, smoothFlux are all set to the flux argument 153 source->peak = pmPeakAlloc(X, Y, flux, PM_PEAK_LONE); 154 source->peak->xf = X; // pmPeakAlloc converts X,Y to int, so reset here 155 source->peak->yf = Y; // pmPeakAlloc converts X,Y to int, so reset here 155 156 source->peak->dx = 0.0; 156 157 source->peak->dy = 0.0; 157 source->peak->rawFlux = peakFlux;158 source->peak->smoothFlux = peakFlux;159 158 160 159 source->moments = pmMomentsAlloc (); … … 172 171 if (fitGalaxy) { 173 172 source->modelFits = psArrayAllocEmpty (1); 174 pmModel *model = pmModelAlloc( modelType);173 pmModel *model = pmModelAlloc(galaxyModelType); 175 174 psF32 *xPAR = model->params->data.F32; 176 175 … … 185 184 galaxyAxes.theta = theta; // XXX degrees or radians? 186 185 187 pmPSF_AxesToModel ( PAR, galaxyAxes, galaxyModelType);186 pmPSF_AxesToModel (xPAR, galaxyAxes, galaxyModelType); 188 187 if (model->params->n > 7) { 189 188 xPAR[PM_PAR_7] = Sindex;
Note:
See TracChangeset
for help on using the changeset viewer.
