sardana-nxsrecorder 3.25.0__py3-none-any.whl → 3.26.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.
- {sardana_nxsrecorder-3.25.0.dist-info → sardana_nxsrecorder-3.26.0.dist-info}/METADATA +2 -2
- sardana_nxsrecorder-3.26.0.dist-info/RECORD +6 -0
- sardananxsrecorder/__init__.py +1 -1
- sardananxsrecorder/nxsrecorder.py +24 -19
- sardana_nxsrecorder-3.25.0.dist-info/RECORD +0 -6
- {sardana_nxsrecorder-3.25.0.dist-info → sardana_nxsrecorder-3.26.0.dist-info}/WHEEL +0 -0
- {sardana_nxsrecorder-3.25.0.dist-info → sardana_nxsrecorder-3.26.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sardana-nxsrecorder
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.26.0
|
|
4
4
|
Summary: NeXus Sardana Scan Recorder
|
|
5
5
|
Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
|
|
6
6
|
Author: Jan Kotanski
|
|
@@ -251,7 +251,7 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
251
251
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
252
252
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
253
253
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
254
|
-
* **NeXusSkipAcquisitionModes** *(list)* - a list of strategy modes for which acquisition is skip
|
|
255
254
|
* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
|
|
256
255
|
* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans
|
|
256
|
+
* **NeXusWriterModes** *(list)* - a list of strategy modes e.g. ``NOINIT``, ``NOSTEP``, ``NOFINAL``, ``MESH``, ``VDS`` separated by commas
|
|
257
257
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
sardananxsrecorder/__init__.py,sha256=GktUxiQNBhdbje4E9WlYbikp7LfZxiGHRK8eBCiEf1U,896
|
|
2
|
+
sardananxsrecorder/nxsrecorder.py,sha256=n8QAbHwDbcJzHgFzR2wDhL9sdEBMqhj33T6BdKXyNvs,57947
|
|
3
|
+
sardana_nxsrecorder-3.26.0.dist-info/METADATA,sha256=1JlJrVuAujdNy7IUw-tKBo3OKAYpcPH5YnDwNExBuYA,8035
|
|
4
|
+
sardana_nxsrecorder-3.26.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
5
|
+
sardana_nxsrecorder-3.26.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
|
|
6
|
+
sardana_nxsrecorder-3.26.0.dist-info/RECORD,,
|
sardananxsrecorder/__init__.py
CHANGED
|
@@ -158,8 +158,9 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
158
158
|
#: (:obj:`dict` <:obj:`str` , :obj:`str`>) NeXus configuration
|
|
159
159
|
self.__conf = {}
|
|
160
160
|
|
|
161
|
-
#: (:obj:`list` <:obj:`str`>)
|
|
162
|
-
self.
|
|
161
|
+
#: (:obj:`list` <:obj:`str`>) acquisition Modes
|
|
162
|
+
self.writerModes = self.__variableList(
|
|
163
|
+
"NeXusWriterModes")
|
|
163
164
|
|
|
164
165
|
#: (:obj:`dict` <:obj:`str` , `any`>) User data
|
|
165
166
|
self.__udata = None
|
|
@@ -177,7 +178,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
177
178
|
|
|
178
179
|
def _serial(self, scanID):
|
|
179
180
|
serial = None
|
|
180
|
-
if "
|
|
181
|
+
if "NOINIT" in self.writerModes and \
|
|
182
|
+
"MESH" in self.writerModes:
|
|
181
183
|
if self.__macro:
|
|
182
184
|
serial = self.__macro().getEnv('NeXusMeshScanID', None)
|
|
183
185
|
if serial is None:
|
|
@@ -188,8 +190,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
188
190
|
serial = scanID
|
|
189
191
|
else:
|
|
190
192
|
serial = scanID + 1
|
|
191
|
-
if self.
|
|
192
|
-
"
|
|
193
|
+
if "MESH" in self.writerModes and \
|
|
194
|
+
"NOINIT" not in self.writerModes:
|
|
193
195
|
if self.__macro:
|
|
194
196
|
self.__macro().setEnv('NeXusMeshScanID', serial)
|
|
195
197
|
return serial
|
|
@@ -1012,6 +1014,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1012
1014
|
self.__vars["vars"]["serialno"] = ("_%05i" % self.__serial) \
|
|
1013
1015
|
if appendscanid else ""
|
|
1014
1016
|
self.__vars["vars"]["scan_id"] = envRec["serialno"]
|
|
1017
|
+
self.__vars["vars"]["acq_modes"] = \
|
|
1018
|
+
",".join(self.writerModes or [])
|
|
1015
1019
|
self.__vars["vars"]["scan_title"] = envRec["title"]
|
|
1016
1020
|
if self.__macro:
|
|
1017
1021
|
if hasattr(self.__macro(), "integ_time"):
|
|
@@ -1054,8 +1058,9 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1054
1058
|
# self.debug('START_DATA: %s' % str(envRec))
|
|
1055
1059
|
|
|
1056
1060
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1057
|
-
self.
|
|
1058
|
-
|
|
1061
|
+
self.writerModes = self.__variableList(
|
|
1062
|
+
"NeXusWriterModes")
|
|
1063
|
+
if "NOINIT" in self.writerModes:
|
|
1059
1064
|
self.__nexuswriter_device.skipAcquisition = True
|
|
1060
1065
|
|
|
1061
1066
|
self.__command(self.__nexuswriter_device, "openEntry")
|
|
@@ -1144,7 +1149,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1144
1149
|
rec = json.dumps(
|
|
1145
1150
|
envrecord, cls=NXS_FileRecorder.numpyEncoder)
|
|
1146
1151
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1147
|
-
if "
|
|
1152
|
+
if "NOSTEP" in self.writerModes:
|
|
1148
1153
|
self.__nexuswriter_device.skipAcquisition = True
|
|
1149
1154
|
|
|
1150
1155
|
# self.debug('DATA: {"data":%s}' % json.dumps(
|
|
@@ -1214,7 +1219,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1214
1219
|
rec = json.dumps(
|
|
1215
1220
|
envrecord, cls=NXS_FileRecorder.numpyEncoder)
|
|
1216
1221
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1217
|
-
if "
|
|
1222
|
+
if "NOFINAL" in self.writerModes:
|
|
1218
1223
|
self.__nexuswriter_device.skipAcquisition = True
|
|
1219
1224
|
self.__command(self.__nexuswriter_device, "closeEntry")
|
|
1220
1225
|
self.__command(self.__nexuswriter_device, "closeFile")
|
|
@@ -1262,18 +1267,18 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1262
1267
|
beamtimeid = self.beamtime_id(bmtfpath, bmtfprefix, bmtfext)
|
|
1263
1268
|
return beamtimeid or "00000000"
|
|
1264
1269
|
|
|
1265
|
-
def
|
|
1266
|
-
"""
|
|
1270
|
+
def __variableList(self, variable='NeXusWriterModes'):
|
|
1271
|
+
""" read variable list
|
|
1267
1272
|
"""
|
|
1268
1273
|
try:
|
|
1269
|
-
|
|
1274
|
+
msvar = self.__macro().getEnv(variable)
|
|
1270
1275
|
except Exception:
|
|
1271
|
-
|
|
1272
|
-
if isinstance(
|
|
1273
|
-
|
|
1274
|
-
if
|
|
1275
|
-
self.debug('
|
|
1276
|
-
return
|
|
1276
|
+
msvar = []
|
|
1277
|
+
if isinstance(msvar, str):
|
|
1278
|
+
msvar = re.split(r"[-;,.\s]\s*", msvar)
|
|
1279
|
+
if msvar:
|
|
1280
|
+
self.debug('%s: %s' % (variable, str(msvar)))
|
|
1281
|
+
return msvar
|
|
1277
1282
|
|
|
1278
1283
|
def __rawfilename(self, serial):
|
|
1279
1284
|
""" find scan name
|
|
@@ -1364,7 +1369,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1364
1369
|
sid = self.__serial
|
|
1365
1370
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1366
1371
|
scanname, entryname, sid, scanname, sid)
|
|
1367
|
-
if "
|
|
1372
|
+
if "NOINIT" in self.writerModes:
|
|
1368
1373
|
sname = "%s:%s" % (sname, time.time())
|
|
1369
1374
|
|
|
1370
1375
|
# auto grouping
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
sardananxsrecorder/__init__.py,sha256=67kuI-TJbdi73SVAYYXMypOs3c_Ha1M4xCgUJ9fORYU,896
|
|
2
|
-
sardananxsrecorder/nxsrecorder.py,sha256=8JX1iQdtAytFaeFQ9YsUKWdWOJdEIoCM_QR-kmTxpts,57858
|
|
3
|
-
sardana_nxsrecorder-3.25.0.dist-info/METADATA,sha256=N2EG57BsCdnNnHQgBqMBMpph-ZUI0nTXwkujqrhr05M,7993
|
|
4
|
-
sardana_nxsrecorder-3.25.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
5
|
-
sardana_nxsrecorder-3.25.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
|
|
6
|
-
sardana_nxsrecorder-3.25.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|