Spectra is a MATLAB library which can be used as a generic experimental data container and is especially suited to neutron scattering datasets. Spectra are stored as spec1d objects which can have mathematical operations applied, where errors are automatically and accuratly calculated.
This library contains the SpinW library for calculating spin wave spectra and ResLibCal from the iFit library to calculate instrumental resolution.
Data manipulation such as combining, cutting, re-binning and has been implemented as well as fitting data to arbitary models.
Research science contains a few endpoints Software, Publication, Pedagogy, and Reproducibility. The research science process is very interactive so I personally reserve the LNS branch (default) for vetted software codes. I tend to work off of the development branch while I am implementing new code.
This software can be obtained by git or as a zip file
git clone https://github.com/simonward86/Spectra.git- If you want the additional submodules run
git clone --recursive https://github.com/simonward86/Spectra.gitinstead. - You can use
spectra_on.mor modify thestartup_example.mand place it in the MATLAB home directory.
Note that some functions rely on the startup script having been run at least once! It is recommended that one of the files is in the MATLAB path.
User guides and examples can be found at the project site https://simonward86.github.io/Spectra look for tagged posts.