Hamamatsu
Overview¶
WORK IN PROGRESS
To be tested.
Support for Hamamatsu mini spectrometers (using HSUSB2 SDK).
Installation¶
Requirements¶
Warning
Do NOT install clr by yourself, this could lead to conflicts, let pythonnet pull its own dependencies.
Linux¶
The HSUSB2 SDK is not available on linux.
Windows¶
TBD
Usage¶
Warning
At the moment only the following mode have been working
- capture mode count (trigger mode seems to be ignored)
- capture mode continuous (trigger mode seems to be ignored)
- capture mode trigger:
- trigger mode internal synchronous
- software synchronous mode
- external synchronous level sense mode (trigger polarity rising tested)
Hamamastru Mini Spectrometers (HMS) parameters:
capture mode¶
- 0x00000000 ...Specified number of measurement mode
- 0x00000001 ...Continuous measurement mode
- 0x00000002 ...Trigger mode
trigger mode¶
- 0x00000000 ...Internal synchronous mode
- 0x00000001 ...Software asynchronous mode
- 0x00000002 ...Software synchronous mode
- 0x00000003 ...External asynchronous edge sense mode
- 0x00000004 ...External asynchronous level sense mode
- 0x00000005 ...External synchronous edge sense mode
- 0x00000006 ...External synchronous level sense mode
- 0x00000007 ...External synchronous pulse mode
We couldn't get async modes to work.
trigger polarity¶
- 0x00000001 ...Falling edge or Low level
- 0x00000003 ... Rising edge or High level
data count¶
(integer, 1 <= n <= 100)
If capture mode is TRIGGER, this is the number of points take per trigger.
If capture mode is COUNT this is the number of points that will be acquired.
data transmit¶
data transmit (integer, 1..datacount)
Aka "frame size", a frame is a bunch of acquired points (pixels if you're familiar with XIA): getCaptureStatus status returned counters units are frames. So if getCaptureStatus indicates that it has 3 frames available, it actually means that 3 x data transmit points have been acquired and are available for download.
Same goes for getImage data, the values passer are "frames": getImage(n, 3) will get you 3 frames, starting at buffer index n. Etc, etc...
Buffer size¶
1 <= n <= 1000
released if datatransmit is changed
Internal buffer, n frames can be stored without the user needing to download them.
Bad things happen if they're not retrieved before it fills up.
capture count¶
1 <= count <= allocated buffer size
Value passed to captureStart. Not sure exactly what it does, except that the indice returned by getCaptureStatus will reset back to 0 when it reaches N-1.
Really bad things happens if the Nth frame has not been downloaded before the N+1th is available.