logs-py 3.0.10__py3-none-any.whl → 3.0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of logs-py might be problematic. Click here for more details.
- LOGS/Entities/Dataset.py +8 -0
- LOGS/Entities/DatatrackNumericMatrix.py +16 -4
- {logs_py-3.0.10.dist-info → logs_py-3.0.11.dist-info}/METADATA +1 -1
- {logs_py-3.0.10.dist-info → logs_py-3.0.11.dist-info}/RECORD +6 -6
- {logs_py-3.0.10.dist-info → logs_py-3.0.11.dist-info}/WHEEL +0 -0
- {logs_py-3.0.10.dist-info → logs_py-3.0.11.dist-info}/top_level.txt +0 -0
LOGS/Entities/Dataset.py
CHANGED
|
@@ -430,6 +430,14 @@ class Dataset(
|
|
|
430
430
|
|
|
431
431
|
return self._requestReport(exportId, p)
|
|
432
432
|
|
|
433
|
+
def getTrackById(self, trackId: str) -> Optional[Track]:
|
|
434
|
+
if not self._tracks:
|
|
435
|
+
return None
|
|
436
|
+
for track in self._tracks:
|
|
437
|
+
if track.id == trackId:
|
|
438
|
+
return track
|
|
439
|
+
return None
|
|
440
|
+
|
|
433
441
|
@property
|
|
434
442
|
def format(self) -> Optional["FormatMinimal"]:
|
|
435
443
|
return self._format
|
|
@@ -41,24 +41,36 @@ class DatatrackNumericMatrix(Datatrack):
|
|
|
41
41
|
self.min[1] + index[1] * (self.max[1] - self.min[1]) / self.size[1],
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
def getIndex(
|
|
44
|
+
def getIndex(
|
|
45
|
+
self, coord: Tuple[float, float], keepInBounds: bool = False
|
|
46
|
+
) -> Tuple[int, int]:
|
|
45
47
|
if self._incomplete:
|
|
46
48
|
raise EntityIncompleteException(self)
|
|
47
49
|
if self.min is None or self.max is None or self.size is None:
|
|
48
50
|
raise ValueError("Datatrack has no min, max or size defined.")
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
index = (
|
|
51
53
|
int((coord[0] - self.min[0]) * self.size[0] / (self.max[0] - self.min[0])),
|
|
52
54
|
int((coord[1] - self.min[1]) * self.size[1] / (self.max[1] - self.min[1])),
|
|
53
55
|
)
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
if keepInBounds:
|
|
58
|
+
index = (
|
|
59
|
+
max(0, min(index[0], self.size[0] - 1)),
|
|
60
|
+
max(0, min(index[1], self.size[1] - 1)),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
return index
|
|
64
|
+
|
|
65
|
+
def getValueFromCoordinate(
|
|
66
|
+
self, coord: Tuple[float, float], keepInBounds: bool = True
|
|
67
|
+
):
|
|
56
68
|
if self._incomplete:
|
|
57
69
|
raise EntityIncompleteException(self)
|
|
58
70
|
if self._data is None:
|
|
59
71
|
return None
|
|
60
72
|
|
|
61
|
-
return self.getValueFromIndex(self.getIndex(coord))
|
|
73
|
+
return self.getValueFromIndex(self.getIndex(coord, keepInBounds=keepInBounds))
|
|
62
74
|
|
|
63
75
|
def getValueFromIndex(self, index: Tuple[int, int]):
|
|
64
76
|
if self._incomplete:
|
|
@@ -53,7 +53,7 @@ LOGS/Entities/DataSourceRelations.py,sha256=eIszpHjZqz6v4WyhaPNu8efSzedsJLNrYR9b
|
|
|
53
53
|
LOGS/Entities/DataSourceRequestParameter.py,sha256=zAfC61NvVt4XO3HhIy1PLViN3AEBJo7Q6Fa_EtyqNvA,1610
|
|
54
54
|
LOGS/Entities/DataSourceStatus.py,sha256=LIMesU020i1clMiTxvO3hAoESf4B1-fXsDGMMtWLdsM,427
|
|
55
55
|
LOGS/Entities/DataSources.py,sha256=UU5ey98_vX4WQknyWITMy-dPOV-wgjblXxu5uXpnVso,481
|
|
56
|
-
LOGS/Entities/Dataset.py,sha256=
|
|
56
|
+
LOGS/Entities/Dataset.py,sha256=VFPccmTCEsMH-WKd-MyqA9bbGl4CeZxNNzMZ9lHClOM,27758
|
|
57
57
|
LOGS/Entities/DatasetCreator.py,sha256=GJ2e0pcYt5ziVqREViBM_uq45K3rm3FG_3NqIOjrO3Y,3253
|
|
58
58
|
LOGS/Entities/DatasetInfo.py,sha256=GVs9dxE2ufMfiuhgKXDcN-GEi2VrZPM1TMBLwtsfMU0,4972
|
|
59
59
|
LOGS/Entities/DatasetMatchTypes.py,sha256=6C60F0GcioNyfRWIIh2XGQJokZxFdBZY9UpKv1y3M7w,4363
|
|
@@ -69,7 +69,7 @@ LOGS/Entities/DatatrackFormattedTable.py,sha256=B4KwRYzjwe4hjT3VOTucBJdBrO2awClI
|
|
|
69
69
|
LOGS/Entities/DatatrackGeneric.py,sha256=wcaD3EK8RRxf5H7zrUM_iXl-g3P7Fbs1ce4LSlQG8ug,816
|
|
70
70
|
LOGS/Entities/DatatrackImage.py,sha256=r_r0VKA7VgrIn7w21555VyVfkwPPHPCTi1WwAVLPb1w,616
|
|
71
71
|
LOGS/Entities/DatatrackNumericArray.py,sha256=BLlGftpapXhLBpot_Wpt50JXiutG55zVB13yafGPGj4,795
|
|
72
|
-
LOGS/Entities/DatatrackNumericMatrix.py,sha256=
|
|
72
|
+
LOGS/Entities/DatatrackNumericMatrix.py,sha256=J4lrNQ5TAuEIRZ8U7Kyyn3TSVMm4qBOGwe4nye_qVQE,3129
|
|
73
73
|
LOGS/Entities/Entities.py,sha256=jq1T_t6xtjcMdTJtr1JJqt45zFWIPiNEVEi-sC2Unz0,2614
|
|
74
74
|
LOGS/Entities/EntitiesRequestParameter.py,sha256=3JdfvtYOfgzpe7RD5Q_-V6wa3iK_gHFHL5Soer0cqvE,358
|
|
75
75
|
LOGS/Entities/EntityOriginWriteModelWithId.py,sha256=5H_KkeLnkRnZXCUnmO2ZqwuGRrgfQGa_coWPU6O86Uk,465
|
|
@@ -254,7 +254,7 @@ LOGS/Parameters/ParameterElement.py,sha256=fr6AlO_flKRygZZFx1OILP4P-2lV2Tx4PAe6W
|
|
|
254
254
|
LOGS/Parameters/ParameterList.py,sha256=ijukB1__iKI5cefmOIIWz0wKaPz9Cx8KpD7Y7Gz2Pn0,1478
|
|
255
255
|
LOGS/Parameters/ParameterTable.py,sha256=7Lew4DPgWmKcpV1T-1Pvt00kEI05FB383QqO-LHAjds,1758
|
|
256
256
|
LOGS/Parameters/__init__.py,sha256=KpMSuBPx964v2YMZ1BqVp8vjrgSpuiW9KYBm-aejRuc,312
|
|
257
|
-
logs_py-3.0.
|
|
258
|
-
logs_py-3.0.
|
|
259
|
-
logs_py-3.0.
|
|
260
|
-
logs_py-3.0.
|
|
257
|
+
logs_py-3.0.11.dist-info/METADATA,sha256=rfFUyOF8Zoe-_HWzxneZvP9pMQQqZtOM2JlthzQqcHU,2340
|
|
258
|
+
logs_py-3.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
259
|
+
logs_py-3.0.11.dist-info/top_level.txt,sha256=Ckn2LiAmGaR7k3tdEnKAc04z_uboMD4gLreYghRNdCs,5
|
|
260
|
+
logs_py-3.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|