-
Notifications
You must be signed in to change notification settings - Fork 81
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
FIX: Setting Capture has no effect in Single Mode. #697
FIX: Setting Capture has no effect in Single Mode. #697
Conversation
Codecov Report
@@ Coverage Diff @@
## master #697 +/- ##
==========================================
+ Coverage 91.48% 91.56% +0.07%
==========================================
Files 63 63
Lines 10227 10228 +1
==========================================
+ Hits 9356 9365 +9
+ Misses 871 863 -8
Continue to review full report at Codecov.
|
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.
I think this should be merged but (as discussed on private channels) it would be nice to get a clearer understanding of why Capture Mode is not applicable in Single Mode.
I don't have a better solution (or an answer to @danielballan's question, for that matter). 👍 |
@MarkRivers Can you explain why Capture Mode is not applicable in Single Mode. This issue is looking at the AD TIFF plugin |
Is this inconsistency of TIFF settings, AD release dependent? I know that Mark has been modifying the stream/ capture functionality in recent releases. For this specific camera: |
There are 3 modes, SingleMode, CaptureMode, and StreamMode. The Capture control only applies in CaptureMode and StreamMode. Capture and Stream modes are intended for collecting multiple NDArrays into memory (Capture) or appending to single disk file (Stream). Setting Capture to 0 in Single mode really should be a warning, not an error because it does not actually do anything.
This has nothing to do with TIFF, it is in the base NDPluginFile class.
I have been discussing changing the stream/capture settings, but have not made any changes. Here is the issue I created: |
That all makes sense to me. Thank you, @MarkRivers! |
I have changed the title of this PR as there is nothing TIFF-specific about either the problem or the fix here (which affects all file plugins). |
Thanks for the clarification, @MarkRivers! |
…le_mode FIX: Setting Capture has no effect in Single Mode.
Ophyd unconditionally tries to set the
capture
component of the TIFF plugin of the AD to0
in https://github.com/NSLS-II/ophyd/blob/18de9724f0d9cf78f1a0e3abe3dd8da9408b6260/ophyd/areadetector/filestore_mixins.py#L427However, this action is not supported when the TIFF plugin is in the "Single" file write mode, so that it results in the error
ERROR: capture not supported in Single mode
:This PR attempts to workaround this situation.