Allows .spc files exported from Mettler Toledo iC IR to be read, plotted and evaluated in Python and Jupyter notebooks
Read the folder by initializing the IR_spectra object
spec = IR_spectra(<folder>)
IR_spectra.print_stats()
Returns the acquisition time and duration along with the time samples taken during this time.
Further the spectral range and resolution is displayed.
IR_spectra.print_stats()
Creates a 3D Plot of the gathered data (Intensity as a function of time and wave number).
When using in a jupyter notebook, use %matplotlib widget to get an interactive view.
The following optional arguments can be supplied:
t_ref = 0set the time in seconds to be used as a reference for the intensitiesfreq_min = 0set the minimum frequency to be included in the plotfreq_max = infset the maximum frequency to be included in the plot
IR_spectra.plot_spectra(<time>)
Plot the spectra at a certain time <time> (given in seconds).
Optional arguments:
t_ref = 0set the time in seconds to be used as a reference for the intensitiesfreq_min = 0set the minimum frequency to be included in the plotfreq_max = infset the maximum frequency to be included in the plotpeaks = Noneif given a numeric value: Highlights peaks above this value and prints a list of peaks
IR_spectra.plot_time(<freq>)
Plots the time dependence of a given signal at <freq>.
Optional arguments:
width = 1include wave numbers above and below the given signal (helps when peaks shift due to temperature)t_ref = 0set the time in seconds to be used as a reference for the intensitiest_min = 0set start time in secondst_max = infset end time in seconds
IR_spectra.get_data(<freq>)
Returns the data for the given signal as a x- and y-list.
Optional arguments:
-
t_ref = 0set the time in seconds to be used as a reference for the intensities -
width = 0include wave numbers above and below the given signal (helps when peaks shift due to temperature) -
t_start = 0set start time in seconds -
t_stop = infset end time in seconds -
invert = Falseinvert the signal (convert from absorbance to transmission), automatically enforces normalization -
normalize-
normalize = 0no normalization (default) -
normalize = 1simple normalization to range of 0 to 1 by min and max value -
normalize = 2normalization via extrapolation using predefined extrapolation function$I(t) = A_1 e^{-k_1 t} + A_2 e^{-k_2 t} + C$
-