Skip to content
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

Merged

Conversation

mrakitin
Copy link
Member

@mrakitin mrakitin commented Mar 4, 2019

Ophyd unconditionally tries to set the capture component of the TIFF plugin of the AD to 0 in https://github.com/NSLS-II/ophyd/blob/18de9724f0d9cf78f1a0e3abe3dd8da9408b6260/ophyd/areadetector/filestore_mixins.py#L427

However, 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:
tiff-plugin

This PR attempts to workaround this situation.

@codecov-io
Copy link

codecov-io commented Mar 4, 2019

Codecov Report

Merging #697 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
ophyd/areadetector/filestore_mixins.py 80.75% <100%> (+0.08%) ⬆️
ophyd/signal.py 93.62% <0%> (+0.17%) ⬆️
ophyd/log.py 77.63% <0%> (+9.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18de972...6beeed1. Read the comment docs.

Copy link
Member

@danielballan danielballan left a 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.

@klauer
Copy link
Member

klauer commented Mar 4, 2019

I don't have a better solution (or an answer to @danielballan's question, for that matter).

👍

@prjemian
Copy link
Contributor

prjemian commented Mar 5, 2019

@MarkRivers Can you explain why Capture Mode is not applicable in Single Mode. This issue is looking at the AD TIFF plugin

@kgofron
Copy link

kgofron commented Mar 5, 2019

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:
base-7-0-1-1
ADProsilica: R2-5-6-g8a179ee
ADCore: R3-3-2
asyn: 4-33-15-g7550ea6

@MarkRivers
Copy link

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.

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.

Is this inconsistency of TIFF settings, AD release dependent?

This has nothing to do with TIFF, it is in the base NDPluginFile class.

I know that Mark has been modifying the stream/ capture functionality in recent releases.

I have been discussing changing the stream/capture settings, but have not made any changes. Here is the issue I created:
areaDetector/ADCore#73

@danielballan
Copy link
Member

That all makes sense to me. Thank you, @MarkRivers!

@danielballan danielballan changed the title FIX: fix "stop capture" in the Single write mode of AD TIFF plugin FIX: Setting Capture has no effect in Single Mode. Mar 5, 2019
@danielballan
Copy link
Member

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).

@danielballan danielballan merged commit 863870a into bluesky:master Mar 5, 2019
@mrakitin mrakitin deleted the fix_stop_capture_in_single_mode branch March 5, 2019 16:54
@mrakitin
Copy link
Member Author

mrakitin commented Mar 5, 2019

Thanks for the clarification, @MarkRivers!

@tacaswell tacaswell added this to the 1.3.2 milestone Mar 8, 2019
tacaswell pushed a commit to tacaswell/ophyd that referenced this pull request Mar 8, 2019
…le_mode

FIX: Setting Capture has no effect in Single Mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants