sardana-nxsrecorder 3.24.0__tar.gz → 3.25.0__tar.gz
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.24.0 → sardana-nxsrecorder-3.25.0}/ChangeLog +4 -0
- {sardana-nxsrecorder-3.24.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.25.0}/PKG-INFO +2 -1
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/README.rst +1 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/man/sardananxsrecorder.1 +5 -1
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0/sardana_nxsrecorder.egg-info}/PKG-INFO +2 -1
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardananxsrecorder/__init__.py +1 -1
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardananxsrecorder/nxsrecorder.py +37 -18
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian10_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian10_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian8_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian8_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian9_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/debian9_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/install.sh +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/run.sh +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.flake8 +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.github/workflows/tests.yml +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/.gitignore +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/COPYRIGHT +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/MANIFEST.in +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/doc/Makefile +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/doc/conf.py +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/doc/index.rst +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/doc/make.bat +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/doc/sardananxsrecorder.rst +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/setup.cfg +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/setup.py +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/test/__init__.py +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/test/__main__.py +0 -0
- {sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/test/main.py +0 -0
{sardana-nxsrecorder-3.24.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.25.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sardana-nxsrecorder
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.25.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,4 +251,5 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
251
251
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
252
252
|
* **NeXusSkipAcquisitionModes** *(list)* - a list of strategy modes for which acquisition is skip
|
|
253
253
|
* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
|
|
254
|
+
* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans
|
|
254
255
|
|
|
@@ -226,4 +226,5 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
226
226
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
227
227
|
* **NeXusSkipAcquisitionModes** *(list)* - a list of strategy modes for which acquisition is skip
|
|
228
228
|
* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
|
|
229
|
+
* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans
|
|
229
230
|
|
|
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
27
27
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
28
28
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
29
29
|
..
|
|
30
|
-
.TH "SARDANANXSRECORDER" "1" "Jun
|
|
30
|
+
.TH "SARDANANXSRECORDER" "1" "Jun 06, 2024" "3.25" "Sardana NeXus Recorder"
|
|
31
31
|
.SH NAME
|
|
32
32
|
sardananxsrecorder \- sardananxsrecorder Documentation
|
|
33
33
|
.sp
|
|
@@ -355,6 +355,10 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
355
355
|
\fBCreateMeasurementFile\fP \fI(bool)\fP \- create a measurement file with its filename releated to \fBScicatMeasurements\fP or \fBScanFile\fP, default: \fBFalse\fP
|
|
356
356
|
.IP \(bu 2
|
|
357
357
|
\fBNeXusSkipAcquisitionModes\fP \fI(list)\fP \- a list of strategy modes for which acquisition is skip
|
|
358
|
+
.IP \(bu 2
|
|
359
|
+
\fBNeXusWriterProperties\fP \fI(dict)\fP \- a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
|
|
360
|
+
.IP \(bu 2
|
|
361
|
+
\fBNeXusMeshScanID\fP \fI(int)\fP \- ScanID used for composed scans e.g. mesh scan combined from many linear scans
|
|
358
362
|
.UNINDENT
|
|
359
363
|
.sp
|
|
360
364
|
Contents:
|
{sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0/sardana_nxsrecorder.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sardana-nxsrecorder
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.25.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,4 +251,5 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
251
251
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
252
252
|
* **NeXusSkipAcquisitionModes** *(list)* - a list of strategy modes for which acquisition is skip
|
|
253
253
|
* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
|
|
254
|
+
* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans
|
|
254
255
|
|
|
@@ -152,11 +152,14 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
152
152
|
#: (:obj:`str`) module lable
|
|
153
153
|
self.__moduleLabel = 'module'
|
|
154
154
|
|
|
155
|
+
#: (:obj:`int`) serialno
|
|
156
|
+
self.__serial = 0
|
|
157
|
+
|
|
155
158
|
#: (:obj:`dict` <:obj:`str` , :obj:`str`>) NeXus configuration
|
|
156
159
|
self.__conf = {}
|
|
157
160
|
|
|
158
161
|
#: (:obj:`list` <:obj:`str`>) skip Acquisition Modes
|
|
159
|
-
self.skipAcquisitionModes =
|
|
162
|
+
self.skipAcquisitionModes = self.__skipAcquisitionModes()
|
|
160
163
|
|
|
161
164
|
#: (:obj:`dict` <:obj:`str` , `any`>) User data
|
|
162
165
|
self.__udata = None
|
|
@@ -172,6 +175,25 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
172
175
|
self.__setFileName(
|
|
173
176
|
self.__base_filename, not appendentry, scanID)
|
|
174
177
|
|
|
178
|
+
def _serial(self, scanID):
|
|
179
|
+
serial = None
|
|
180
|
+
if "INIT" in self.skipAcquisitionModes:
|
|
181
|
+
if self.__macro:
|
|
182
|
+
serial = self.__macro().getEnv('NeXusMeshScanID', None)
|
|
183
|
+
if serial is None:
|
|
184
|
+
if scanID is None:
|
|
185
|
+
serial = self.recordlist.getEnvironValue('serialno')
|
|
186
|
+
elif scanID >= 0:
|
|
187
|
+
if isarver >= 304 or isarver == 0:
|
|
188
|
+
serial = scanID
|
|
189
|
+
else:
|
|
190
|
+
serial = scanID + 1
|
|
191
|
+
if self.skipAcquisitionModes and \
|
|
192
|
+
"INIT" not in self.skipAcquisitionModes:
|
|
193
|
+
if self.__macro:
|
|
194
|
+
self.__macro().setEnv('NeXusMeshScanID', serial)
|
|
195
|
+
return serial
|
|
196
|
+
|
|
175
197
|
def __command(self, server, command, *args):
|
|
176
198
|
""" execute tango server (or python object) command
|
|
177
199
|
|
|
@@ -378,27 +400,22 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
378
400
|
|
|
379
401
|
subs = (len([None for _ in list(re.finditer('%', filename))]) == 1)
|
|
380
402
|
# construct the filename, e.g. : /dir/subdir/etcdir/prefix_00123.nxs
|
|
381
|
-
|
|
382
|
-
serial = self.recordlist.getEnvironValue('serialno')
|
|
383
|
-
elif scanID >= 0:
|
|
384
|
-
if isarver >= 304 or isarver == 0:
|
|
385
|
-
serial = scanID
|
|
386
|
-
else:
|
|
387
|
-
serial = scanID + 1
|
|
403
|
+
self.__serial = self._serial(scanID)
|
|
388
404
|
|
|
389
405
|
if subs:
|
|
390
406
|
try:
|
|
391
407
|
#: output file name
|
|
392
|
-
self.filename = filename %
|
|
408
|
+
self.filename = filename % self.__serial
|
|
393
409
|
except Exception:
|
|
394
410
|
subs = False
|
|
395
411
|
if not self.__raw_filename:
|
|
396
|
-
self.__raw_filename = self.__rawfilename(
|
|
412
|
+
self.__raw_filename = self.__rawfilename(self.__serial)
|
|
397
413
|
self.debug('Raw Filename: %s' % str(self.__raw_filename))
|
|
398
414
|
if not subs and self.__raw_filename and \
|
|
399
415
|
"{ScanID" in self.__raw_filename:
|
|
400
416
|
try:
|
|
401
|
-
self.filename = self.__raw_filename.format(
|
|
417
|
+
self.filename = self.__raw_filename.format(
|
|
418
|
+
ScanID=self.__serial)
|
|
402
419
|
subs = True
|
|
403
420
|
except Exception:
|
|
404
421
|
pass
|
|
@@ -409,10 +426,12 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
409
426
|
filename[-4].rpartition(".")[0] and \
|
|
410
427
|
filename[-4].rpartition(".")[2] in self.formats.keys():
|
|
411
428
|
tpl = filename[-4].rpartition(".")
|
|
412
|
-
self.filename = "%s_%05d.%s.tmp" % (
|
|
429
|
+
self.filename = "%s_%05d.%s.tmp" % (
|
|
430
|
+
tpl[0], self.__serial, tpl[2])
|
|
413
431
|
else:
|
|
414
432
|
tpl = filename.rpartition('.')
|
|
415
|
-
self.filename = "%s_%05d.%s" % (
|
|
433
|
+
self.filename = "%s_%05d.%s" % (
|
|
434
|
+
tpl[0], self.__serial, tpl[2])
|
|
416
435
|
else:
|
|
417
436
|
self.filename = filename
|
|
418
437
|
|
|
@@ -990,7 +1009,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
990
1009
|
appendscanid = not self.__setFileName(
|
|
991
1010
|
self.__base_filename, not appendentry)
|
|
992
1011
|
envRec = self.recordlist.getEnviron()
|
|
993
|
-
self.__vars["vars"]["serialno"] = ("_%05i" %
|
|
1012
|
+
self.__vars["vars"]["serialno"] = ("_%05i" % self.__serial) \
|
|
994
1013
|
if appendscanid else ""
|
|
995
1014
|
self.__vars["vars"]["scan_id"] = envRec["serialno"]
|
|
996
1015
|
self.__vars["vars"]["scan_title"] = envRec["title"]
|
|
@@ -1014,7 +1033,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1014
1033
|
# self.debug('XML: %s' % str(cnfxml))
|
|
1015
1034
|
self.__removeDynamicComponent()
|
|
1016
1035
|
|
|
1017
|
-
self.__vars["data"]["serialno"] =
|
|
1036
|
+
self.__vars["data"]["serialno"] = self.__serial
|
|
1018
1037
|
self.__vars["data"]["scan_title"] = envRec["title"]
|
|
1019
1038
|
if self.__macro:
|
|
1020
1039
|
if hasattr(self.__macro(), "integ_time"):
|
|
@@ -1310,7 +1329,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1310
1329
|
def __appendSciCatDataset(self, hostname=None):
|
|
1311
1330
|
""" append dataset to SciCat ingestion list """
|
|
1312
1331
|
|
|
1313
|
-
sid = self.
|
|
1332
|
+
sid = self.__serial
|
|
1314
1333
|
fdir, fname = os.path.split(self.filename)
|
|
1315
1334
|
sname, fext = os.path.splitext(fname)
|
|
1316
1335
|
beamtimeid = self.beamtimeid()
|
|
@@ -1342,7 +1361,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1342
1361
|
if appendentry is True and \
|
|
1343
1362
|
'%' not in self.__raw_filename and \
|
|
1344
1363
|
"{ScanID" not in self.__raw_filename:
|
|
1345
|
-
sid = self.
|
|
1364
|
+
sid = self.__serial
|
|
1346
1365
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1347
1366
|
scanname, entryname, sid, scanname, sid)
|
|
1348
1367
|
if "INIT" in self.skipAcquisitionModes:
|
|
@@ -1381,7 +1400,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1381
1400
|
def __createMeasurementFile(self):
|
|
1382
1401
|
""" create measurement file """
|
|
1383
1402
|
|
|
1384
|
-
sid = self.
|
|
1403
|
+
sid = self.__serial
|
|
1385
1404
|
fdir, fname = os.path.split(self.filename)
|
|
1386
1405
|
sname, fext = os.path.splitext(fname)
|
|
1387
1406
|
# beamtimeid = self.beamtimeid()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/requires.txt
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.24.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|