GSRadomaClassLibrary.dll
Minimal documentation for (x86) platform
Dependencies:
- GS1290: SDACQ32MP.dll, PDETH.dll, SDProcCL.dll
- GS1220: DCamUSB.dll
Installation:
- C#: copy the DLLs into your target directory (or put them on the PATH)
- Python: see install-on-python for details
Radoma1290Class
An instance of this class provides the interface to the 1290.
- Radoma1290Class() -- constructor
- .OpenComm() -- opens communications with the 1290
- .CloseComm() -- close when you are done
- .calibration --
- .calWave -- the amplitude calibration is stored on the 1290. When you open communications, the wavelength calibration is read from the unit and this var is instantiated
- .calAmplitude -- access the amplitude calibration with this var that you create with ...
- .LoadAmplitudeCalibration(filename) -- loads a GammaScientific calibration file into calAmplitude
- .OpenShutter(True/False) -- open (True) or close (False) the shutter
- .SetIntegrationTime(newintegrationtime) -- set the integration time, in millisecs
- .ScanSettings -- (see below)
- .RunAutoIntegrationTime() -- finds an integration time (IT) that provides a spectra with a maximum value in [ScanSettings.MinimumCount, ScanSettings.MaximumCount] and IT in [ScanSettings.MinimumIntegrationTime, ScanSettings.MaximumIntegrationTime].
Notes:
- If your seed IT is large (~ 4 * ScanSettings.MaximumIntegrationTime), then the algorithm will quit with IT = ScanSettings.MaximumIntegrationTime. Usually you can run it again and get a good IT.
- The default constraints are not for everyone (especially the impatient); they are set so that the program will not appear to hang if it is dark. Modify them for your application and expectations.
- data = SimpleScan() -- run a scan and return a RadomaDataClass object
RadomaDataClass
- RadomaDataClass(data) -- copy another RadomaDataClass object
- .integrationMs -- the ms used to gather the data
- .Wavelengths[] -- the wavelength for the Amplitude at the same index
- .WaveUnits -- 'pixels' until a wavelength calibration is applied
- .Amplitudes[] -- the data array
- .AmpUnits -- 'counts' until an Amplitude calibration is applied
- .iLength -- 1024 for the 1290 or you can look at the len(Amplitudes) or len(Wavelengths)
- .Subtract(bck) -- subtracts bck from the current instance. It does not try to determine if the data is in the same units, that is up to you.
- .ApplyWavelengthCalibration(gs1290.calibration.calWave) -- basically copies the nm info into Wavelengths
- .ApplyAmplitudeCalibration(gs1290.calibration.calAmplitude) -- scales the data by the cal file and integration millisecs
SpectralFileClass
- SpectralFileClass(data) -- create an instance from a data object
- SpectralFileClass(filename) -- create an instance from a file
- .WriteFile(filename) -- write it to disk in GammaScientific format
Optional libraries