mxcubecore.HardwareObjects.ESRF.ESRFEnergyScan

Example xml_ configuration:

<object class="ESRF.ESRFEnergyScan">
  <object href="/bliss" role="controller"/>
  <config_file>/users/blissadm/local/beamline_configuration/misc/EdgeScan.dat</config_file>
  <offset_keV>0.0</offset_keV>
  <theoritical_edge_threshold>0.03</theoritical_edge_threshold>
  <elements>
    <element>
      <symbol>Mn</symbol>
      <energy>K</energy>
    </element>
    ...
    <element>
      <symbol>U</symbol>
      <energy>L</energy>
    </element>
  </elements>
</object>
class: ESRF.ESRFEnergyScan.ESRFEnergyScan
configuration:
  config_file: /users/blissadm/local/beamline_configuration/misc/EdgeScan.dat
  offset_keV: 0.0
  theoritical_edge_threshold: 0.03   # optional
  element:
   -
     element:
      - symbol: Mn
        emergy: K
   ...
   -
      element:
      - symbol: U
        emergy: L
objects:
  controller: bliss.yaml   # optional

Functions

store_energy_scan_thread(db_conn, scan_info)

Classes

ESRFEnergyScan(name)

GetStaticParameters(config_file, element, edge)

class mxcubecore.HardwareObjects.ESRF.ESRFEnergyScan.ESRFEnergyScan(name)[source]

Bases: AbstractEnergyScan

class HOConfig(*, offset_keV: float | None = None, theoritical_edge_threshold: float = 0.03, config_file: str, **extra_data: Any)[source]

Bases: HOConfig

Parameters:
  • offset_keV (float | None)

  • theoritical_edge_threshold (float)

  • config_file (str)

  • extra_data (Any)

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

cancelEnergyScan(*args)[source]

Called by queue_entry.py. To be removed

choose_attenuation()[source]

Choose the appropriate attenuation to execute the scan

close_fast_shutter()[source]

Close the fast shutter.

do_chooch(elt: str, edge: str, directory: str, archive_directory: str, prefix: str)[source]

Execute peak and IP calculation with chooch. :param elt: Element acrony as in the periodic table of elements. :type elt: str :param edge: Edge like (K, L1, L2, L3). :type edge: str :param directory: raw data directory (fill path). :type directory: str :param archive_director: archive data directory (fill path). :type archive_director: str :param prefix: File root prefix. :type prefix: str

Parameters:
  • elt (str)

  • edge (str)

  • directory (str)

  • archive_directory (str)

  • prefix (str)

energy_scan_hook(energy_scan_parameters: dict)[source]

Execute actions, required before running the raw scan(like changing undulator gaps, move to a given energy… These are in general beamline specific actions.

Parameters:

energy_scan_parameters (dict)

escan_cleanup()[source]

Cleanup actions.

escan_postscan()[source]

Actions done after the scan finished.

escan_prepare()[source]

Set the nesessary equipment in position for the scan.

execute_command(command_name, *args, **kwargs)[source]

Execute command.

Parameters:
  • command_name (str) – Command name.

  • *args (tuple) – Arguments to pass through to the command to be executed.

  • **kwargs (Dict[str, Any]) – Named arguments to pass through to the

  • executed. (command to be)

Raises:

AttributeError – If command not found.

Returns:

Execution output.

Return type:

Any

execute_energy_scan(energy_scan_parameters: dict)[source]

Execute the raw scan sequence. Here is where you pass whatever parameters you need to run the raw scan (e.g start/end energy, counting time, energy step…).

Parameters:

energy_scan_parameters (dict)

get_static_parameters(config_file: str, element: str, edge: str) → dict[source]

Get the static parameters for form the config file. :param config_file: File to read the configuration from (full path). :type config_file: str :param element: Element acronym as in the periodic table of elements. :type element: str :param edge: edge line (K, L1, L2, L3) :type edge: str

Parameters:
Return type:

dict

init()[source]

Initialise the objects and the properties

open_fast_shutter()[source]

Open the fast shutter.

set_mca_roi(eroi_min, eroi_max)[source]

Configure the fluorescent detector ROI. The input is min/max energy.