calibrations
This package contains all calibrations accessible via dirigent.
New calibrations must be added to this package, and a particular naming convention must be used to ensure they are accessible via the dirigent command line interface:
Calibration scripts must be in files with name
<calibration_name>.py
Each script must contain one main click command with name
<calibration_name>
with at minimum the decorator:@click.command(<calibration_name>) def <calibration_name>(cli_ctx, [other click arguments]): ...If a CalibrationContext is desired, use the
@request_calibration_context
and@with_calibration_context
decorators to request and open a calibration context from dirigent:@click.command(<calibration_name>) @request_calibration_context @with_calibration_context def <calibration_name>(context, cli_ctx, [other click arguments]): ...The CalibrationContext is now passed as the first argument (
context
), instruments are accessible viacontext.instruments
, and dirigent configuration is accessible via e.g.context.instruments._default_lv_channel
.Scripts are called via
dirigent <calibration_name>
and dynamically loaded on call.
Modules