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.
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
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: https://www.dropbox.com/sh/r24hxn0qnyj8cx3/AADR0kOoGCFXSOEa9GJWUvYka?dl=0
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.
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 ();
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.
Nicolet6700 and Omnic8
What instrument and software version did you use?
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.
Corrected the denominator in the Interval calculation on line 32 to account for the first wavenumber being used as a fixed point.
Create scripts with code, output, and formatted text in a single executable document.