Discussion:
Curve Fitting for Interference Pattern
(too old to reply)
s***@gmail.com
2005-12-25 08:05:37 UTC
Permalink
Hi all,

I have to analyse an interference pattern, for which I need to fit a
curve to the given data set. Please tell me which curve fit (e.g
Polynomial, Exponential, etc. ) to use to fit it.

<img
src="Loading Image...">

URL is <a
href="http://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg" style="padding: 7px 8px; background-color: #F6FEFF; border-left: 1px solid #8FF1FF; margin: 10px 0px; display: inline-block; color: #3B5053; font-size: 13px; ">Loading Image...</a>

I have tried to use to sum of sines, but it didnt give a good fit. This
is not exactly sinusoidal data. Please note that I need to fit the
GREEN curve only.

THanx in advance.

Merry Christmas to all.

Som
John D'Errico
2005-12-25 11:21:17 UTC
Permalink
Post by s***@gmail.com
I have to analyse an interference pattern, for which I need to fit a
curve to the given data set. Please tell me which curve fit (e.g
Polynomial, Exponential, etc. ) to use to fit it.
<img
src="http://img15.imgspot.com/u/05/358/03/Interference1135501150.jpg">
URL is <a
href="Loading Image...">htt
p://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg</a>
I have tried to use to sum of sines, but it didnt give a good fit. This
is not exactly sinusoidal data. Please note that I need to fit the
GREEN curve only.
Polynomial? No.

Exponential? No.

Sorry. It isn't anything special. There is no magic recipe
waiting in the wings to make fitting this curve easy. The
closest thing would be a least squares spline, only because
a spline with hand chosen knots can fit nearly anything. A
smoothing spline is another choice that could work. Much
depends upon how well you choose to fit the curve. Does that
initial segment need to be fit well, in the sense that it
must be monotone decreasing?

Even were I to use my own least squares splines tools to
do it, I'd probably end up with almost 30 hand chosen knots.
It would take 50-100 knots if you just used equally spaced
knots, and then you still would be unhappy with the fit,
without some additional effort applied.

And, having seen your curve, can I know "how to fit it"?
Sorry, no. Only you know what your goals are. You have not
told me enough information. Maybe that junk that appears
to be noise to me is important to you. What will you do
with the resulting fit? What do you know about it that lies
unspoken in the words "fit a curve"?

So your best option may be a (cubic) spline, least squares
or smoothing, both will have downsides. You can find them
in the splines toolbox. Even an interpolating spline may
be appropriate. Just look in interp1 for that.

I'm sorry that I can't be of much help here.

HTH,
John D'Errico
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945

Those who can't laugh at themselves leave the job to others.
Anonymous
John O'Flaherty
2005-12-25 23:09:01 UTC
Permalink
Post by s***@gmail.com
Hi all,
I have to analyse an interference pattern, for which I need to fit a
curve to the given data set. Please tell me which curve fit (e.g
Polynomial, Exponential, etc. ) to use to fit it.
<img
src="http://img15.imgspot.com/u/05/358/03/Interference1135501150.jpg">
URL is <a
href="http://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg">http://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg</a>
I have tried to use to sum of sines, but it didnt give a good fit. This
is not exactly sinusoidal data. Please note that I need to fit the
GREEN curve only.
I tried to simulate what happens to produce an interference pattern-
differentially changing path length causes differential phase, which
gives interference. This code comes close to producing a curve like the
one you posted (without the noise).

L=9301.2
k=20
d=[0:1:700]
dx=ones(1,701)*140
dt=max(d,dx)
da=sqrt(L^2+(dt).^2)
db=sqrt(L^2+(dt-k).^2)
amp=sqrt(cos(da).^2+cos(db).^2)
plot(d,100*amp+50)

L represents the distance from the wave source. k is the horizontal
distance between the two wave starting points (like the two sides of a
slit). d is the horizontal axis you used.
da and db are the total distances from the two origin points as d is
varied. The amplitude is taken as the norm of the vector sum of the
cosines of the two interfering waves.

There is a cheat such that the action only starts at 140 on the
distance scale, by making dt have a minimum value of 140.

The gross L value controls how many humps are in the graph. The fine L
value makes the starting point be uptop where it should be. The k value
controls how fast the pattern tapers off with d, and of course there
are factors in the plot command to postion and scale the curve.

If you wanted to fit the curve to be able to reproduce it without a
data set, this might do it.

--
john
Rune Allnor
2005-12-25 23:54:09 UTC
Permalink
Post by s***@gmail.com
Hi all,
I have to analyse an interference pattern, for which I need to fit a
curve to the given data set.
What does "analyze" mean here? What is the experimental setup that
produced the data? What do you hope to achieve by this analysis?
Post by s***@gmail.com
Please tell me which curve fit (e.g
Polynomial, Exponential, etc. ) to use to fit it.
<img
src="http://img15.imgspot.com/u/05/358/03/Interference1135501150.jpg">
URL is <a
href="http://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg">http://img15.imgspot.com/?u=/u/05/358/03/Interference1135501150.jpg</a>
I have tried to use to sum of sines, but it didnt give a good fit. This
is not exactly sinusoidal data. Please note that I need to fit the
GREEN curve only.
It is impossible to answer such questions without knowing the purpose
of your excercise. Would a simple DFT help out? A sum of exponentially
damped sines?

Data analysis is an inherently subjective dicipline, as different
people
might answer such questions differently. That's why the term
"interpretation" is used in practical data analysis.

Rune

Continue reading on narkive:
Loading...