csaxs_bec.bec_ipython_client.plugins.cSAXS.cSAXS.cSAXS#

class cSAXS(client)[source]#

Bases: cSAXSInitSmaractStages, cSAXSSmaract, cSAXSFilterTransmission, cSAXSSlits

Methods

fil_trans

Set exposure-box filters to achieve a target transmission.

fshn1in

Move fast shutter n1 to its 'in' position defined in user parameters.

slits_show_all

Show all slits with center and width.

smaract_check_all_referenced

Check reference state for all SmarAct devices that define 'bl_smar_stage'.

smaract_components_to_initial_position

Move selected (or all) SmarAct-based components to their configured init_position.

smaract_reference_stages

Reference SmarAct stages using runtime discovery.

fil_trans(transmission: float | None = None, energy_kev: float | None = None, print_only: bool = True) None#

Set exposure-box filters to achieve a target transmission.

If called without ‘transmission’, prints usage and current status.

Safety: - fil_trans(1) is always allowed. - fil_trans(<1) is only allowed if:

  • epics_get(“X12SA-OP-DMM-EMLS-3010:THRU”) == 1 (DMM translation THROUGH)

  • epics_get(“X12SA-OP-DMM-EMLS-3030:THRU”) == 1 (DMM rotation THROUGH)

  • epics_get(“X12SA-OP-CCM1:ENERGY-GET”) > 1 (CCM active, energy in keV)

Otherwise, prompt with default NO.

fshn1in()#

Move fast shutter n1 to its ‘in’ position defined in user parameters.

slits_show_all()#

Show all slits with center and width.

smaract_check_all_referenced()#

Check reference state for all SmarAct devices that define ‘bl_smar_stage’. This now enables all relevant devices first (attempt), then performs the checks.

smaract_components_to_initial_position(devices_to_move=None)#

Move selected (or all) SmarAct-based components to their configured init_position.

Parameters:
  • devices_to_move (iterable of str or str, optional) – Specific device names to move (e.g. [“xbpm3x”, “sl3trxi”]). If None, all devices in the current session that define ‘bl_smar_stage’ are considered.

  • Behavior

  • --------

  • Runtime-based (-)

  • moved. (- Only axes that are referenced will be)

  • continues. (- Unreferenced axes are skipped with a WARNING; the operation)

  • listed. (- Devices missing init_position are skipped and)

  • end (- At the)

  • referenced. (a summary warns if some stages could not be moved because they were not)

smaract_reference_stages(force: bool = False, devices_to_reference=None)#

Reference SmarAct stages using runtime discovery.

Parameters:
  • force (bool, optional) – If True, re-reference ALL selected stages. If False (default), only reference stages that are currently NOT referenced.

  • devices_to_reference (iterable of str or str, optional) – If provided, only these devices will be considered for referencing. If None, all devices in the current session that define ‘bl_smar_stage’ are considered.

  • Behavior

  • --------

  • Runtime-based (-)

  • those. (- If devices_to_reference is given → restrict referencing to)

  • referenced. (- If force=False → skip devices already)

  • always. (- If force=True → re-reference selected devices)

  • to (- Only newly referenced devices are passed) – smaract_components_to_initial_position(devices_to_move=[…]) afterwards.

Examples

Reference only stages that are NOT referenced yet (default)

csaxs.smaract_reference_stages()

Force re-reference of all stages

csaxs.smaract_reference_stages(force=True)

Reference only specific stages
csaxs.smaract_reference_stages(

devices_to_reference=[“sl3trxi”, “sl3trxo”, “xbpm3x”]

)

Reference selected stages and force re-referencing
csaxs.smaract_reference_stages(

devices_to_reference=[“sl4trxi”, “sl4trxo”], force=True

)

Reference a single device
csaxs.smaract_reference_stages(

devices_to_reference=”xbimtrx”

)

Reference only the selected devices (skip already-referenced ones)
csaxs.smaract_reference_stages(

devices_to_reference=[“sl3trxi”, “sl4trxo”, “sl5trxt”]

)

Check referencing status of all stages

csaxs.smaract_check_all_referenced()