Skip to content

Commit 39b8cab

Browse files
Extensions for EM and APM for use cases from FAU Erlangen-Nuremberg CENEM and APM run-through NFDI-MatWerk (#421)
* Exemplar alternative strategy to keep track of projects * ran a make style, must have been a while ago since this was done the last time * Add minimal example electron tomography * spellchecking * NXcollection to store flat collection of metadata that people have several times requested but for which we currently have no mapping to NeXus or we do not know exactly whats behind these parameters * align styling and formatting with apm_prepare_nomad_v142 branch * Apm prepare nomad v142 (#424) * Adding concepts for sampled monitoring instances as stored in rhit and hits * add precommit config and removed unnecessary categories in custom-dictionary * intend NXdata monitoring instances under measurement, install pre-commit --------- Co-authored-by: mkuehbach <markus.kuehbach@physik.hu-berlin.de> * align linting, styling, and formatting with niac PR1626 * automation script to populate the dictionary in case of precommit failing on new words * Shortening and tightening cover page updating also * Shortening and tightening completed, added also definition of versions * corrections on fairmat cover * edit in reviewer comments * bump isort in precommit --------- Co-authored-by: mkuehbach <markus.kuehbach@physik.hu-berlin.de>
1 parent e87e872 commit 39b8cab

35 files changed

+3233
-967
lines changed

.cspell/custom-dictionary.txt

Lines changed: 464 additions & 480 deletions
Large diffs are not rendered by default.

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 26.3.1
4+
hooks:
5+
- id: black
6+
7+
- repo: https://github.com/pycqa/flake8
8+
rev: 7.3.0
9+
hooks:
10+
- id: flake8
11+
12+
- repo: https://github.com/pycqa/isort
13+
rev: 8.0.1
14+
hooks:
15+
- id: isort
16+
17+
- repo: https://github.com/streetsidesoftware/cspell-cli
18+
rev: v9.7.0
19+
hooks:
20+
- id: cspell # spellchecking
21+
pass_filenames: false
22+
args:
23+
- --config
24+
- cspell.json
25+
- applications/**/*
26+
- base_classes/**/*
27+
- contributed_definitions/**/*

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ install ::
4848
$(PYTHON) -m pip install -r requirements.txt
4949

5050
style ::
51-
$(PYTHON) -m black --check dev_tools
52-
$(PYTHON) -m flake8 dev_tools
53-
$(PYTHON) -m isort --check dev_tools
51+
$(PYTHON) -m black --check .
52+
$(PYTHON) -m flake8 .
53+
$(PYTHON) -m isort --check .
5454

5555
autoformat ::
56-
$(PYTHON) -m black dev_tools
57-
$(PYTHON) -m isort dev_tools
56+
$(PYTHON) -m black .
57+
$(PYTHON) -m isort .
5858

5959
test ::
6060
$(PYTHON) -m pytest dev_tools

applications/NXapm.nxdl.xml

Lines changed: 596 additions & 9 deletions
Large diffs are not rendered by default.

applications/NXem.nxdl.xml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@
251251
<field name="checksum" type="NX_CHAR" recommended="true"/>
252252
<field name="algorithm" type="NX_CHAR" recommended="true"/>
253253
</group>
254+
<group name="project" type="NXproject" optional="true">
255+
<field name="name" type="NX_CHAR"/>
256+
</group>
254257
<group name="userID" type="NXuser" minOccurs="0" maxOccurs="unbounded" nameType="partial">
255258
<doc>
256259
Information about persons who performed or were involved in the microscope
@@ -1587,6 +1590,12 @@ basically optional use of NXaberration therein at least some value required-->
15871590
<group name="sensorID" type="NXsensor" nameType="partial" minOccurs="0" maxOccurs="unbounded"/>
15881591
<group name="actuatorID" type="NXactuator" nameType="partial" minOccurs="0" maxOccurs="unbounded"/>
15891592
</group>
1593+
<group type="NXcollection" optional="true">
1594+
<doc>
1595+
Group with content not meant for validation to store e.g.,
1596+
metadata that are currently not standardized with NeXus.
1597+
</doc>
1598+
</group>
15901599
</group>
15911600
</group>
15921601
<group name="simulation" type="NXem_simulation" optional="true">
@@ -1872,6 +1881,63 @@ not wish to duplicate all payload data-->
18721881
</group>
18731882
</group>
18741883
<group name="eels" type="NXem_eels" optional="true"/>
1884+
<group name="tomo" type="NXprocess" optional="true">
1885+
<doc>
1886+
Electron tomography
1887+
</doc>
1888+
<group name="reconstructionID" type="NXprocess" nameType="partial" minOccurs="0" maxOccurs="unbounded">
1889+
<doc>
1890+
Processing a single tilt series into an electron tomogram
1891+
</doc>
1892+
<group name="configuration" type="NXparameters" recommended="true">
1893+
<doc>
1894+
Parameters used for computing the tomogram.
1895+
</doc>
1896+
</group>
1897+
<group name="programID" type="NXprogram" nameType="partial" recommended="true">
1898+
<doc>
1899+
The program with which the reconstruction was performed.
1900+
</doc>
1901+
<field name="program" type="NX_CHAR">
1902+
<attribute name="version" type="NX_CHAR" recommended="true"/>
1903+
</field>
1904+
</group>
1905+
<group name="tomogram" type="NXdata">
1906+
<doc>
1907+
The resulting tomogram
1908+
</doc>
1909+
<attribute name="signal" type="NX_CHAR"/>
1910+
<attribute name="axes" type="NX_CHAR"/>
1911+
<attribute name="AXISNAME_indices" type="NX_UINT" nameType="partial"/>
1912+
<field name="title" type="NX_CHAR" recommended="true"/>
1913+
<field name="intensity" type="NX_NUMBER">
1914+
<dimensions rank="3">
1915+
<dim index="1" value="n_k"/>
1916+
<dim index="2" value="n_j"/>
1917+
<dim index="3" value="n_i"/>
1918+
</dimensions>
1919+
</field>
1920+
<field name="axis_k" type="NX_FLOAT">
1921+
<dimensions rank="1">
1922+
<dim index="1" value="n_k"/>
1923+
</dimensions>
1924+
<attribute name="long_name" type="NX_CHAR"/>
1925+
</field>
1926+
<field name="axis_j" type="NX_FLOAT">
1927+
<dimensions rank="1">
1928+
<dim index="1" value="n_j"/>
1929+
</dimensions>
1930+
<attribute name="long_name" type="NX_CHAR"/>
1931+
</field>
1932+
<field name="axis_i" type="NX_FLOAT">
1933+
<dimensions rank="1">
1934+
<dim index="1" value="n_i"/>
1935+
</dimensions>
1936+
<attribute name="long_name" type="NX_CHAR"/>
1937+
</field>
1938+
</group>
1939+
</group>
1940+
</group>
18751941
</group>
18761942
</group>
18771943
<!--see an example how to map e.g. the following flat schema https://www.zenodo.org/record/6513745 to NXem

0 commit comments

Comments
 (0)