Procedure template

This is the canonical skeleton for procedure pages on this site.

To create a new procedure: copy this file as procedures/item_NNN.rst, replace the title and the Name value with your procedure’s identifier, and fill in every section below. Sections marked required must be present even if the value is “none”; sections marked optional can be omitted entirely.

Each procedure page is meant to register one-to-one with a cora Method (see cora). The sections below map onto cora as follows:

Section

Maps to in cora

Name

Method.name

Source

Links to the Python implementation + release notes

Devices

Plan.wiring targets (Assets from item_020)

Preconditions

Guard clauses checked before the Method runs

Parameters

Method.parameters_schema

Steps

Method body — ideally one atomic action per row

Postconditions

State asserted on success

Failure modes

caution BC entries

Procedure name (short imperative phrase)

One short paragraph for human readers: what this procedure does, when an operator would run it, and the high-level outcome. Avoid clicking-here-clicking-there detail — that belongs in the Operation page this procedure links to.

Name

procedure_short_identifier (required — snake_case; becomes ``Method.name`` in cora)

Source

(required — links to the Python implementation in `2bm-procedures <https://github.com/decarlof/2bm-procedures>`__ and to its CHANGELOG entry. For stub pages prior to implementation, replace the bullets with a “Not yet implemented. Future location: procedures/SLUG.py …” note. Substitute the actual snake_case procedure slug for the literal SLUG below.)

Devices

(required — list every Asset / Component this procedure reads from or writes to. The first time a Device appears it should link back to :doc:`../manual/item_020` so cora can resolve the wiring.)

Preconditions

(required — system state that must be true before the procedure starts. One bullet per check, phrased as an assertion. “none” is acceptable for procedures with no entry guards.)

  • Shutter is closed.

  • MCTOptics IOC is running.

  • Rotary is homed.

Parameters

(required — may be “none”)

Name

Type

Unit

Description

param_1

integer

What the parameter controls.

param_2

number > 0

mm

Range / sensible default if any.

Steps

(required — one atomic operation per row.)

#

Action

PV / call

1

Short imperative description of the action.

caput 2bmb:mNN.VAL <value> — or a TomoScan API call, or a softGlue PV write.

2

Wait for completion.

cawait 2bmb:mNN.DMOV == 1 timeout=30

3

Postconditions

(required — state that must be true after the procedure has succeeded. Same style as Preconditions, one assertion per bullet.)

  • Rotary is at the requested angle.

  • Detector trigger mode is restored to FreeRun.

Failure modes

(required — may be “none known”)

Symptom

Recovery

Step N times out

What to do (abort, retry once, escalate). Reference a caution if cora already tracks this failure.

Bad parameter combination

How the procedure should refuse to start (add a precondition).

Operator walkthrough (optional)

Free-form prose for the human operator: MEDM clicks, sanity checks, what to expect on the camera live view, etc. Link to the corresponding Operation page where one exists — do not duplicate it here.

Notes (optional)

Anything that doesn’t fit the structured block: rationale, history, links to commissioning logs, references to vendor procedures.