nxswriter 3.15.0__py3-none-any.whl → 3.16.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.
- nxswriter/DecoderPool.py +20 -5
- nxswriter/Release.py +1 -1
- {nxswriter-3.15.0.dist-info → nxswriter-3.16.0.dist-info}/METADATA +1 -1
- {nxswriter-3.15.0.dist-info → nxswriter-3.16.0.dist-info}/RECORD +8 -8
- {nxswriter-3.15.0.data → nxswriter-3.16.0.data}/scripts/NXSDataWriter +0 -0
- {nxswriter-3.15.0.data → nxswriter-3.16.0.data}/scripts/nxsfromxml +0 -0
- {nxswriter-3.15.0.dist-info → nxswriter-3.16.0.dist-info}/WHEEL +0 -0
- {nxswriter-3.15.0.dist-info → nxswriter-3.16.0.dist-info}/top_level.txt +0 -0
nxswriter/DecoderPool.py
CHANGED
|
@@ -175,8 +175,10 @@ class DATAARRAYdecoder(object):
|
|
|
175
175
|
self.__value = None
|
|
176
176
|
#: ([:obj:`str`, :obj:`str`]) header and image data
|
|
177
177
|
self.__data = None
|
|
178
|
-
#: (:obj:`str`) struct header format
|
|
179
|
-
self.
|
|
178
|
+
#: (:obj:`str`) struct header format ver < 4
|
|
179
|
+
self.__headerFormat123 = '<IHHIIHHHHHHHHIIIIIIII'
|
|
180
|
+
#: (:obj:`str`) struct header format ver >=4
|
|
181
|
+
self.__headerFormat = '<IHHIIHHHHHHHHIIIIIIQQII'
|
|
180
182
|
#: (:obj:`dict` <:obj:`str`, :obj:`any` > ) header data
|
|
181
183
|
self.__header = {}
|
|
182
184
|
#: (:obj:`dict` <:obj:`int`, :obj:`str` > ) format modes
|
|
@@ -200,7 +202,7 @@ class DATAARRAYdecoder(object):
|
|
|
200
202
|
"""
|
|
201
203
|
self.__data = data
|
|
202
204
|
self.format = data[0]
|
|
203
|
-
self._loadHeader(data[1]
|
|
205
|
+
self._loadHeader(data[1])
|
|
204
206
|
self.__value = None
|
|
205
207
|
|
|
206
208
|
def _loadHeader(self, headerData):
|
|
@@ -209,7 +211,15 @@ class DATAARRAYdecoder(object):
|
|
|
209
211
|
:param headerData: buffer with header data
|
|
210
212
|
:type headerData: :obj:`str`
|
|
211
213
|
"""
|
|
212
|
-
|
|
214
|
+
try:
|
|
215
|
+
hData = headerData[:struct.calcsize(self.__headerFormat)]
|
|
216
|
+
hdr = struct.unpack(self.__headerFormat, hData)
|
|
217
|
+
if hdr[1] < 4:
|
|
218
|
+
hData = headerData[:struct.calcsize(self.__headerFormat123)]
|
|
219
|
+
hdr = struct.unpack(self.__headerFormat123, hData)
|
|
220
|
+
except Exception:
|
|
221
|
+
hData = headerData[:struct.calcsize(self.__headerFormat123)]
|
|
222
|
+
hdr = struct.unpack(self.__headerFormat123, hData)
|
|
213
223
|
self.__header = {}
|
|
214
224
|
self.__header['magic'] = hdr[0]
|
|
215
225
|
self.__header['headerVersion'] = hdr[1]
|
|
@@ -261,7 +271,12 @@ class DATAARRAYdecoder(object):
|
|
|
261
271
|
if not self.__header or not self.__data:
|
|
262
272
|
return
|
|
263
273
|
if self.__value is None:
|
|
264
|
-
|
|
274
|
+
if 'headerVersion' in self.__header and \
|
|
275
|
+
self.__header['headerVersion'] >= 4:
|
|
276
|
+
image = self.__data[1][struct.calcsize(self.__headerFormat):]
|
|
277
|
+
else:
|
|
278
|
+
image = self.__data[1][
|
|
279
|
+
struct.calcsize(self.__headerFormat123):]
|
|
265
280
|
dformat = self.__formatID[self.__header['imageMode']]
|
|
266
281
|
fSize = struct.calcsize(dformat)
|
|
267
282
|
self.__value = numpy.array(
|
nxswriter/Release.py
CHANGED
|
@@ -4,7 +4,7 @@ nxswriter/DataHolder.py,sha256=DL08NyY0FG6snsmW0-nQ7JmWJwDc5-Hy2bC4E3Uz1fk,6164
|
|
|
4
4
|
nxswriter/DataSourceFactory.py,sha256=W0IirDjsu38KKvBxFbkvv-ghvqil2JJStQ3WMxo8Kh4,4687
|
|
5
5
|
nxswriter/DataSourcePool.py,sha256=1bDOrHhYpG_ZFz8ut2IzkNSMeGxrCBcSCneM4h1AgDc,4574
|
|
6
6
|
nxswriter/DataSources.py,sha256=l40n4WTfgRjLpFsJs7JoWjsER_dCVviRI_iolQ2fENM,5303
|
|
7
|
-
nxswriter/DecoderPool.py,sha256
|
|
7
|
+
nxswriter/DecoderPool.py,sha256=-eBLujQhuAV81yaFoWirHNULuGSDp4L0ElyFfK-Yj2c,15779
|
|
8
8
|
nxswriter/EAttribute.py,sha256=hADI-LeuQMZwVoTFM4qevoz173Ma_atrk0edqvsFXS0,8878
|
|
9
9
|
nxswriter/EField.py,sha256=YLbdaykGccZ4cjqheS9te50FG6HQq5kfp7gg_OBkJ9k,28034
|
|
10
10
|
nxswriter/EGroup.py,sha256=Y_PuTERckQXfUXGISbnpzHj7I4y2iFxM5CGByjVD6KA,4900
|
|
@@ -23,16 +23,16 @@ nxswriter/NXSFromXML.py,sha256=932BivWZnf-3tnIkbpSRFwfGV0PTwcT9pYb2FMmVd_4,9077
|
|
|
23
23
|
nxswriter/NXSWriter.py,sha256=raHykC9mpUXU8pPtsqePuz3CI-24qYjIUSoyux2zCgo,31345
|
|
24
24
|
nxswriter/NexusXMLHandler.py,sha256=IrZ2mWLuovdBIHcWTqKmr4HZxpMEWLun8A94O6pavr8,14131
|
|
25
25
|
nxswriter/PyEvalSource.py,sha256=7-7Gc2_3CGd3XMHD3LBPCBOZx4Q6b1guzt1xgrSLxMs,11234
|
|
26
|
-
nxswriter/Release.py,sha256=
|
|
26
|
+
nxswriter/Release.py,sha256=WvhVn3E4Fup8cqvu9a_KgMIxI73SQY45aJeFSxzBRvY,900
|
|
27
27
|
nxswriter/StreamSet.py,sha256=sSvXJxoDufmt9_Xu5rFaQsp_4x9gww_zMv0NTiiyLlg,5799
|
|
28
28
|
nxswriter/TangoDataWriter.py,sha256=yP6B3TVUhpHp8OBHKYQRNNtFer9xARoakNXuro4eVv8,28725
|
|
29
29
|
nxswriter/TangoSource.py,sha256=jiFGUsoX2N5-i2gpBqkHi2KjmTBd46TI22Cjkt_2btw,29410
|
|
30
30
|
nxswriter/ThreadPool.py,sha256=TKvOStVUUyuyHowk0MRaBM4GmRKtl0VPVVPdFHu332M,6039
|
|
31
31
|
nxswriter/Types.py,sha256=haH578_GqBwWWUhPC6x9KQOubhhEOsxHdI63j0_AkdE,7906
|
|
32
32
|
nxswriter/__init__.py,sha256=M0w3HGjZgfdqjMdQNaLcq5jazqQeRekx84YSbQCA8-0,1760
|
|
33
|
-
nxswriter-3.
|
|
34
|
-
nxswriter-3.
|
|
35
|
-
nxswriter-3.
|
|
36
|
-
nxswriter-3.
|
|
37
|
-
nxswriter-3.
|
|
38
|
-
nxswriter-3.
|
|
33
|
+
nxswriter-3.16.0.data/scripts/NXSDataWriter,sha256=wO3opCCjYttfrY7CITNXHvirXv5W6rIQTY7vX5PmioI,905
|
|
34
|
+
nxswriter-3.16.0.data/scripts/nxsfromxml,sha256=qxnJUtV_ueA3lGnne8ltaOF6yF5YtmzeFLIl3NWkAq8,61
|
|
35
|
+
nxswriter-3.16.0.dist-info/METADATA,sha256=3kKO-rih_oHQUtEzNFizUYwDDpJ3iZ1Ec1akWpKonKo,9013
|
|
36
|
+
nxswriter-3.16.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
37
|
+
nxswriter-3.16.0.dist-info/top_level.txt,sha256=29dYcOYN2MVz1NKpwobc4Zl4yjhd4VB62LDSuSy7x0Y,10
|
|
38
|
+
nxswriter-3.16.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|