-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device modes #36
base: master
Are you sure you want to change the base?
Device modes #36
Conversation
Now the timing in the camera and the scan is fixed so that the burst mode test passes without having to use different exposure times for scan and caemra. Hovewer, I needed to use a large flyback time to make it work because if the timing is too tight the camera still misses the sync signal from the scan. |
Do we need some way of generally specifying a minimum flyback time? |
No I think this is simulator-specific here. Normally you would only attempt this acquisition mode with a camera with good timing. And if you want some extra flyback time you can simply use the actual flyback time for that. Or what would be the difference between the regular flyback time and a minimum flyback time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this patch would complicate the simulator cameras. We should consider the idea, too, of a separate simplified simulator camera or test-specific simulator instead.
I agree that this complicates the simulator cameras, but since we want to support "burst" mode for our "real" cameras it might make sense to have it working with the simulator, too. But until we decide if and how we want to use the |
So this is a first attempt at the "burst mode" for the simulator cameras. This is stilla work-in-progress as we have to settle on how to implement it exactly.
There are also still some timing problems which is why the test for the new mode needs to use a much smaller pixel time for the camera than for the scan (https://github.com/Brow71189/nionswift-usim/blob/5cb5a6f6296b3fc1157c5c20d61d20ebc8e76086/nionswift_plugin/usim/test/Camera_test.py#L88, scan pixel time defined in line 108).
I think the reason for this is that we are not handling the flyback time correctly. Essentially the simulator always uses two flyback pixels but it doesn't actually add any extra time for them in free running mode. The correct behavior would be to not have flyback pixels in free running mode but instead just add a short wait time when advancing to the next line (although I don't know how to implement that correctly, since these times are on the order of a couple of 100 us). Maybe we can just have longer ones in the simulator which probably doens't hurt but makes this synchronized burst mode more reliable.