Repository navigation
Bugfix hardware_averaging + Change LED type to led_push for ROI - #10
Conversation
|
good catch RomClaude! By the way, SebClaude worked on creating a camera template independant of pylablib but following it's interface. It means nothing change for the pylablib based camera but we can now also benefit for other camera of this implementation. There is a base classe defining the interface and the method the driver/wrapper need to have to reuse the plugin gneric structure. I will apply it to opencv webcams... (there will be soon a cookbook in pymodaq_plugins_mockexamples in how to do it). This is meant mostly for agents to learn the proper way to code in pymodaq! If you have time, can you look at this for the camera you maintain? |
|
@rgeneaux thanks for the report on What happens. if self.plugin.live_mode_available and (not self.hardware_averaging and self.average_done):
breakSo the two flags interfere. I replayed this loop with a fake plugin counting the calls to
The loop mixes two independent questions: "does the plugin stream?" ( Proposed contract (to be fixed in PyMoDAQ, see the issue I am about to open):
Once the viewer is fixed, Generated by Claude Code |
|
I've just tested the PyMoDAQ/PyMoDAQ#1422 fix with a thorlabs cam and it works perfectly well where it was crashing before!!! |
two issues were fixed in
CameraBasePyLabLib,:Set hardware_averaging to False. Running a thorlabs camera at 100 FPS with True would crash the plugin in 5 seconds. According to Claude, this is because grab_data is called each frame and creates an infinite number of acquisition loops, triggering a stack overflow.
the two ROI switches
update_roi("Update ROI from Viewer") andapply_roi("Apply ROI") use theledparameter type. With pymodaq_gui 5.3.x,ledis a display-only indicator (its widget is created withclickable = False), whileled_pushis the clickable one.Changing to led_push makes the ROI usable again