measurement_point
MeasurementPoint
Bases: BaseModel
Represents a single measurement point in the environment.
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
X-coordinate of the measurement point in meters. |
y |
float
|
Y-coordinate of the measurement point in meters (must be below 0). |
distances_to_cables |
dict[CableKey, float]
|
Mapping from cable keys to distances in meters. |
distances_to_mirror_cables |
dict[CableKey, float]
|
Mapping from mirror cable keys to distances in meters. |
ndigits |
int
|
Number of decimal places used when generating the key. |
key |
MeasurementPointKey
|
Computed 3-level key used in result DataFrame columns. |
key
property
key: MeasurementPointKey
Create a stable output key for a measurement point.
Returns:
| Type | Description |
|---|---|
MeasurementPointKey
|
A 3-level tuple key in the format |
MeasurementPointKey
|
|
MeasurementPointRegistry
MeasurementPointRegistry()
Stores and deduplicates measurement points.
Attributes:
| Name | Type | Description |
|---|---|---|
points |
set[MeasurementPoint]
|
Set of unique measurement points. |
Source code in cable_thermal_model/environment/measurement_point.py
81 82 83 84 85 | |
measurement_point_keys
property
measurement_point_keys: set[MeasurementPointKey]
Return all registered measurement-point keys.
Returns:
| Type | Description |
|---|---|
set[MeasurementPointKey]
|
The set of measurement-point keys currently in the registry. |
add_measurement_point
add_measurement_point(x: float, y: float, ndigits: int = 3) -> MeasurementPointKey
Add a measurement point to the registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
x-coordinate of the measurement point. |
required |
y
|
float
|
y-coordinate of the measurement point. |
required |
ndigits
|
int
|
Number of decimal places to round the coordinates for key generation. |
3
|
Returns:
| Type | Description |
|---|---|
MeasurementPointKey
|
The key of the added or already-existing measurement point. |
Source code in cable_thermal_model/environment/measurement_point.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |