Changeset 34261 for trunk/ppSim/src/ppSimInsertGalaxies.c
- Timestamp:
- Jul 31, 2012, 4:03:41 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimInsertGalaxies.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimInsertGalaxies.c
r34083 r34261 76 76 if (type == -1) { 77 77 psError (PS_ERR_UNKNOWN, false, "invalid model name"); 78 return false;78 return false; 79 79 } 80 80 … … 136 136 PAR[PM_PAR_YPOS] = yChip; 137 137 138 psEllipseAxes axes; 139 axes.major = galaxy->Rmaj; 140 axes.minor = galaxy->Rmin; 141 axes.theta = galaxy->theta; 142 pmPSF_AxesToModel (PAR, axes, type); 143 psF64 Area = 2.0 * M_PI * axes.major * axes.minor; 138 if (type == pmModelClassGetType ("PS_MODEL_TRAIL")) { 139 PAR[PM_PAR_LENGTH] = galaxy->Rmaj; 140 PAR[PM_PAR_SIGMA] = galaxy->Rmin; 141 PAR[PM_PAR_THETA] = galaxy->theta; 142 } else { 143 psEllipseAxes axes; 144 axes.major = galaxy->Rmaj; 145 axes.minor = galaxy->Rmin; 146 axes.theta = galaxy->theta; 147 pmPSF_AxesToModel (PAR, axes, type); 148 } 149 psF64 Area = 2.0 * M_PI * galaxy->Rmaj * galaxy->Rmin; 144 150 145 151 if (nParam == 8) { … … 147 153 } 148 154 149 // set the normalization to get the desired flux150 // XXX for now, use peak: pmModelSetFlux (model, galaxy->flux);151 152 155 // XXX let the flux limit be a user-defined number of sky sigmas (not just 1.0) 153 156 float radius = model->modelRadius (model->params, 0.1*roughNoise); 154 157 radius = PS_MAX (radius, 1.0); 158 155 159 // XXX the exp(-r^0.25) models can go way out if allowed... 156 160 radius = PS_MIN (radius, 300.0); … … 176 180 177 181 float par8 = (model->params->n == 8) ? model->params->data.F32[7] : 0.0; 178 fprintf (outfile, "%8.3f %8.3f %10.2f %2d %7.3f %5.3f %5.3f %5.3f %5.3f %5.3f\n", galaxy->x, galaxy->y, flux, 1, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8);182 fprintf (outfile, "%8.3f %8.3f %10.2f %2d %7.3f %5.3f %5.3f %5.3f %5.3f %5.3f\n", galaxy->x, galaxy->y, flux, 1, source->psfMag, source->psfMagErr, galaxy->Rmaj, galaxy->Rmin, galaxy->theta, par8); 179 183 180 184 psArrayAdd (sources, 100,source);
Note:
See TracChangeset
for help on using the changeset viewer.
