sardana-nxsrecorder 3.23.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.23.0 → sardana-nxsrecorder-3.25.0}/ChangeLog +8 -0
- {sardana-nxsrecorder-3.23.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.25.0}/PKG-INFO +3 -1
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/README.rst +2 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/man/sardananxsrecorder.1 +5 -1
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0/sardana_nxsrecorder.egg-info}/PKG-INFO +3 -1
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardananxsrecorder/__init__.py +1 -1
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardananxsrecorder/nxsrecorder.py +49 -18
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian10_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian10_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian8_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian8_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian9_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/debian9_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/install.sh +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/run.sh +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.flake8 +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.github/workflows/tests.yml +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/.gitignore +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/COPYRIGHT +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/MANIFEST.in +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/doc/Makefile +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/doc/conf.py +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/doc/index.rst +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/doc/make.bat +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/doc/sardananxsrecorder.rst +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/setup.cfg +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/setup.py +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/test/__init__.py +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/test/__main__.py +0 -0
- {sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/test/main.py +0 -0
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
2024-06-07 Jan Kotanski <jankotan@gmail.com>
|
|
2
|
+
* set NeXusMeshScanID variable (#124)
|
|
3
|
+
* tagged as 3.25.0
|
|
4
|
+
|
|
5
|
+
2024-06-06 Jan Kotanski <jankotan@gmail.com>
|
|
6
|
+
* set TangoDataWriter properties from NeXusWriterProperties variable (#121)
|
|
7
|
+
* tagged as 3.24.0
|
|
8
|
+
|
|
1
9
|
2024-06-04 Jan Kotanski <jankotan@gmail.com>
|
|
2
10
|
* skip acquisition for the modes listed in NeXusSkipAcquisitionModes variable (#117)
|
|
3
11
|
* tagged as 3.23.0
|
{sardana-nxsrecorder-3.23.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
|
|
@@ -250,4 +250,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
250
250
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
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
|
+
* **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
|
|
253
255
|
|
|
@@ -225,4 +225,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
225
225
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
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
|
+
* **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
|
|
228
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.23.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
|
|
@@ -250,4 +250,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
250
250
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
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
|
+
* **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
|
|
253
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
|
|
|
@@ -543,6 +562,18 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
543
562
|
if self.__nexuswriter_device is None:
|
|
544
563
|
from nxswriter import TangoDataWriter
|
|
545
564
|
self.__nexuswriter_device = TangoDataWriter.TangoDataWriter()
|
|
565
|
+
try:
|
|
566
|
+
properties = dict(
|
|
567
|
+
self.__getEnvVar("NeXusWriterProperties", {}))
|
|
568
|
+
except Exception as e:
|
|
569
|
+
self.warning(
|
|
570
|
+
"Cannot load NeXusWriterProperties %s" % (str(e)))
|
|
571
|
+
self.__macro().warning(
|
|
572
|
+
"Cannot load NeXusWriterProperties %s" % (str(e)))
|
|
573
|
+
properties = {}
|
|
574
|
+
for ky, vl in properties.items():
|
|
575
|
+
if hasattr(self.__nexuswriter_device, ky):
|
|
576
|
+
setattr(self.__nexuswriter_device, ky, vl)
|
|
546
577
|
|
|
547
578
|
def __get_alias(self, name):
|
|
548
579
|
""" provides a device alias
|
|
@@ -978,7 +1009,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
978
1009
|
appendscanid = not self.__setFileName(
|
|
979
1010
|
self.__base_filename, not appendentry)
|
|
980
1011
|
envRec = self.recordlist.getEnviron()
|
|
981
|
-
self.__vars["vars"]["serialno"] = ("_%05i" %
|
|
1012
|
+
self.__vars["vars"]["serialno"] = ("_%05i" % self.__serial) \
|
|
982
1013
|
if appendscanid else ""
|
|
983
1014
|
self.__vars["vars"]["scan_id"] = envRec["serialno"]
|
|
984
1015
|
self.__vars["vars"]["scan_title"] = envRec["title"]
|
|
@@ -1002,7 +1033,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1002
1033
|
# self.debug('XML: %s' % str(cnfxml))
|
|
1003
1034
|
self.__removeDynamicComponent()
|
|
1004
1035
|
|
|
1005
|
-
self.__vars["data"]["serialno"] =
|
|
1036
|
+
self.__vars["data"]["serialno"] = self.__serial
|
|
1006
1037
|
self.__vars["data"]["scan_title"] = envRec["title"]
|
|
1007
1038
|
if self.__macro:
|
|
1008
1039
|
if hasattr(self.__macro(), "integ_time"):
|
|
@@ -1298,7 +1329,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1298
1329
|
def __appendSciCatDataset(self, hostname=None):
|
|
1299
1330
|
""" append dataset to SciCat ingestion list """
|
|
1300
1331
|
|
|
1301
|
-
sid = self.
|
|
1332
|
+
sid = self.__serial
|
|
1302
1333
|
fdir, fname = os.path.split(self.filename)
|
|
1303
1334
|
sname, fext = os.path.splitext(fname)
|
|
1304
1335
|
beamtimeid = self.beamtimeid()
|
|
@@ -1330,7 +1361,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1330
1361
|
if appendentry is True and \
|
|
1331
1362
|
'%' not in self.__raw_filename and \
|
|
1332
1363
|
"{ScanID" not in self.__raw_filename:
|
|
1333
|
-
sid = self.
|
|
1364
|
+
sid = self.__serial
|
|
1334
1365
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1335
1366
|
scanname, entryname, sid, scanname, sid)
|
|
1336
1367
|
if "INIT" in self.skipAcquisitionModes:
|
|
@@ -1369,7 +1400,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1369
1400
|
def __createMeasurementFile(self):
|
|
1370
1401
|
""" create measurement file """
|
|
1371
1402
|
|
|
1372
|
-
sid = self.
|
|
1403
|
+
sid = self.__serial
|
|
1373
1404
|
fdir, fname = os.path.split(self.filename)
|
|
1374
1405
|
sname, fext = os.path.splitext(fname)
|
|
1375
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.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.23.0 → sardana-nxsrecorder-3.25.0}/sardana_nxsrecorder.egg-info/requires.txt
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.23.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
|