[daip] XMOM units {External}
egreisen
egreisen at nrao.edu
Tue Feb 8 23:44:55 EST 2022
On 2022-02-08 09:34, Lawrence Rudnick via Daip wrote:
> Eric or whoever's around: Sorry, this is a repeat of q from long ago.
>
> Can you please write down the formulas for the moments calculated by
> XMOM. I've read the words in the description, but i need the actual
> formulas for XMOM0,1,2.
>
> so, for example, if the values in a row are b_i, at column i, are
> these correct? i can't get these to match up with what i have....
>
> XMOM0=average(b_i)
>
> XMOM1=average(i*b_i)/XMOM0
>
> XMOM2=....
>
> Thanks! Larry
You have the source code and so should be able to answer this yourself.
$APLPGM/XMOM.FOR
xmom0 = sum (b_i)
xmom1 = sum (i * b_i) / xmom0
then it gets more complex
xmom2 = sqrt [ sum (i*i*b_i) - sum (i * b_i)^2 ]
if s1 == sum (i * b_i)
s2 == sum (i * i * b_i)
then
xmom3 = [ sum (i * i * i *b_i) - s * s1 * s2 + 2 * s1 * s1 * s1] ^ 1/3
But then units are applied where X = increment on spectral axis
xmom0 = xmom0 * abs(X)
xmom1 = X * (xmom1 + blc - 1 - crp ) + crv - offset
xmom2 = abs(X) * xmom2
xmom3 = X * xmom3
Eric
More information about the Daip
mailing list