problem with the intensity in *.spc file tgspcread

조회 수: 5 (최근 30일)
Alejandro Castro Alvarez
Alejandro Castro Alvarez 2024년 5월 31일
편집: Walter Roberson 2024년 7월 25일
I am using the tgspcread function to import *.spc files from a spectrometer.
The function reads everything fine, however the intensity of the spectra is much lower than it should be.
When I compare the intensity using the spectrometer program there is a difference of several orders of magnitude in the intensities and completely arbitrary. It appears that the tgspcread function is dividing the intensity of each spectrum by an arbitrary factor.
Does anyone have any idea what the function is doing?
below an example
  댓글 수: 1
Alejandro Castro Alvarez
Alejandro Castro Alvarez 2024년 5월 31일
I also found that the x-axis is slightly different from Matlab and spectrometer software. That moves the whole spectra

댓글을 달려면 로그인하십시오.

답변 (1개)

Garmit Pant
Garmit Pant 2024년 7월 3일
Hello Alejandro Castro Alvarez
I see that you are working with spectral data acquired from a spectrometer and saved as a Thermo Galactic GRAMS format SPC-file. You are trying to import the data to MATLAB using “tgspcread” function.
tgspcread” function reads the raw binary data stored in the SPC-file and imports it into MATLAB in ‘double’ precision format. The function reads and converts the binary data as it is, without any post-processing like normalization.
I investigated the behaviour of the “tgspcread” function using a sample file that I have attached to the answer. On comparing the plots between MATLAB R2021b and Spectragryph v1.2.16.1, I found no discrepancy between the plots.
The following can be the reasons behind the discrepancy in the plots:
  • The spectrometer software can be applying some post-processing steps like normalization or scaling while exporting the data to a SPC-file.
  • The MATLAB script used to read and plot the data can be applying some normalization or scaling after using the “tgspcread” function.
You can refer to the documentation for the “tgspcread” function to understand how to refine your readings using input arguments:
I hope you find the above explanation and suggestions useful!
  댓글 수: 1
Alejandro Castro Alvarez
Alejandro Castro Alvarez 2024년 7월 25일
편집: Walter Roberson 2024년 7월 25일
Hi Garmit,
Thank you for your response. I checked your file and it works properly (Spectragryph vs Matlab). However, I do not understand what happened to my files. I never use the equipment's software to treat the data; instead, I save it as it was measured.
I always check the files first before doing the analysis. Here a small script to check and plot the files.
[file,path] = uigetfile('*.spc','Select Raman');
filename = fullfile(path,file);
SPCStruct = tgspcread(filename);
Freq=SPCStruct.X; % cm-1 or nm
Y =SPCStruct.Y; % intensity
plot(Freq,Y)
Do you have any idea what the problem could be?
I attach an example of the map.
Thank a lot for your help!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by