tomoscan.tomoscan_32id

Software for tomography scanning with EPICS at APS beamline 32-ID

Classes

TomoScan32ID

Derived class for tomography scanning with EPICS at APS beamline 32-ID

Functions:

tomoscan.tomoscan_32id

Software for tomography scanning with EPICS at APS beamline 32-ID

exception tomoscan.tomoscan_32id.SampleXError[source]

Bases: Exception

Exception raised when SampleX is not equal to SampleInX

class tomoscan.tomoscan_32id.TomoScan32ID(pv_files, macros)[source]

Bases: TomoScanPSO

Derived class used for tomography scanning with EPICS at APS beamline 32-ID

Parameters
  • pv_files (list of str) – List of files containing EPICS pvNames to be used.

  • macros (dict) – Dictionary of macro definitions to be substituted when reading the pv_files

add_theta()[source]

Add theta at the end of a scan.

begin_scan()[source]

Performs the operations needed at the very start of a scan.

This does the following:

  • Set data directory.

  • Set the TomoScan xml files

  • Calls the base class method.

  • Opens the front-end shutter.

  • Sets the PSO controller.

  • Creates theta array using list from PSO.

  • Turns on data capture.

close_frontend_shutter()[source]

Closes the shutters to collect dark fields. This does the following:

  • Closes the 32-ID-C front-end shutter.

close_shutter()[source]

Closes the shutters to collect dark fields. This does the following:

  • Closes the 32-ID-C fast shutter.

end_scan()[source]

Performs the operations needed at the very end of a scan.

This does the following:

  • Calls save_configuration().

  • Put the camera back in “FreeRun” mode and acquiring so the user sees live images.

  • Sets the speed of the rotation stage back to the maximum value.

  • Calls move_sample_in().

  • Calls the base class method.

  • Closes shutter.

  • Add theta to the raw data file.

  • Copy raw data to data analysis computer.

energy_change()[source]

Change energy trhough TXMOptics

fly_scan()[source]

Control of Sample X position

open_frontend_shutter()[source]

Opens the shutters to collect flat fields or projections.

This does the following:

  • Checks if we are in testing mode. If we are, do nothing else opens the 2-BM-A front-end shutter.

open_shutter()[source]

Opens the shutters to collect flat fields or projections.

This does the following:

  • Opens the 32-ID-C fast shutter.

pv_callback_32id(pvname=None, value=None, char_value=None, **kw)[source]

Callback function that is called by pyEpics when certain EPICS PVs are changed

set_trigger_mode(trigger_mode, num_images)[source]

Sets the trigger mode SIS3820 and the camera.

Parameters
  • trigger_mode (str) – Choices are: “FreeRun”, “Internal”, or “PSOExternal”

  • num_images (int) – Number of images to collect. Ignored if trigger_mode=”FreeRun”. This is used to set the NumImages PV of the camera.

set_trigger_mode_grasshopper(trigger_mode, num_images)[source]
wait_frontend_shutter_open(timeout=-1)[source]

Waits for the front end shutter to open, or for abort_scan() to be called.

While waiting this method periodically tries to open the shutter..

Parameters

timeout (float) – The maximum number of seconds to wait before raising a ShutterTimeoutError exception.

Raises
  • ScanAbortError – If abort_scan() is called

  • ShutterTimeoutError – If the open shutter has not completed within timeout value.

wait_pv(epics_pv, wait_val, timeout=-1)[source]

Wait on a pv to be a value until max_timeout (default forever) delay for pv to change