Where does my (small) notebook go wrong?

  • Thread starter Thread starter Shukie
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on using NonLinearModelFit in Mathematica to determine Rydberg's constant from a dataset obtained via a spectroscope. The user encountered issues with the model not functioning correctly due to inadequate starting points for the parameter "p". It was concluded that starting points such as {p, 0} or {p, 0.027} yield successful results, allowing the model to fit the data appropriately.

PREREQUISITES
  • Familiarity with Mathematica's NonLinearModelFit function
  • Understanding of Rydberg's constant and its significance in spectroscopy
  • Basic knowledge of nonlinear fitting techniques
  • Experience with dataset preparation and manipulation in Mathematica
NEXT STEPS
  • Research advanced techniques for parameter estimation in NonLinearModelFit
  • Explore the impact of different starting points on model fitting accuracy
  • Learn about data weighting in Mathematica to improve fit quality
  • Investigate other fitting functions available in Mathematica for spectroscopy analysis
USEFUL FOR

Researchers, physicists, and data analysts working with spectroscopy data and those looking to enhance their skills in nonlinear modeling using Mathematica.

Shukie
Messages
91
Reaction score
0
Hi all,

A few days ago I have done an experiment with a spectroscope to find the value of Rydberg's constant. In my notebook I have a dataset that I want to use a NonLinearModelFit on to find this constant. However, it will not work and I just can't figure out why it won't. I have gotten rid of everything else in the notebook to keep it as clear as possible:

View attachment Notebook1.nb

Could anyone please take a look?
 
Physics news on Phys.org
I think the problem is all in your starting points. Do you have a better starting point for "p" than one?
I see that {p,0} or {p,0.027} works:
Code:
fit3 = NonlinearModelFit[
  dat1, \[Theta]nul + \[Alpha] + (ArcSin[p k - Sin[\[Alpha]]]), {{p, 
    0}, {\[Theta]nul, 3.15}, {\[Alpha], 0.}}, k, Weights -> wt]
 
Thanks a bunch, that works indeed!
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
910
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 7 ·
Replies
7
Views
2K