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 |
|
Source |
Links to the Python implementation + release notes |
Devices |
|
Preconditions |
Guard clauses checked before the Method runs |
Parameters |
|
Steps |
Method body — ideally one atomic action per row |
Postconditions |
State asserted on success |
Failure modes |
|
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.)
Implementation: procedures/SLUG.py
Release notes: 2bm-procedures CHANGELOG
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.)
Beamline components:
<asset_name_1>(e.g.Rotary)Beamline components:
<asset_name_2>
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 |
|---|---|---|---|
|
integer |
— |
What the parameter controls. |
|
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. |
|
2 |
Wait for completion. |
|
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
|
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.