AlexShkarin / pyLabLib

Python package for device control and experiment automation
http://pylablib.readthedocs.io
GNU General Public License v3.0
142 stars 34 forks source link

Add software trigger support for pvcam #19

Open dboonz opened 2 years ago

dboonz commented 2 years ago

For my application it would be nice to support send_software_trigger() for the pvcam, just like some of the other cameras already do.

So:

camera = PhotoMetrics.PvcamCamera()
self.cam.set_trigger_mode('e_soft_edge')
self.cam.start_acquisition()
# fire software trigger
self.cam.send_software_trigger() # <-- this is not implemented yet, will do so
self.cam.read_newest_image()

I figured out how to implement it and I'll file a pull request early next week.

AlexShkarin commented 2 years ago

Thanks for bringin this up!

As far as I understand, this involves calling pl_exp_trigger function from the library and making sure that it returns 0? Is there anythint else too keep in mind? If not, and you do not want to go through the motions of filing a pull request, I can implement the fix myself (on the dev branch so far) and add it in the next library version.