sardana-nxsrecorder 3.21.1__tar.gz → 3.22.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.21.1 → sardana-nxsrecorder-3.22.0}/ChangeLog +4 -0
- {sardana-nxsrecorder-3.21.1/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.22.0}/PKG-INFO +1 -1
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/man/sardananxsrecorder.1 +26 -18
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0/sardana_nxsrecorder.egg-info}/PKG-INFO +1 -1
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardananxsrecorder/__init__.py +1 -1
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardananxsrecorder/nxsrecorder.py +104 -32
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian10_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian10_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian8_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian8_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian9_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/debian9_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/install.sh +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/run.sh +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.flake8 +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.github/workflows/tests.yml +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/.gitignore +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/COPYRIGHT +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/MANIFEST.in +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/README.rst +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/doc/Makefile +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/doc/conf.py +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/doc/index.rst +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/doc/make.bat +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/doc/sardananxsrecorder.rst +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/setup.cfg +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/setup.py +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/test/__init__.py +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/test/__main__.py +0 -0
- {sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/test/main.py +0 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
2024-06-03 Jan Kotanski <jankotan@gmail.com>
|
|
2
|
+
* improve support for ScanFile formating wih _%05d and _{ScanID:05d} (#114)
|
|
3
|
+
* tagged as 3.22.0
|
|
4
|
+
|
|
1
5
|
2024-05-23 Jan Kotanski <jankotan@gmail.com>
|
|
2
6
|
* replace deprecated tz.localize() with datetime.replace() (#111)
|
|
3
7
|
* tagged as 3.21.1
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
.\" Man page generated from reStructuredText.
|
|
2
2
|
.
|
|
3
|
-
.TH "SARDANANXSRECORDER" "1" "Nov 09, 2022" "3.12" "Sardana NeXus Recorder"
|
|
4
|
-
.SH NAME
|
|
5
|
-
sardananxsrecorder \- sardananxsrecorder Documentation
|
|
6
3
|
.
|
|
7
4
|
.nr rst2man-indent-level 0
|
|
8
5
|
.
|
|
@@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
30
27
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
31
28
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
32
29
|
..
|
|
30
|
+
.TH "SARDANANXSRECORDER" "1" "Jun 03, 2024" "3.22" "Sardana NeXus Recorder"
|
|
31
|
+
.SH NAME
|
|
32
|
+
sardananxsrecorder \- sardananxsrecorder Documentation
|
|
33
33
|
.sp
|
|
34
34
|
\fI\%\fP
|
|
35
35
|
\fI\%\fP
|
|
@@ -79,7 +79,7 @@ defining the package location, e.g.
|
|
|
79
79
|
.sp
|
|
80
80
|
.SS Debian packages
|
|
81
81
|
.sp
|
|
82
|
-
Debian Bookworm, Bullseye, Buster and Ubuntu Lunar, Jammy
|
|
82
|
+
Debian Bookworm, Bullseye, Buster and Ubuntu Lunar, Jammy and Focal packages can be found in the HDRI repository.
|
|
83
83
|
.sp
|
|
84
84
|
To install the debian packages, add the PGP repository key
|
|
85
85
|
.INDENT 0.0
|
|
@@ -330,17 +330,25 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
330
330
|
.IP \(bu 2
|
|
331
331
|
\fBNXSAppendSciCatDataset\fP \fI(bool)\fP \- append scan name to scicat dataset list file, default: \fBFalse\fP
|
|
332
332
|
.IP \(bu 2
|
|
333
|
-
\fBBeamtimeFilePath\fP \fI(str)\fP \- beamtime file path to search beamtime metadata file, default: \fB
|
|
333
|
+
\fBBeamtimeFilePath\fP \fI(str)\fP \- beamtime file path to search beamtime metadata file, default: \fB\(dq/gpfs/current\(dq\fP
|
|
334
334
|
.IP \(bu 2
|
|
335
|
-
\fBBeamtimeFilePrefix\fP \fI(str)\fP \- beamtime metadata file prefix, default: \fB
|
|
335
|
+
\fBBeamtimeFilePrefix\fP \fI(str)\fP \- beamtime metadata file prefix, default: \fB\(dqbeamtime\-metadata\-\(dq\fP
|
|
336
336
|
.IP \(bu 2
|
|
337
|
-
\fBBeamtimeFileExt\fP \fI(str)\fP \- beamtime metadata file extension, default: \fB
|
|
337
|
+
\fBBeamtimeFileExt\fP \fI(str)\fP \- beamtime metadata file extension, default: \fB\(dq.json\(dq\fP
|
|
338
338
|
.IP \(bu 2
|
|
339
|
-
\fBSciCatDatasetListFilePrefix\fP \fI(str)\fP \- scicat dataset list file prefix, default: \fB
|
|
339
|
+
\fBSciCatDatasetListFilePrefix\fP \fI(str)\fP \- scicat dataset list file prefix, default: \fB\(dqscicat\-datasets\-\(dq\fP
|
|
340
340
|
.IP \(bu 2
|
|
341
|
-
\fBSciCatDatasetListFileExt\fP \fI(str)\fP \- scicat dataset list file extension, default: \fB
|
|
341
|
+
\fBSciCatDatasetListFileExt\fP \fI(str)\fP \- scicat dataset list file extension, default: \fB\(dq.lst\(dq\fP
|
|
342
342
|
.IP \(bu 2
|
|
343
343
|
\fBSciCatDatasetListFileLocal\fP \fI(bool)\fP \- add the hostname to the scicat dataset list file extension, default: \fBFalse\fP
|
|
344
|
+
.IP \(bu 2
|
|
345
|
+
\fBSciCatAutoGrouping\fP \fI(bool)\fP \- group all scans with the measurement name set to the base scan filename, default: \fBFalse\fP
|
|
346
|
+
.IP \(bu 2
|
|
347
|
+
\fBMetadataScript\fP \fI(str)\fP \- a python module file name containing \fBmain()\fP which provides a dictionary with user metadata stored in the INIT mode, default: \fB\(dq\(dq\fP
|
|
348
|
+
.IP \(bu 2
|
|
349
|
+
\fBScicatMeasurements\fP \fI(dict)\fP \- a dictionary of measurement names indexed by \fBScanDir\fP and used by \fBscingestor\fP, default: \fB{}\fP
|
|
350
|
+
.IP \(bu 2
|
|
351
|
+
\fBCreateMeasurementFile\fP \fI(bool)\fP \- create a measurement file with its filename releated to \fBScicatMeasurements\fP or \fBScanFile\fP, default: \fBFalse\fP
|
|
344
352
|
.UNINDENT
|
|
345
353
|
.sp
|
|
346
354
|
Contents:
|
|
@@ -351,8 +359,8 @@ Contents:
|
|
|
351
359
|
This is the macro server scan data NeXus recorder module
|
|
352
360
|
.INDENT 0.0
|
|
353
361
|
.TP
|
|
354
|
-
.B class
|
|
355
|
-
Bases: \
|
|
362
|
+
.B class sardananxsrecorder.nxsrecorder.NXS_FileRecorder(filename=None, macro=None, **pars)
|
|
363
|
+
Bases: \fI\%BaseFileRecorder\fP
|
|
356
364
|
.sp
|
|
357
365
|
This recorder saves data to a NeXus file making use of NexDaTaS Writer
|
|
358
366
|
.sp
|
|
@@ -430,7 +438,7 @@ and records in INIT mode
|
|
|
430
438
|
.UNINDENT
|
|
431
439
|
.INDENT 7.0
|
|
432
440
|
.TP
|
|
433
|
-
.B formats
|
|
441
|
+
.B formats = {\(aqh5\(aq: \(aq.h5\(aq, \(aqndf\(aq: \(aq.ndf\(aq, \(aqnx\(aq: \(aq.nx\(aq, \(aqnxs\(aq: \(aq.nxs\(aq}
|
|
434
442
|
(\fI\%dict\fP <\fI\%str\fP, \fI\%str\fP > ) recoder format
|
|
435
443
|
.UNINDENT
|
|
436
444
|
.INDENT 7.0
|
|
@@ -448,8 +456,8 @@ the output file format
|
|
|
448
456
|
.UNINDENT
|
|
449
457
|
.INDENT 7.0
|
|
450
458
|
.TP
|
|
451
|
-
.B class
|
|
452
|
-
Bases: \
|
|
459
|
+
.B class numpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
|
|
460
|
+
Bases: \fBJSONEncoder\fP
|
|
453
461
|
.sp
|
|
454
462
|
numpy json encoder with list
|
|
455
463
|
.sp
|
|
@@ -465,7 +473,7 @@ ensure_ascii is false, the output can contain non\-ASCII characters.
|
|
|
465
473
|
.sp
|
|
466
474
|
If check_circular is true, then lists, dicts, and custom encoded
|
|
467
475
|
objects will be checked for circular references during encoding to
|
|
468
|
-
prevent an infinite recursion (which would cause an
|
|
476
|
+
prevent an infinite recursion (which would cause an RecursionError).
|
|
469
477
|
Otherwise, no such check takes place.
|
|
470
478
|
.sp
|
|
471
479
|
If allow_nan is true, then NaN, Infinity, and \-Infinity will be
|
|
@@ -507,11 +515,11 @@ default encoder
|
|
|
507
515
|
Sardana Scan Recorders
|
|
508
516
|
.INDENT 0.0
|
|
509
517
|
.IP \(bu 2
|
|
510
|
-
|
|
518
|
+
\fI\%Index\fP
|
|
511
519
|
.IP \(bu 2
|
|
512
|
-
|
|
520
|
+
\fI\%Module Index\fP
|
|
513
521
|
.IP \(bu 2
|
|
514
|
-
|
|
522
|
+
\fI\%Search Page\fP
|
|
515
523
|
.UNINDENT
|
|
516
524
|
.SH AUTHOR
|
|
517
525
|
Author
|
|
@@ -102,6 +102,8 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
102
102
|
BaseFileRecorder.__init__(self)
|
|
103
103
|
#: (:obj:`str`) base filename
|
|
104
104
|
self.__base_filename = filename
|
|
105
|
+
#: (:obj:`str`) raw filename
|
|
106
|
+
self.__raw_filename = ""
|
|
105
107
|
self.__macro = weakref.ref(macro) if macro else None
|
|
106
108
|
#: (:class:`tango.Database`) tango database
|
|
107
109
|
self.__db = tango.Database()
|
|
@@ -164,7 +166,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
164
166
|
appendentry = self.__getConfVar("AppendEntry", True)
|
|
165
167
|
scanID = self.__env["ScanID"] \
|
|
166
168
|
if "ScanID" in self.__env.keys() else -1
|
|
167
|
-
|
|
169
|
+
self.__setFileName(
|
|
168
170
|
self.__base_filename, not appendentry, scanID)
|
|
169
171
|
|
|
170
172
|
def __command(self, server, command, *args):
|
|
@@ -339,10 +341,12 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
339
341
|
|
|
340
342
|
:param filename: sardana scanfile name
|
|
341
343
|
:type filename: :obj:`str`
|
|
342
|
-
:param
|
|
343
|
-
:param
|
|
344
|
+
:param number: True if append scanID
|
|
345
|
+
:param number: :obj:`bool`
|
|
344
346
|
:param scanID: scanID to append
|
|
345
347
|
:type scanID: :obj:`int`
|
|
348
|
+
:returns: True if append scanID
|
|
349
|
+
:rtype: :obj:`bool`
|
|
346
350
|
"""
|
|
347
351
|
if scanID is not None and scanID < 0:
|
|
348
352
|
return number
|
|
@@ -371,20 +375,30 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
371
375
|
|
|
372
376
|
subs = (len([None for _ in list(re.finditer('%', filename))]) == 1)
|
|
373
377
|
# construct the filename, e.g. : /dir/subdir/etcdir/prefix_00123.nxs
|
|
374
|
-
if
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
if scanID is None:
|
|
379
|
+
serial = self.recordlist.getEnvironValue('serialno')
|
|
380
|
+
elif scanID >= 0:
|
|
381
|
+
if isarver >= 304 or isarver == 0:
|
|
382
|
+
serial = scanID
|
|
383
|
+
else:
|
|
384
|
+
serial = scanID + 1
|
|
385
|
+
|
|
382
386
|
if subs:
|
|
383
387
|
try:
|
|
384
388
|
#: output file name
|
|
385
389
|
self.filename = filename % serial
|
|
386
390
|
except Exception:
|
|
387
391
|
subs = False
|
|
392
|
+
if not self.__raw_filename:
|
|
393
|
+
self.__raw_filename = self.__rawfilename(serial)
|
|
394
|
+
self.debug('Raw Filename: %s' % str(self.__raw_filename))
|
|
395
|
+
if not subs and self.__raw_filename and \
|
|
396
|
+
"{ScanID" in self.__raw_filename:
|
|
397
|
+
try:
|
|
398
|
+
self.filename = self.__raw_filename.format(ScanID=serial)
|
|
399
|
+
subs = True
|
|
400
|
+
except Exception:
|
|
401
|
+
pass
|
|
388
402
|
|
|
389
403
|
if not subs:
|
|
390
404
|
if number:
|
|
@@ -958,12 +972,11 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
958
972
|
self.__setNexusDevices()
|
|
959
973
|
|
|
960
974
|
appendentry = self.__getConfVar("AppendEntry", True)
|
|
961
|
-
|
|
962
|
-
appendentry = not self.__setFileName(
|
|
975
|
+
appendscanid = not self.__setFileName(
|
|
963
976
|
self.__base_filename, not appendentry)
|
|
964
977
|
envRec = self.recordlist.getEnviron()
|
|
965
978
|
self.__vars["vars"]["serialno"] = ("_%05i" % envRec["serialno"]) \
|
|
966
|
-
if
|
|
979
|
+
if appendscanid else ""
|
|
967
980
|
self.__vars["vars"]["scan_id"] = envRec["serialno"]
|
|
968
981
|
self.__vars["vars"]["scan_title"] = envRec["title"]
|
|
969
982
|
if self.__macro:
|
|
@@ -1188,15 +1201,15 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1188
1201
|
"""
|
|
1189
1202
|
result = ""
|
|
1190
1203
|
fpath = self.filename
|
|
1191
|
-
|
|
1192
|
-
|
|
1204
|
+
try:
|
|
1205
|
+
if fpath.startswith(bmtfpath):
|
|
1193
1206
|
if os.path.isdir(bmtfpath):
|
|
1194
1207
|
btml = [fl for fl in os.listdir(bmtfpath)
|
|
1195
1208
|
if (fl.startswith(bmtfprefix)
|
|
1196
1209
|
and fl.endswith(bmtfext))]
|
|
1197
1210
|
result = btml[0][len(bmtfprefix):-len(bmtfext)]
|
|
1198
|
-
|
|
1199
|
-
|
|
1211
|
+
except Exception:
|
|
1212
|
+
pass
|
|
1200
1213
|
return result
|
|
1201
1214
|
|
|
1202
1215
|
def beamtimeid(self):
|
|
@@ -1207,11 +1220,62 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1207
1220
|
beamtimeid = self.beamtime_id(bmtfpath, bmtfprefix, bmtfext)
|
|
1208
1221
|
return beamtimeid or "00000000"
|
|
1209
1222
|
|
|
1223
|
+
def __rawfilename(self, serial):
|
|
1224
|
+
""" find scan name
|
|
1225
|
+
"""
|
|
1226
|
+
try:
|
|
1227
|
+
scan_file = self.__macro().getEnv('ScanFile')
|
|
1228
|
+
except Exception:
|
|
1229
|
+
scan_file = []
|
|
1230
|
+
try:
|
|
1231
|
+
scan_dir = self.__macro().getEnv('ScanDir')
|
|
1232
|
+
except Exception:
|
|
1233
|
+
scan_dir = "/"
|
|
1234
|
+
if isinstance(scan_file, str):
|
|
1235
|
+
scan_file = [scan_file]
|
|
1236
|
+
bfilename = ""
|
|
1237
|
+
|
|
1238
|
+
for sfile in scan_file:
|
|
1239
|
+
sfile = os.path.join(scan_dir, sfile)
|
|
1240
|
+
try:
|
|
1241
|
+
ffile = sfile.format(ScanID=serial)
|
|
1242
|
+
except KeyError:
|
|
1243
|
+
ffile = sfile
|
|
1244
|
+
if ffile == self.__base_filename:
|
|
1245
|
+
bfilename = sfile
|
|
1246
|
+
break
|
|
1247
|
+
bfilename = bfilename or self.__base_filename
|
|
1248
|
+
return bfilename
|
|
1249
|
+
|
|
1250
|
+
def __scanname(self, serial):
|
|
1251
|
+
""" find scan name
|
|
1252
|
+
"""
|
|
1253
|
+
if not self.__raw_filename:
|
|
1254
|
+
self.__raw_filename = self.__rawfilename(serial)
|
|
1255
|
+
bfilename = self.__raw_filename
|
|
1256
|
+
_, bfname = os.path.split(bfilename)
|
|
1257
|
+
if bfname.endswith(".tmp"):
|
|
1258
|
+
bfname = bfname[:-4]
|
|
1259
|
+
sname, fext = os.path.splitext(bfname)
|
|
1260
|
+
scanname = os.path.commonprefix(
|
|
1261
|
+
[sname.format(ScanID=11111111),
|
|
1262
|
+
sname.format(ScanID=99999999)])
|
|
1263
|
+
if '%' in scanname:
|
|
1264
|
+
try:
|
|
1265
|
+
scanname = os.path.commonprefix(
|
|
1266
|
+
[scanname % 11111111,
|
|
1267
|
+
scanname % 99999999])
|
|
1268
|
+
except Exception:
|
|
1269
|
+
pass
|
|
1270
|
+
if scanname.endswith("_"):
|
|
1271
|
+
scanname = scanname[:-1]
|
|
1272
|
+
return scanname
|
|
1273
|
+
|
|
1210
1274
|
def __appendSciCatDataset(self, hostname=None):
|
|
1211
1275
|
""" append dataset to SciCat ingestion list """
|
|
1212
1276
|
|
|
1277
|
+
sid = self.__vars["vars"]["scan_id"]
|
|
1213
1278
|
fdir, fname = os.path.split(self.filename)
|
|
1214
|
-
_, bfname = os.path.split(self.__base_filename)
|
|
1215
1279
|
sname, fext = os.path.splitext(fname)
|
|
1216
1280
|
beamtimeid = self.beamtimeid()
|
|
1217
1281
|
defprefix = "scicat-datasets-"
|
|
@@ -1231,12 +1295,17 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1231
1295
|
variables = self.__getConfVar("ConfigVariables", None, True)
|
|
1232
1296
|
if isinstance(variables, dict) and "entryname" in variables:
|
|
1233
1297
|
entryname = variables["entryname"]
|
|
1234
|
-
try:
|
|
1235
|
-
scanname, _ = os.path.splitext(bfname % "")
|
|
1236
|
-
except Exception:
|
|
1237
|
-
scanname, _ = os.path.splitext(bfname)
|
|
1238
1298
|
|
|
1239
|
-
|
|
1299
|
+
scanname = self.__scanname(sid)
|
|
1300
|
+
# _, bfname = os.path.split(self.__base_filename)
|
|
1301
|
+
# try:
|
|
1302
|
+
# scanname, _ = os.path.splitext(bfname % "")
|
|
1303
|
+
# except Exception:
|
|
1304
|
+
# scanname, _ = os.path.splitext(bfname)
|
|
1305
|
+
|
|
1306
|
+
if appendentry is True and \
|
|
1307
|
+
'%' not in self.__raw_filename and \
|
|
1308
|
+
"{ScanID" not in self.__raw_filename:
|
|
1240
1309
|
sid = self.__vars["vars"]["scan_id"]
|
|
1241
1310
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1242
1311
|
scanname, entryname, sid, scanname, sid)
|
|
@@ -1274,15 +1343,17 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1274
1343
|
def __createMeasurementFile(self):
|
|
1275
1344
|
""" create measurement file """
|
|
1276
1345
|
|
|
1346
|
+
sid = self.__vars["vars"]["scan_id"]
|
|
1277
1347
|
fdir, fname = os.path.split(self.filename)
|
|
1278
|
-
_, bfname = os.path.split(self.__base_filename)
|
|
1279
1348
|
sname, fext = os.path.splitext(fname)
|
|
1280
1349
|
# beamtimeid = self.beamtimeid()
|
|
1281
1350
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1351
|
+
scanname = self.__scanname(sid)
|
|
1352
|
+
# _, bfname = os.path.split(self.__base_filename)
|
|
1353
|
+
# try:
|
|
1354
|
+
# scanname, _ = os.path.splitext(bfname % "")
|
|
1355
|
+
# except Exception:
|
|
1356
|
+
# scanname, _ = os.path.splitext(bfname)
|
|
1286
1357
|
|
|
1287
1358
|
try:
|
|
1288
1359
|
sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
|
|
@@ -1295,9 +1366,10 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1295
1366
|
if isinstance(variables, dict) and "entryname" in variables:
|
|
1296
1367
|
entryname = variables["entryname"]
|
|
1297
1368
|
if appendentry is True:
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1369
|
+
if '%' not in self.__raw_filename and \
|
|
1370
|
+
"{ScanID" not in self.__raw_filename:
|
|
1371
|
+
sname = sname + ("_%05i" % sid)
|
|
1372
|
+
entryname = entryname + ("_%05i" % sid)
|
|
1301
1373
|
|
|
1302
1374
|
mntname = scanname
|
|
1303
1375
|
if fdir in sm.keys() and 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
|
|
File without changes
|
{sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.0}/sardana_nxsrecorder.egg-info/requires.txt
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.21.1 → sardana-nxsrecorder-3.22.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
|