device_digital_twins

class DigitalDeviceTwinBase(device_position_mm=None, field_of_view_extent_mm=None)[source]

Bases: SerializableSIMPAClass

This class represents a device that can be used for illumination, detection or a combined photoacoustic device which has representations of both.

Parameters:
  • device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of e.g. detector element positions or illuminator positions.

  • field_of_view_extent_mm (ndarray) – Field of view which is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

__eq__(other)[source]

Checks each key, value pair in the devices.

abstract check_settings_prerequisites(global_settings) bool[source]

It might be that certain device geometries need a certain dimensionality of the simulated PAI volume, or that it requires the existence of certain Tags in the global global_settings. To this end, a PAI device should use this method to inform the user about a mismatch of the desired device and throw a ValueError if that is the case.

Parameters:

global_settings (Settings) – Settings for the entire simulation pipeline.

Raises:

ValueError – raises a value error if the prerequisites are not matched.

Returns:

True if the prerequisites are met, False if they are not met, but no exception has been raised.

Return type:

bool

static deserialize(dictionary_to_deserialize)[source]
generate_uuid()[source]

Generates a universally unique identifier (uuid) for each device. :return:

get_field_of_view_mm() ndarray[source]

Returns the absolute field of view in mm where the probe position is already accounted for. It is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

Returns:

Absolute field of view in mm where the probe position is already accounted for.

Return type:

ndarray

serialize() dict[source]
abstract update_settings_for_use_of_model_based_volume_creator(global_settings)[source]

This method can be overwritten by a PA device if the device poses special constraints to the volume that should be considered by the model-based volume creator.

Parameters:

global_settings (Settings) – Settings for the entire simulation pipeline.