SPEC commands in Bluesky#

Make it easier for users (especially SPEC users) to learn and remember the tools in Bluesky’s hklpy package.

See section Module: user for more hklpy commands.

Quick Reference Table

SPEC

hklpy

description

select_diffractometer()

Select the default diffractometer.

pa

pa()

Report (full) diffractometer settings. (pa: print all)

wh

wh()

Report (brief) diffractometer settings. (wh: where)

br h k l

d_object.move((h, k, l))

(command line) Move motors of diffractometer d_object to the given \(h, k, l\). Note the extra parenthesis.

br h k l

yield from bps.mv(d_object, (h, k, l))

(bluesky plan) Move motors of diffractometer d_object to the given \(h, k, l\). Note the extra parenthesis.

ca h k l

cahkl()

Prints calculated motor settings for the given \(h, k, l\).

or_swap

or_swap()

Exchange primary & secondary orientation reflections.

or0

setor()

Define a crystal reflection and its motor positions.

or1

setor()

Define a crystal reflection and its motor positions.

reflex

affine()

Refinement of lattice parameters from list of 3 or more reflections

reflex_beg

not necessary

Initializes the reflections file

reflex_end

not necessary

Closes the reflections file

setlat

update_sample()

Update current sample lattice.

setmode

mode()

Set the diffractometer mode for the forward() computation.

show_constraints()

Show the current set of constraints (cut points).

cuts

apply_constraints()

Add constraints to the diffractometer forward() computation.

freeze

apply_constraints()

Hold an axis constant during the diffractometer forward() computation.

unfreeze

undo_last_constraints()

Undo the most-recent constraints applied.

reset_constraints()

Reset the diffractometer constraints to defaults.

calc_UB()

Compute the UB matrix with two reflections.

change_sample()

Pick a known sample to be the current selection.

list_samples()

List all defined crystal samples.

new_sample()

Define a new crystal sample.

setaz h k l

TODO:

Set the azimuthal reference vector to the given \(h, k, l\).

setsector

TODO:

Select a sector.

cz

TODO:

Calculate zone from two reflections

mz

TODO:

Move zone

pl

TODO:

Set the scattering plane

sz

TODO:

Set zone