Rank: 1620 based on 44 downloads (last 30 days) and 2 files submitted
photo

Kris De Gussem

E-mail
Company/University
Ghent University

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Kris View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
22 Aug 2009 Screenshot Biodata toolbox Database system coupled to chemometric algorithms that consequently stores spectra and related data Author: Kris De Gussem 12 0
19 Aug 2009 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem 32 14
  • 4.88889
4.9 | 10 ratings
Comments and Ratings on Kris' Files View all
Updated File Comment by Comments Rating
18 Jul 2012 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem Uur

I tried this:

x = 1:0.1:100;
y = sin(x);
file = [x ; y]';
xlswrite('file.xls', file);

fread = xlsread('file.xls');
fX = fread(:,1); fY = fread(:,2);

GSSpcWrite ('newFile.spc', y, x) -> Works!

GSSpcWrite ('newFile.spc', fY, fX)
??? Error using ==> GSSpcWrite>CreateSPCFileFromMatrices at 217
Length of axis and number of spectral channels do not correspond.

Error in ==> GSSpcWrite at 189
CreateSPCFileFromMatrices (f, spectra, axis, logtxt, logbin, options);

How can I overcome this?

17 Jul 2012 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem Uur

Hi, very useful tool for spectroscopists.

However I could not use it properly, I think.

When I generate x and y axis randomly, I can write to SPC well. But When I try to read from XLS and write to SPC, I get the error "Length of axis and number of spectral channels do not correspond." eventhough the size of my data are the same.

My input was GSSpcWrite ('spec.spc', y,x)

So where do I make wrong?

greetings.

22 May 2012 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem Cai, Chun

First thanks for the great work. After using this toolbox for a while, I have found 3 bugs and have fixes.

- Problem: (GSSpcRead v0.4.3), For a multifile SPC file when using this option:
[data,xaxis,auditlog]=GSSpcRead('c:\tmp\test.spc',0);
Error using zeros Out of memory. Type HELP MEMORY for your options.error.

Solution: Change line 437 from
data = zeros (l,Specdata.spectra(1).data); %preallocation for speed
to
data = zeros (l,length(Specdata.spectra(1).data)); %preallocation for speed

- Problem: (GSSpcRead v0.4.3) For Horiba .spc file, the log information (last line is empty, error)

Solution: change line 403 from
if (~isempty(T{1}))
to
if (~isempty(S)) && (~isempty(T{1}))

- Problem (GSSpcWrite v0.4.3)
Uneven spaced x-axis is ignored, and generated SPC is even spaced.
Line 320 range function - if input is row vector, then no range (just 0s)

Solution: change
if range(diff) > 1E-8
to
if range(diff(:)) > 1E-8

28 Apr 2011 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem Weber, Larry

I found an error in GSSpcWrite.m . It outputs the xtype, ytype, and ztype to the header as a string instead of the correct single byte binary format. This is especially bad if the string has more than one byte since the rest of the header will get messed up.

The fix is to change lines 578 through 592 to the following code which simply converts the string to a single binary byte.

Thanks to Kris for making this very helpful set of routines available to us.

if isfield (spectra, 'xtype')
ThisSpcHdr.fxtype = uint8(str2double(LocateItem (spectra.xtype, Types.X, 2))); %%std%%%BYTE: Type of X units
else
ThisSpcHdr.fxtype = 13; %%std%%%BYTE: Type of X units
end
if isfield (spectra, 'ytype')
ThisSpcHdr.fytype = uint8(str2double(LocateItem (spectra.ytype, Types.Y, 2))); %%std%%%BYTE: Type of Y units
else
ThisSpcHdr.fytype = 0; %%std%%%BYTE: Type of Y units
end
if isfield (spectra, 'ztype')
ThisSpcHdr.fztype = uint8(str2double(LocateItem (spectra.ztype, Types.X, 2))); %%std%%%BYTE: Type of z units
else
ThisSpcHdr.fztype = 0; %%std%%%BYTE: Type of Z units
end

15 Dec 2010 GSTools A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions Author: Kris De Gussem Joseph

Oops, I'm sorry. I was inputting the wrong compatibility. Never mind.

Contact us