sardana-nxsrecorder 3.19.0__tar.gz → 3.21.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.19.0 → sardana-nxsrecorder-3.21.0}/ChangeLog +9 -0
- {sardana-nxsrecorder-3.19.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.21.0}/PKG-INFO +5 -2
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/README.rst +3 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0/sardana_nxsrecorder.egg-info}/PKG-INFO +5 -2
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardananxsrecorder/__init__.py +1 -1
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardananxsrecorder/nxsrecorder.py +62 -3
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/setup.py +2 -2
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian10_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian10_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian8_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian8_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian9_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/debian9_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/install.sh +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/run.sh +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.flake8 +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.github/workflows/tests.yml +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/.gitignore +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/COPYRIGHT +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/MANIFEST.in +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/doc/Makefile +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/doc/conf.py +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/doc/index.rst +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/doc/make.bat +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/doc/sardananxsrecorder.rst +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/man/sardananxsrecorder.1 +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/setup.cfg +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/test/__init__.py +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/test/__main__.py +0 -0
- {sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/test/main.py +0 -0
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
2024-05-22 Jan Kotanski <jankotan@gmail.com>
|
|
2
|
+
* improve support for creating measurement files in appendentry mode (#108)
|
|
3
|
+
* change entryname in the appendentry mode to '%s_%05i' (#108)
|
|
4
|
+
* tagged as 3.21.0
|
|
5
|
+
|
|
6
|
+
2024-05-22 Jan Kotanski <jankotan@gmail.com>
|
|
7
|
+
* add support for creating measurement files (#105)
|
|
8
|
+
* tagged as 3.20.0
|
|
9
|
+
|
|
1
10
|
2024-05-13 Jan Kotanski <jankotan@gmail.com>
|
|
2
11
|
* send count_time beamtime_id and npoints to writer (#103)
|
|
3
12
|
* tagged as 3.19.0
|
{sardana-nxsrecorder-3.19.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.21.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.21.0
|
|
4
4
|
Summary: NeXus Sardana Scan Recorder
|
|
5
5
|
Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
|
|
6
6
|
Author: Jan Kotanski
|
|
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
12
12
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
13
13
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
14
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
15
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.4
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.5
|
|
@@ -22,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
25
|
|
|
26
26
|
Welcome to sardananxsrecorder's documentation!
|
|
27
27
|
==============================================
|
|
@@ -245,3 +245,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
245
245
|
* **SciCatDatasetListFileLocal** *(bool)* - add the hostname to the scicat dataset list file extension, default: ``False``
|
|
246
246
|
* **SciCatAutoGrouping** *(bool)* - group all scans with the measurement name set to the base scan filename, default: ``False``
|
|
247
247
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
248
|
+
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
249
|
+
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
250
|
+
|
|
@@ -220,3 +220,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
220
220
|
* **SciCatDatasetListFileLocal** *(bool)* - add the hostname to the scicat dataset list file extension, default: ``False``
|
|
221
221
|
* **SciCatAutoGrouping** *(bool)* - group all scans with the measurement name set to the base scan filename, default: ``False``
|
|
222
222
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
223
|
+
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
224
|
+
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
225
|
+
|
{sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.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.21.0
|
|
4
4
|
Summary: NeXus Sardana Scan Recorder
|
|
5
5
|
Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
|
|
6
6
|
Author: Jan Kotanski
|
|
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
12
12
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
13
13
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
14
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
15
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.4
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.5
|
|
@@ -22,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
25
|
|
|
26
26
|
Welcome to sardananxsrecorder's documentation!
|
|
27
27
|
==============================================
|
|
@@ -245,3 +245,6 @@ The NeXus file recorder uses the following sardana environment variables
|
|
|
245
245
|
* **SciCatDatasetListFileLocal** *(bool)* - add the hostname to the scicat dataset list file extension, default: ``False``
|
|
246
246
|
* **SciCatAutoGrouping** *(bool)* - group all scans with the measurement name set to the base scan filename, default: ``False``
|
|
247
247
|
* **MetadataScript** *(str)* - a python module file name containing ``main()`` which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
|
|
248
|
+
* **ScicatMeasurements** *(dict)* - a dictionary of measurement names indexed by ``ScanDir`` and used by ``scingestor``, default: ``{}``
|
|
249
|
+
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
|
|
250
|
+
|
|
@@ -35,6 +35,15 @@ try:
|
|
|
35
35
|
except Exception:
|
|
36
36
|
import PyTango as tango
|
|
37
37
|
|
|
38
|
+
try:
|
|
39
|
+
NXSWRITER = True
|
|
40
|
+
try:
|
|
41
|
+
from nxstools import h5cppwriter as h5writer
|
|
42
|
+
except Exception:
|
|
43
|
+
from nxstools import h5pywriter as h5writer
|
|
44
|
+
except Exception:
|
|
45
|
+
NXSWRITER = False
|
|
46
|
+
|
|
38
47
|
|
|
39
48
|
from sardana.macroserver.scan.recorder.storage import BaseFileRecorder
|
|
40
49
|
|
|
@@ -952,7 +961,7 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
952
961
|
appendentry = not self.__setFileName(
|
|
953
962
|
self.__base_filename, not appendentry)
|
|
954
963
|
envRec = self.recordlist.getEnviron()
|
|
955
|
-
self.__vars["vars"]["serialno"] = envRec["serialno"] \
|
|
964
|
+
self.__vars["vars"]["serialno"] = ("_%05i" % envRec["serialno"]) \
|
|
956
965
|
if appendentry else ""
|
|
957
966
|
self.__vars["vars"]["scan_id"] = envRec["serialno"]
|
|
958
967
|
self.__vars["vars"]["scan_title"] = envRec["title"]
|
|
@@ -1157,6 +1166,9 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1157
1166
|
vl = self.__getEnvVar("NXSAppendSciCatDataset", None)
|
|
1158
1167
|
if vl:
|
|
1159
1168
|
self.__appendSciCatDataset(vl)
|
|
1169
|
+
cmf = self.__getEnvVar("CreateMeasurementFile", False)
|
|
1170
|
+
if cmf and NXSWRITER:
|
|
1171
|
+
self.__createMeasurementFile()
|
|
1160
1172
|
|
|
1161
1173
|
def beamtime_id(self, bmtfpath, bmtfprefix, bmtfext):
|
|
1162
1174
|
""" code for beamtimeid datasource
|
|
@@ -1221,12 +1233,13 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1221
1233
|
scanname, _ = os.path.splitext(bfname)
|
|
1222
1234
|
|
|
1223
1235
|
if appendentry is True:
|
|
1224
|
-
sid = self.
|
|
1225
|
-
sname = "%s::/%
|
|
1236
|
+
sid = self.__vars["vars"]["scan_id"]
|
|
1237
|
+
sname = "%s::/%s_%05i;%s_%05i" % (
|
|
1226
1238
|
scanname, entryname, sid, scanname, sid)
|
|
1227
1239
|
|
|
1228
1240
|
# auto grouping
|
|
1229
1241
|
grouping = bool(self.__getEnvVar('SciCatAutoGrouping', False))
|
|
1242
|
+
|
|
1230
1243
|
if grouping:
|
|
1231
1244
|
commands = []
|
|
1232
1245
|
try:
|
|
@@ -1254,6 +1267,52 @@ class NXS_FileRecorder(BaseFileRecorder):
|
|
|
1254
1267
|
with open(dslfile, "a+") as fl:
|
|
1255
1268
|
fl.write("\n%s" % sname)
|
|
1256
1269
|
|
|
1270
|
+
def __createMeasurementFile(self):
|
|
1271
|
+
""" create measurement file """
|
|
1272
|
+
|
|
1273
|
+
fdir, fname = os.path.split(self.filename)
|
|
1274
|
+
_, bfname = os.path.split(self.__base_filename)
|
|
1275
|
+
sname, fext = os.path.splitext(fname)
|
|
1276
|
+
# beamtimeid = self.beamtimeid()
|
|
1277
|
+
|
|
1278
|
+
try:
|
|
1279
|
+
scanname, _ = os.path.splitext(bfname % "")
|
|
1280
|
+
except Exception:
|
|
1281
|
+
scanname, _ = os.path.splitext(bfname)
|
|
1282
|
+
|
|
1283
|
+
try:
|
|
1284
|
+
sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
|
|
1285
|
+
except Exception:
|
|
1286
|
+
sm = {}
|
|
1287
|
+
|
|
1288
|
+
entryname = "scan"
|
|
1289
|
+
appendentry = self.__getConfVar("AppendEntry", False)
|
|
1290
|
+
variables = self.__getConfVar("ConfigVariables", None, True)
|
|
1291
|
+
if isinstance(variables, dict) and "entryname" in variables:
|
|
1292
|
+
entryname = variables["entryname"]
|
|
1293
|
+
if appendentry is True:
|
|
1294
|
+
sid = self.__vars["vars"]["scan_id"]
|
|
1295
|
+
entryname = entryname + ("_%05i" % sid)
|
|
1296
|
+
sname = sname + ("_%05i" % sid)
|
|
1297
|
+
|
|
1298
|
+
mntname = scanname
|
|
1299
|
+
if fdir in sm.keys() and sm[fdir]:
|
|
1300
|
+
mntname = sm[fdir]
|
|
1301
|
+
if not appendentry or mntname != scanname:
|
|
1302
|
+
mntfile = os.path.join(fdir, mntname + fext)
|
|
1303
|
+
|
|
1304
|
+
if not os.path.exists(mntfile):
|
|
1305
|
+
fl = h5writer.create_file(mntfile)
|
|
1306
|
+
self.info("Measurement file '%s' created " % mntname)
|
|
1307
|
+
else:
|
|
1308
|
+
fl = h5writer.open_file(mntfile, readonly=False)
|
|
1309
|
+
rt = fl.root()
|
|
1310
|
+
if sname not in rt.names():
|
|
1311
|
+
h5writer.link("%s:/%s" % (fname, entryname), rt, sname)
|
|
1312
|
+
self.debug("Link '%s' in '%s' created " % (sname, mntname))
|
|
1313
|
+
rt.close()
|
|
1314
|
+
fl.close()
|
|
1315
|
+
|
|
1257
1316
|
def _addCustomData(self, value, name, group="data", remove=False,
|
|
1258
1317
|
**kwargs):
|
|
1259
1318
|
""" adds custom data to configuration variables, i.e. from macros
|
|
@@ -50,7 +50,7 @@ install_requires = [
|
|
|
50
50
|
'numpy>1.6.0',
|
|
51
51
|
# 'pytango',
|
|
52
52
|
# 'nxswriter',
|
|
53
|
-
# 'nxstools',
|
|
53
|
+
# 'nxstools', # >4.1.0
|
|
54
54
|
# 'nxsconfigserver',
|
|
55
55
|
# 'sardana',
|
|
56
56
|
# 'taurus',
|
|
@@ -80,7 +80,6 @@ SETUPDATA = dict(
|
|
|
80
80
|
'Topic :: Scientific/Engineering :: Physics',
|
|
81
81
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
82
82
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
83
|
-
'Programming Language :: Python :: 2.7',
|
|
84
83
|
'Programming Language :: Python :: 3',
|
|
85
84
|
'Programming Language :: Python :: 3.4',
|
|
86
85
|
'Programming Language :: Python :: 3.5',
|
|
@@ -90,6 +89,7 @@ SETUPDATA = dict(
|
|
|
90
89
|
'Programming Language :: Python :: 3.9',
|
|
91
90
|
'Programming Language :: Python :: 3.10',
|
|
92
91
|
'Programming Language :: Python :: 3.11',
|
|
92
|
+
'Programming Language :: Python :: 3.12',
|
|
93
93
|
],
|
|
94
94
|
install_requires=install_requires,
|
|
95
95
|
zip_safe=False,
|
|
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.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/requires.txt
RENAMED
|
File without changes
|
{sardana-nxsrecorder-3.19.0 → sardana-nxsrecorder-3.21.0}/sardana_nxsrecorder.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|