sardana-nxsrecorder 3.22.0__tar.gz → 3.24.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.22.0 → sardana-nxsrecorder-3.24.0}/ChangeLog +8 -0
- {sardana-nxsrecorder-3.22.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.24.0}/PKG-INFO +5 -1
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/README.rst +4 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/man/sardananxsrecorder.1 +7 -1
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0/sardana_nxsrecorder.egg-info}/PKG-INFO +5 -1
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardananxsrecorder/__init__.py +1 -1
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardananxsrecorder/nxsrecorder.py +38 -1
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian10_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian10_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian8_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian8_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian9_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/debian9_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/install.sh +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/run.sh +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.flake8 +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.github/workflows/tests.yml +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/.gitignore +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/COPYRIGHT +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/MANIFEST.in +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/doc/Makefile +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/doc/conf.py +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/doc/index.rst +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/doc/make.bat +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/doc/sardananxsrecorder.rst +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/setup.cfg +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/setup.py +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/test/__init__.py +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/test/__main__.py +0 -0
- {sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/test/main.py +0 -0
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
2024-06-06 Jan Kotanski <jankotan@gmail.com>
|
|
2
|
+
* set TangoDataWriter properties from NeXusWriterProperties variable (#121)
|
|
3
|
+
* tagged as 3.24.0
|
|
4
|
+
|
|
5
|
+
2024-06-04 Jan Kotanski <jankotan@gmail.com>
|
|
6
|
+
* skip acquisition for the modes listed in NeXusSkipAcquisitionModes variable (#117)
|
|
7
|
+
* tagged as 3.23.0
|
|
8
|
+
|
|
1
9
|
2024-06-03 Jan Kotanski <jankotan@gmail.com>
|
|
2
10
|
* improve support for ScanFile formating wih _%05d and _{ScanID:05d} (#114)
|
|
3
11
|
* tagged as 3.22.0
|
{sardana-nxsrecorder-3.22.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.24.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.24.0
|
|
4
4
|
Summary: NeXus Sardana Scan Recorder
|
|
5
5
|
Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
|
|
6
6
|
Author: Jan Kotanski
|
|
@@ -234,6 +234,8 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
234
234
|
|
|
235
235
|
* **ActiveMntGrp** *(str)* - active measurement group
|
|
236
236
|
* **ScanID** *(int)* - the last scan identifier number, default: ``-1``
|
|
237
|
+
* **ScanDir** *(str)* - the scan directory
|
|
238
|
+
* **ScanFile** *(list)* - a list of scan files
|
|
237
239
|
* **NeXusSelectorDevice** *(str)* - NXSRecSelector tango device if more installed, otherwise first one found
|
|
238
240
|
|
|
239
241
|
* **NXSAppendSciCatDataset** *(bool)* - append scan name to scicat dataset list file, default: ``False``
|
|
@@ -247,4 +249,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
247
249
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
248
250
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
249
251
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
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)
|
|
250
254
|
|
|
@@ -209,6 +209,8 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
209
209
|
|
|
210
210
|
* **ActiveMntGrp** *(str)* - active measurement group
|
|
211
211
|
* **ScanID** *(int)* - the last scan identifier number, default: ``-1``
|
|
212
|
+
* **ScanDir** *(str)* - the scan directory
|
|
213
|
+
* **ScanFile** *(list)* - a list of scan files
|
|
212
214
|
* **NeXusSelectorDevice** *(str)* - NXSRecSelector tango device if more installed, otherwise first one found
|
|
213
215
|
|
|
214
216
|
* **NXSAppendSciCatDataset** *(bool)* - append scan name to scicat dataset list file, default: ``False``
|
|
@@ -222,4 +224,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
222
224
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
223
225
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
224
226
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
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)
|
|
225
229
|
|
|
@@ -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 04, 2024" "3.23" "Sardana NeXus Recorder"
|
|
31
31
|
.SH NAME
|
|
32
32
|
sardananxsrecorder \- sardananxsrecorder Documentation
|
|
33
33
|
.sp
|
|
@@ -326,6 +326,10 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
326
326
|
.IP \(bu 2
|
|
327
327
|
\fBScanID\fP \fI(int)\fP \- the last scan identifier number, default: \fB\-1\fP
|
|
328
328
|
.IP \(bu 2
|
|
329
|
+
\fBScanDir\fP \fI(str)\fP \- the scan directory
|
|
330
|
+
.IP \(bu 2
|
|
331
|
+
\fBScanFile\fP \fI(list)\fP \- a list of scan files
|
|
332
|
+
.IP \(bu 2
|
|
329
333
|
\fBNeXusSelectorDevice\fP \fI(str)\fP \- NXSRecSelector tango device if more installed, otherwise first one found
|
|
330
334
|
.IP \(bu 2
|
|
331
335
|
\fBNXSAppendSciCatDataset\fP \fI(bool)\fP \- append scan name to scicat dataset list file, default: \fBFalse\fP
|
|
@@ -349,6 +353,8 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
349
353
|
\fBScicatMeasurements\fP \fI(dict)\fP \- a dictionary of measurement names indexed by \fBScanDir\fP and used by \fBscingestor\fP, default: \fB{}\fP
|
|
350
354
|
.IP \(bu 2
|
|
351
355
|
\fBCreateMeasurementFile\fP \fI(bool)\fP \- create a measurement file with its filename releated to \fBScicatMeasurements\fP or \fBScanFile\fP, default: \fBFalse\fP
|
|
356
|
+
.IP \(bu 2
|
|
357
|
+
\fBNeXusSkipAcquisitionModes\fP \fI(list)\fP \- a list of strategy modes for which acquisition is skip
|
|
352
358
|
.UNINDENT
|
|
353
359
|
.sp
|
|
354
360
|
Contents:
|
{sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.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.24.0
|
|
4
4
|
Summary: NeXus Sardana Scan Recorder
|
|
5
5
|
Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
|
|
6
6
|
Author: Jan Kotanski
|
|
@@ -234,6 +234,8 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
234
234
|
|
|
235
235
|
* **ActiveMntGrp** *(str)* - active measurement group
|
|
236
236
|
* **ScanID** *(int)* - the last scan identifier number, default: ``-1``
|
|
237
|
+
* **ScanDir** *(str)* - the scan directory
|
|
238
|
+
* **ScanFile** *(list)* - a list of scan files
|
|
237
239
|
* **NeXusSelectorDevice** *(str)* - NXSRecSelector tango device if more installed, otherwise first one found
|
|
238
240
|
|
|
239
241
|
* **NXSAppendSciCatDataset** *(bool)* - append scan name to scicat dataset list file, default: ``False``
|
|
@@ -247,4 +249,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
247
249
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
248
250
|
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
249
251
|
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
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)
|
|
250
254
|
|
|
@@ -155,6 +155,9 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
155
155
|
#: (:obj:`dict` <:obj:`str` , :obj:`str`>) NeXus configuration
|
|
156
156
|
self.__conf = {}
|
|
157
157
|
|
|
158
|
+
#: (:obj:`list` <:obj:`str`>) skip Acquisition Modes
|
|
159
|
+
self.skipAcquisitionModes = []
|
|
160
|
+
|
|
158
161
|
#: (:obj:`dict` <:obj:`str` , `any`>) User data
|
|
159
162
|
self.__udata = None
|
|
160
163
|
|
|
@@ -540,6 +543,18 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
540
543
|
if self.__nexuswriter_device is None:
|
|
541
544
|
from nxswriter import TangoDataWriter
|
|
542
545
|
self.__nexuswriter_device = TangoDataWriter.TangoDataWriter()
|
|
546
|
+
try:
|
|
547
|
+
properties = dict(
|
|
548
|
+
self.__getEnvVar("NeXusWriterProperties", {}))
|
|
549
|
+
except Exception as e:
|
|
550
|
+
self.warning(
|
|
551
|
+
"Cannot load NeXusWriterProperties %s" % (str(e)))
|
|
552
|
+
self.__macro().warning(
|
|
553
|
+
"Cannot load NeXusWriterProperties %s" % (str(e)))
|
|
554
|
+
properties = {}
|
|
555
|
+
for ky, vl in properties.items():
|
|
556
|
+
if hasattr(self.__nexuswriter_device, ky):
|
|
557
|
+
setattr(self.__nexuswriter_device, ky, vl)
|
|
543
558
|
|
|
544
559
|
def __get_alias(self, name):
|
|
545
560
|
""" provides a device alias
|
|
@@ -1020,6 +1035,10 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1020
1035
|
# self.debug('START_DATA: %s' % str(envRec))
|
|
1021
1036
|
|
|
1022
1037
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1038
|
+
self.skipAcquisitionModes = self.__skipAcquisitionModes()
|
|
1039
|
+
if "INIT" in self.skipAcquisitionModes:
|
|
1040
|
+
self.__nexuswriter_device.skipAcquisition = True
|
|
1041
|
+
|
|
1023
1042
|
self.__command(self.__nexuswriter_device, "openEntry")
|
|
1024
1043
|
except Exception:
|
|
1025
1044
|
self.__removeDynamicComponent()
|
|
@@ -1106,6 +1125,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1106
1125
|
rec = json.dumps(
|
|
1107
1126
|
envrecord, cls=NXS_FileRecorder.numpyEncoder)
|
|
1108
1127
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1128
|
+
if "STEP" in self.skipAcquisitionModes:
|
|
1129
|
+
self.__nexuswriter_device.skipAcquisition = True
|
|
1109
1130
|
|
|
1110
1131
|
# self.debug('DATA: {"data":%s}' % json.dumps(
|
|
1111
1132
|
# record.data,
|
|
@@ -1174,6 +1195,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1174
1195
|
rec = json.dumps(
|
|
1175
1196
|
envrecord, cls=NXS_FileRecorder.numpyEncoder)
|
|
1176
1197
|
self.__nexuswriter_device.jsonrecord = rec
|
|
1198
|
+
if "FINAL" in self.skipAcquisitionModes:
|
|
1199
|
+
self.__nexuswriter_device.skipAcquisition = True
|
|
1177
1200
|
self.__command(self.__nexuswriter_device, "closeEntry")
|
|
1178
1201
|
self.__command(self.__nexuswriter_device, "closeFile")
|
|
1179
1202
|
except Exception:
|
|
@@ -1220,6 +1243,19 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1220
1243
|
beamtimeid = self.beamtime_id(bmtfpath, bmtfprefix, bmtfext)
|
|
1221
1244
|
return beamtimeid or "00000000"
|
|
1222
1245
|
|
|
1246
|
+
def __skipAcquisitionModes(self):
|
|
1247
|
+
""" find skip acquisition modes
|
|
1248
|
+
"""
|
|
1249
|
+
try:
|
|
1250
|
+
skip_acq = self.__macro().getEnv('NeXusSkipAcquisitionModes')
|
|
1251
|
+
except Exception:
|
|
1252
|
+
skip_acq = []
|
|
1253
|
+
if isinstance(skip_acq, str):
|
|
1254
|
+
skip_acq = re.split(r"[-;,.\s]\s*", skip_acq)
|
|
1255
|
+
if skip_acq:
|
|
1256
|
+
self.debug('Skip Acquisition Modes: %s' % str(skip_acq))
|
|
1257
|
+
return skip_acq
|
|
1258
|
+
|
|
1223
1259
|
def __rawfilename(self, serial):
|
|
1224
1260
|
""" find scan name
|
|
1225
1261
|
"""
|
|
@@ -1309,6 +1345,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1309
1345
|
sid = self.__vars["vars"]["scan_id"]
|
|
1310
1346
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1311
1347
|
scanname, entryname, sid, scanname, sid)
|
|
1348
|
+
if "INIT" in self.skipAcquisitionModes:
|
|
1349
|
+
sname = "%s:%s" % (sname, time.time())
|
|
1312
1350
|
|
|
1313
1351
|
# auto grouping
|
|
1314
1352
|
grouping = bool(self.__getEnvVar('SciCatAutoGrouping', False))
|
|
@@ -1370,7 +1408,6 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1370
1408
|
"{ScanID" not in self.__raw_filename:
|
|
1371
1409
|
sname = sname + ("_%05i" % sid)
|
|
1372
1410
|
entryname = entryname + ("_%05i" % sid)
|
|
1373
|
-
|
|
1374
1411
|
mntname = scanname
|
|
1375
1412
|
if fdir in sm.keys() and sm[fdir]:
|
|
1376
1413
|
mntname = sm[fdir]
|
|
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.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.0}/sardana_nxsrecorder.egg-info/requires.txt
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.22.0 → sardana-nxsrecorder-3.24.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
|