python-seabreeze
python-seabreeze copied to clipboard
Timeout, or abort, needed for proper trigger support
spectrometer and system information
USB2000, etc - all models with external trigger capability
current problem
To adequately support triggered operation, the API to retrieve spectra, absolutely needs to have a timeout parameter, or at least a way to abort the intensities() call while it is waiting for a trigger.
Hi @drmcnelson,
This will be a bit more involved. It's possible to change the pyseabreeze
backend to allow pass-through of a timeout value. For the cseabreeze
backend these USB timeouts are hardcoded, so it'll involve more work to implement.
I will implement the functionality for pyseabreeze
first.
But I'm currently pretty overloaded with work, so this is a very low priority right now.
I'll update this issue when I start work on this. I can also give some guidance on how to implement this feature, if someone volunteers to work on a PR.
Cheers, Andreas 😃
Yes, I saw where it would go in the pyseabreeze code. An abort could be a useful alternative for some use cases.
Note to self: It seems there's no easy hacky way to do this with the sync interface: https://libusb.sourceforge.io/api-1.0/libusb_io.html#sync
Yes, it looks messy. The comment that they need to be called to handle events seems a little concerning.
I have been using the device in triggered mode for clocked data acquisitions. So I'm getting along with out it for the moment.
Thank you for looking into it.
user space thread to implement a watchdog timer? (provided the overhead is small)
But again, I don't want to cause you extra work. It has been working very well as is, for my clocked data acquisitions.
At this point, I am pretty sure I would not change my code to use the timeout.