Difference between revisions of "Bluesky"
KevinYager (talk | contribs) (Created page with "NSLS-II software for data acquisition, management, and retrieval. ==Examples== ===Search in the metadata with key value as string=== db( measure_type='N6 Pattern 015' )...") |
KevinYager (talk | contribs) |
||
Line 10: | Line 10: | ||
===Multi-search in the metadata=== | ===Multi-search in the metadata=== | ||
db(**{'sample.material':'CoralPor', 'temperature': '287 K' } ) | db(**{'sample.material':'CoralPor', 'temperature': '287 K' } ) | ||
+ | |||
+ | |||
+ | ==Plans== | ||
+ | <source lang="python"> | ||
+ | # Define a plan, which is a sequence of actions (move motors, collect data). | ||
+ | def my_plan(position): | ||
+ | yield from mv(smx, position) # 'plan' style for moving motor | ||
+ | yield from mv(EpicsSignal('PV', name='shutter'), 1) # 'plan' style for caput | ||
+ | yield from count(dets) # 'plan' style for triggering detector | ||
+ | |||
+ | # Check the plan | ||
+ | summarize_plan(my_plan(12)) | ||
+ | |||
+ | # Execute the plan when ready | ||
+ | RE( my_plan(12) ) | ||
+ | </source> |
Latest revision as of 07:53, 6 September 2017
NSLS-II software for data acquisition, management, and retrieval.
Contents
Examples
Search in the metadata with key value as string
db( measure_type='N6 Pattern 015' )
Search in the metadata with key value as a dict
db(**{'sample.material':'CoralPor' }
Multi-search in the metadata
db(**{'sample.material':'CoralPor', 'temperature': '287 K' } )
Plans
# Define a plan, which is a sequence of actions (move motors, collect data). def my_plan(position): yield from mv(smx, position) # 'plan' style for moving motor yield from mv(EpicsSignal('PV', name='shutter'), 1) # 'plan' style for caput yield from count(dets) # 'plan' style for triggering detector # Check the plan summarize_plan(my_plan(12)) # Execute the plan when ready RE( my_plan(12) )