Read SIMPSON files with SimPYson¶
In the examples
folder, you can find the files ethanol.in
, ethanol.fid
, and ethanol.spe
.
ethanol.in
is a standard input file for a SIMPSON simulation of the ethanol molecule.ethanol.fid
represents the simulated free induction decay (FID) of the ethanol molecule.ethanol.spe
represents the NMR spectra of the ethanol molecule.
SimPYson provides the SimpReader
class, which reads a SIMPSON fid
, spe
and xreim
files. When a fid
file is read SimpReader
creates a Python object with the following data:
real
- The real part of the FID.imag
- The imaginary part of the FID.np
- The number of points.sw
- The spectral width.time
- The time in milliseconds.
The data can be easily plotted using matplotlib
When reading spe
files the following data is extracted:
real
- The real part of the spectrum.imag
- The imaginary part of the spectrum.np
- The number of points.sw
- The spectral width.hz
- The frequency in Hz.
The 1H NMR spectra of ethanol show 3 1H NMR peaks: - Triplet from the CH3 group - Quartet from the CH2 group - Single from the OH group
You can edit jcoupling
in the file examples/ethanol.in
to see the effect of J-coupling on the spliting of the 1H peaks
The data can be converted from frequency (Hz) to ppm by providing the external magnetic field (B0) in either Tesla or MHz, and specify the nucleus being observed
Lastly, you can convert any fid
file into a spe
easily by using .to_spe()
The data can be easily exported to a .csv
file