core

class PipelineElementBase(global_settings: Settings)[source]

Bases: object

Defines a pipeline element (either simulation or processing module) that implements a run method and can be called by running the pipeline’s simulate method.

Parameters:

global_settings (Settings) – The SIMPA settings dictionary

abstract run(digital_device_twin: DigitalDeviceTwinBase)[source]

Executes the respective simulation module

Parameters:

digital_device_twin – The digital twin that can be used by the digital device_twin.

simulate(simulation_pipeline: list, settings: Settings, digital_device_twin: DigitalDeviceTwinBase)[source]

This method constitutes the staring point for the simulation pipeline of the SIMPA toolkit.

Parameters:
  • simulation_pipeline – a list of callable functions

  • settings – settings dictionary containing the simulation instructions

  • digital_device_twin – a digital device twin of an imaging device as specified by the DigitalDeviceTwinBase class.

Raises:
  • TypeError – if one of the given parameters is not of the correct type

  • AssertionError – if the digital device twin is not able to simulate the settings specification

Returns:

list with the save paths of the simulated data within the HDF5 file.