Closed ZLLentz closed 6 years ago
Merging #27 into master will increase coverage by
0.76%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #27 +/- ##
========================================
+ Coverage 99.23% 100% +0.76%
========================================
Files 2 2
Lines 393 356 -37
========================================
- Hits 390 356 -34
+ Misses 3 0 -3
Impacted Files | Coverage Δ | |
---|---|---|
pcdsdaq/daq.py | 100% <100%> (+0.55%) |
:arrow_up: |
pcdsdaq/preprocessors.py | 100% <100%> (ø) |
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 0a1ae12...412cb51. Read the comment docs.
Are we guaranteed that unstage
happens after end_run
? If not we might leave the DAQ hanging (unsubscribe before ending run)
Do we want to deprecating the mode
. Could we do something similar where have a "calib"
mode that watches for create
and save
?
unstage
should also do end_run
to prevent the desync.preprocessor
that inserts kickoff
at create and complete
at save
instead of the existing msg_hook
goreDAQ
.I'm not bringing the message hook gore back under any conditions, but if you think having a mode=calib
-like behavior is valuable (e.g. people will use it) then we can re-implement as a preprocessor
. When would we use this?
I'm sorry. I think I might have missed something by having the docs split up. If I want a flyer
I use daq_wrapper
this runs the entire scan in a single run. If I want calib
cycles I configure
for "n" events and pass it as a regular detector.
If this is correct, I vote for a rename of daq_wrapper
to indicate the flying nature.
This is reasonable, daq_wrapper
was a catch-all for when we were going to require it on every daq plan. Any suggestions? daq_during_wrapper
?
Sure, obvious link to the fly_during_wrapper
Some final thoughts here:
events
count on each read
or collect
, maybe in a different PRevents
count, we can make progress bars on daq completion which is a desirable nice-to-have featureSeparate PR. Test with pcdsdaq
first to see if events
is accurate at all.
Description
Apologies in advance for breaking the API.
trigger
,read
, anddescribe
methods, wheretrigger
starts the daq. This means we can use the daq inside normal bluesky scans in the dets argument.stage
set up a subscription that starts a run atrun_start
documents and ends a run atrun_stop
documents.unstage
removes this subscription, and also callsend_run
if it hasn't been called.calib_cycle
mode
configuration parametercollect
to not end the run (and to get full coverage)plans.py
topreprocessors.py
because it only contains preprocessors nowMotivation and Context
Is better than
And this structure means we can use bluesky subscriptions to implement the scan PVs later, whereas the repeated flyer approach doesn't increment the sequence number the same way.
I opted to remove the
calib_cycle
stuff so that the module was easier to understand, and so that when we do implement subscriptions that rely on event documents we don't have people accidentally usingcalib_cycle
and wondering why the scan PVs don't update.I also opted to remove the
mode
configuration parameter because it was superfluous, complicated, and useless. You were extremely likely to get stuck in the wrong mode. Now we just supporttrigger_and_read
to read when you want to,daq_wrapper
to read for the whole plan, andstage
/unstage
to manage the starting and stopping of daq runs.How Has This Been Tested?
Adjusted the tests. (Full coverage now! Wow!) I would like to spend quality time in a hutch with this for "feel" tests before thinking about merging.
Where Has This Been Documented?
Lots of docs commits in this repo