Mercurial > repos > muon-spectroscopy-computational-project > muspinsim
view 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 |
line wrap: on
line source
# A basic test of fitting. We define a single muon with no interactions except # for a dissipation term, causing an exponential decay. We then fit the rate # of decay using a single variable g, starting at g=0.1, bounded from 0 to # positive infinity. # # Some target data with added artificial noise is used as the "experiment" # that we are trying to fit. We expect the decay to go like # # 0.5*cos(2*pi*t)*exp(-g*t) # # with g our variable, t the time, and pi = 3.1415... # # The 0.5 factor appears in front as that's the moment of the muon. # With the data provided, we expect the fitting to find that g = 3.0 name fitting_data spins mu field 1.0/muon_gyr fitting_data load("fitting_input.dat") fitting_variables g 0.1 0.0 inf dissipation 1 g