- Timestamp:
- Oct 28, 2013, 11:22:13 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CFF.c
r36209 r36244 71 71 assert (modelType > -1); 72 72 73 // how to deal with this?74 int galaxyModelType = pmModelClassGetType ("PS_MODEL_EXP");75 76 73 // We get the size of the table, and allocate the array of sources first because the table 77 74 // is large and ephemeral --- when the table gets blown away, whatever is allocated after … … 93 90 unsigned int ID = psMetadataLookupU32 (&status, row, "ID"); 94 91 float X = psMetadataLookupF32 (&status, row, "X"); 92 assert(status); 95 93 float Y = psMetadataLookupF32 (&status, row, "Y"); 94 assert(status); 96 95 float flux = psMetadataLookupF32 (&status, row, "FLUX"); // guess at the instrumental flux 97 96 … … 105 104 float Rminor = psMetadataLookupF32 (&status, row, "R_MINOR"); 106 105 float theta = psMetadataLookupF32 (&status, row, "THETA"); 107 float Sindex = psMetadataLookupF32 (&status, row, "INDEX"); 106 107 // XXX: we need to put a lookup table in the cff header to define the correspondence of the 108 // model type values in the cff with our models. (We want to use an interger for efficiency 109 // but the values depend on the array in pmModelClass.c 110 int galaxyModelType = psMetadataLookupS32(&status, row, "MODEL_TYPE"); 111 float Sindex = psMetadataLookupF32 (&status, row, "INDEX"); // Should this be PAR_07 not sersic index 108 112 109 113 pmSource *source = pmSourceAlloc (); … … 160 164 source->moments->Mx = X; 161 165 source->moments->My = Y; 162 source->moments->Mrf = kronRadius ;166 source->moments->Mrf = kronRadius * 0.4; // kronRadius is 2.5 * first radial moment 163 167 source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED; 164 168 // XXX does the above cause a problem with pmSourceMoments (do we run it?) … … 182 186 galaxyAxes.major = Rmajor; 183 187 galaxyAxes.minor = Rminor; 184 galaxyAxes.theta = theta ; // XXX degrees or radians?188 galaxyAxes.theta = theta * PS_RAD_DEG; 185 189 186 190 pmPSF_AxesToModel (xPAR, galaxyAxes, galaxyModelType); 187 191 if (model->params->n > 7) { 188 xPAR[PM_PAR_7] =Sindex;192 xPAR[PM_PAR_7] = 0.5 / Sindex; 189 193 } 190 194 191 195 psArrayAdd (source->modelFits, 1, model); 192 196 psFree (model); 193 194 197 } 195 198
Note:
See TracChangeset
for help on using the changeset viewer.
