aps-8id-dys / ipython-8idiuser

8-ID-I ipython configuration for bluesky (and other)
1 stars 1 forks source link

sb() Not Working #240

Closed qzhang234 closed 3 years ago

qzhang234 commented 4 years ago

I tested pre_align() and it moves pind4 with no problem. I think it's actually RE(sb()) that is not working.

This is what sb() does, only one line, very simple:

yield from bps.mv(shutter, "open")

However I thought we redefined the shutter class recently? @prjemian Any suggestions?

prjemian commented 4 years ago

Slight different question. If you want to call RE(sb()) on the command line, that should work. Slightly less awkward (for me) is shutter.open(), shutter.set("open"), or even %mov shutter "open". For some reason, shutter.put("open") will not work. Noted.

The shutter device is interesting because it could be either EpicsOnOffShutter or SimulatedApsPssShutterWithStatus depending on conditions (if aps.inUserOperations and operations_in_8idi()) when the bluesky8IDI session was started. You need to check which one you have. (If it is a simulator, it will appear in the logger file as a WARNING.

A quick check informs me that you did not have a simulator in any recent history:

(bluesky_2020_9) jemian@wow .../2020-3/.logs $ pwd
/home/beams/8IDIUSER/bluesky_data/2020/2020-3/.logs
(bluesky_2020_9) jemian@wow .../2020-3/.logs $ grep WARNING ipython_logger.log* | grep simulator
(bluesky_2020_9) jemian@wow .../2020-3/.logs $ 

Noting that from apstools.devices import EpicsOnOffShutter, here is the documentation for EpicsOnOffShutter. The shutter (this specific line was last edited 8 months ago) is defined here: https://github.com/aps-8id-dys/ipython-8idiuser/blob/25191059630f33d75827ee83a9020a111287a1e3/profile_bluesky/startup/instrument/devices/shutters.py#L37

prjemian commented 4 years ago

So, how do you know RE(sb()) is not working? Called from the command line or called from a file or function? Can you show the code?

qzhang234 commented 4 years ago

If I do pre_align and then sb from Spec, it would open the fast shutter and keeps it open.

However if I do pre_align() and then RE(sb()) from Bluesky, the fast shutter is in the state as shown in the screenshot, where the button 'open' is pressed, but the shutter itself is not actually open.

One scenario that this would occur is when the detector is still controlling the shutter.

Screen Shot 2020-10-06 at 6 35 47 PM
qzhang234 commented 4 years ago

The 20,000 measurement scan is still running and will probably finish sometime around 4 am on Thursday. I plan to go onsite tomorrow morning to do some short test measurements and align some capillaries.

@prjemian Should we look at the shutter problem at say 10 am?

@Kacperswitalski Would you be interested in trying the alignment yourself?

Kacperswitalski commented 4 years ago

@qzhang234 Yeah, I would like to try it.

qzhang234 commented 4 years ago

@Kacperswitalski Here's the cheatsheet I wrote on the Wiki of this Repo (but you knew most of it already):

https://github.com/aps-8id-dys/ipython-8idiuser/wiki/Bluesky:-Align-and-Acquire

Also here are the slides for the measurements so far:

https://argonnedoe-my.sharepoint.com/:p:/g/personal/qzhang234_anl_gov/EV6KXHD_W-9PjX8_qNQqGh4BkBZ8P_EriHzR5CMfuKnBgA?e=P29rti

Let me know if you have any questions.

qzhang234 commented 4 years ago

To-do list for myself at 10 am of 10/08:

  1. git push origin master from quartz;
  2. Merge pull request of #241 ;
  3. Do pre_align() and then RE(sb()) to see if it opens the fast shutter.
  4. If it does, close the issue and proceed with alignment.
prjemian commented 4 years ago

There is a file changed locally that is not yet committed. You'll need to do that first. As I recall, git hub had changes that are not on local so you may have to do a pull first, after the commit. Then...

On Wed, Oct 7, 2020, 4:42 PM Qingteng Zhang notifications@github.com wrote:

To-do list for myself at 10 am of 10/08:

  1. git push origin master from quartz;
  2. Merge pull request of #241 https://github.com/aps-8id-dys/ipython-8idiuser/pull/241 ;
  3. Do pre_align() and then RE(sb()) to see if it opens the fast shutter.
  4. If it does, close the issue and proceed with alignment.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/240#issuecomment-705209733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMEJW2QUTRS6MBGQ7STSJTOGFANCNFSM4SGTQ5DA .

qzhang234 commented 4 years ago

The shutter override is still not working. In particular, I tried running shutter_override.put(0) and shutter_override.put(1) in IPython terminal and then toggle the shutter button on EPICS yet it didn't do anything.

May be worth looking into this in a share-screen session

qzhang234 commented 4 years ago

@prjemian Would you have time during the day to take a look at it? Any time is good for me.

Thanks!

qzhang234 commented 4 years ago

Or we could do this during the shutdown time and I can ask Kacper to align in Spec for now.

Either way should work

prjemian commented 4 years ago

Go with spec for now, we need full control of the instrument to get this right

On Thu, Oct 8, 2020, 10:25 AM Qingteng Zhang notifications@github.com wrote:

Or we could do this during the shutdown time and I can ask Kacper to align in Spec for now.

Either way should work

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/240#issuecomment-705645070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMC45PS4SCHGCAAWOJTSJXKVTANCNFSM4SGTQ5DA .