1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What function should I fit to this data?

  1. Mar 22, 2015 #1
    1. The problem statement, all variables and given/known data
    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.

    2. Relevant 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.

    3. 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
     

    Attached Files:

    Last edited: Mar 22, 2015
  2. jcsd
  3. Mar 22, 2015 #2

    Quantum Defect

    User Avatar
    Homework Helper
    Gold Member

    Why not do some smoothing first? Numerical Recipes has some methods for doing this.
     
  4. Mar 22, 2015 #3
    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?
     
  5. Mar 22, 2015 #4

    Quantum Defect

    User Avatar
    Homework Helper
    Gold Member

    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.
     
  6. Mar 22, 2015 #5
    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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: What function should I fit to this data?
Loading...