cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Adjust Bessel function to data

M_U
9-Granite
9-Granite

Adjust Bessel function to data

Hi,

I need to adjust a Bessel function to this data. I was unable to make it and I can't discover the error. Can someone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:M_U)

The Bessel function will not work, note that J0 does not have a flat lower bound, like your data shows.

It may help to square the Bessel function, like this:

LucMeekes_0-1608143463055.png

Success!
Luc

View solution in original post

9 REPLIES 9
Werner_E
24-Ruby V
(To:M_U)


I can't discover the error.

Which error?

Post your Mathcad or Prime sheet!

M_U
9-Granite
9-Granite
(To:Werner_E)

I'm trying to use the QuickSheet of Fitting nonlinear functions to data. But my problem starts when I have to define the bessel function J0. I don't have the analytic expression for the function, so I can't use the genfit.

Werner_E
24-Ruby V
(To:M_U)

The Bessel function J0 does not have any parameters you may twist to fit to some data.

Why do you think that you must fit with a Bessel and what modified version of Bessel do you have in mind?

Where does the problem stem from?

M_U
9-Granite
9-Granite
(To:Werner_E)

Hello,

 

These data are of intensity depending on the distance of a diffraction pattern. From the aspect of the curve, I think it's a zero-order Bessel function because it doesn't cancel out at the origin. I even saw an example on the forum but I didn't quite understand it because I'm a Mathcad beginner

Werner_E
24-Ruby V
(To:M_U)

You may of course scale the Bessel in x and y direction and/or shift it, but the result sure is not satisfactory as you can see:

Werner_E_3-1608132145514.png

 

Maybe a damping factor of some kind is needed, but a first try with exp(-c*|x|) made it even worse:

Werner_E_2-1608132066218.png

So, unless you know a bit more about the type of function to fit, ...

 

 

 

 

I think it might be better to fit a more standard diffraction function:

 

I = I0*sinc(k*x)^2

where I is your first column of data, x is your second column and sinc(x) = sin(x)/x

Having fitted I0 and k to your data you could see how k compares with the theoretical value (it’s a function of slit width, distance from slit to plane and wavelength of light),

 

Alan

Here's the result of Alans suggestion. I had to add a parameter c for vertical displacement

Werner_E_0-1608141696737.png

 

M_U
9-Granite
9-Granite
(To:Werner_E)

Thnak you Werner_E for the help. Using your tip and LucMeekes 1'm able to fit the function

LucMeekes
23-Emerald III
(To:M_U)

The Bessel function will not work, note that J0 does not have a flat lower bound, like your data shows.

It may help to square the Bessel function, like this:

LucMeekes_0-1608143463055.png

Success!
Luc

Top Tags