From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reader of Omnic Thermo .spa spectra file

Hi,

 

Does anyone know how to read a Omnic Thermo .spa spectra file?

 

Regards

Guswib

0 Kudos
Message 1 of 6
(7,178 Views)

Hi Guswib,

 

I assume you’re referring to reading this file into LabVIEW? What are you looking to do with the data in this file?

0 Kudos
Message 2 of 6
(7,149 Views)

I indend to make a very specific data treatment program for my experiment. For that reason I just need to be able to read the IR spectra inside the file.

0 Kudos
Message 3 of 6
(7,140 Views)

It doesn't appear that .spa files can be brought directly into LabVIEW. Do you have any programs that you can open it with and possible convert it to a different data type?

0 Kudos
Message 4 of 6
(7,121 Views)

Did you find a way to do this?  I need to do it too.  I found some info...

 

http://stackoverflow.com/questions/2887151/how-to-read-data-from-a-nicolet-ftir-spectral-file-with-e...

 

	
Do you have any particular language in mind, or would you like us to surprise you? – Ignacio Vazquez-Abrams May 22 '10 at 6:24
I would prefer: Matlab, VBA, any other like C, Pascal will all be OK. Thanks – cooooldog May 24 '10 at 0:59
As a Matter of fact, I have obtained the following Matlab/Octave codes for some specific *.spa spectra I obtained before. The only concern I have is, when reading the spectrum data, the offset typically is 0x41ch, but not always be 0x41ch when the *.spa files were re-named or saved as new or converted between %transmittance and absorbance via Omnic software.%%%%%%%%%%%****************%%%%%%%%%%%% – cooooldog May 24 '10 at 1:05
clc filename='c:\Documents and Settings\User Name\My Documents\Spectral File.SPA'; fid=fopen(filename,'r'); % Find the points number fseek(fid,hex2dec('234'),'bof'); Number_of_DataPoints=fread(fid,1,'int32'); %Find the maximum and minimum of Wavenumber (cm-1) range fseek(fid,576,'bof'); Maximum_Wavenumber=fread(fid,1,'single'); Minimum_Wavenumber=fread(fid,1,'single'); Interval=(Maximum_Wavenumber-Minimum_Wavenumber)/(Number_of_DataPoints-1); Wavenumber=linspace(Minimum_Wavenumber,Maximum_Wavenumber,Number_of_DataPoints).‌'; Wavenumber=flipud(Wavenumber); – cooooldog May 24 '10 at 1:05
%Find the Y-Axis data type: %Transmittance or Absorbance fseek(fid,hex2dec('360'),'bof'); Y_Label=char(fread(fid,14,'uchar')'); % How to define the offset for spectral data still remains unresolved. fseek(fid,hex2dec('41c'),'bof'); spectrum=fread(fid,Number_of_DataPoints,'single');%'double'); % float64, %real*8 figure(1),plot(Wavenumber,spectrum,'r'); set(gcf,'color','w'); set(gca,'xdir','rev','xcolor','b','ycolor','b','xlim',[round(Minimum_Wavenumber)‌,round(Maximum_Wavenumber)]); xlabel('Wavenumber /cm^{-1}'); ylabel(Y_Label); – cooooldog May 24 '10 at 1:06

 

0 Kudos
Message 5 of 6
(7,006 Views)

Playing around tonight, I have found that all my files have SGL array spectra that begin at 4x952 bytes; Hope this helps.

0 Kudos
Message 6 of 6
(7,002 Views)