MuonMaxent v1¶
Summary¶
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
Raw muon workspace to process |
|
InputPhaseTable |
Input |
Phase table (initial guess) |
||
InputDeadTimeTable |
Input |
Dead time table (initial) |
||
GroupTable |
Input |
Group Table |
||
GroupWorkspace |
Input |
Group Workspace |
||
FirstGoodTime |
Input |
number |
0.1 |
First good data time |
LastGoodTime |
Input |
number |
33 |
Last good data time |
Npts |
Input |
number |
Mandatory |
Number of frequency points to fit (should be power of 2). Allowed values: [‘256’, ‘512’, ‘1024’, ‘2048’, ‘4096’, ‘8192’, ‘16384’, ‘32768’, ‘65536’, ‘131072’, ‘262144’, ‘524288’, ‘1048576’] |
MaxField |
Input |
number |
1000 |
Maximum field for spectrum |
FixPhases |
Input |
boolean |
False |
Fix phases to initial values |
FitDeadTime |
Input |
boolean |
True |
Fit deadtimes |
DoublePulse |
Input |
boolean |
False |
Double pulse data |
OuterIterations |
Input |
number |
10 |
Number of loops to optimise phase, amplitudes, backgrounds and dead times |
InnerIterations |
Input |
number |
10 |
Number of loops to optimise the spectrum |
DefaultLevel |
Input |
number |
0.1 |
Default Level |
Factor |
InOut |
number |
1.04 |
Used to control the value chi-squared converge to |
OutputWorkspace |
Output |
Mandatory |
Output Spectrum (combined) versus field |
|
OutputPhaseTable |
Output |
Output phase table (optional) |
||
OutputDeadTimeTable |
Output |
Output dead time table (optional) |
||
ReconstructedSpectra |
Output |
Reconstructed time spectra (optional) |
||
PhaseConvergenceTable |
Output |
Convergence of phases (optional) |
Description¶
This algorithm calculates a single frequency spectrum from the time domain spectra recorded by multiple groups/detectors.
If a group contains zero counts (i.e. the detectors are dead) then they are excluded from the frequency calculation. In the outputs these groups record the phase and asymmetry as zero and
The time domain data FirstGoodTime
also have their errors set to infinity. The algorithm will produce the frequency spectra MaxField
. The maximum frequency,
The algorithm calculates an estimate of each time domain spectra,
where
The
where Factor
and is of order 1.0 (but can be adjusted by the user at the start of the algorithm for a better fit).
The entropy is given by
where DefaultLevel
; it is a parameter of the entropy function. It has a number of names in the literature, one of which
is default-value since the maximum entropy solution with no data is Factor
above that this algorithm property acts a Lagrange multiplier, i.e. controlling the value
Usage¶
# load data
Load(Filename='MUSR00022725.nxs', OutputWorkspace='MUSR00022725')
# estimate phases
CalMuonDetectorPhases(InputWorkspace='MUSR00022725', FirstGoodData=0.10000000000000001, LastGoodData=16, DetectorTable='phases', DataFitted='fitted', ForwardSpectra='9-16,57-64', BackwardSpectra='25-32,41-48')
MuonMaxent(InputWorkspace='MUSR00022725', InputPhaseTable='phases', Npts='16384', OuterIterations='9', InnerIterations='12', DefaultLevel=0.11, Factor=1.03, OutputWorkspace='freq', OutputPhaseTable='phasesOut', ReconstructedSpectra='time')
# get data
freq = AnalysisDataService.retrieve("freq")
print('frequency values {:.3f} {:.3f} {:.3f} {:.3f} {:.3f}'.format(freq.readY(0)[5], freq.readY(0)[690],freq.readY(0)[700], freq.readY(0)[710],freq.readY(0)[900]))
Output¶
frequency values 0.110 0.789 0.871 0.821 0.105
Categories: AlgorithmIndex | Muon | Arithmetic\FFT
Source¶
Python: MuonMaxent.py