Experiments

There are abstract implementations for radiography, stepped tomography, continuous tomography, stepped spiral tomography and continuous spiral tomography.

All of them implement Acquisition for dark images (without beam), flat field images (with beam, but sample moved to Experiment.flatfield_position) and projections of the sample according to the measurement scheme.

In each acquisition generator the functions _prepare_flats(), _finish_flats(), _prepare_darks(), _finish_darks(), _prepare_radios(), _finish_radios() are called. Overwriting them allows an easy way to implement special features within the experiments.

To use the classes one has to implement the start_sample_exposure() and stop_sample_exposure() accordingly (see concert.experiments.synchrotron.SynchrotronMixin as an example).

For special cameras the generator _produce_frames() can be overwritten.

Radiography

class concert.experiments.imaging.Radiography(self, walker, flat_motor, radio_position, flat_position, camera, num_flats, num_darks, num_projections, separate_scans=True)

Bases: Experiment

Radiography experiment

This records dark images (without beam) and flat images (with beam and without the sample) as well as the projections with the sample in the beam.

await __ainit__(walker, flat_motor, radio_position, flat_position, camera, num_flats, num_darks, num_projections, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.cameras.base.Camera) – Camera to acquire the images.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

num_darks

Number of images acquired for dark correction.

num_flats

Number of images acquired for flatfield correction.

num_projections

Number of projection images.

num_projections_total

Total number of projections. For most of the experiments this is the same as the number of projections.

await prepare()

Gets executed before every experiment run.

await start_sample_exposure()

This function must implement in a way that the sample is exposed by radiation, like opening a shutter or starting an X-ray tube.

await stop_sample_exposure()

This function must implement in a way that the sample is not exposed by radiation, like closing a shutter or switching off an X-ray tube.

Tomography

class concert.experiments.imaging.Tomography(self, walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)

Bases: Radiography

Abstract implementation of a tomography experiment.

await __ainit__(walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • tomography_motor (concert.devices.motors.base.RotationMotor) – RotationMotor for tomography.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.cameras.base.Camera) – Camera to acquire the images.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

  • angular_range (q.deg) – Range for the scan of the tomography_motor.

  • start_angle (q.deg) – Start position of tomography_motor for the first projection.

angular_range

Range for scanning the tomography_motor.

start_angle

Initial position of the tomography_motor.

Stepped tomography

class concert.experiments.imaging.SteppedTomography(self, walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)

Bases: Tomography

Stepped tomography experiment

await __ainit__(walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.camera.base.Camera) – Camera to acquire the images.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

  • angular_range (q.deg) – Range for the scan of the tomography_motor.

  • start_angle (q.deg) – Start position of tomography_motor for the first projection.

Continuous tomography

class concert.experiments.imaging.ContinuousTomography(self, walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)

Bases: Tomography

Continuous Tomography

This implements a tomography with a continuous rotation of the sample. The camera must record frames with a constant rate.

await __ainit__(walker, flat_motor, tomography_motor, radio_position, flat_position, camera, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.camera.base.Camera) – Camera to acquire the images.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

  • angular_range (q.deg) – Range for the scan of the tomography_motor.

  • start_angle (q.deg) – Start position of tomography_motor for the first projection.

velocity

Velocity of the tomography_motor in the continuous scan.

Stepped spiral tomography

class concert.experiments.imaging.SteppedSpiralTomography(self, walker, flat_motor, tomography_motor, vertical_motor, radio_position, flat_position, camera, start_position_vertical, sample_height, vertical_shift_per_tomogram, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)

Bases: SpiralMixin, SteppedTomography

Stepped spiral tomography

await __ainit__(walker, flat_motor, tomography_motor, vertical_motor, radio_position, flat_position, camera, start_position_vertical, sample_height, vertical_shift_per_tomogram, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • tomography_motor (concert.devices.motors.base.RotationMotor) – RotationMotor for tomography scan.

  • vertical_motor (concert.devices.motors.base.LinearMotor) – LinearMotor to translate the sample along the tomographic axis.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.cameras.base.Camera) – Camera to acquire the images.

  • start_position_vertical (q.mm) – Start position of vertical_motor.

  • sample_height (q.mm) – Height of the sample.

  • vertical_shift_per_tomogram (q.mm) – Distance vertical_motor is translated during one angular_range.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

  • angular_range (q.deg) – Range for the scan of the tomography_motor.

  • start_angle (q.deg) – Start position of tomography_motor for the first projection.

Continuous spiral tomography

class concert.experiments.imaging.ContinuousSpiralTomography(self, walker, flat_motor, tomography_motor, vertical_motor, radio_position, flat_position, camera, start_position_vertical, sample_height, vertical_shift_per_tomogram, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)

Bases: SpiralMixin, ContinuousTomography

Spiral Tomography

This implements a helical acquisition scheme, where the sample is translated perpendicular to the beam while the sample is rotated and the projections are recorded.

await __ainit__(walker, flat_motor, tomography_motor, vertical_motor, radio_position, flat_position, camera, start_position_vertical, sample_height, vertical_shift_per_tomogram, num_flats=200, num_darks=200, num_projections=3000, angular_range=<Quantity(180, 'degree')>, start_angle=<Quantity(0, 'degree')>, separate_scans=True)
Parameters:
  • walker (concert.storage.Walker) – Walker for storing experiment data.

  • flat_motor – Motor for moving sample in and out of the beam. Must feature a ‘position’ property.

  • tomography_motor (concert.devices.motors.base.ContinuousRotationMotor) – ContinuousRotationMotor for tomography scan.

  • vertical_motor (concert.devices.motors.base.ContinuousLinearMotor) – ContinuousLinearMotor to translate the sample along the tomographic axis.

  • radio_position – Position of flat_motor that the sample is positioned in the beam. Unit must be the same as flat_motor[‘position’].

  • flat_position – Position of flat_motor that the sample is positioned out of the beam. Unit must be the same as flat_motor[‘position’].

  • camera (concert.devices.cameras.base.Camera) – Camera to acquire the images.

  • start_position_vertical (q.mm) – Start position of vertical_motor.

  • sample_height (q.mm) – Height of the sample.

  • vertical_shift_per_tomogram (q.mm) – Distance vertical_motor is translated during one angular_range.

  • num_flats (int) – Number of images for flatfield correction.

  • num_darks (int) – Number of images for dark correction.

  • num_projections (int) – Number of projections.

  • angular_range (q.deg) – Range for the scan of the tomography_motor.

  • start_angle (q.deg) – Start position of tomography_motor for the first projection.