petal-qc 0.0.0__py3-none-any.whl → 0.0.2__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 petal-qc might be problematic. Click here for more details.
- petal_qc/BTreport/CheckBTtests.py +16 -6
- petal_qc/BTreport/bustapeReport.py +78 -9
- petal_qc/__init__.py +1 -1
- petal_qc/dashBoard.py +21 -0
- petal_qc/metrology/coreMetrology.py +18 -3
- petal_qc/thermal/IRBFile.py +8 -4
- petal_qc/thermal/IRCore.py +1 -0
- petal_qc/thermal/IRDataGetter.py +41 -2
- petal_qc/thermal/IRPetal.py +14 -7
- petal_qc/thermal/IRPetalParam.py +5 -1
- petal_qc/thermal/PipeFit.py +1 -0
- petal_qc/thermal/analyze_IRCore.py +120 -6
- petal_qc/thermal/coreThermal.py +366 -0
- petal_qc/thermal/create_IRCore.py +34 -8
- petal_qc/thermal/create_core_report.py +122 -0
- petal_qc/thermal/pipe_back.npz +0 -0
- petal_qc/thermal/pipe_front.npz +0 -0
- petal_qc/thermal/show_IR_petal.py +8 -0
- petal_qc/thermal/test_Graphana.py +30 -0
- petal_qc/thermal/test_coreThermal.py +58 -0
- petal_qc/utils/readGraphana.py +61 -0
- {petal_qc-0.0.0.dist-info → petal_qc-0.0.2.dist-info}/METADATA +1 -1
- {petal_qc-0.0.0.dist-info → petal_qc-0.0.2.dist-info}/RECORD +26 -18
- {petal_qc-0.0.0.dist-info → petal_qc-0.0.2.dist-info}/WHEEL +0 -0
- {petal_qc-0.0.0.dist-info → petal_qc-0.0.2.dist-info}/entry_points.txt +0 -0
- {petal_qc-0.0.0.dist-info → petal_qc-0.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Class to access graphana data."""
|
|
3
|
+
|
|
4
|
+
import datetime
|
|
5
|
+
from dateutil.parser import parse
|
|
6
|
+
import influxdb
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReadGraphana(object):
|
|
11
|
+
"""Connect to the GraphanaDB"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, host="silab15.ific.uv.es", port=8086):
|
|
14
|
+
"""Connect to Graphan server
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
host (str, optional): The IP of the server.
|
|
18
|
+
port (int, optional): The port to the server.
|
|
19
|
+
"""
|
|
20
|
+
self.client = influxdb.InfluxDBClient(host=host, port=port,
|
|
21
|
+
username="matlab", password="matlab",
|
|
22
|
+
database="clean_room")
|
|
23
|
+
|
|
24
|
+
def get_temperature(self, the_time, window=10):
|
|
25
|
+
"""REturns the temperature
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
teh_time: the time to query the DB.
|
|
29
|
+
window: the time window, in minutes, around the given time.
|
|
30
|
+
"""
|
|
31
|
+
if not isinstance(the_time, datetime.datetime):
|
|
32
|
+
the_time = parse(the_time)
|
|
33
|
+
|
|
34
|
+
td = datetime.timedelta(minutes=window/2)
|
|
35
|
+
t1 = the_time - td # datetime.datetime(year=2024, month=5, day=22, hour=15)
|
|
36
|
+
t2 = the_time + td #datetime.datetime(year=2024, month=5, day=23, hour=15)
|
|
37
|
+
|
|
38
|
+
measure="Temp"
|
|
39
|
+
setup="MARTA_APP|MARTA_tt06"
|
|
40
|
+
query = "select location,value from {measure} where (location =~ /.*{location}*/ and time>'{t1}' and time < '{t2}') group by \"location\"".format(
|
|
41
|
+
measure=measure,
|
|
42
|
+
location=setup,
|
|
43
|
+
t1=t1.isoformat()+'Z',
|
|
44
|
+
t2=t2.isoformat()+'Z')
|
|
45
|
+
|
|
46
|
+
ss = self.client.query(query)
|
|
47
|
+
nitems = 0
|
|
48
|
+
for s in ss:
|
|
49
|
+
nitems += len(s)
|
|
50
|
+
|
|
51
|
+
if nitems==0:
|
|
52
|
+
raise ValueError(("No data found"))
|
|
53
|
+
|
|
54
|
+
T = []
|
|
55
|
+
for s in ss:
|
|
56
|
+
for v in s:
|
|
57
|
+
T.append(v['value'])
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
val = np.mean(T)
|
|
61
|
+
return val
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: petal_qc
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: A collection of scripts for Petal CORE QC.
|
|
5
5
|
Author-email: Carlos Lacasta <carlos.lacasta@cern.ch>
|
|
6
6
|
Project-URL: Homepage, https://gitlab.cern.ch/atlas-itk/sw/db/itk-pdb-gtk-gui-utils
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
petal_qc/__init__.py,sha256=
|
|
2
|
-
petal_qc/
|
|
1
|
+
petal_qc/__init__.py,sha256=qgmsBfB_EW96gEoFQLrZhf2KsTrIy3KffxsjNF_Cy5I,337
|
|
2
|
+
petal_qc/dashBoard.py,sha256=aPugRYhCcAzEBPrCyh8A8QKYaB4Q-_T1q3r5A3J2eog,553
|
|
3
|
+
petal_qc/BTreport/CheckBTtests.py,sha256=4hNP1V-zcFBN5UvWVbx9nAmittF8Jmb5J17L33t68Eg,9086
|
|
3
4
|
petal_qc/BTreport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
petal_qc/BTreport/bustapeReport.py,sha256=
|
|
5
|
+
petal_qc/BTreport/bustapeReport.py,sha256=c5VERxPm6BOgW_yN9O_bEPmCYpuwZ_Yt_I2sMVAp0-I,6895
|
|
5
6
|
petal_qc/metrology/Cluster.py,sha256=UtZ5q1EFb8f3qC0hEYBbhRg2pPbW_28aJX2EEMu00Ho,2105
|
|
6
7
|
petal_qc/metrology/DataFile.py,sha256=PbFqy3-WSj69epV5EjhHc1GKhA8I74FmJYOXUjN0V20,1367
|
|
7
8
|
petal_qc/metrology/PetalMetrology.py,sha256=H4MwuQ2QxP_Td9KtMly_-osXT1owigzC7QlmRub7oRo,11886
|
|
@@ -12,7 +13,7 @@ petal_qc/metrology/cold_noise.py,sha256=PuTaQ73WrQCJdE9ezS4UFmA3atwCuvM0ZsUOYu1Z
|
|
|
12
13
|
petal_qc/metrology/comparisonTable.py,sha256=6Zmh-x0ahs28ZJQuHMrIiRcblUmTN1_-1otFSRNMPds,1743
|
|
13
14
|
petal_qc/metrology/convert_mitutoyo.py,sha256=HdXQzFL5y7r8qXDzti91VItDQ-y6D9rEAYknn4yHwBs,5449
|
|
14
15
|
petal_qc/metrology/convert_smartscope.py,sha256=es3PoUd5d5rpHebgwsS9nrc3uuy9uFKOQ00ZdU5XHQ0,3836
|
|
15
|
-
petal_qc/metrology/coreMetrology.py,sha256=
|
|
16
|
+
petal_qc/metrology/coreMetrology.py,sha256=L_uoxq8ObmmiMSx41gFCdpQnalR-HgaVUPHzhDYsDiE,13610
|
|
16
17
|
petal_qc/metrology/data2csv.py,sha256=2ttMSmfGLPIaOqZGima2dH6sdnSRAFTHlEbSOfW5ebA,1809
|
|
17
18
|
petal_qc/metrology/do_Metrology.py,sha256=4tbZJfJYXY8QVLiG5_2pThNPzyuqbC3s8xhFdQfC1TU,3977
|
|
18
19
|
petal_qc/metrology/flatness4nigel.py,sha256=SUHwn6pCEUWQV_62-_9-VKrmUdL4gVQcSA3aTtYq958,4071
|
|
@@ -23,29 +24,36 @@ petal_qc/metrology/testSummary.py,sha256=0BhcEd1BPz2Mbonzi8nyZOzNSzpUqowBFNl5cVu
|
|
|
23
24
|
petal_qc/metrology/test_paralelism.py,sha256=_j__OdUwdXWM494_9HpGPuPHixMwwVphCcvHEfzWi_k,1981
|
|
24
25
|
petal_qc/thermal/CSVImage.py,sha256=Vt2kYmUsZWkQvxcF8fDda3HO1Rb29kPQHnEoHFCqWYo,2038
|
|
25
26
|
petal_qc/thermal/DebugPlot.py,sha256=OmREFwNDAKgoObDmcgHrB4d8m3bf2znfsKVGsb5rBGQ,2119
|
|
26
|
-
petal_qc/thermal/IRBFile.py,sha256=
|
|
27
|
-
petal_qc/thermal/IRCore.py,sha256=
|
|
28
|
-
petal_qc/thermal/IRDataGetter.py,sha256=
|
|
29
|
-
petal_qc/thermal/IRPetal.py,sha256=
|
|
30
|
-
petal_qc/thermal/IRPetalParam.py,sha256=
|
|
27
|
+
petal_qc/thermal/IRBFile.py,sha256=gudyAMwYjBtfXhx-Kxbott9Lpbnfm4oKnizIE5vrkoE,22270
|
|
28
|
+
petal_qc/thermal/IRCore.py,sha256=y79YEQrq4q2hSdmYbOF7jjEA-wy50Qun0g_AmrRUmls,3056
|
|
29
|
+
petal_qc/thermal/IRDataGetter.py,sha256=cT20apD0xN9VCKY01yXQTx9cV1Pk4xjVy3sXR3ROHGQ,10580
|
|
30
|
+
petal_qc/thermal/IRPetal.py,sha256=8H1ltpahzJavM65De8OTSedvilXQkr3LkV8mRnTDhLQ,38334
|
|
31
|
+
petal_qc/thermal/IRPetalParam.py,sha256=hrQ9FevzWctvBVHeQ71G0WzllVEa5rYkJom2ezfFYHc,3674
|
|
31
32
|
petal_qc/thermal/PetalColorMaps.py,sha256=6CvJHzRdojLHu3BROYSekHw8g_BJ1lJ_edyhovTIydU,3831
|
|
32
33
|
petal_qc/thermal/Petal_IR_Analysis.py,sha256=8Deh_bJ5B7DdaUV18saboF7fXZ_8Bt1vkUlsk5RqVeo,3910
|
|
33
|
-
petal_qc/thermal/PipeFit.py,sha256=
|
|
34
|
+
petal_qc/thermal/PipeFit.py,sha256=bipXxJGxrwlgbrFv8WJA1Ds7Kj4oUwEyqTIswpgni9o,17214
|
|
34
35
|
petal_qc/thermal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
petal_qc/thermal/analyze_IRCore.py,sha256=
|
|
36
|
+
petal_qc/thermal/analyze_IRCore.py,sha256=6qV8q4yEJxB1hkhXi-SozI3fZXMh9zNHnwfjvpI380k,18086
|
|
36
37
|
petal_qc/thermal/contours.py,sha256=ampCKm4byZYKb_4eJFjIkdFIl2bqVXD2mV13d2XUWlw,8244
|
|
37
|
-
petal_qc/thermal/
|
|
38
|
+
petal_qc/thermal/coreThermal.py,sha256=q1e_8e19TPL3EeJzJKiMo04-nIdXAU6b_XSJNuF-zGU,12320
|
|
39
|
+
petal_qc/thermal/create_IRCore.py,sha256=3J6vj1xyjtwoe2OdHv8LbjTgo4I_vaiw_05DWidY9v4,6206
|
|
40
|
+
petal_qc/thermal/create_core_report.py,sha256=x3yx4CxbPARmLHqjpt5-yNZELRiHadEOufMpDFNEr5g,4239
|
|
41
|
+
petal_qc/thermal/pipe_back.npz,sha256=yooZuVYtHU541HcV6Gh_5B0BqdYAVEvYAuVvMMSY7Jc,3632
|
|
42
|
+
petal_qc/thermal/pipe_front.npz,sha256=DuwruG9C2Z1rLigqWMApY4Orsf1SGUQGKy0Yan8Bk8A,3697
|
|
38
43
|
petal_qc/thermal/pipe_read.py,sha256=HrAtEbf8pMhJDETzkevodiTbuprIOh4yHv6PzpRoz7Q,5040
|
|
39
|
-
petal_qc/thermal/show_IR_petal.py,sha256=
|
|
44
|
+
petal_qc/thermal/show_IR_petal.py,sha256=vKb8wm9Y7erAdCb93ODREv2qfSexNMfJpV-67wfOhBw,13159
|
|
45
|
+
petal_qc/thermal/test_Graphana.py,sha256=lr3JYC8XwwsZLfhGK2M1swOiIvDUTf5IYc6pqxZyCSA,878
|
|
46
|
+
petal_qc/thermal/test_coreThermal.py,sha256=YRPK3DGG7Tz66K4Kka3euXgUDzW_JlIqSYicMBhb96E,1516
|
|
40
47
|
petal_qc/utils/Geometry.py,sha256=XwA_aojk880N-jC1_bnMYFK0bcD-L96JPS81NUerJf0,19765
|
|
41
48
|
petal_qc/utils/Progress.py,sha256=gCti4n2xfCcOTlAff5GchabGE5BCwavvDZYYKdbEsXU,4064
|
|
42
49
|
petal_qc/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
50
|
petal_qc/utils/all_files.py,sha256=4ja_DkbTYPY3gUPBAZq0p7KB9lnXZx-OCnpTHg9tm4I,1044
|
|
44
51
|
petal_qc/utils/docx_utils.py,sha256=Eye16PF8W0mPBVdQvgFKWxPYV7-hzBgANPDZtUEjzf8,5805
|
|
45
52
|
petal_qc/utils/fit_utils.py,sha256=3KUGWpBMV-bVDkQHWBigXot8chOpjAVBJ5H5b5dbdjk,5349
|
|
53
|
+
petal_qc/utils/readGraphana.py,sha256=-l1iVazszGOgH2oUYAbjaIyxUvM8G4Bzoar491tsWjg,1862
|
|
46
54
|
petal_qc/utils/utils.py,sha256=CqCsNIcEg6FQb3DN70tmqeLVLlQqsRfDzhfGevlnfBc,4035
|
|
47
|
-
petal_qc-0.0.
|
|
48
|
-
petal_qc-0.0.
|
|
49
|
-
petal_qc-0.0.
|
|
50
|
-
petal_qc-0.0.
|
|
51
|
-
petal_qc-0.0.
|
|
55
|
+
petal_qc-0.0.2.dist-info/METADATA,sha256=SPjkEowJUpsvFQv4FEoQ60BmJzg7Fj_zILlVDf0e2oo,943
|
|
56
|
+
petal_qc-0.0.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
57
|
+
petal_qc-0.0.2.dist-info/entry_points.txt,sha256=ZsBmzA1gRvZSe4ZKcxlo0b-RBjySccqBhL6g_CJhNaM,92
|
|
58
|
+
petal_qc-0.0.2.dist-info/top_level.txt,sha256=CCo1Xe6kLS79PruhsB6bk2CuL9VFtNdNpgJjYUs4jk4,9
|
|
59
|
+
petal_qc-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|