Difference between revisions of "Bluesky"

From GISAXS
Jump to: navigation, search
(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' )...")
 
 
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 08:53, 6 September 2017

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' )

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) )