Skip to content

Instantly share code, notes, and snippets.

@chiahaoliu
Last active March 9, 2017 18:44
Show Gist options
  • Save chiahaoliu/620e6341954ce62d005b96cd56244e37 to your computer and use it in GitHub Desktop.
Save chiahaoliu/620e6341954ce62d005b96cd56244e37 to your computer and use it in GitHub Desktop.
170307_Sanjit_support
import bluesky.plans as bp
from xpdacq.beamtime import _configure_area_det
## set up tiff name
xpd_data_proc.data_fields.append(('gas_current_gas', ''))
## switch gas
gas.set('He') # switch to 'He', available entries are defined by gas.gas_list. E.g. gas.gas_list= ['He', 'O2']
## configure the exposure time first
_configure_area_det(5) # 5 secs exposuretime
## ScanPlan you need
#Reference: http://nsls-ii.github.io/bluesky/bluesky.plans.count.html#bluesky.plans.count
plan = bp.count([pe1c, rga, gas.current_gas], num=3, delay=5) # take 3 imgaes with each of them delay by 5seconds
plan = bp.subs_wrapper(plan, LiveTable([xpd_configuration['area_det'], rga])) # give you LiveTable
xrun(0, plan)
## collect metadata
tb = db.get_table(db[-1])
tb.to_csv(<full_filename_you_want>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment