-
Notifications
You must be signed in to change notification settings - Fork 25
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
Added Sequencer trigger logic from ScanSpec #565
base: main
Are you sure you want to change the base?
Conversation
@@ -61,6 +61,7 @@ dev = [ | |||
"pytest-rerunfailures", | |||
"pytest-timeout", | |||
"ruff", | |||
"scanspec==0.7.2", |
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.
"scanspec==0.7.2", | |
"scanspec>=0.7.2", |
if type(rows[0]) is tuple: | ||
rows = rows[0] |
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.
Why did you need this?
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 had been meaning to ask you about this. I found some odd behaviour with the seq_table_from_rows() method - perhaps I'm not quite using it right.
seq_table_from_rows(SeqTableRow(), SeqTableRow())
The above works as expected but the below raises an error:
rows = (SeqTableRow(), SeqTableRow())
seq_table_from_rows(rows)
AttributeError: 'tuple' object has no attribute 'repeats'
When I looked into it I found that inside the method, rows
gets turned into ((SeqTableRow(), SeqTableRow()),)
- A tuple within a tuple. So my workaround was to check if the first element in rows was a tuple, and to use that instead.
WatchableAsyncStatus, | ||
wait_for_value, | ||
) | ||
from ophyd_async.epics import motor |
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.
We shouldn't import epics
from fastcs
. Can we use INENC1.VAL.Scale
from PandA instead?
c1f9653
to
7d4244e
Compare
7d4244e
to
9f5813d
Compare
These changes implements a Panda Trigger Logic Flyer, setting up a PandA Seq table and resolves #448. On Prepare it takes a Spec[motor.Motor], which would describe the trajectory of the scan, and uses this to calculate the gaps in the scan. Between each gap it will setup a new set of rows in the sequencer table.