simcats.sensor.deformation
SimCATS subpackage of the sensor package containing all functionalities related to sensor peak deformations.
Package Contents
Classes
General interface for sensor peak deformations. |
|
Circular deformation implementation of the SensorPeakDeformationInterface. |
|
Linear deformation implementation of the SensorPeakDeformationInterface. |
Package Implementation Details
- class simcats.sensor.deformation.SensorPeakDeformationInterface
Bases:
abc.ABCGeneral interface for sensor peak deformations.
Classes that implement this abstract class realize different types of deformation of a single wavefront.
- abstract calc_mu(dist, mu0)
Method that calculates the deformed potential value of mu0 of a sensor peak that is moved based on the distance (dist) to a middle line from which the deformation originates. The middle line follows the direction of the sensor peaks (i.e., the sensor dot potential) and is perpendicular to the wavefronts defined by the peaks.
- Parameters:
dist (Union[float, np.ndarray]) – Distance from the middle line, from which the deformation originates. If a point is above the middle line the distance is positive and if it is below, the distance is negative. The parameter can either be a np.ndarray that contains multiple distances or a single distance as a float.
mu0 (float) – Potential offset for calculation of the deformed potential. Usually this should be the potential offset of the sensor peak, that should be deformed.
- Returns:
Deformed potential value mu0 of a sensor peak. The same type as the type of dist is returned.
- Return type:
Union[float, np.ndarray]
- property sensor: SensorInterface
Returns the sensor object to which the deformed sensor peak belongs.
- Returns:
Sensor object of the deformed sensor peak.
- Return type:
- class simcats.sensor.deformation.SensorPeakDeformationCircle(radius)
Bases:
simcats.sensor.deformation.SensorPeakDeformationInterfaceCircular deformation implementation of the SensorPeakDeformationInterface.
Initialization of an object of the class CircleSensorPeakDeformation. This kind of deformation uses a single circle for the deformation of a sensor peak.
- Parameters:
radius (float) – Radius of the circle that is used for the deformation. The radius can the positive or negative. If the radius is positive the center of the circle is below mu0 and if it is negative the center is above mu0.
- property radius: float
Returns the radius used for this deformation. Radius is specified in potential values. The radius can the positive or negative. If the radius is positive the center of the circle is below mu0 and if it is negative the center is above mu0.
- Returns:
Radius of the circular deformation. The wavefront is deformed according to this circle.
- Return type:
float
- calc_mu(dist, mu0)
Method that calculates the deformed potential value for mu0 of a sensor peak that is moved based on the distance (dist) to a middle line, from which the deformation originates, using a circle. The middle line follows the direction of the sensor peaks (i.e., the sensor dot potential) and is perpendicular to the wavefronts defined by the peaks.
The center of the circle is either above or below the sensor peak and lies on the middle line. However, it is chosen so that the mu0 value lies on the edge of the circle. To determine the deformation, one of the points of the circle with the given distance to the middle line is used. The deformed mu0 value is the potential value of the point whose potential value is closest to the original mu0 value. If there is no point of the circle that has the given distance (dist) to the middle line, the potential of the point of the circle with the greatest distance to the middle straight line is used.
- Parameters:
dist (Union[float, np.ndarray]) – Distance from the middle line, from which the deformation originates. If a point is above the middle line the distance is positive and if it is below, the distance is negative. The parameter can either be a np.ndarray that contains multiple distances or a single distance as a float.
mu0 (float) – Potential offset for calculation of the deformed potential. Usually this should be the potential offset of the sensor peak, that should be deformed.
- Returns:
Deformed potential value mu0 of a sensor peak. The same type as the type of dist is returned.
- Return type:
Union[float, np.ndarray]
- class simcats.sensor.deformation.SensorPeakDeformationLinear(angle)
Bases:
simcats.sensor.deformation.SensorPeakDeformationInterfaceLinear deformation implementation of the SensorPeakDeformationInterface.
Initialization of an object of the class LinearSensorPeakDeformation. This kind of deformation uses a single line for the deformation of a sensor peak (tilting the wavefront).
- Parameters:
angle (float) – Angle of the line that is used for the linear deformation of the sensor peak. This Angle is specified in radians. The angle between the two straight lines is specified, which lies above the deformation line and to the right of the middle line.
- property angle: float
Returns the angle of the line used for deforming the sensor peak.
- Returns:
Angle of the line that is used for the linear deformation of the sensor peak.
- Return type:
float
- calc_mu(dist, mu0)
Method that calculates the deformed potential value for mu0 of mu0 of a sensor peak that is moved based on the distance (dist) to a middle line, from which the deformation originates, using a line. The middle line follows the direction of the sensor peaks (i.e., the sensor dot potential) and is perpendicular to the wavefronts defined by the peaks.
For the deformation, the potential value of the point of the line that has the given distance to the center line is used.
- Parameters:
dist (Union[float, np.ndarray]) – Distance from the middle line, from which the deformation originates. If a point is above the middle line the distance is positive and if it is below, the distance is negative. The parameter can either be a np.ndarray that contains multiple distances or a single distance as a float.
mu0 (float) – Potential offset for calculation of the deformed potential. Usually this should be the potential offset of the sensor peak, that should be deformed.
- Returns:
- Deformed potential value mu0 of a sensor peak. The same type as the type of
dist is returned.
- Return type:
Union[float, np.ndarray]