Explanation of msrfit Initial Guess File

Title line

The first line is just a title.
(1993)11144:  La3In TF=dac36000 118G 11K ( 3 vs 4 ) ASY    10:20:24   1-JUN-94
Even though it generally has some structure to the information (<run number>: <run title> <signal prep> <time> <date>) that is just the format msrfit uses to output an updated guess file. There is no restriction on the format of the title line.

Parameter list

Starting on line 2 are parameters to be varied by the least squares fitting procedure to minimize chi-squared. One parameter per line, numbered in order starting at 1. Across a single line are:

ParamNum ParamName InitialValue InitialUncertainty LowerBound UpperBound

The last parameter line must be followed by a blank line, and the blank line should usually be followed by a line stating "\-E" (to disable echoing):

         1  AlphaLR   1.055451 .00173354        .2        5.
         2  Phas      -88.3943   .447291     -300.      300.
         3  AsyLR       .24321 .00137581        0.       .38
         4  Freq      1.599562 6.2994E-4        .4        3.
         5  Sigma       .12419 .00314248        0.        2.
 
\-E  (do not Echo indirect input to ASK.)

Comment section

The comment section follows, listing number of degrees of freedom and raw sum-of-squares-of-deviations ("chi-squared") for the last time this file was run (but if you want to be sure, run it again). People often refer to (sum-of-sq.-dev.)/(num.deg.freedom) as the "chi-squared", though it is properly the "reduced chi-squared".
!====================== COMMENT for Last Run:
!  219,   324.89     = NDFR, CHISQ
!                                   10:22:24     1-JUN-94       
Any line that begins with an exclamation mark (!) is a comment line. Whereas the comments in the Comment Section are written by msrfit when it updates an input file, you may place your own comments anywhere in the file.

Output command

The output command lists the name of the file to write the fit results to, in the form of another initial guess file. The "MIN=" indicates that the output file be minimally updated from the input file. Otherwise the file is written completely afresh.
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=11144.ITF   

Signal lines

The signal command encodes the type of theory function, and how the fitting parameters from the top of the initial guess file are to be used in the theory function.
! -------------------- SIGNAL commands:
 SIGNAL  2,      3,        4,       -5,        0
!      Phase Asymmetry Frequency Relaxation Hop/Pow  
Each value is a pointer based on the parameter number for a fitting parameter, as tabulated at the top of the inital guess file. The fitting function is identified by an arcane system positive, negative, or zero pointer values with hundreds added. General principles of the encoding:
a. Phase
Pointer to the signal's phase angle, in degrees:
b. Asymmetry
Pointer to the signal amplitude
c. Frequency
Pointer to the frequency of oscillation, in MHz, or related quantity:
d. Relaxation
Pointer to the signal's primary relaxation parameter, in inverse microseconds
e. Hop
Pointer to the signal's second relaxation parameter, typically a hop rate or power-law exponent.
If any values are omitted, they are taken as zero.

Details of the particular relaxation functions.
 TF   +a, +b, +c, +d,  0 Precession with Exponential envelope
+a, +b, +c, -d,  0 Precession with Gaussian envelope
+a, +b, +c, -d, +e Precession with Abragam (muon hopping) envelope
+a, +b, +c, +d, +e Precession with phenomenological ("stretched exponential") exponent-of-power exp(-{dt}e) envelope
 ZF    0, +b,  0, +d,  0 Simple exponential relaxation
 0, +b,  0, -d,  0 Static Gaussian ZF Kubo-Toyabe
 0, +b,  0, -d, +e ZF Kubo-Toyabe with hopping; next line should supply filename of .TBL lookup table, either Gaussian (KDGZF.TBL) or Lorentzian (KDLZF.TBL).
 0, +b,  0, +d, +e Phenomenological "stretched exponential" exp(-{dt}e) relaxation
 0, +b,  0, -d, -e Generalized Zero-field Kubo Toyabe (ZF KT): (1/3) + (2/3)[1-{dt}e] exp(-[{dt}e]/e) Note: to get static Lorentzian ZF Kubo-Toyabe, Jess Brewer recommends Generalized ZF KT with e=1 fixed.
 0, +b, -c,  0,  0 Incommensurate spin density wave function (bessel function)
+a, +b,  0, +d, -e Uemura thesis spin glass function with order parameter Q given by parameter a and hop rate by e
 LF   +a, +b, -c, -d,  0 Static LF Kubo-Toyabe, next line should supply filename of .TBL lookup table, either Gaussian (GLF.TBL) or Lorentzian (LLF.TBL).
+a, +b, -c, -d, +e LF Kubo-Toyabe with hopping, next line should supply filename of .TBL lookup table, either Gaussian (KDGLF.TBL) or Lorentzian (KDLLF.TBL).
+a, +b, +c, . . . Any TF signal can be used for LF relaxation by providing parameters for the phase (a) and frequency (c) whose values are fixed at zero (that's the value, not the pointer).

Indirect Mapping of parameters:
If an integer entry on the Signal line has absolute value in the range 100 < |a| < 115, then the parameter to be used in this slot is listed in the (|a|-100)th slot of the Spectrum line. This is useful when fitting a single model to a bunch of spectra simultaneously ("global fits"), with some model parameters varying from spectrum to spectrum, but other model parameters having unique value for the whole set of spectra.
Evaluated parameters:
If an integer entry on the Signal line (or a Spectrum line, see below) has absolute value greater than 200, then the next line should be an equation giving a mathematical expression for that parameter (in a format simlilar to Fortran) based on parameter names from the list at the top of the file. The expression may be written as an assignment to a parameter name, which could then be used in other expressions.
Multiple signals:
More than one Signal can be specified, and they will be combined.

Spectrum commands

The Spectrum command declares the use of a spectrum - a data set - and encodes parameters relevant to that spectrum. For asymmetry spectra:
! --------------------- SPECTRUM commands:
SPECTRUM 1,   0,     0,      0,    0,    
!       Alpha Beta RelPhase RelAsy L/T    (indirect...)
or for raw histogram spectra:
SPECTRUM    -9,   10,    0,      8,     -11,   
!          Norm  Bkgd  RelPha  RelAsy  T0Shift   (indirect...)
All entries in first 5 slots should be (usually positive) integers indicating the parameter number of the relevant fitting parameter in the list at the top of the file.

Alpha and Beta are parameters governing the assembly of the Asymmetry Histogram out of 2 histograms from an opposed pair of counters. Alpha is the "relative efficiency". Usually Beta, the "relative asymmetry" is left at its default value of unity. If Beta is not well approximated by unity, you are usually in analysis trouble.

A negative value for the Alpha entry indicates the spectrum is a raw histogram, and the first two parameters are Normalization (counts per ns) and fractional flat Background.

Relative Phase and Relative Asymmetry allow a distinction to be made between the detector geometry for a spectrum and the signal's precession phase. The Phase (Asymmetry) values of each signal are augmented by adding (multiplying) these relative values. This system facilitates multi-spectrum, multi-signal fits much better than using indirect parameters for all the signals.

L/T is life time, if different from the default value for a muon in vacuum. This is only used in negative muon spin relaxation. If the L/T pointer is negative, the parameter represents the shift in T0 for the spectrum (Lag Time instead of Life Time).

Any Spectrum parameter pointers greater than 200 indicate evaluated parameters, just as for Signal parameters described above.

The line following the Spectrum command, and following any expressions for evaluated parameters, must be the filename of the data file used to generate this spectrum.

 011144.msr

Lines after the file name specify how the data histograms are used to calculate a spectrum for fitting:

SpectrumType <Type> [ , <RRF freq>, <RRF bin> ]
where the types are:
  1. Single raw-data histogram.
  2. Asymmetry calculated from a single histogram. Calculate normalization and background numerically; subtract background and divide out normalized muon decay.
  3. Asymmetry: conceptually (A-B)/(A+B) from two histograms, but accounting for Alpha and Beta efficiencies.
  4. Asymmetry: A/B from two histograms.
  5. Complex Asymmetry from four histograms, perhaps translated to a rotating reference frame. The <RRF freq>uency and <RRF bin> size (in µs) tell how to build the RRF spectrum.

HistNumbers <num> [, <num> ...]
Specify one, two, or four histogram numbers used to generate the spectrum.

BackgroundBins <first>, <last> [ repeat for each histogram ]
Specify the bin ranges in each histogram of the data file corresponding to flat (uncorrelated) background. This line overrides the values in the data file itself, and it can be omitted.

Times <first>, <last>, <size>
Specify the time-range and binning desired for the spectrum: the time at the center of the first (packed) bin (μs), the last bin (μs), and the packed bin size (ns). This line can be omitted, in which case the spectrum uses all the data from the "good bins" specified in the data file. If this line requests data outside the "good bins" range, the good bins will truncate the time range.

Prev
Used instead of all the others, means to use the same settings as the previous spectrum.

The end of the commands to configure a particular spectrum is signalled by a blank line, after which there can be another Spectrum command or the end of all spectra. The end of spectra is also signalled by a blank line. Therefore, the end of the Spectrum section must have two blank lines:

 SP 2
 H 3,4
 B 80,200,80,200
 T .05,9,40


Any text after the two blank lines are only used by a batch fit, and are ignored by the interactive-fit program:
! --------------------- MINUIT commands:
 MIGRAD
 MINOS
 END

Complete Example Files

We have done a lot of fitting TF in vortex state of polycrystal superconductors to a sum of 2 Gaussian-envelope signals. For low fields
(1993)11148:  La3In TF=dac36000 118G FC 4.1K ( 3 vs 4 ) ASY   
         1  AlphaLR   1.037401 .00177851        .2        5.
         2  Phas      -84.8061  1.684704     -300.      300.
         3  AsyLR          .23  .0032481        0.       .23
         4  Freq       .942987   .039401        .4        3.
         5  Sigma       4.1858   .080712        1.        6.
         6  AsyBK      .045251 .00164983        0.        .3
         7  FrqBK     1.596713 .00249088        .4        3.
         8  SigBK      .145646  .0189731        0.        .5
 
\-E  (do not Echo indirect input to ASK.)
!====================== COMMENT for Last Run:
!  290,   333.95     = NDFR, CHISQ
!                                   22:37:56    25-JUL-93       
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=11148.ITF2  
! -------------------- SIGNAL commands:
 SIGNAL 2, 3, 4, -5
 SIGNAL 2, 6, 7, -8
! --------------------- SPECTRUM commands:
 SPECTRUM 1
 /musr/data/m13/1993/011148.msr
 SP 2
 H 3,4
 B 80,200,80,200
 T .04,6,20
 
 
! --------------------- MINUIT commands:
 FIX 2
 MIGRAD
 MINOS
 END


At high fields, in rotating reference frame:

(1994)7255 TD38L aligned Tl-1212  3kG 5K                    14:46:47    17-JAN-95       
         1  Phase    -1.672379   .532623     -190.      190.
         2  Asy1       .037514 7.8748E-4        0.        .3
         3  Frq1       42.0448  .0258043        0.      100.
         4  Sigma1     3.43283   .098483        0.       10.
         5  Asy2       .032213 2.1546E-4        0.        .3
         6  Frq2       42.3589 7.7438E-4        0.      100.
         7  Sigma2     .144882  .0042957        0.        1.
 
\-E  (do not Echo indirect input to ASK.)
!====================== COMMENT for Last Run:
!  591,   2130.4     = NDFR, CHISQ
!                                   14:46:49    17-JAN-95       
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=7255.I2RR   
! --------------------- SIGNAL commands:
SIGNAL 1, 2 ,3, -4
SIGNAL 1, 5 ,6, -7
! --------------------- SPECTRUM commands:
SPECTRUM 201
Alpha=1.
/musr/data/m15/1994/007255.msr
SP 4, RRF=40, .02
H 1,2,0,0
B 60,200,60,200, 60,200,60,200
T 0.,6
 
 
! --------------------- MINUIT commands:
!MIGRAD
!END


When I want to test for static vs. dynamic local fields, I apply a sequence of LFs to see if the relaxation will "decouple". I fit all such LF spectra at a single temperature with a single global fit. A simple static case is:

(note the minus signs in front of the indirectly-mapped LFFreq parameter numbers on the Spectrum lines)

(1993)5256-7-8 UVa AlCuFe QC 1K ZF, 8G, 17G LF
         1  Alpha      .643258 .00116349        .2        3.
         2  ASY        .179766 9.0747E-4        0.       .25
         3  Delta      .289526 .00173231        0.        .5
         4  HopR       .053294 .00271449        0.        3.
         5  ZERO         1.E-5     1.E-6        0.      .001
         6  LFF8       .121597 .00115867        0.        .3
         7  lff17      .223658 .00252321        0.       .32
 
\-E  (do not Echo indirect input to ASK.)
!====================== COMMENT for Last Run:
!  104,   172.17     = NDFR, CHISQ
!                                   16:24:06    16-FEB-93       
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=ALCUFE1K.IGL
! --------------------- SIGNAL commands:
SIGNAL  0,  2, -106, -3,  4
!      Pha Asy  Frq  Rlx Hop
[DRN.UTIL.TBL]KDGLF.TBL
! --------------------- SPECTRUM commands:
SPECTRUM 1,  0,  0,  0,  0,  -5
!       Alp Bet RPh RAs L/T (indir...)
/musr/data/m15/1993/005256.msr
SP 2
H  1,2
B  76,236,76,236,76,236,76,236
T   ,11,300
 
SPECTRUM 1,  0,  0,  0,  0,  -6
!       Alp Bet RPh RAs L/T (indir...)
/musr/data/m15/1993/005257.msr
PREV
 
spectrum 1,  0,  0,  0,  0,  -7
!       alp bet rph ras l/t (indir...)
/musr/data/m15/1993/005258.msr
prev
 
 
 
! --------------------- MINUIT commands:
MIGRAD
END


On the other hand, the Al-Mn-Si quasicrystal exhibited much more complicated behavior. The following is for a temperature above the spin glass freezing, but not too far above (AsyIns and LamIns represent a small temperature- and field- and sample-independent signal which I concluded was instrumental (early bins, but I did not want to give them up entirely):

(1993) AlMnSi UVa T=10K ZF,41,100,300,800GLF FastRlx+(SGKT) 10:11:08    18-OCT-93       
         1  AlphUD        .686 .00175163       .68       .69
         2  AsyFas     .042691 9.4488E-4        0.       .19
         3  RlxFLo     .202535  .0078375        0.        1.
         4  PwrFas     .681561  .0080226      .499      2.01
         5  AsyKT      .147244 8.8483E-4        0.       .19
         6  ZERO         1.E-5     1.E-6        0.      .001
         7  RlxF300     .11738  .0078151        0.        .8
         8  RlxF800    .130227  .0070363        0.        .6
 
\-E  (do not Echo indirect input to ASK.)
!====================== COMMENT for Last Run:
!  647,   762.06     = NDFR, CHISQ
!                                   10:11:10    18-OCT-93       
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=10KLF6.ID   
!===================================================== SIGNAL Parameters:
SIGNAL 0,   2,    0,  107,   4
SIGNAL 0,   5, -106, -202
DelKT=0.352
[NOAKES.TBL]GLF.TBL
SIGNAL 0, 203,    0,  204
AsyIns=.0227
LamIns=26.
!===================================================== SPECTRUM Parameters:
SPECTRUM 1,,,,,-6,3
/musr/data/m15/1993/005201.msr
SP 2
H 1,2
B 80,230, 80,230
T ,.5, 5
 
SPECTRUM 1,,,,,-6,3
/musr/data/m15/1993/005201.msr
SP 2
H 1,2
B 80,230, 80,230
T .49, 10., 300
 
SPECTRUM 1,,,,,-205,3
LFF41=0.5555
/musr/data/m15/1993/005203.msr
SP 2
H 1,2
B 80,230, 80,230
T ,.5, 5
 
SPECTRUM 1,,,,,-206,3
LF41=0.5555
/musr/data/m15/1993/005203.msr
SP 2
H 1,2
B 80,230, 80,230
T .49, 10., 300
 
SPECTRUM 1,,,,,-207,3
LFF100=1.355
/musr/data/m15/1993/005204.msr
SP 2
H 1,2
B 80,230, 80,230
T ,.5, 5
 
SPECTRUM 1,,,,,-208,3
LF100=1.355
/musr/data/m15/1993/005204.msr
SP 2
H 1,2
B 80,230, 80,230
T .49, 10., 300
 
SPECTRUM 1,,,,,-209,7
LFF300=4.065
/musr/data/m15/1993/005205.msr
SP 2
H 1,2
B 80,230, 80,230
T ,.5, 5
 
SPECTRUM 1,,,,,-210,7
LF300=4.065
/musr/data/m15/1993/005205.msr
SP 2
H 1,2
B 80,230, 80,230
T .49, 10., 300
 
SPECTRUM 1,,,,,-211,8
LFF800=10.84
/musr/data/m15/1993/005206.msr
SP 2
H 1,2
B 80,230, 80,230
T ,.5, 5
 
SPECTRUM 1,,,,,-212,8
LF800=10.84
/musr/data/m15/1993/005206.msr
SP 2
H 1,2
B 80,230, 80,230
T .49, 10., 300
 
 
!---------------------- MINUIT Commands follow:
MIGRAD
END


Remember the fluoride insulators? The initial guess file that first fit the ZF data involved a 3-frequency function that you wrote down plus an extra monotonic-relaxing signal:

CAF2ZF80: Tokyo CaF2 ZF 80K (5096+5097) Syd's Fcn + Xtra Mon16:38:36     3-APR-85       
         1  AlphaBF    .967844 7.0944E-4        .2        5.
         2  ASYM      .0093516 1.2109E-4        0.       .06
         3  FRAC        .57735      .001        .5        .6
         4  DFRQ       .195322 9.5996E-4       .01        1.
         5  Rlx1       .143092  .0071282        0.        5.
         6  Powr        .50005   .050956        .5       2.2
         7  PwrX      1.690186    .06783        .5      2.05
         8  AsyX       .032426 3.3427E-4        0.        .1
         9  RlxX       .323251  .0085806       .01        8.
 
\-E  (do not Echo indirect input to ASK.)
!====================== COMMENT for Last Run:
!   45,   62.015     = NDFR, CHISQ
!                                   16:41:25     3-APR-85       
!====================== Name of TARGET "Initial Guess" File for RESULTS:
OUTPUT 
MIN=CAF2SYD.ID                                        
!===================
SIG ,201,202,5,6
A1=(1.-FRAC)*ASYM
FREQ1=0.732*DFRQ
SIG ,2,203,5,6
FREQ2=2*DFRQ
SIG ,204,205,5,6
A3=(1.+FRAC)*ASYM
FREQ3=2.732*DFRQ
SIG ,206,,5,6
A0=3.*ASYM
SIG ,8,,9,7
!===================
SPEC 1
caf2zf80.msr
S 2
H 1,2
B 8,18, 8,18
R 10,230, 10,230,
T ,8.8, 160
 
 
!-------------------
FIX 3
MIGRAD
MINOS ,6
MINOS ,7
MINOS ,8
MINOS ,2
MINOS ,10
MINOS ,9
END