nxstools 4.31.4__py3-none-any.whl → 4.33.0__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.
- nxstools/h5rediswriter.py +23 -3
- nxstools/release.py +1 -1
- {nxstools-4.31.4.dist-info → nxstools-4.33.0.dist-info}/METADATA +1 -1
- {nxstools-4.31.4.dist-info → nxstools-4.33.0.dist-info}/RECORD +12 -12
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxscollect +0 -0
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxsconfig +0 -0
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxscreate +0 -0
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxsdata +0 -0
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxsetup +0 -0
- {nxstools-4.31.4.data → nxstools-4.33.0.data}/scripts/nxsfileinfo +0 -0
- {nxstools-4.31.4.dist-info → nxstools-4.33.0.dist-info}/WHEEL +0 -0
- {nxstools-4.31.4.dist-info → nxstools-4.33.0.dist-info}/top_level.txt +0 -0
nxstools/h5rediswriter.py
CHANGED
|
@@ -34,7 +34,6 @@ from .nxsfileparser import (getdsname, getdssource,
|
|
|
34
34
|
# getdstype
|
|
35
35
|
)
|
|
36
36
|
|
|
37
|
-
|
|
38
37
|
H5CPP = False
|
|
39
38
|
try:
|
|
40
39
|
from . import h5cppwriter as h5writer
|
|
@@ -130,6 +129,10 @@ progattrdesc = {
|
|
|
130
129
|
"beamtime_id": ["beamtime_id", str, False],
|
|
131
130
|
}
|
|
132
131
|
|
|
132
|
+
titleplots = {
|
|
133
|
+
"mesh": {"kind": "scatter-plot", "items": [{"kind": "scatter"}]},
|
|
134
|
+
}
|
|
135
|
+
|
|
133
136
|
|
|
134
137
|
def nptype(dtype):
|
|
135
138
|
""" converts to numpy types
|
|
@@ -406,6 +409,12 @@ class H5RedisFile(H5File):
|
|
|
406
409
|
""" file tree file
|
|
407
410
|
"""
|
|
408
411
|
|
|
412
|
+
#: (:obj:`dict`) global data stores
|
|
413
|
+
global_data_stores = {}
|
|
414
|
+
|
|
415
|
+
#: (:class:`threading.Lock`) global data store lock
|
|
416
|
+
global_data_store_lock = threading.Lock()
|
|
417
|
+
|
|
409
418
|
def __init__(self, h5object=None, filename=None, h5imp=None,
|
|
410
419
|
redisurl=None, session=None, h5fileplugin=None):
|
|
411
420
|
""" constructor
|
|
@@ -444,8 +453,13 @@ class H5RedisFile(H5File):
|
|
|
444
453
|
self.__entryname = ''
|
|
445
454
|
self.__insname = ''
|
|
446
455
|
if REDIS and self.__redisurl:
|
|
447
|
-
|
|
448
|
-
|
|
456
|
+
with self.global_data_store_lock:
|
|
457
|
+
# print("FILENAME", self.name)
|
|
458
|
+
if self.__redisurl in self.global_data_stores:
|
|
459
|
+
self.__datastore = self.global_data_stores[self.__redisurl]
|
|
460
|
+
else:
|
|
461
|
+
self.__datastore = getDataStore(self.__redisurl)
|
|
462
|
+
self.global_data_stores[self.__redisurl] = self.__datastore
|
|
449
463
|
# global FileStream
|
|
450
464
|
# if h5fileplugin:
|
|
451
465
|
# try:
|
|
@@ -1696,6 +1710,12 @@ class H5RedisField(H5Field):
|
|
|
1696
1710
|
np = str(filewriter.first(attrs[vl[0]].read()))
|
|
1697
1711
|
if vl[2] or np:
|
|
1698
1712
|
self.set_scaninfo(np, [key])
|
|
1713
|
+
if isinstance(np, str):
|
|
1714
|
+
macro_name = np.split(" ")[0]
|
|
1715
|
+
for mn, plot in titleplots.items():
|
|
1716
|
+
if mn in macro_name:
|
|
1717
|
+
self.append_scaninfo(plot, ["plots"])
|
|
1718
|
+
|
|
1699
1719
|
except Exception as e:
|
|
1700
1720
|
print(str(e))
|
|
1701
1721
|
pass
|
nxstools/release.py
CHANGED
|
@@ -3,7 +3,7 @@ nxstools/filenamegenerator.py,sha256=82Zbrxk54OiDFi6MuXtKgSgPNti4CVciBCe9NgPY8HE
|
|
|
3
3
|
nxstools/filewriter.py,sha256=feSjyvCkUvoiD949-PB6bP6F30-MSuRPtboZehYbaVk,31899
|
|
4
4
|
nxstools/h5cppwriter.py,sha256=OOdXQR2ptKAaTNIOFVd6hETqStM_Jb38jTR65rdBxlU,69060
|
|
5
5
|
nxstools/h5pywriter.py,sha256=PxV0ou_WBpKE2NTnmIfsw0xKwjOO6WIjkMmxvtYXbsk,57830
|
|
6
|
-
nxstools/h5rediswriter.py,sha256=
|
|
6
|
+
nxstools/h5rediswriter.py,sha256=UHCUx7uIlVlzkmAAXTjmnkgohZ1EJl-AteH5FGf8ozg,70934
|
|
7
7
|
nxstools/nxsargparser.py,sha256=j2ZEhBbs1TelCTEVSWMnVTvujusjKhFNSY6kQR3nIbQ,3241
|
|
8
8
|
nxstools/nxscollect.py,sha256=1kYhO6Vpk5Hb-cF14EMFkljF_nr2UUcXvzuk46-uVcM,64898
|
|
9
9
|
nxstools/nxsconfig.py,sha256=hyuLqLFC9nVHPaARut74_Oy-5_SBkuADGV6ilPM6dqI,61686
|
|
@@ -17,7 +17,7 @@ nxstools/nxsfileparser.py,sha256=hoNDweS_o9RjM7p89dVQdP13VRf-1SytCUwuVNMOWag,283
|
|
|
17
17
|
nxstools/nxsparser.py,sha256=Z6xOHCd7W20ICIurOM6H3I0FbFLF4xa29iwkotk9b40,35902
|
|
18
18
|
nxstools/nxsxml.py,sha256=EMh9ZctS6TsEA9cpJc5BRabd-a8CQClTm0_H4QqaLAk,25209
|
|
19
19
|
nxstools/redisutils.py,sha256=3QSILdasxql4geSHxrWAfOQ5v0-KZ6lv-e8uhlbhNPk,2586
|
|
20
|
-
nxstools/release.py,sha256=
|
|
20
|
+
nxstools/release.py,sha256=QqJtpI0EqOlnrr15pw5uqFTdQ1qvrRU0ZzrX5edY4pM,890
|
|
21
21
|
nxstools/ontology/__init__.py,sha256=QoAaEawW9gN3-Oan4Nh4RcnIQ5xTUy_cyTTt_qH7MH0,5583
|
|
22
22
|
nxstools/ontology/ontology.json,sha256=skBZzmbhLGtQ9ahizOKlolG5agHf0lfaK4Bao2e43Lk,191838
|
|
23
23
|
nxstools/pyeval/__init__.py,sha256=PtASTU6yoxWfn8GWA17Y9jcLRQjkqCKy9bpCxhaeMSo,848
|
|
@@ -265,13 +265,13 @@ nxstools/xmltemplates/title.ds.xml,sha256=cBN_WigqtvGK2vS3dCotwH7NNDAb2Z_z7CLw-t
|
|
|
265
265
|
nxstools/xmltemplates/undulator.xml,sha256=Tnfkgftm6KOQyifc-BVyqUuEB9alHUru7z3_Qv9tJrY,2369
|
|
266
266
|
nxstools/xmltemplates/xspress3.xml,sha256=uOsLW21SyXcsilZAZdIyQ37npTkzuIEqjat3QlNyndY,1873
|
|
267
267
|
nxstools/xmltemplates/xspress3_triggermode_cb.ds.xml,sha256=xrXNLT6uuDofgXRqVhdIo25J7nUPPdSPJs4kE_u8_rw,871
|
|
268
|
-
nxstools-4.
|
|
269
|
-
nxstools-4.
|
|
270
|
-
nxstools-4.
|
|
271
|
-
nxstools-4.
|
|
272
|
-
nxstools-4.
|
|
273
|
-
nxstools-4.
|
|
274
|
-
nxstools-4.
|
|
275
|
-
nxstools-4.
|
|
276
|
-
nxstools-4.
|
|
277
|
-
nxstools-4.
|
|
268
|
+
nxstools-4.33.0.data/scripts/nxscollect,sha256=ckAVuZnNdjepU9S6EKDACb-Zcojpt_UhiTKnHoMVEhk,60
|
|
269
|
+
nxstools-4.33.0.data/scripts/nxsconfig,sha256=va2RtUWqZN_Nb4dSs_0d63XjzqYkbSLSnvkCB0dbwYw,58
|
|
270
|
+
nxstools-4.33.0.data/scripts/nxscreate,sha256=kpc2eEoCpWNg3inzgm2if6bpT9i-9-GJJQ-8mSs6a7M,59
|
|
271
|
+
nxstools-4.33.0.data/scripts/nxsdata,sha256=XvalTwXtrS2DOb8nKLp-7Mjom-L_WBLBqY5xtl-CPH4,54
|
|
272
|
+
nxstools-4.33.0.data/scripts/nxsetup,sha256=pYXgv6vHpblrmURXikAZBAOOaPxDnqu3n6OSYuLXkWE,54
|
|
273
|
+
nxstools-4.33.0.data/scripts/nxsfileinfo,sha256=Hhus49bHtva79IwY_7nxDhQF-ianVKMYo1uvNqeOqJ0,62
|
|
274
|
+
nxstools-4.33.0.dist-info/METADATA,sha256=9WV46bYnWOCS3a_ucPAgRoUgUPLF-sZrBtCRQ41TLXo,5051
|
|
275
|
+
nxstools-4.33.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
276
|
+
nxstools-4.33.0.dist-info/top_level.txt,sha256=puE4GNPuhMbwc3ViVq7sru72pVPcvxWlx9lPezA-5RQ,9
|
|
277
|
+
nxstools-4.33.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|