Changeset 9775 for trunk/psModules/src/objects/models/pmModel_GAUSS.c
- Timestamp:
- Oct 29, 2006, 5:02:59 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/models/pmModel_GAUSS.c
r9770 r9775 1 1 /****************************************************************************** 2 * this file defines the PGAUSS source shape model. Note that these model functions are loaded2 * this file defines the GAUSS source shape model. Note that these model functions are loaded 3 3 * by pmModelGroup.c using 'include', and thus need no 'include' statements of their own. The 4 4 * models use a psVector to represent the set of parameters, with the sequence used to specify … … 6 6 * specifics of the model. All models which are used a PSF representations share a few 7 7 * parameters, for which # define names are listed in pmModel.h: 8 9 pure Gaussian: 10 exp(-z) 8 11 9 12 * PM_PAR_SKY 0 - local sky : note that this is unused and may be dropped in the future … … 114 117 shape.sx = PAR[PM_PAR_SXX] / sqrt(2.0); 115 118 shape.sy = PAR[PM_PAR_SYY] / sqrt(2.0); 116 shape.sxy = PAR[PM_PAR_SXY] / sqrt(2.0);119 shape.sxy = PAR[PM_PAR_SXY]; 117 120 118 121 // Area is equivalent to 2 pi sigma^2 … … 131 134 psEllipseShape shape; 132 135 136 psF32 *PAR = params->data.F32; 137 133 138 if (flux <= 0) 134 139 return (1.0); 135 if ( params->data.F32[PM_PAR_I0] <= 0)140 if (PAR[PM_PAR_I0] <= 0) 136 141 return (1.0); 137 if (flux >= params->data.F32[PM_PAR_I0])142 if (flux >= PAR[PM_PAR_I0]) 138 143 return (1.0); 139 140 psF32 *PAR = params->data.F32;141 144 142 145 shape.sx = PAR[PM_PAR_SXX] / sqrt(2.0); 143 146 shape.sy = PAR[PM_PAR_SYY] / sqrt(2.0); 144 shape.sxy = PAR[PM_PAR_SXY] / sqrt(2.0);147 shape.sxy = PAR[PM_PAR_SXY]; 145 148 146 149 psEllipseAxes axes = psEllipseShapeToAxes (shape); 147 psF64 radius = axes.major * sqrt (2.0 * log( params->data.F32[PM_PAR_I0] / flux));150 psF64 radius = axes.major * sqrt (2.0 * log(PAR[PM_PAR_I0] / flux)); 148 151 return (radius); 149 152 }
Note:
See TracChangeset
for help on using the changeset viewer.
