Built-in macros

activate

Activates all detectors or those specified.

activate [<det1> ... <detN>]

ascan

Software scan one or more motors in parallel.

ascan <motor1> <start> <stop> ... <intervals> <exp_time>

bookmark

Bookmarks the specified motors at their current dial positions.

bookmark <'bookmark name'> <motor 1> <motor 2> ...

Also saves existing bookmarks to all available MotorMemorizer objects.

checkgit

checks the git repo of the used contrast installation looks the the hash of the used commit lists the uncommitted changes

ct

Make a single acquisition on the active detectors without recording data. Optional argument <exp_time> specifies exposure time, the default is 1.0.

ct [<exp_time>]

deactivate

Deactivates all detectors or those specified.

deactivate [<det1> ... <detN>]

dmesh

Software scan on a regular grid of N motors, with positions relative to each motor’s current one. Moves motors back at the end.

dmesh <motor1> <start> <stop> <intervals> ... <exp_time>

dscan

Software scan one or more motors in parallel, with positions relative to each motor’s current one. Moves back afterwards.

dscan <motor1> <start> <stop> <intervals> ... <exp_time>

fermatscan

Software scan in the shape of a fermat spiral (good for ptychography scan). The center of the spiral will be the center of the given rectangle. Both motors have to be in the same units.

fermatscan <motor1> <start> <stop> <motor2> <start> <stop> <stepsize> <exp_time>
optional keyword arguments:
optimize: boolean … will try to solve the traveling salesman problem

WARNING: can be slow for large scans!

fermatscanplus

Software scan in the shape of a fermat spiral (good for ptychography scan). The center of the spiral will be the center of the given rectangle. The first motors have to be in the same units. :: A third motor with a different step size is used as the inner most loop.

fermatscan <motor1> <start> <stop>

<motor2> <start> <stop> <stepsize12> <motor3> <start> <stop> <stepsize3> <exp_time>

optional keyword arguments:
optimize: boolean … will try to solve the traveling salesman problem

WARNING: can be slow for large scans!

healthcheck

runs the health check of each gadget in the beamline script

listscan

Software scan one or more motors in parallel with manually given position lists for each of the motors. Can be used for unusual scan requirements. The position lists must be given as python lists, but without any spaces.

listscan <motor1> <position_list> … <exp_time>

liveplot

Start a live plot recorder which will plot coming scans.

liveplot [<x>] <y>

Examples:

liveplot xmotor diode1
liveplot diode1

loopscan

A software scan with no motor movements. Number of exposures is <intervals> + 1, for consistency with ascan, dscan etc.

loopscan <intervals> <exp_time>

lsbook

Lists the currently defined bookmarks or the contents of a specific bookmark.

lsbook [<bookmark name>]

lsdet

List available detectors.

lsm

List available motors.

lsmac

List available macros. Do <macro-name>? (without <>) for more information.

lsrec

List active recorders.

lstrig

List available trigger sources.

mesh

Software scan on a regular grid of N motors.

mesh <motor1> <start> <stop> <intervals> ... <exp_time>
optional keyword arguments:

jitter: float … Randomizes perfect grid positions.

meshjmesh

2D Software scan for NearField ptychography. Each point of a larger 2D mesh scan is another smaller 2D mesh.

meshjmesh <motor1> <abs_start1>     <abs_stop1>     <nr_int1>     <jit_amp1>
                   <rel_start_sub1> <rel_stop_sub1> <nr_int_sub1> <jit_amp_sub1>
          <motor1> <abs_start2>     <abs_stop2>     <nr_int2>     <jit_amp2>
                   <rel_start_sub2> <rel_stop_sub2> <nr_int_sub2> <jit_amp_sub2>
          <exposure_time>

The start and stop position of the coarse mesh are in aboslute coordinates, while the start and stop positions of the submesh are relative coordiantes.

2nd axis is the fast axis.

mv

Move one or more motors.

mvr <motor1> <position1> <motor2> <position2> ...

mvd

Move one or more motors to an abolute dial position. Not implemented.

mvr

Move one or more motors relative to their current positions.

mvr <motor1> <position1> <motor2> <position2> ...

path

Print the current data path.

restore

Restore a bookmarked position by moving all motors there.

rmbook

Delete one or all bookmarks defined with the bookmark command.

rmbook [<bookmark 1> <bookmark 2> ...]

Also updates all available MotorMemorizer instances.

setlim

Set limits on motors.

setlim <motor1> <lower 1> <upper 1> ...

Also saves new limits to all available MotorMemorizer objects.

setpos

Sets user position on motors.

setpos <motor1> <pos1> ...

Also saves new user positions to all available MotorMemorizer objects.

spiralascan

Software scan across a 2D Archimedes spiral centered on a given position. :

spiralascan <motor1> <pos1> <motor2> <pos2> <stepsize> <positions> <exp_time>

spiralscan

Software scan across a 2D Archimedes spiral centered on the current position.

spiralscan <motor1> <motor2> <stepsize> <positions> <exp_time>

startlive

Starts software live mode on listed eligible detectors. If none are listed, all active and eligible detectors are started.

startlive [<det1> ... <detN> <exposure time>]

stoplive

Stops software live mode on listed eligible detectors. If no arguments are given, all active live detectors are stopped.

stoplive [<det1> ... <detN>]

tweak

An interactive scan where motor positions are chosen manually for each point. Useful for tweaking motors and reading the currently active detectors after each step.

tweak <motor1> <stepsize1> [<motor2> <stepsize2>] <exp_time>

umv

Like mv, but prints the current position while moving, and returns when the move is complete.

umvr

Like umv, but in positions relative to the current ones.

userlevel

Get or set the current user level.

userlevel [<level>]

wa

Print the positions of all motors available at the current user level.

wm

Print the positions of one or more motors.

wm <motor1> <motor2> ...

wms

Silent ‘where motor’. Print the positions of one or more motors but do not print any output.

wms <motor1> <motor2> ...