Saves the spectra in the two-dimensional array SpecData as an ENVI spectral library (the spectra are stored rowwise in the array). The parameter FName specifies the full file path of dataset. The parameter Description contains the description of the library, the parameter Endian controls the endianess of the binary data. The array parameter SpecNames contains the names of the spectra and the WaveLengths array holds the list of wavelength values.
The parameter SpecType determines the spectral type of the library (the type of spectra in an ENVI file is not fully specified in the standard ENVI header file, Epina ImageLab uses the proprietory keyword "sensor type" to store the spectral type. SpecType may assume one of the following values:
ctEDX .......... energy dispersive xray (single lines)
ctEDXRaw ....... energy dispersive xray (raw spectra)
ctImpulse ...... time domain impulse
ctImpulse ...... impulse over time
ctIRdiscrete ... discrete infrared lines
ctIRspec ....... IR spectrum
ctLibsRaw ...... LIBS raw data (continuous spectrum)
ctLibssl ....... LIBS single line data
ctMagSpec ...... magnitude spectrum
ctMSNeg ........ MS negative spectrum (lines)
ctMSNegRaw ..... MS negative spectrum (continuous)
ctMSPos ........ MS positive spectrum (lines)
ctMSPosRaw ..... MS positive spectrum (continuous)
ctMSsim ........ MS single ion monitoring (lines)
ctOESRaw ....... optical emission spectroscopy (single lines)
ctOESsl ........ optical emission spectroscopy (single lines)
ctPhaseSpec .... phase spectrum
ctPowerSpec .... power spectrum
ctRaman ........ Raman spectrum
ctRGBcolors .... RGB color photo
ctSIMS ......... SIMS lines
ctTHzSpec ...... THz spectrum
ctTime ......... time
ctUndefined .... undefined spectral type
ctUvVis ........ UV/VIS/NIR spectrum
The parameter Feedback controls whether a visual feedback is provided during the import of the data. Please note that unless the script progress bar is already visible you have to make it visible before calling SaveEnviSpecLib, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).
The function returns the following error codes:
0 ... everything is OK
-1 ... the sizes of SpecNames and SpecData do not match
-2 ... the spectral type not supported
-3 ... the number of wavelengths does not match the length of the spectra
|