File Exchange

image thumbnail


version (2.42 KB) by Kurt Oldenburg
Imports Thermo FTIR time series data (.SRS files) into MATLAB


Updated 07 Feb 2018

View Version History

View License

The data file is imported into 3 numeric arrays: Spectra, Wavenumbers and Time. Series_Info is a cell array containing the acquisition information from the file header. The spectral range and acquisition from this header info are used to calculate the Wavenumber and Time arrays.

Cite As

Kurt Oldenburg (2021). SRS_Import (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

Max Lee

Despite the convenience of the matlab, there have been an error going as "SRS_Import (line 42)
Spectra (i,:)=fread(fid,Spectrum_Pts,'single');" . When I set up a break point at line 42 and F9 the "fid" and "Spectrum_Pts", the value of fid was 5 while the value of latter was 0.

Wendi Guo

Thank you for writing a code to read SRS file. However, It is not working on the computer, probably because I am using OMNIC 9. Is it possible to modify the code for OMNIC 9 version srs file. I am having the same problem with Irina

Kurt Oldenburg

Hi Ryan,
I would be happy to take a look at a different .SRS file and update the code! I used files collected in OMNIC 7, so I suspect that the length of the comment fields was changed when they did the upgrade to 8.

I set up a dropbox:


Ryan Dodson

Hi Kurt --
First off, thank you for writing code to deal with .srs files. I've been very disappointed with OMNIC in all of my dealings with it, so having a robust solution for handling this data would be fantastic. I'm running into the same issue as Irina and Marty, in that regardless of the number of spectra in the .srs file, the code only outputs a single spectrum. I'm calling the function as [Spectra, Wavenumbers, Time, Series_Info] = SRS_Import ();. I've tried working through the code line-by-line, but couldn't find where it should be recognizing additional spectra. I'd be happy to provide you with an example .srs file if that would help. I'm using a Nicolet iS50 FTIR and Omnic 9.

Kurt Oldenburg

Marty: The names of the matrices you want the data to populate have to be specified when you call the function. Try calling it like this:

[Spectra, Wavenumbers, Time] = SRS_Import ();

Marty B

I should preface this with the fact that I don't use Matlab very often and so I'm not very good with it. I'm trying to open an srs file using your program. In the workspace it tells me that I have a matrix 'ans=2x3268 double'. I don't know how to get the three numeric arrays out.

Irina Ir

Nicolet6700 and Omnic8

Kurt Oldenburg

Hi Irina,

What instrument and software version did you use?

Irina Ir

On my data this doesnt work :( Input: series file with 35 spectra. Output: 2 spectra with wrong data, "Time" array include only 2 wrong values.


Beautiful! A great timesaver! Thanks for this sbmission.

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!