Xygaus

Hi,

Just wondering what the parameters are for the 2D Gaussian formula ‘xygaus’. I can’t find them listed in the documentation or on the web.

Thanks,
John

Parameters are const,meanx,sigmax,meany,sigmay

Rene

[quote=“brun”]Parameters are const,meanx,sigmax,meany,sigmay

Rene[/quote]

Thanks!

[quote=“jkildea”][quote=“brun”]Parameters are const,meanx,sigmax,meany,sigmay

Rene[/quote]

Thanks![/quote]

Hi again,

The list of parameters you provided is what I had thought initially. I just went back and looked though and I am getting a negative sigmax, which doesn’t make a lot of sense. The 2D histogram I am fitting looks normal.

Thanks,
John

Here is the fit output:


** 1 **SET ERR 1


PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 p0 5.00000e+01 1.50000e+01 no limits
2 p1 0.00000e+00 1.00000e+00 no limits
3 p2 5.00000e-01 1.50000e-01 no limits
4 p3 0.00000e+00 1.00000e+00 no limits
5 p4 5.00000e-01 1.50000e-01 no limits


** 2 **SET PRINT 0



** 3 **MIGRAD 5000 0.001521


MIGRAD MINIMIZATION HAS CONVERGED.
FCN=190585 FROM MIGRAD STATUS=CONVERGED 223 CALLS 224 TOTAL
EDM=7.53588e-08 STRATEGY= 1 ERROR MATRIX UNCERTAINTY
1.4 per cent
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.59389e+02 6.43254e-01 -1.17232e-03 1.44010e-04
2 p1 4.95416e-02 3.61106e-04 -3.25179e-07 1.10874e+00
3 p2 -1.34512e-01 3.23758e-04 2.30096e-06 7.41990e-01
4 p3 1.09753e-02 2.79168e-04 -1.02896e-06 -9.72767e-01
5 p4 1.07965e-01 2.58409e-04 1.38596e-06 3.01019e-01
FCN=190585 FROM MIGRAD STATUS=CONVERGED 223 CALLS 224 TOTAL
EDM=7.53588e-08 STRATEGY= 1 ERROR MATRIX UNCERTAINTY
1.4 per cent
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.59389e+02 6.43254e-01 -1.17232e-03 1.44010e-04
2 p1 4.95416e-02 3.61106e-04 -3.25179e-07 1.10874e+00
3 p2 -1.34512e-01 3.23758e-04 2.30096e-06 7.41990e-01
4 p3 1.09753e-02 2.79168e-04 -1.02896e-06 -9.72767e-01
5 p4 1.07965e-01 2.58409e-04 1.38596e-06 3.01019e-01

When fitting expressions like ((x-mean)/sigma)^2, a positive or negative sigma are correct solutions. You can specify boundary limits for the parameters.
Only in case of “gaus” functions we force a positive value for sigma.

Rene

[quote=“brun”]When fitting expressions like ((x-mean)/sigma)^2, a positive or negative sigma are correct solutions. You can specify boundary limits for the parameters.
Only in case of “gaus” functions we force a positive value for sigma.

Rene[/quote]

Okay. Thanks for the explanation!

John

I post my question here, since i think it should be better than opening a new post.

I would like to know if const Parameter is the peak or the area of the xygaus.

When fitting, after setting const using SetParameter and SetParLimits before each fit

func->SetParameter(0, 150); func->SetParLimits(0, 0, 1000);

I get this error:

Actually, the fit is quite good, and without setting const is not. The fitted const Parameter is in the limits I setted, so I was wondering where I am wrong.

[quote]I post my question here, since i think it should be better than opening a new post.[/quote]I recommend you open a new post in the Math & Stat forum, you are more likely to get an answer there.

Cheers,
Philippe.

[quote=“kormoranos”]I would like to know if const Parameter is the peak or the area of the xygaus.
[/quote]

based on my tests, it seems that the const is really the peak… I checked with same const and different sigma (different by an order of 1000), which gave equal peaks (at least to the eye)… if the const depended on the area, the peak would have differed significantly I think.

EDIT: sorry… i’d checked with the one dimensional version… :frowning:
though i think that it should be same for the 2d variant as well, for the sake of consistency…