Mercurial > repos > muon-spectroscopy-computational-project > muspinsim
view test-data/fitting.in @ 4:8af5948994b0 draft default tip
planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim commit 389608650050596b28bc0c055de9f98c513a6f65
author | muon-spectroscopy-computational-project |
---|---|
date | Thu, 18 Jul 2024 09:07:13 +0000 |
parents | 64e6816a6727 |
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