comparison test-data/fitting.in @ 0:64e6816a6727 draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim commit d130cf2c46d933fa9d0214ddbd5ddf860f322dc4
author muon-spectroscopy-computational-project
date Thu, 25 Aug 2022 16:16:19 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:64e6816a6727
1 # A basic test of fitting. We define a single muon with no interactions except
2 # for a dissipation term, causing an exponential decay. We then fit the rate
3 # of decay using a single variable g, starting at g=0.1, bounded from 0 to
4 # positive infinity.
5 #
6 # Some target data with added artificial noise is used as the "experiment"
7 # that we are trying to fit. We expect the decay to go like
8 #
9 # 0.5*cos(2*pi*t)*exp(-g*t)
10 #
11 # with g our variable, t the time, and pi = 3.1415...
12 #
13 # The 0.5 factor appears in front as that's the moment of the muon.
14 # With the data provided, we expect the fitting to find that g = 3.0
15
16 name
17 fitting_data
18 spins
19 mu
20 field
21 1.0/muon_gyr
22 fitting_data
23 load("fitting_input.dat")
24 fitting_variables
25 g 0.1 0.0 inf
26 dissipation 1
27 g