12. Command cheatsheet#

This section provides a quick summary of the data acquisition commands discussed in the previous sections.

Stopping a measurement

To stop any command do Ctrl-C Ctrl-C

That is, hit Ctrl-C twice!

This will pause the running command and return you to the command line.

Do RE.resume() to continue the command from where it stopped.

Do RE.stop() to fully stop the command.

12.1. The most essential information#

Note

Parentheses – () – are an essential part of the syntax. Same for RE() and % when specified.

12.1.1. Most common commands#

shb.open() / shb.close()

Open / close the photon shutter

RE(mv(dcm.energy, <value>))

Move TO an energy value

RE(mv(xafs_y, <value>))

Move any named motor TO a position (xafs_y is an example)

RE(mvr(xafs_y, <value>))

Move any named motor BY an amount (xafs_y is an example)

RE(change_edge('Xx'))

setup beamline for an absorption edge, Xx = 1- or 2-letter symbol, e.g. Cu or Y.

RE(slot(<N>))

Move sample wheel to slot #N (1 ≤ N ≤ 24)

RE(xafs_wheel.outer()) / RE(xafs_wheel.inner())

move the ex situ wheel sample holder to the outer/inner ring

%xrf

measure and display an XRF spectrum

RE(linescan(<motor>, <detector>, <start>, <stop>, <N>))

move a motor, plot a signal

RE(pluck())

Select a point from a plot on screen and move that motor to that position

xlsx()

import a spreadsheet

RE(xanes())

quick-n-dirty XANES scan at the current element and edge

12.1.2. Most common motors#

See Section 4.1 for the full list of xafs_ motors.

motor

type

units

notes

directions

xafs_x

linear

mm

main sample stage

+ outboard, - inboard

xafs_y

linear

mm

main sample stage

+ up, - down

xafs_det

linear

mm

detector mount

+ away from sample, - closer

12.2. Full list of commands#

Note that some command must be run through the run engine, other do not. The use of RE() is called explicitly in Table 12.1. Any command that should be run through the run engine will complain with this hint:

BMM D.111 [48] > mvr(xafs_x, 2)
Out[48] <generator object mvr 0x7fefafd1df50>   Hint: enclose bsui commands in RE()
Table 12.1 Main BlueSky commands used at BMM (don’t type the < or >, those symbols indicate that the argument is numeric.)#

          Shutter commands

shb.open() / shb.close()

Open / close the photon shutter

          Mono tuning commands

RE(rocking_curve())

Measure the 2nd crystal rocking curve

tu() / td()

Tune the mono 2nd crystal by hand

TUNE_STEP=0.004

Tuning step size – 0.004 is good for Si(111), 0.002 for Si(311)

          Import an automation spreadsheet

xlsx()

Select an existing spreadsheet from a list

          Mono movement commands

RE(mv(dcm.energy, <value>))

Move TO an energy value

RE(mv(dcm.energy, <e0value> + 50))

Move 50 eV above the edge

RE(mv(dcm.energy, <e0value> - 50))

Move 50 eV below the edge

RE(mvr(dcm.energy, <value>))

Move BY an energy step

          Motor movement commands

RE(mv(xafs_y, <value>))

Move any named motor TO a position (xafs_y is an example)

RE(mvr(xafs_y, <value>))

Move any named motor BY an amount (xafs_y is an example)

          Where are things?

%w dcm

where’s the mono?

%w slits3

where are the slits?

%w m2

where’s mirror 2? (toroidal focusing mirror)

%w m3

where’s mirror 3? (flat, harmonic rejection mirror)

%w xafs_table

where’s the XAFS table?

          Change edge and mono crystal

RE(change_edge('Xx'))

setup beamline for an absorption edge, 1- or 2-letter symbol

RE(change_xtals('h11'))

set monochromator, Si(111) or Si(311), h=1 or h=3

          Experiment setup

RE(slit_height())

explore position of slits3 (then pluck to move dm3_bct)

RE(dark_current())

measure electrometer dark currents

          ex situ sample stage

RE(slot(<N>))

Move sample wheel to slot #N (1 ≤ N ≤ 24)

RE(find_slot())

align the ex situ wheel sample holder

RE(xafs_wheel.outer())

move the ex situ wheel sample holder to the outer ring

RE(xafs_wheel.inner())

move the ex situ wheel sample holder to the inner ring

          Glancing angle stage

RE(ga.to(N))

move glancing angle stage to sample N (1 ≤ N ≤ 8) + start spinner

RE(ga.auto_align(pitch))

automatically align glancing angle stage and move to pitch

          Linkam stage

RE(mv(linkam, T))

move Linkam stage to temperature T

linkam.settle_time = 120

set Linkam settling time (in seconds)

linkam.status()

display Linkam status

linkam.on() / linkam.off()

turn Linkam on or off

          LakeShore temperature controller

RE(lakeshore.to(T, power))

move cryostat to temperature T with heater at power

lakeshore.settle_time = 120

set Linkam settling time (in seconds)

lakeshore.status()

display Linkam status

RE(mv(lakeshore.power,3))

turn heater to full power

RE(mv(lakeshore.power,0))

turn heater off

          Reference wheel

RE(reference('Xx'))

Move to reference ‘Xx’

          Get help

%m

Show motors

%h

Show help

%k

Show keyboard shortcuts

%se

Show reference foil and ROI configurations

12.3. Photon delivery system modes#

Table 12.2 Photon delivery system modes#

Mode

focused

energy range

A

8 keV and up

B

below 6 keV

C

6 keV to 8 keV

D

8 keV and up

E

6 keV to 8 keV

F

below 6 keV

XRD

8 keV and up

12.4. Slits3 coordinated motions#

These coordinated motions behave just like single motors and can be used with the motor movement commands in Table 12.1.

Horizontal size

slits3.hsize (nominally 8 mm)

Horizontal center

slits3.hcenter (nominally 0 mm)

Vertical size

slits3.vsize (nominally 1 mm)

Vertical center

slits3.vcenter (nominally 0 mm)

The vertical center should never be changed. Instead, align the slits using dm3_bct and the slit_height() plan (Section 6.2)

Example movement: RE(mv(slits3.vsize, 0.5))

Individual slits are named slits3.top, slits3.bottom, slits3.inboard, slits3.outboard.

12.5. Motor positions and limits#

These commands work on any named motor (Table 4.1).

Where is a sample motor?

%w xafs_x

What are the soft limits?

xafs_x.hlm.value / xafs_x.llm.value

Set a soft limit:

xafs_x.hlm.put(-95) / xafs_x.llm.put(-157)

12.6. Line scans#

RE(linescan(<motor>, <detector>, <start>, <stop>, <N>))

where

  • <motor> is a named motor, see Table 4.1

  • <detector> is one of: 'it', 'if', 'ir', or 'i0'

  • <start>, <stop>, <N> are the boundaries relative to the current position and the number of steps.

The plot will be determined from the values of <motor> and <detector>

This is a relative scan.

After the scan, you will prompted to select a position to move to. Single click the left button after a linescan to move to a position.

RE(pluck())

to repeat that on the current plot.

12.7. Energy scans#

Start an XAFS scan, prompting for an INI file (section 7.1)

RE(xafs())

Start an XAFS scan using a specified INI file (section 7.1)

RE(xafs('myscan.ini'))

In the INI file, set mode to transmission, fluorescence, reference, or both to control the in-scan plotting display (both = show transmission and fluorescence)

Import a spreadsheet to perform automated XAFS measurements:

xlsx()

You will be prompted first for the name of a spreadsheet file, then for the tab to be read.