What function should I fit to this data?

gothloli
Messages
37
Reaction score
0

Homework Statement


I'm supposed to find the first ionization energy of a gas (Argon), and to do that I used mass spectrometer. The data I plotted was amplifier voltage (acts as Ion current) vs. electron volts. The graph appears in the attachment as data2.jpeg.
To find the ionization energy I'm supposed to take the first and second derivative of the data, and the max x-value of the data is the ionization energy. When I do that the plot of the derivatives is not smooth; the points fluctuate. So I decided to fit a function to the data, and then take the derivative.

Homework Equations


I fitted using curve_fit on numpy, python 2.7. and tested the goodness of fit using chi-squared/dof. The fit was bad.

The Attempt at a Solution


I used the logistic function defined here http://en.wikipedia.org/wiki/Logistic_function, with parameters, (0.026, 0.745, 19.0, 0.0005). The fitted function is shown here. Since the fit was not good, is there a better function to fit this kind of data, or is there a better way to find the derivatives of the data?
data.jpeg


data.jpeg
 

Attachments

  • data2.jpeg
    data2.jpeg
    18.6 KB · Views: 514
Last edited:
Physics news on Phys.org
gothloli said:

Homework Statement


I'm supposed to find the first ionization energy of a gas (Argon), and to do that I used mass spectrometer. The data I plotted was amplifier voltage (acts as Ion current) vs. electron volts. The graph appears in the attachment as data2.jpeg.
To find the ionization energy I'm supposed to take the first and second derivative of the data, and the max x-value of the data is the ionization energy. When I do that the plot of the derivatives is not smooth; the points fluctuate. So I decided to fit a function to the data, and then take the derivative.

Homework Equations


I fitted using curve_fit on numpy, python 2.7. and tested the goodness of fit using chi-squared/dof. The fit was bad.

The Attempt at a Solution


I used the logistic function defined here http://en.wikipedia.org/wiki/Logistic_function, with parameters, (0.026, 0.745, 19.0, 0.0005). The fitted function is shown here. Since the fit was not good, is there a better function to fit this kind of data, or is there a better way to find the derivatives of the data?
View attachment 80813

View attachment 80813
Why not do some smoothing first? Numerical Recipes has some methods for doing this.
 
Quantum Defect said:
Why not do some smoothing first? Numerical Recipes has some methods for doing this.
would smoothing the data give a clean first and second differential plot? If so which smoothing algorithm would work best? Since the data was originally plotted with time, would exponential smoothing work?
 
gothloli said:
would smoothing the data give a clean first and second differential plot? If so which smoothing algorithm would work best? Since the data was originally plotted with time, would exponential smoothing work?

You have high frequency noise, with a very clean underlying signal. I would just try some different ways to smooth (moving window is easiest) and see what you get. It will get rid of the high frequency noise, and should clean up the derivatives.
 
Actually each data point shown above, was an average of an even noisier data set. Since I changed the electron volts every 2 seconds, I took the average of the voltage every two seconds. So using moving average would make the data even more cleaner? Do you know any smoothing functions from numpy?
 
##|\Psi|^2=\frac{1}{\sqrt{\pi b^2}}\exp(\frac{-(x-x_0)^2}{b^2}).## ##\braket{x}=\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dx\,x\exp(-\frac{(x-x_0)^2}{b^2}).## ##y=x-x_0 \quad x=y+x_0 \quad dy=dx.## The boundaries remain infinite, I believe. ##\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dy(y+x_0)\exp(\frac{-y^2}{b^2}).## ##\frac{2}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,y\exp(\frac{-y^2}{b^2})+\frac{2x_0}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,\exp(-\frac{y^2}{b^2}).## I then resolved the two...
Hello everyone, I’m considering a point charge q that oscillates harmonically about the origin along the z-axis, e.g. $$z_{q}(t)= A\sin(wt)$$ In a strongly simplified / quasi-instantaneous approximation I ignore retardation and take the electric field at the position ##r=(x,y,z)## simply to be the “Coulomb field at the charge’s instantaneous position”: $$E(r,t)=\frac{q}{4\pi\varepsilon_{0}}\frac{r-r_{q}(t)}{||r-r_{q}(t)||^{3}}$$ with $$r_{q}(t)=(0,0,z_{q}(t))$$ (I’m aware this isn’t...
Hi, I had an exam and I completely messed up a problem. Especially one part which was necessary for the rest of the problem. Basically, I have a wormhole metric: $$(ds)^2 = -(dt)^2 + (dr)^2 + (r^2 + b^2)( (d\theta)^2 + sin^2 \theta (d\phi)^2 )$$ Where ##b=1## with an orbit only in the equatorial plane. We also know from the question that the orbit must satisfy this relationship: $$\varepsilon = \frac{1}{2} (\frac{dr}{d\tau})^2 + V_{eff}(r)$$ Ultimately, I was tasked to find the initial...
Back
Top