AFL.automation.instrument.BioSANS#

Classes

BioSANS([overrides])

Driver for Bio-SANS instrument ORNL.

Driver(name[, defaults, overrides, ...])

MockEICClient(*args, **kwargs)

Minimal mock EIC client for testing and mock_mode.

class AFL.automation.instrument.BioSANS.BioSANS(overrides=None)[source]#

Driver for Bio-SANS instrument ORNL.

defaults = {'PVs_to_store': ['CG3:SE:SMPLINF:SRC1Comp', 'CG3:SE:SMPLINF:SRC2Comp', 'CG3:SE:SMPLINF:SRC3Comp', 'CG3:SE:SMPLINF:SRC4Comp', 'CG3:SE:SMPLINF:SRC5Comp', 'CG3:SE:SMPLINF:SRC6Comp', 'CG3:SE:SMPLINF:SRC7Comp', 'CG3:SE:SMPLINF:SRC8Comp', 'CG3:SE:SMPLINF:SRC1Name', 'CG3:SE:SMPLINF:SRC2Name', 'CG3:SE:SMPLINF:SRC3Name', 'CG3:SE:SMPLINF:SRC4Name', 'CG3:SE:SMPLINF:SRC5Name', 'CG3:SE:SMPLINF:SRC6Name', 'CG3:SE:SMPLINF:SRC7Name', 'CG3:SE:SMPLINF:SRC8Name', 'CG3:SE:SMPLINF:SRC1Conc', 'CG3:SE:SMPLINF:SRC2Conc', 'CG3:SE:SMPLINF:SRC3Conc', 'CG3:SE:SMPLINF:SRC4Conc', 'CG3:SE:SMPLINF:SRC5Conc', 'CG3:SE:SMPLINF:SRC6Conc', 'CG3:SE:SMPLINF:SRC7Conc', 'CG3:SE:SMPLINF:SRC8Conc', 'CG3:SE:SMPLINF:SRC1ConcUnits', 'CG3:SE:SMPLINF:SRC2ConcUnits', 'CG3:SE:SMPLINF:SRC3ConcUnits', 'CG3:SE:SMPLINF:SRC4ConcUnits', 'CG3:SE:SMPLINF:SRC5ConcUnits', 'CG3:SE:SMPLINF:SRC6ConcUnits', 'CG3:SE:SMPLINF:SRC7ConcUnits', 'CG3:SE:SMPLINF:SRC8ConcUnits', 'CG3:SE:CMP:S1Vol', 'CG3:SE:CMP:S2Vol', 'CG3:SE:CMP:S3Vol', 'CG3:SE:CMP:S4Vol', 'CG3:SE:CMP:S5Vol', 'CG3:SE:CMP:S6Vol', 'CG3:SE:CMP:S7Vol', 'CG3:SE:CMP:S8Vol', 'CG3:SE:URMPI:143', 'CG3:SE:SMPLINF:SMPLTotalVol', 'CG3:SE:SMPLINF:SMPLFinalConc1', 'CG3:SE:SMPLINF:SMPLFinalConc2', 'CG3:SE:SMPLINF:SMPLFinalConc3', 'CG3:SE:SMPLINF:SMPLFinalConc4', 'CG3:SE:SMPLINF:SMPLFinalConc5', 'CG3:SE:SMPLINF:SMPLFinalConc6', 'CG3:SE:SMPLINF:SMPLFinalConc7', 'CG3:SE:SMPLINF:SMPLFinalConc8'], 'beamline': 'CG3', 'config': 'Config0', 'eic_token': '1', 'ipts_number': '1234', 'mock_mode': False, 'reduced_file_data_path': '/HFIR/{INST}/IPTS-{IPTS}/shared/autoreduce/{RUN_CYCLE}/{CONFIG}/1D', 'reduction_log_data_path': '/HFIR/{INST}/IPTS-{IPTS}/shared/autoreduce/{RUN_CYCLE}/{CONFIG}', 'run_cycle': 'RC511', 'use_subtracted_data': True}#
__init__(overrides=None)[source]#
property client#

Property that returns the EIC client instance.

If the client doesn’t exist yet, it instantiates a new EICClient using the token and beamline from the configuration.

Returns:

The client instance for communicating with the instrument.

Return type:

EICClient

reset_client()[source]#

Reset the EICClient instance

getLastRunNumber()[source]#
lastMeasuredTransmission()[source]#
getLastReductionLogFilePath(**kwargs)[source]#

get the currently set file name

getLastTransmission(**kwargs)[source]#
setExposure(exposure)[source]#
getLastFilePath(**kwargs)[source]#

get the currently set file name

readFileSafely(file_read_function, attempts_limit=300, attempts_pause_time=1.0, **kwargs)[source]#
blockForTableScan()[source]#
expose(name=None, exposure=None, block=True, save_reduced_data=True, save_nexus=True, exposure_type='time')[source]#

Perform an exposure with the specified parameters.

This method performs an exposure of the sample, optionally measuring the transmission, reducing the data, and saving it in Nexus format.

Parameters:
  • name (str, optional) – The name of the sample (default is None).

  • exposure (float, optional) – The exposure time or counts (default is None).

  • block (bool, optional) – If True, block until the exposure is complete (default is True).

  • save_nexus (bool, optional) – If True, save the data in Nexus format (default is True).

  • exposure_type (str, optional) – The type of exposure, must be one of ‘time’, ‘detector’, or ‘monitor’ (default is ‘detector’).

Raises:
  • ValueError – If the exposure type is not one of ‘time’, ‘detector’, or ‘monitor’.

  • FileNotFoundError – If the data file cannot be located after multiple attempts.

process_data(**kwargs)[source]#

Process the SANS data after exposure, writing the data to Tiled

status()[source]#