Closed prjemian closed 4 years ago
@sureshnaps Sounds good. I'll start on this today.
@qzhang234 : We talked about test work yesterday or today. Let's do that next week. Most important is (#92) to set the scan_id
register without any troubles.
the rdef inside the def's can be ignored, i cleaned up a lot of stuff but there are still some unwanted stuff there. Once we see this code from you, some of the other similar looking stuff can be handled by us. I was imagining that there could be a xx-controls.py where all these could go. Ofcourse you would know better.
Sounds good to me.
@qzhang234 emailed:
Attached is my Spec-to-BlueSky translation for the start-up of a regular user week of user operation based on the email instruction Suresh sent me last month (also attached). So it seems like the macros we are missing are:
move_pind1z_in / move_pind1z_out; Spec macro that moves the pin diode in and out of the beam. We have three pind that are currently in use (pind1, pind2, and pind4) and we need macro for moving all three of them;
flux pind1 xxxx: A mathematical calculation embedded in spec that takes the reading from pind1 (after ct), multiply that by a certain coefficient to convert it into photon counts. Trivial to write but very handy during beamtimes.
sb / bb: Open and close the fast shutter, if the detector is not controlling it.
@sureshnaps : Do you think these macros would be useful to have?
@prjemian : Am I right in assuming that currently the most effective way to browse through scans is to save the Bluesky scans into Spec format and load them in Matlab?
@qzhang234 : The most effective way to browse through scans is with tools you know how to use. In the future, the bluesky browser may become more useful. It certainly sounds promising.
An additional aspect to consider is to adding metadata to the scans that you will use in the future to identify particular scans when browsing. That's the most forward-thinking action you can take now.
@prjemian @sureshnaps Sorry, I didn't realize that Suresh has already documented the needed macros. His list is more complete than mine. We'll go with Suresh's list.
Also @prjemian adding metadata to indicate the type of scan is definitely a great idea
pind1z & pind2z -- any other diodes to move in/out?
You'll need to modify 50-controls.py and add the values for in and out positions for each diode.
On Sun, Nov 3, 2019, 5:33 PM qzhang234 notifications@github.com wrote:
@prjemian https://github.com/prjemian @sureshnaps https://github.com/sureshnaps Sorry, I didn't realize that Suresh has already documented the needed macros. His list is more complete than mine. We'll go with Suresh's list.
Also @prjemian https://github.com/prjemian adding metadata to indicate the type of scan is definitely a great idea
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-trr/ipython-8idiuser/issues/93?email_source=notifications&email_token=AARMUMHXV6OSWTEHOX4BCWLQR5GRZA5CNFSM4JHOPBL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC573JY#issuecomment-549191079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMA7UV7IOJYXZJZ2F4TQR5GRZANCNFSM4JHOPBLQ .
@prjemian There's also pind4. 3 in total I think.
PV for that?
On Sun, Nov 3, 2019, 6:39 PM qzhang234 notifications@github.com wrote:
@prjemian https://github.com/prjemian There's also pind4. 3 in total I think.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-trr/ipython-8idiuser/issues/93?email_source=notifications&email_token=AARMUMEFRJU3JYWBVVZHD2DQR5OK7A5CNFSM4JHOPBL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC6BHOA#issuecomment-549196728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMCSGDZGDU42LGKGJUTQR5OK7ANCNFSM4JHOPBLQ .
pvFLUX_PIND, 0 is out and 1 is in.
need an EPICS process variable name for that
Refactored to make the presets easier to use. In a plan:
yield from pind1z_in()
On command line (it's mov
, not mv
or move
):
mov pind1z presets.pind1z.in
Change the preset (in a plan or on command line):
presets.pind1z = (-25.1, 1) # (in, out) - must provide both since it's a tuple
In Bluesky, use mov
as you would SPEC's umv
. This shows a progress bar, current position, and percent complete if the move takes longer than a short time to complete.
Similar for umvr
. This table:
SPEC | Bluesky | description |
---|---|---|
mv |
mov |
move motor (absolute positioning) |
umv |
mov |
move motor (absolute positioning) and show position while moving |
mvr |
movr |
move motor (relative positioning) |
umvr |
movr |
move motor (relative positioning) and show position while moving |
Syntax example: mov m1 1
In Bluesky, can set any signal on command line with this same syntax:
mov m1 1
mov temperature 251
mov sample_title "aluminum foil"
tw ta2fine 2 to maximize
sb; lup samx -3 3 30 0.2; bb;
prdef
) of bb
?prdef
) of sb
?prdef
) of tw
?Perhaps, tw
means move this motor to the chosen position?
in
is a Python keyword... and it cannot be re-used in our namedtuple
We switch to insert
and remove
, screaming Aw, nuts! all the way.
In 15-spec-config.py, pind1z and pind2z can go. They used to be motor driven pin diode actuators but now they are pneumatic and you already did that in 50-controls.py
@sureshnaps , @qzhang234 @ericmdufresne : What is PV for motor ta2fine
?
756.SPEC8IDI> wm ta2fine
ta2fine
ta2fine
User
High 3808.000
Current3227.130
Low 1428.000
Dial
High 3808.000
Current3227.130
Low 1428.000
@ericmdufresne : Thanks! You showed me it is 8ida:sm9
. That motor is already defined as the theta
axis of the FOEmirrorDevice
: foemirror.theta
is the same thing.
In [131]: foemirror.theta
Out[131]: EpicsMotor(prefix='8ida:sm9', name='foemirror_theta', parent='foemirror', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['user_offset', 'user_offset_dir', 'velocity', 'acceleration', 'motor_egu'])
The lineup_and_center()
plan takes a counter as input but assumes that the associated scaler is named scaler
. That's not right for this beam line. Let's make this more robust by checking if the counter is actually part of a scaler. It might be some other signal, such as a calcout or ao record. Only apply scaler configurations when appropriate.
Tested everything but the tw
macro. That one will need more thought to implement.
@suresh emailed: