sardana-nxsrecorder 3.26.1__py3-none-any.whl → 3.28.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.26.1.dist-info → sardana_nxsrecorder-3.28.0.dist-info}/METADATA +1 -1
- sardana_nxsrecorder-3.28.0.dist-info/RECORD +6 -0
- sardananxsrecorder/__init__.py +1 -1
- sardananxsrecorder/nxsrecorder.py +29 -5
- sardana_nxsrecorder-3.26.1.dist-info/RECORD +0 -6
- {sardana_nxsrecorder-3.26.1.dist-info → sardana_nxsrecorder-3.28.0.dist-info}/WHEEL +0 -0
- {sardana_nxsrecorder-3.26.1.dist-info → sardana_nxsrecorder-3.28.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
sardananxsrecorder/__init__.py,sha256=h6HQAAt8xp2J48ltT-jcFK-o0PVLwSqt44LUq8Ma6AU,896
|
|
2
|
+
sardananxsrecorder/nxsrecorder.py,sha256=BvFnu1HpIg2HzKdIUtJCdXVRJT-f5_cA_3uqyLrYInc,59379
|
|
3
|
+
sardana_nxsrecorder-3.28.0.dist-info/METADATA,sha256=mWdquaGZEVncGQKYN_fQOodoX2vrJ2Op-vdTLUJ-pog,8035
|
|
4
|
+
sardana_nxsrecorder-3.28.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
5
|
+
sardana_nxsrecorder-3.28.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
|
|
6
|
+
sardana_nxsrecorder-3.28.0.dist-info/RECORD,,
|
sardananxsrecorder/__init__.py
CHANGED
|
@@ -1316,11 +1316,13 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1316
1316
|
bfilename = bfilename or self.__base_filename
|
|
1317
1317
|
return bfilename
|
|
1318
1318
|
|
|
1319
|
-
def __scanname(self, serial):
|
|
1319
|
+
def __scanname(self, serial, default=None):
|
|
1320
1320
|
""" find scan name
|
|
1321
1321
|
"""
|
|
1322
1322
|
if not self.__raw_filename:
|
|
1323
1323
|
self.__raw_filename = self.__rawfilename(serial)
|
|
1324
|
+
if default:
|
|
1325
|
+
return default
|
|
1324
1326
|
bfilename = self.__raw_filename
|
|
1325
1327
|
_, bfname = os.path.split(bfilename)
|
|
1326
1328
|
if bfname.endswith(".tmp"):
|
|
@@ -1345,6 +1347,14 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1345
1347
|
|
|
1346
1348
|
sid = self.__serial
|
|
1347
1349
|
fdir, fname = os.path.split(self.filename)
|
|
1350
|
+
snmode = self.__getEnvVar("ScanNames", None)
|
|
1351
|
+
appendentry = self.__getConfVar("AppendEntry", False)
|
|
1352
|
+
pdir = None
|
|
1353
|
+
if snmode is not None:
|
|
1354
|
+
if bool(snmode):
|
|
1355
|
+
fdir = os.path.dirname(os.path.abspath(fdir))
|
|
1356
|
+
elif appendentry is False:
|
|
1357
|
+
fdir, pdir = os.path.split(os.path.abspath(fdir))
|
|
1348
1358
|
sname, fext = os.path.splitext(fname)
|
|
1349
1359
|
beamtimeid = self.beamtimeid()
|
|
1350
1360
|
defprefix = "scicat-datasets-"
|
|
@@ -1365,7 +1375,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1365
1375
|
if isinstance(variables, dict) and "entryname" in variables:
|
|
1366
1376
|
entryname = variables["entryname"]
|
|
1367
1377
|
|
|
1368
|
-
scanname = self.__scanname(sid)
|
|
1378
|
+
scanname = self.__scanname(sid, pdir)
|
|
1369
1379
|
# _, bfname = os.path.split(self.__base_filename)
|
|
1370
1380
|
# try:
|
|
1371
1381
|
# scanname, _ = os.path.splitext(bfname % "")
|
|
@@ -1378,13 +1388,15 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1378
1388
|
sid = self.__serial
|
|
1379
1389
|
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1380
1390
|
scanname, entryname, sid, scanname, sid)
|
|
1391
|
+
if pdir:
|
|
1392
|
+
sname = "%s/%s" % (pdir, sname)
|
|
1381
1393
|
if "NOINIT" in self.writerModes:
|
|
1382
1394
|
sname = "%s:%s" % (sname, time.time())
|
|
1383
1395
|
|
|
1384
1396
|
# auto grouping
|
|
1385
1397
|
grouping = bool(self.__getEnvVar('SciCatAutoGrouping', False))
|
|
1386
1398
|
|
|
1387
|
-
if grouping:
|
|
1399
|
+
if grouping or pdir:
|
|
1388
1400
|
commands = []
|
|
1389
1401
|
try:
|
|
1390
1402
|
sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
|
|
@@ -1416,10 +1428,18 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1416
1428
|
|
|
1417
1429
|
sid = self.__serial
|
|
1418
1430
|
fdir, fname = os.path.split(self.filename)
|
|
1431
|
+
pdir = None
|
|
1432
|
+
snmode = self.__getEnvVar("ScanNames", None)
|
|
1433
|
+
appendentry = self.__getConfVar("AppendEntry", False)
|
|
1434
|
+
if snmode is not None:
|
|
1435
|
+
if bool(snmode):
|
|
1436
|
+
fdir = os.path.dirname(os.path.abspath(fdir))
|
|
1437
|
+
elif appendentry is False:
|
|
1438
|
+
fdir, pdir = os.path.split(os.path.abspath(fdir))
|
|
1419
1439
|
sname, fext = os.path.splitext(fname)
|
|
1420
1440
|
# beamtimeid = self.beamtimeid()
|
|
1421
1441
|
|
|
1422
|
-
scanname = self.__scanname(sid)
|
|
1442
|
+
scanname = self.__scanname(sid, pdir)
|
|
1423
1443
|
# _, bfname = os.path.split(self.__base_filename)
|
|
1424
1444
|
# try:
|
|
1425
1445
|
# scanname, _ = os.path.splitext(bfname % "")
|
|
@@ -1454,7 +1474,11 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1454
1474
|
fl = h5writer.open_file(mntfile, readonly=False)
|
|
1455
1475
|
rt = fl.root()
|
|
1456
1476
|
if sname not in rt.names():
|
|
1457
|
-
|
|
1477
|
+
if pdir:
|
|
1478
|
+
h5writer.link("%s/%s:/%s" %
|
|
1479
|
+
(pdir, fname, entryname), rt, sname)
|
|
1480
|
+
else:
|
|
1481
|
+
h5writer.link("%s:/%s" % (fname, entryname), rt, sname)
|
|
1458
1482
|
self.debug("Link '%s' in '%s' created " % (sname, mntname))
|
|
1459
1483
|
rt.close()
|
|
1460
1484
|
fl.close()
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
sardananxsrecorder/__init__.py,sha256=D9XnMblVPsgwwr6BjPz877oQCWyEj1GqmL7nb3JAb70,896
|
|
2
|
-
sardananxsrecorder/nxsrecorder.py,sha256=bS7vevRyLtPgz7zoK2XJid9XCTgdKAeJRZb-QK2Nl5g,58343
|
|
3
|
-
sardana_nxsrecorder-3.26.1.dist-info/METADATA,sha256=Y56-3gdsv1UknXfjr8uyMUPVinvmbEYF_Ev-CqHlzCk,8035
|
|
4
|
-
sardana_nxsrecorder-3.26.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
5
|
-
sardana_nxsrecorder-3.26.1.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
|
|
6
|
-
sardana_nxsrecorder-3.26.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|