APS-2BM-MIC / ipython-user2bmb

ipython configurations for the tomography instrument
2 stars 5 forks source link

create profile for offline work in B station #16

Closed prjemian closed 6 years ago

prjemian commented 6 years ago

per https://jira.aps.anl.gov/browse/BCDA_MONA-8 want to use BlueSky in the B station while A is in production

prjemian commented 6 years ago

started: https://github.com/APS-2BM-MIC/ipython-user2bmb/tree/master/profile_2bmb/startup

close this issue when we have some things working

https://github.com/prjemian/ipython_mintvm/blob/master/profile_bluesky/startup/notebooks/busy_fly_scan.ipynb

prjemian commented 6 years ago

output from today's testing:

user2bmb@lyra ~/.../profile_2bmb/startup $ use_bluesky.sh 2bmb
BlueSky executable path: /home/beams/USER2BMB/Apps/BlueSky/bin
Python 3.6.5 :: Anaconda, Inc.
conda 4.5.2
pip 9.0.1 from /home/beams/USER2BMB/Apps/BlueSky/lib/python3.6/site-packages (python 3.6)
starting ipython with profile: 2bmb
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

IPython profile: 2bmb
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/00-0-checks.py
BlueSky version: 1.1.0
Ophyd version: 1.0.0
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/00-startup.py
Loading metadata history from /home/beams/USER2BMB/.config/bluesky/bluesky_history.db
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/01-databroker.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/02-pyepics.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/10-imports.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/15-custom-devices.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/20-signals.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/25-PG3-grasshopper.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/30-busy_fly_scan.py
/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/60-metadata.py
using profile:  2bmb
Metadata dictionary:
RE.md['APS_BlueSky_tools_VERSION'] = 0.0.19+5.g943bbe1
RE.md['BLUESKY_VERSION'] = 1.1.0
RE.md['EPICS_APP'] = /net/s2dserv/xorApps/epics/synApps_5_6/ioc/2bmb
RE.md['EPICS_AR_PORT'] = 7002
RE.md['EPICS_CA_MAX_ARRAY_BYTES'] = 100000000
RE.md['EPICS_EXTENSIONS'] = /APSshare/epics/extensions
RE.md['EPICS_HOST_ARCH'] = linux-x86_64
RE.md['OPHYD_VERSION'] = 1.0.0
RE.md['SESSION_STARTED'] = 2018-05-21 15:35:45.753579
RE.md['USER2BMB_ROOT_DIR'] = /local/user2bmb
RE.md['beamline_id'] = 2-BM tomography
RE.md['ipython_profile'] = 2bmb
RE.md['login_id'] = user2bmb@lyra.xray.aps.anl.gov
RE.md['pid'] = 5725
RE.md['profile'] = 2bmb
RE.md['proposal_id'] = not set
RE.md['scan_id'] = 73

In [1]: psofly.read()
Out[1]: 
OrderedDict([('psofly_taxi', {'timestamp': 1526934736.663905, 'value': 0}),
             ('psofly_fly', {'timestamp': 1526934758.70468, 'value': 0}),
             ('psofly_motor_pv_name',
              {'timestamp': 631152000.0, 'value': '2bmb:m100'}),
             ('psofly_start', {'timestamp': 631152000.0, 'value': 0.0}),
             ('psofly_end', {'timestamp': 1526928396.414563, 'value': 180.0}),
             ('psofly_slew_speed', {'timestamp': 631152000.0, 'value': 10.0}),
             ('psofly_scan_delta',
              {'timestamp': 1526928403.569563, 'value': 0.1}),
             ('psofly_delta_time',
              {'timestamp': 1526928403.569563, 'value': 0.01})])

In [2]: RE(simple_demo())
rotary stage position: 10.0
rotary stage position: 0.0                                                                                              
rotary stage position: 190.0
rotary stage position: 10.0                                                                                             
Out[2]: ()

In [3]: RE.msg_hook = bluesky.utils.ts_msg_hook

In [4]: RE(simple_demo())
rotary stage position: 10.0
15:05:47 set               -> bmb100          args: (0,), kwargs: {'group': 'febc1818-b58d-457d-93de-13049eaa6feb'}
15:05:47 wait              -> None            args: (), kwargs: {'group': 'febc1818-b58d-457d-93de-13049eaa6feb'}
rotary stage position: 0.0                                                                                              
15:05:50 set               -> psofly_taxi     args: ('Taxi',), kwargs: {'group': 'fc47d3da-2822-4db5-9f1b-49bc5dea0dbe'}
15:05:50 wait              -> None            args: (), kwargs: {'group': 'fc47d3da-2822-4db5-9f1b-49bc5dea0dbe'}
15:05:53 set               -> psofly_fly      args: ('Fly',), kwargs: {'group': '79c19f53-9dd4-434f-b263-8491e3aaa0d2'}
15:05:53 wait              -> None            args: (), kwargs: {'group': '79c19f53-9dd4-434f-b263-8491e3aaa0d2'}
rotary stage position: 190.0
15:05:15 set               -> bmb100          args: (10.0,), kwargs: {'group': '9fdc01aa-03ca-431d-b331-4e488fab46e7'}
15:05:15 wait              -> None            args: (), kwargs: {'group': '9fdc01aa-03ca-431d-b331-4e488fab46e7'}
rotary stage position: 10.0                                                                                             
Out[4]: ()

In [5]: exit
End of BlueSky console session - press return