aps_32id.run.energy_scan

For each energy step, a projection and then a flat field is acquired. The script calls the move_energy method from the TXM class.

Functions:

energy_scan(energies[, exposure, ...]) Collect a series of 2-dimensional projections across a range of energies.
aps_32id.run.energy_scan.energy_scan(energies, exposure=0.5, n_pre_dark=5, has_permit=False, sample_pos=(None, ), out_pos=(None, ), constant_mag=True, stabilize_sleep_ms=1000, num_recursive_images=1)[source]

Collect a series of 2-dimensional projections across a range of energies.

At each position, a sample projection and white-field projection will be collected by moving the sample along the X direction.

Parameters:
  • energies (np.ndarray) – An array with the list of energies to scan, in keV.
  • exposure (float, optional) – How long to collect each frame for, in seconds.
  • n_pre_dark (int, optional) – How many dark-field projections to collect before starting the energy scan.
  • is_attached (bool, optional) – Determines whether the instrument is available.
  • has_permit (bool, optional) – Does the user have permission to open the shutters and change source energy.
  • sample_pos (4-tuple, optional) – (x, y, z, θ) tuple for positioning the sample in the beam.
  • out_pos (4-tuple, optional) – (x, y, z, θ) tuple for removing the sample from the beam.
  • constant_mag (bool, optional) – Whether to adjust the camera position to maintain a constant focus.
  • stabilize_sleep_ms (int, optional) – How long, in milliseconds, to wait for the beam to stabilize before collecting projections.
  • num_recursive_images (int, optional) – If greater than 1, several consecutive images can be collected.