Sample Program: |
The following sample program shows how to import a single spectrum stored in JCAMP/DX format. If successful the imported spectrum is stored in pixel [1,1] of the current data cube.
program ImportJCampDXSpectrum;
var
Spec : TDoubleArray;
errnum : integer;
FName : string;
grp : integer;
begin
FName := SelectFile ('', '*.dx', 'Select a jcamp/dx file');
if FName <> '' then
errnum := ImportJCampDXSpec (FName, Spec, grp);
if (errnum = 0) and (grp > 0) then
SetSpectrum (1,1,1,grp,Spec);
end.
|