IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
binning_factor.py
Go to the documentation of this file.
2
3from ids_peak_icv.exceptions import OutOfRangeException
4from ids_peak_icv.backend.datatypes import peak_icv_binning_factor
5
6
8 """!
9 @brief
10 The binning factor for the x and y directions must consist of positive integer values.
11 A binning value of 2 indicates that the values of the two lines are combined into one line.
12
13 @since ids_peak_icv 1.0
14 @ingroup ids_peak_icv_python_types
15 """
16
17 def __init__(self, x: int, y: int) -> None:
18 """!
19 @brief
20 Creates a binning factor configuration.
21
22 @param x: x information
23 @param y: y information
24
25 @exception OutOfRangeException: If x or y is less than or equal to zero.
26
27 @since ids_peak_icv 1.0
28 """
29 if x < 1 or y < 1:
30 raise OutOfRangeException("Given binning factor value is invalid. Value has to be bigger than 0.")
31 super().__init__(x, y)
32
33 @property
34 def _c_type(self) -> peak_icv_binning_factor:
35 binning_factor = peak_icv_binning_factor()
36 binning_factor.x = self.xx
37 binning_factor.y = self.yy
38 return binning_factor
Represents a point in 2D space with x and y coordinates.
Definition point.py:6
The binning factor for the x and y directions must consist of positive integer values.
None __init__(self, int x, int y)
Creates a binning factor configuration.
Thrown when a value is outside the allowed range.