< a mulab primer | Index | advanced Mulab topics >
You must have set the Data path, the LOCATION, filenames and LOG path first.
Then the main functions of mulab are the following:
- Displaying individual detectors: Menu Plots/Plot detectors. At ISIS you can inspect the buildup of the full count rate as the burst enters the sample. At PSI you see prompt counts, i.e. particles that hit both muon and positron counters, with failing vetoes.
- Quick overlayed plot of the asymmetry from successive runs: Menu Plots/Overlay asymmetries
- Estimating the t=0 bin: Setup/Determine t=0 will either fit prompts at PSI or fit count rate build-up at ISIS. It assumes that t=0 coincides with prompt peaks at PSI and with the top of the beam time structure at ISIS. This is not a guaranteed method. A better practice involves measuring transverse field phases at different fields. This determines the time when the phase of the spin precession equals the geometrical angle between the detector axis and the initial spin direction. Warning: at ISIS the applied field does not alter this angle, but at PSI in transverse geometry WED fields do (see GPS manual and this description).
- Fitting time-differential asymmetries to models: the primer provides a simple example
- Saving fit results: automatic save in log files (extension
.fit
). Different versions can be saved by changing log version number, on the left of the menu. The log files contain global structures , that may be entirely reproduced by loading the log file by LdModel.
- Reproducing an old fit: make sure you are using matlab from the correct instrument-specific directory. First load the model by the LdModel button (you can navigate to log-directories belonging to other runs and other samples, to simply inherit a model for a new fit attempt, but make sure you do not change instrument; this will not change your defaults paths). Then load the data: this order of operation guarantees that the correct t=0 and dt, loaded with the model, will be applied to the raw data when producing the asymmetry. Finally, select Results (to the left of PlotFit) and hit Plotfit.
- Replotting a portion of the fit over a different range: PlotFit displays the range selected in the window to its right. It replots the starting guess written il the parameter inputs below, if Guess is selected in the right popdown, the best fit if Result is selected. Also Bin can be changed to n, to rebin data (sum the content of n adjacent bins). This never affects fits, which are always performed on the original unbinned data. Requires patch muloadmodel.m or mulab version from at least 31-08-2015
- Rotating frame display of the asymmetry, in order to see a fast precession, can be selected from the same Fit plot window (look at the leftmost drop-down menu).
- FFT of the fit residues: when you have a best fit, press Update (or LdModel its file), then you can select or deselect each individual component and perform a FFT of the data MINUS the selected best fit components (residues). Power, real and imaginary amplitudes of the FFT are displayed. You can further choose the output frequency range and the rate of an anti-aliasing filter (hypergaussian). Match it to the intrinsic decay rate of the signal.
- Plotting best fit parameters of a given model in a series of runs vs. T, B, run number or a user defined variable. Menu Plots/Plot Parameters.
- Producing independent figures: for instance try these fitplot_template.m, fitrebinsave_template.m (download the chosen one to your instrument-specific working directory)
- Python templates and matlab automation e.g. to produce an early-time multiplot, use this python script (
python earlytimes.py
) after producing earlytimes.mat by this matlab script, by replotting and saving a series of obtained best fits. Requires patch muloadmodel.m or at least mulab version from 31-08-2015 on. Nicer multiplot with musaveasym.m
in mulab/psi/gos/
< a mulab primer | Index | advanced Mulab topics >