- Timestamp:
- Apr 18, 2011, 8:53:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110404/psModules/src/objects/pmSourceMoments.c
r31153 r31312 109 109 // Xn = SUM (x - xc)^n * (z - sky) 110 110 111 psF32 RFW = 0.0; 112 psF32 RHW = 0.0; 113 111 114 psF32 RF = 0.0; 112 115 psF32 RH = 0.0; … … 187 190 psF32 rs = fDiff; 188 191 192 psF32 rfw = r * pDiff; 193 psF32 rhw = sqrt(r) * pDiff; 194 189 195 psF32 x = xDiff * pDiff; 190 196 psF32 y = yDiff * pDiff; … … 208 214 RH += rh; 209 215 RS += rs; 216 217 RFW += rfw; 218 RHW += rhw; 210 219 211 220 XX += xx; … … 226 235 } 227 236 228 source->moments->Mrf = RF/RS; 229 source->moments->Mrh = RH/RS; 237 // if Mrf (first radial moment) is << sigma, we are getting into low-significance 238 // territory. saturate at 0.75*sigma. conversely, if Mrf is > radius, we are clearly 239 // making an error. saturate at radius. 240 source->moments->Mrf = MIN(radius, MAX(0.75*sigma, RF/RS)); 241 source->moments->Mrh = MIN(radius, MAX(0.75*sigma, RH/RS)); 230 242 231 243 source->moments->Mxx = XX/Sum; … … 243 255 source->moments->Mxyyy = XYYY/Sum; 244 256 source->moments->Myyyy = YYYY/Sum; 257 258 // XXX TEST: 259 // source->moments->KronFinner = RFW/Sum; 260 // source->moments->KronFouter = sigma; 245 261 246 262 // Calculate the Kron magnitude (make this block optional?)
Note:
See TracChangeset
for help on using the changeset viewer.
