pynxtools-spm 0.2.2__tar.gz → 0.2.4__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.
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/PKG-INFO +33 -7
- pynxtools_spm-0.2.4/README.md +40 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/pyproject.toml +2 -2
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/__init__.py +1 -1
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/nanonis/nanonis_sxm_generic_afm.json +3 -3
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/nanonis/nanonis_sxm_generic_stm.json +2 -2
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/omicron/omicron_sm4_stm.json +1 -1
- pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/README.md +3 -0
- pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/__init__.py +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/app → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/apps}/__init__.py +2 -2
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nomad/entrypoints.py +3 -3
- pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads/__init__.py +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/afm/AFMExampleWithCustomization/afm.scheme.archive.yaml +4 -4
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/afm/AFMExampleWithCustomization/config.json +3 -3
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/stm/STMExampleWithCustomization/config.json +2 -2
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/stm/STMExampleWithCustomization/stm.scheme.archive.yaml +3 -3
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/sts/STSExampleWithCustomization/sts.scheme.archive.yaml +3 -3
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nomad/nomad_example_paths.py +7 -7
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nxformatters/nanonis → pynxtools_spm-0.2.4/src/pynxtools_spm/nxformatters}/__init__.py +0 -1
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/base_formatter.py +43 -42
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/helpers.py +23 -22
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nxformatters/omicron → pynxtools_spm-0.2.4/src/pynxtools_spm/nxformatters/nanonis}/__init__.py +0 -1
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/nanonis/nanonis_base.py +14 -14
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/nanonis/nanonis_dat_sts.py +6 -5
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/nanonis/nanonis_sxm_afm.py +5 -5
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/nanonis/nanonis_sxm_stm.py +10 -9
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nxformatters → pynxtools_spm-0.2.4/src/pynxtools_spm/nxformatters/omicron}/__init__.py +0 -1
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/omicron/omicron_sm4_stm.py +10 -9
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/__init__.py +15 -14
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/helpers.py +16 -16
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonis_dat.py +22 -22
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonis_sxm.py +9 -11
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonispy/read.py +10 -14
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonispy/utils.py +3 -3
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/reader.py +27 -27
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm.egg-info/SOURCES.txt +19 -16
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm.egg-info/entry_points.txt +1 -1
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm.egg-info/requires.txt +1 -1
- pynxtools_spm-0.2.2/README.md +0 -14
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/LICENSE +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/mkdocs.yml +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/setup.cfg +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/__init__.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/nanonis/nanonis_dat_generic_sts.json +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/afm/AFMExampleWithCustomization/A151216.123306-02602.sxm +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/afm/AFMExampleWithCustomization/AFMExample.archive.json +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/afm/AFMExampleWithCustomization/README.md +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/stm/STMExampleWithCustomization/Au_mica_2023_Y_A_diPAMY_195.sxm +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/stm/STMExampleWithCustomization/README.md +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/stm/STMExampleWithCustomization/STMExample.archive.json +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/sts/STSExampleWithCustomization/Bias-Spectroscopy00015_20230420.dat +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/sts/STSExampleWithCustomization/README.md +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/sts/STSExampleWithCustomization/STSExample.archive.json +0 -0
- {pynxtools_spm-0.2.2/src/pynxtools_spm/nomad/examples → pynxtools_spm-0.2.4/src/pynxtools_spm/nomad/example_uploads}/sts/STSExampleWithCustomization/config.json +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/omicron/omicron_base.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/base_parser.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonispy/README.md +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonispy/__init__.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/nanonispy/constants.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/parsers/omicron_sm4.py +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm.egg-info/dependency_links.txt +0 -0
- {pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pynxtools-spm
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: pynxtools-spm: A pynxtools plugin for SPM (Scanning Probe Microscopy) data readers
|
|
5
5
|
Author: The NOMAD Authors
|
|
6
6
|
License:
|
|
@@ -217,7 +217,7 @@ Classifier: Operating System :: OS Independent
|
|
|
217
217
|
Requires-Python: >=3.10
|
|
218
218
|
Description-Content-Type: text/markdown
|
|
219
219
|
License-File: LICENSE
|
|
220
|
-
Requires-Dist: pynxtools>=0.
|
|
220
|
+
Requires-Dist: pynxtools>=0.13.0
|
|
221
221
|
Requires-Dist: findiff>=0.11.1
|
|
222
222
|
Requires-Dist: matplotlib
|
|
223
223
|
Requires-Dist: scipy
|
|
@@ -239,16 +239,42 @@ Requires-Dist: mkdocs-simple-hooks; extra == "docs"
|
|
|
239
239
|
Dynamic: license-file
|
|
240
240
|
|
|
241
241
|
[](https://github.com/astral-sh/ruff)
|
|
242
|
-
[](https://zenodo.org/badge/latestdoi/890885270)
|
|
243
242
|

|
|
244
243
|

|
|
245
244
|

|
|
246
245
|

|
|
247
246
|

|
|
248
247
|

|
|
249
|
-

|
|
249
|
+
[](https://doi.org/10.5281/zenodo.17390485)
|
|
250
250
|
|
|
251
|
-
|
|
252
|
-
See full documentation at [https://fairmat-nfdi.github.io/pynxtools-spm/](https://fairmat-nfdi.github.io/pynxtools-spm/).
|
|
251
|
+
# `pynxtools-spm`: A `pynxtools` reader for SPM data
|
|
253
252
|
|
|
254
|
-
|
|
253
|
+
.
|
|
254
|
+
|
|
255
|
+
This `pynxtools` plugin was generated with [`cookiecutter`](https://github.com/cookiecutter/cookiecutter) using the [`pynxtools-plugin-template`](https://github.com/FAIRmat-NFDI/`pynxtools-plugin-template) template.
|
|
256
|
+
|
|
257
|
+
## Installation
|
|
258
|
+
|
|
259
|
+
It is recommended to use python 3.12 with a dedicated virtual environment for this package.
|
|
260
|
+
Learn how to manage [python versions](https://github.com/pyenv/pyenv) and
|
|
261
|
+
[virtual environments](https://realpython.com/python-virtual-environments-a-primer/).
|
|
262
|
+
|
|
263
|
+
This package is a reader plugin for [`pynxtools`](https://github.com/FAIRmat-NFDI/pynxtools) and can be installed together with `pynxtools`:
|
|
264
|
+
|
|
265
|
+
```shell
|
|
266
|
+
uv pip install pynxtools[spm]
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
for the latest released version.
|
|
270
|
+
|
|
271
|
+
## Docs
|
|
272
|
+
|
|
273
|
+
More information about this pynxtools plugin is available in the [documentation](https://fairmat-nfdi.github.io/pynxtools-spm/). You will find information about getting started, how-to guides, the supported file formats, how to get involved, and much more there.
|
|
274
|
+
|
|
275
|
+
## Contact person in FAIRmat for this reader
|
|
276
|
+
|
|
277
|
+
Rubel Mozumder
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
**Note**: This repository is an upgraded and renamed version of [pynxtools-stm](https://github.com/FAIRmat-NFDI/pynxtools-stm), which is now archived. In addition to the integration of new readers (e.g., `AFM`), all functionalities of `pynxtools-stm` remain available in this repository.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[](https://github.com/astral-sh/ruff)
|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://doi.org/10.5281/zenodo.17390485)
|
|
10
|
+
|
|
11
|
+
# `pynxtools-spm`: A `pynxtools` reader for SPM data
|
|
12
|
+
|
|
13
|
+
.
|
|
14
|
+
|
|
15
|
+
This `pynxtools` plugin was generated with [`cookiecutter`](https://github.com/cookiecutter/cookiecutter) using the [`pynxtools-plugin-template`](https://github.com/FAIRmat-NFDI/`pynxtools-plugin-template) template.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
It is recommended to use python 3.12 with a dedicated virtual environment for this package.
|
|
20
|
+
Learn how to manage [python versions](https://github.com/pyenv/pyenv) and
|
|
21
|
+
[virtual environments](https://realpython.com/python-virtual-environments-a-primer/).
|
|
22
|
+
|
|
23
|
+
This package is a reader plugin for [`pynxtools`](https://github.com/FAIRmat-NFDI/pynxtools) and can be installed together with `pynxtools`:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
uv pip install pynxtools[spm]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
for the latest released version.
|
|
30
|
+
|
|
31
|
+
## Docs
|
|
32
|
+
|
|
33
|
+
More information about this pynxtools plugin is available in the [documentation](https://fairmat-nfdi.github.io/pynxtools-spm/). You will find information about getting started, how-to guides, the supported file formats, how to get involved, and much more there.
|
|
34
|
+
|
|
35
|
+
## Contact person in FAIRmat for this reader
|
|
36
|
+
|
|
37
|
+
Rubel Mozumder
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
**Note**: This repository is an upgraded and renamed version of [pynxtools-stm](https://github.com/FAIRmat-NFDI/pynxtools-stm), which is now archived. In addition to the integration of new readers (e.g., `AFM`), all functionalities of `pynxtools-stm` remain available in this repository.
|
|
@@ -21,7 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Operating System :: OS Independent",
|
|
22
22
|
]
|
|
23
23
|
dependencies = [
|
|
24
|
-
"pynxtools>=0.
|
|
24
|
+
"pynxtools>=0.13.0",
|
|
25
25
|
"findiff>=0.11.1",
|
|
26
26
|
# "pySPM==0.6.2", # SPM file reader for Bruker files use it when you have Bruker files
|
|
27
27
|
"matplotlib",
|
|
@@ -59,7 +59,7 @@ spm = "pynxtools_spm.reader:SPMReader"
|
|
|
59
59
|
sts_example = "pynxtools_spm.nomad.entrypoints:sts_example"
|
|
60
60
|
stm_example = "pynxtools_spm.nomad.entrypoints:stm_example"
|
|
61
61
|
afm_example = "pynxtools_spm.nomad.entrypoints:afm_example"
|
|
62
|
-
spm_app = "pynxtools_spm.
|
|
62
|
+
spm_app = "pynxtools_spm.nomad.apps:spm_app"
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
[tool.setuptools.packages.find]
|
|
@@ -52,5 +52,5 @@ def load_default_config(config_type):
|
|
|
52
52
|
elif config_type == "omicron_sm4_stm":
|
|
53
53
|
config_file = omicron_sm4_stm
|
|
54
54
|
if config_file is not None:
|
|
55
|
-
with open(config_file,
|
|
55
|
+
with open(config_file, encoding="utf-8") as f:
|
|
56
56
|
return json.load(f)
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
"DATA[scan_data]": [
|
|
366
366
|
{
|
|
367
367
|
"data": {
|
|
368
|
-
"name": "
|
|
368
|
+
"name": "input_4",
|
|
369
369
|
"raw_path": "/Input_4/forward",
|
|
370
370
|
"@units": "/DATA/INFO/Input_4/Unit"
|
|
371
371
|
},
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
"data": {
|
|
379
|
-
"name": "
|
|
379
|
+
"name": "input_4",
|
|
380
380
|
"raw_path": "/Input_4/backward",
|
|
381
381
|
"@units": "/DATA/INFO/Input_4/Unit"
|
|
382
382
|
},
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
"@units": "/DATA/INFO/Z/Unit"
|
|
526
526
|
},
|
|
527
527
|
"title": {
|
|
528
|
-
"raw_path": "@default:Height Plot of AFM Experiment (
|
|
528
|
+
"raw_path": "@default:Height Plot of AFM Experiment (Forward Direction)"
|
|
529
529
|
},
|
|
530
530
|
"grp_name": "z_forward"
|
|
531
531
|
},
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"@units": "@default:m"
|
|
579
579
|
},
|
|
580
580
|
"title": {
|
|
581
|
-
"raw_path": "@default:Height Plot of STM Experiment (
|
|
581
|
+
"raw_path": "@default:Height Plot of STM Experiment (Forward Direction)"
|
|
582
582
|
},
|
|
583
583
|
"grp_name": "z_forward"
|
|
584
584
|
},
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
"@units": "@default:A"
|
|
601
601
|
},
|
|
602
602
|
"title": {
|
|
603
|
-
"raw_path": "@default:Current Plot of STM Experiment (
|
|
603
|
+
"raw_path": "@default:Current Plot of STM Experiment (Forward Direction)"
|
|
604
604
|
},
|
|
605
605
|
"grp_name": "current_forward"
|
|
606
606
|
},
|
{pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/configs/omicron/omicron_sm4_stm.json
RENAMED
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
"@units": "/Topography_Forward/RHK_Y/@unit"
|
|
525
525
|
},
|
|
526
526
|
"title": {
|
|
527
|
-
"raw_path": "@default:Topography Plot of STM Experiment (
|
|
527
|
+
"raw_path": "@default:Topography Plot of STM Experiment (Forward Direction)"
|
|
528
528
|
},
|
|
529
529
|
"grp_name": "z_forward"
|
|
530
530
|
},
|
|
File without changes
|
|
@@ -99,9 +99,9 @@ map_concept_to_full_quantities = {
|
|
|
99
99
|
"Reference Phase (Oscillator)": f"data.ENTRY.INSTRUMENT.SPM_CANTILEVER.cantilever_oscillator.reference_phase__field#{schema}#float",
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
spm_app = AppEntryPoint(
|
|
102
|
+
spm_app: AppEntryPoint = AppEntryPoint(
|
|
103
103
|
name="SpmApp",
|
|
104
|
-
description="A Generic NOMAD App for SPM
|
|
104
|
+
description="A Generic NOMAD App for SPM Experiment Technique.",
|
|
105
105
|
app=App(
|
|
106
106
|
# Label of the App
|
|
107
107
|
label="SPM",
|
|
@@ -25,7 +25,7 @@ sts_example = ExampleUploadEntryPoint(
|
|
|
25
25
|
category="NeXus Experiment Examples",
|
|
26
26
|
description="""This example presents the capabilities of the NOMAD platform to store standardized Scanning Tunneling Spectroscopy (sts) data.""",
|
|
27
27
|
plugin_package="pynxtools_spm",
|
|
28
|
-
resources=["nomad/
|
|
28
|
+
resources=["nomad/example_uploads/sts/STSExampleWithCustomization/*"],
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -34,7 +34,7 @@ stm_example = ExampleUploadEntryPoint(
|
|
|
34
34
|
category="NeXus Experiment Examples",
|
|
35
35
|
description="""This example presents the capabilities of the NOMAD platform to store standardized Scanning Tunneling Microscopy (stm) data""",
|
|
36
36
|
plugin_package="pynxtools_spm",
|
|
37
|
-
resources=["nomad/
|
|
37
|
+
resources=["nomad/example_uploads/stm/STMExampleWithCustomization/*"],
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
|
|
@@ -43,5 +43,5 @@ afm_example = ExampleUploadEntryPoint(
|
|
|
43
43
|
category="NeXus Experiment Examples",
|
|
44
44
|
description="""This example presents the capabilities of the NOMAD platform to store standardized Atomic Force Microscopy (afm) data""",
|
|
45
45
|
plugin_package="pynxtools_spm",
|
|
46
|
-
resources=["nomad/
|
|
46
|
+
resources=["nomad/example_uploads/afm/AFMExampleWithCustomization/*"],
|
|
47
47
|
)
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ definitions:
|
|
|
5
5
|
sections:
|
|
6
6
|
ELN_for_AFM:
|
|
7
7
|
base_sections:
|
|
8
|
-
- pynxtools.nomad.dataconverter.NexusDataConverter
|
|
8
|
+
- pynxtools.nomad.schema_packages.dataconverter.NexusDataConverter
|
|
9
9
|
- nomad.datamodel.data.EntryData
|
|
10
10
|
m_annotations:
|
|
11
11
|
template:
|
|
@@ -155,7 +155,7 @@ definitions:
|
|
|
155
155
|
eln:
|
|
156
156
|
component: StringEditQuantity
|
|
157
157
|
description: |
|
|
158
|
-
If model has a
|
|
158
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
159
159
|
software:
|
|
160
160
|
section:
|
|
161
161
|
m_annotations:
|
|
@@ -183,14 +183,14 @@ definitions:
|
|
|
183
183
|
component: StringEditQuantity
|
|
184
184
|
description: |
|
|
185
185
|
Version or model of the component named by the manufacturer (e.g. Generic 4).
|
|
186
|
-
Note that this should be
|
|
186
|
+
Note that this should be exactly the same as in experiment file.
|
|
187
187
|
model_version:
|
|
188
188
|
type: str
|
|
189
189
|
m_annotations:
|
|
190
190
|
eln:
|
|
191
191
|
component: StringEditQuantity
|
|
192
192
|
description: |
|
|
193
|
-
If model has a
|
|
193
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
194
194
|
height_piezo_sensor:
|
|
195
195
|
section:
|
|
196
196
|
m_annotations:
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
"DATA[scan_data]": [
|
|
369
369
|
{
|
|
370
370
|
"data": {
|
|
371
|
-
"name": "
|
|
371
|
+
"name": "input_4",
|
|
372
372
|
"raw_path": "/Input_4/forward",
|
|
373
373
|
"@units": "/DATA/INFO/Input_4/Unit"
|
|
374
374
|
},
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"data": {
|
|
382
|
-
"name": "
|
|
382
|
+
"name": "input_4",
|
|
383
383
|
"raw_path": "/Input_4/backward",
|
|
384
384
|
"@units": "/DATA/INFO/Input_4/Unit"
|
|
385
385
|
},
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
"@units": "/DATA/INFO/Z/Unit"
|
|
529
529
|
},
|
|
530
530
|
"title": {
|
|
531
|
-
"raw_path": "@default:Height Plot of AFM Experiment (
|
|
531
|
+
"raw_path": "@default:Height Plot of AFM Experiment (Forward Direction)"
|
|
532
532
|
},
|
|
533
533
|
"grp_name": "z_forward"
|
|
534
534
|
},
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"@units": "@default:m"
|
|
579
579
|
},
|
|
580
580
|
"title": {
|
|
581
|
-
"raw_path": "@default:Height Plot of STM Experiment (
|
|
581
|
+
"raw_path": "@default:Height Plot of STM Experiment (Forward Direction)"
|
|
582
582
|
},
|
|
583
583
|
"grp_name": "z_forward"
|
|
584
584
|
},
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
"@units": "@default:A"
|
|
601
601
|
},
|
|
602
602
|
"title": {
|
|
603
|
-
"raw_path": "@default:Current Plot of STM Experiment (
|
|
603
|
+
"raw_path": "@default:Current Plot of STM Experiment (Forward Direction)"
|
|
604
604
|
},
|
|
605
605
|
"grp_name": "current_forward"
|
|
606
606
|
},
|
|
@@ -5,7 +5,7 @@ definitions:
|
|
|
5
5
|
sections:
|
|
6
6
|
ELN_for_STM:
|
|
7
7
|
base_sections:
|
|
8
|
-
- pynxtools.nomad.dataconverter.NexusDataConverter
|
|
8
|
+
- pynxtools.nomad.schema_packages.dataconverter.NexusDataConverter
|
|
9
9
|
- nomad.datamodel.data.EntryData
|
|
10
10
|
m_annotations:
|
|
11
11
|
template:
|
|
@@ -151,7 +151,7 @@ definitions:
|
|
|
151
151
|
eln:
|
|
152
152
|
component: StringEditQuantity
|
|
153
153
|
description: |
|
|
154
|
-
If model has a
|
|
154
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
155
155
|
software:
|
|
156
156
|
section:
|
|
157
157
|
m_annotations:
|
|
@@ -187,7 +187,7 @@ definitions:
|
|
|
187
187
|
eln:
|
|
188
188
|
component: StringEditQuantity
|
|
189
189
|
description: |
|
|
190
|
-
If model has a
|
|
190
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
191
191
|
height_piezo_sensor:
|
|
192
192
|
section:
|
|
193
193
|
m_annotations:
|
|
@@ -5,7 +5,7 @@ definitions:
|
|
|
5
5
|
sections:
|
|
6
6
|
ELN_for_STS:
|
|
7
7
|
base_sections:
|
|
8
|
-
- pynxtools.nomad.dataconverter.NexusDataConverter
|
|
8
|
+
- pynxtools.nomad.schema_packages.dataconverter.NexusDataConverter
|
|
9
9
|
- nomad.datamodel.data.EntryData
|
|
10
10
|
m_annotations:
|
|
11
11
|
template:
|
|
@@ -139,7 +139,7 @@ definitions:
|
|
|
139
139
|
eln:
|
|
140
140
|
component: StringEditQuantity
|
|
141
141
|
description: |
|
|
142
|
-
If model has a
|
|
142
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
143
143
|
software:
|
|
144
144
|
section:
|
|
145
145
|
m_annotations:
|
|
@@ -175,7 +175,7 @@ definitions:
|
|
|
175
175
|
eln:
|
|
176
176
|
component: StringEditQuantity
|
|
177
177
|
description: |
|
|
178
|
-
If model has a
|
|
178
|
+
If model has a distinguishable version (e.g. BP5e).
|
|
179
179
|
lockin_amplifier:
|
|
180
180
|
section:
|
|
181
181
|
m_annotations:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
List of path for nomad
|
|
3
|
+
List of path for nomad examples to run test in nomad.
|
|
4
4
|
"""
|
|
5
5
|
# -*- coding: utf-8 -*-
|
|
6
6
|
#
|
|
@@ -25,22 +25,22 @@ import os
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
STS_DEFAULT_CONF_EXAMPLE_PATH = os.path.join(
|
|
28
|
-
os.path.dirname(__file__), "
|
|
28
|
+
os.path.dirname(__file__), "example_uploads", "sts", "STSDefaultExample"
|
|
29
29
|
)
|
|
30
30
|
STS_CUSTOMIZED_EXAMPLE_PATH = os.path.join(
|
|
31
|
-
os.path.dirname(__file__), "
|
|
31
|
+
os.path.dirname(__file__), "example_uploads", "sts", "STSExampleWithCustomization"
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
STM_DEFAULT_CONF_EXAMPLE_PATH = os.path.join(
|
|
35
|
-
os.path.dirname(__file__), "
|
|
35
|
+
os.path.dirname(__file__), "example_uploads", "stm", "STMDefaultExample"
|
|
36
36
|
)
|
|
37
37
|
STM_CUSTOMIZED_EXAMPLE_PATH = os.path.join(
|
|
38
|
-
os.path.dirname(__file__), "
|
|
38
|
+
os.path.dirname(__file__), "example_uploads", "stm", "STMExampleWithCustomization"
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
AFM_DEFAULT_CONF_EXAMPLE_PATH = os.path.join(
|
|
42
|
-
os.path.dirname(__file__), "
|
|
42
|
+
os.path.dirname(__file__), "example_uploads", "afm", "AFMDefaultExample"
|
|
43
43
|
)
|
|
44
44
|
AFM_CUSTOMIZED_EXAMPLE_PATH = os.path.join(
|
|
45
|
-
os.path.dirname(__file__), "
|
|
45
|
+
os.path.dirname(__file__), "example_uploads", "afm", "AFMExampleWithCustomization"
|
|
46
46
|
)
|
{pynxtools_spm-0.2.2 → pynxtools_spm-0.2.4}/src/pynxtools_spm/nxformatters/base_formatter.py
RENAMED
|
@@ -27,7 +27,8 @@ import re
|
|
|
27
27
|
from abc import ABC, abstractmethod
|
|
28
28
|
from dataclasses import dataclass
|
|
29
29
|
from pathlib import Path
|
|
30
|
-
from typing import TYPE_CHECKING, Any,
|
|
30
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
|
31
|
+
from collections.abc import Callable
|
|
31
32
|
|
|
32
33
|
import numpy as np
|
|
33
34
|
import yaml
|
|
@@ -47,7 +48,7 @@ if TYPE_CHECKING:
|
|
|
47
48
|
from pint import Quantity
|
|
48
49
|
|
|
49
50
|
|
|
50
|
-
REPLACE_NESTED:
|
|
51
|
+
REPLACE_NESTED: dict[str, str] = {}
|
|
51
52
|
|
|
52
53
|
CONVERT_DICT = {
|
|
53
54
|
"Positioner_spm": "POSITIONER_SPM[positioner_spm]",
|
|
@@ -83,14 +84,14 @@ REPEATEABLE_CONCEPTS = ("Sample_component",)
|
|
|
83
84
|
|
|
84
85
|
@dataclass
|
|
85
86
|
class NXdata:
|
|
86
|
-
grp_name:
|
|
87
|
-
signal:
|
|
88
|
-
auxiliary_signals:
|
|
89
|
-
title:
|
|
87
|
+
grp_name: str | None = ""
|
|
88
|
+
signal: str | None = None
|
|
89
|
+
auxiliary_signals: list[str] | None = None
|
|
90
|
+
title: str | None = None
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
def write_multiple_concepts_instance(
|
|
93
|
-
eln_dict:
|
|
94
|
+
eln_dict: dict, list_of_concept: tuple[str], convert_mapping: dict[str, str]
|
|
94
95
|
):
|
|
95
96
|
"""Write multiple concepts for variadic name in eln dict if there are multiple
|
|
96
97
|
instances are requested in eln archive.json file.
|
|
@@ -133,22 +134,22 @@ class SPMformatter(ABC):
|
|
|
133
134
|
# Put the class in the base_formatter.py under BaseFormatter class
|
|
134
135
|
x_points: int
|
|
135
136
|
y_points: int
|
|
136
|
-
x_offset:
|
|
137
|
-
x_offset_unit:
|
|
138
|
-
y_offset:
|
|
139
|
-
y_offset_unit:
|
|
140
|
-
x_start:
|
|
141
|
-
x_start_unit:
|
|
142
|
-
y_start:
|
|
143
|
-
y_start_unit:
|
|
144
|
-
x_range:
|
|
145
|
-
x_range_unit:
|
|
146
|
-
y_range:
|
|
147
|
-
y_range_unit:
|
|
148
|
-
x_end:
|
|
149
|
-
x_end_unit:
|
|
150
|
-
y_end:
|
|
151
|
-
y_end_unit:
|
|
137
|
+
x_offset: int | float
|
|
138
|
+
x_offset_unit: str | Quantity
|
|
139
|
+
y_offset: int | float
|
|
140
|
+
y_offset_unit: str | Quantity
|
|
141
|
+
x_start: int | float
|
|
142
|
+
x_start_unit: str | Quantity
|
|
143
|
+
y_start: int | float
|
|
144
|
+
y_start_unit: str | Quantity
|
|
145
|
+
x_range: int | float
|
|
146
|
+
x_range_unit: str | Quantity
|
|
147
|
+
y_range: int | float
|
|
148
|
+
y_range_unit: str | Quantity
|
|
149
|
+
x_end: int | float
|
|
150
|
+
x_end_unit: str | Quantity
|
|
151
|
+
y_end: int | float
|
|
152
|
+
y_end_unit: str | Quantity
|
|
152
153
|
fast_axis: str # lower case x, y
|
|
153
154
|
slow_axis: str # lower case x, y
|
|
154
155
|
|
|
@@ -171,17 +172,15 @@ class SPMformatter(ABC):
|
|
|
171
172
|
def __init__(
|
|
172
173
|
self,
|
|
173
174
|
template: Template,
|
|
174
|
-
raw_file:
|
|
175
|
+
raw_file: str | Path,
|
|
175
176
|
eln_file: str | Path,
|
|
176
|
-
config_file:
|
|
177
|
-
|
|
178
|
-
] = None, # Incase it is not provided by users
|
|
179
|
-
entry: Optional[str] = None,
|
|
177
|
+
config_file: None | (str | Path) = None, # In case it is not provided by users
|
|
178
|
+
entry: str | None = None,
|
|
180
179
|
):
|
|
181
180
|
self.template: Template = template
|
|
182
|
-
self.raw_file:
|
|
181
|
+
self.raw_file: str | Path = raw_file
|
|
183
182
|
self.eln = self._get_eln_dict(eln_file) # Placeholder
|
|
184
|
-
self.raw_data:
|
|
183
|
+
self.raw_data: dict = self.get_raw_data_dict()
|
|
185
184
|
self.entry: str = entry
|
|
186
185
|
self.config_dict = self._get_conf_dict(config_file) or None # Placeholder
|
|
187
186
|
|
|
@@ -189,7 +188,7 @@ class SPMformatter(ABC):
|
|
|
189
188
|
def _get_conf_dict(self, config_file: str | Path = None): ...
|
|
190
189
|
|
|
191
190
|
def _get_eln_dict(self, eln_file: str | Path):
|
|
192
|
-
with open(eln_file,
|
|
191
|
+
with open(eln_file, encoding="utf-8") as fl_obj:
|
|
193
192
|
eln_dict: dict = yaml.safe_load(fl_obj)
|
|
194
193
|
extended_eln: dict = write_multiple_concepts_instance(
|
|
195
194
|
eln_dict=eln_dict,
|
|
@@ -203,14 +202,14 @@ class SPMformatter(ABC):
|
|
|
203
202
|
|
|
204
203
|
def walk_though_config_nested_dict(
|
|
205
204
|
self,
|
|
206
|
-
config_dict:
|
|
205
|
+
config_dict: dict,
|
|
207
206
|
parent_path: str,
|
|
208
207
|
use_custom_func_prior: bool = True,
|
|
209
|
-
func_on_raw_key:
|
|
208
|
+
func_on_raw_key: Callable | None = None,
|
|
210
209
|
):
|
|
211
210
|
# This concept is just note where the group will be
|
|
212
211
|
# handeld name of the function regestered in the self._grp_to_func
|
|
213
|
-
# or
|
|
212
|
+
# or something like that.
|
|
214
213
|
if "#note" in config_dict:
|
|
215
214
|
return
|
|
216
215
|
for key, val in config_dict.items():
|
|
@@ -221,7 +220,7 @@ class SPMformatter(ABC):
|
|
|
221
220
|
self._resolve_link_in_config(val, f"{parent_path}/{key}")
|
|
222
221
|
# Special case, will be handled in a specific function registered
|
|
223
222
|
# in self._grp_to_func
|
|
224
|
-
elif
|
|
223
|
+
elif retrieved_key := next(
|
|
225
224
|
(k for k in self._grp_to_func.keys() if key.startswith(k)), None
|
|
226
225
|
):
|
|
227
226
|
if not use_custom_func_prior:
|
|
@@ -231,10 +230,10 @@ class SPMformatter(ABC):
|
|
|
231
230
|
func_on_raw_key=func_on_raw_key,
|
|
232
231
|
)
|
|
233
232
|
# Fill special fields first
|
|
234
|
-
method = getattr(self, self._grp_to_func[
|
|
233
|
+
method = getattr(self, self._grp_to_func[retrieved_key])
|
|
235
234
|
method(val, parent_path, key)
|
|
236
235
|
else:
|
|
237
|
-
method = getattr(self, self._grp_to_func[
|
|
236
|
+
method = getattr(self, self._grp_to_func[retrieved_key])
|
|
238
237
|
method(val, parent_path, key)
|
|
239
238
|
self.walk_though_config_nested_dict(
|
|
240
239
|
config_dict=val,
|
|
@@ -310,7 +309,7 @@ class SPMformatter(ABC):
|
|
|
310
309
|
val, f"{parent_path}/{key}", func_on_raw_key=func_on_raw_key
|
|
311
310
|
)
|
|
312
311
|
|
|
313
|
-
def rearrange_data_according_to_axes(self, data, is_forward:
|
|
312
|
+
def rearrange_data_according_to_axes(self, data, is_forward: bool | None = None):
|
|
314
313
|
"""Rearrange array data according to the fast and slow axes.
|
|
315
314
|
|
|
316
315
|
Implement this function in other base classes (e.g., NanonisBase) where it is needed.
|
|
@@ -377,7 +376,7 @@ class SPMformatter(ABC):
|
|
|
377
376
|
"""
|
|
378
377
|
|
|
379
378
|
if val.startswith("@default_link:"):
|
|
380
|
-
val = val.
|
|
379
|
+
val = val.rsplit("@default_link:", maxsplit=1)[-1]
|
|
381
380
|
|
|
382
381
|
classes = val.split("/")[1:]
|
|
383
382
|
pattern = ""
|
|
@@ -522,7 +521,7 @@ class SPMformatter(ABC):
|
|
|
522
521
|
parent_path: str,
|
|
523
522
|
group_name: str,
|
|
524
523
|
group_index=0,
|
|
525
|
-
is_forward:
|
|
524
|
+
is_forward: bool | None = None,
|
|
526
525
|
rearrange_2d_data: bool = True,
|
|
527
526
|
):
|
|
528
527
|
"""Example NXdata dict descrioption from config
|
|
@@ -671,7 +670,9 @@ class SPMformatter(ABC):
|
|
|
671
670
|
r"active_channel$": str,
|
|
672
671
|
r"model/@version$": str,
|
|
673
672
|
r"/model$": str,
|
|
674
|
-
r"lockin_amplifier/(demodulated|modulation)_signal$": lambda input:
|
|
673
|
+
r"lockin_amplifier/(demodulated|modulation)_signal$": lambda input: (
|
|
674
|
+
input.lower()
|
|
675
|
+
),
|
|
675
676
|
r"lockin_amplifier/(hp|lp){1,}_filter_orderN\[\1_filter_order_[\w]*\]$": (
|
|
676
677
|
lambda input: input if isinstance(input, (int, float)) else ""
|
|
677
678
|
),
|
|
@@ -732,7 +733,7 @@ class SPMformatter(ABC):
|
|
|
732
733
|
end_conf_dct: dict,
|
|
733
734
|
parent_path: str,
|
|
734
735
|
concept_key: str,
|
|
735
|
-
part_to_embed:
|
|
736
|
+
part_to_embed: str | None,
|
|
736
737
|
):
|
|
737
738
|
"""
|
|
738
739
|
Puts the data, unit, and other attributes into the template
|