From d3838f3d203796242a121ad10f79bc958324f54d Mon Sep 17 00:00:00 2001 From: mkuehbach Date: Thu, 27 Jun 2024 13:57:34 +0200 Subject: [PATCH 1/5] Simplified base class design for documenting aberrations --- .../NXaberration_model.nxdl.xml | 83 ++++++++++++++++- .../NXaberration_model_ceos.nxdl.xml | 92 ------------------- .../NXaberration_model_nion.nxdl.xml | 63 ------------- .../NXcorrector_cs.nxdl.xml | 3 +- contributed_definitions/NXem.nxdl.xml | 5 +- .../nyaml/NXaberration_model.yaml | 90 +++++++++++++++++- .../nyaml/NXaberration_model_ceos.yaml | 71 -------------- .../nyaml/NXaberration_model_nion.yaml | 37 -------- .../nyaml/NXcorrector_cs.yaml | 3 +- contributed_definitions/nyaml/NXem.yaml | 6 +- .../contributed_definitions/em-structure.rst | 2 +- 11 files changed, 178 insertions(+), 277 deletions(-) delete mode 100644 contributed_definitions/NXaberration_model_ceos.nxdl.xml delete mode 100644 contributed_definitions/NXaberration_model_nion.nxdl.xml delete mode 100644 contributed_definitions/nyaml/NXaberration_model_ceos.yaml delete mode 100644 contributed_definitions/nyaml/NXaberration_model_nion.yaml diff --git a/contributed_definitions/NXaberration_model.nxdl.xml b/contributed_definitions/NXaberration_model.nxdl.xml index 67a975cc6b..92a81762d0 100644 --- a/contributed_definitions/NXaberration_model.nxdl.xml +++ b/contributed_definitions/NXaberration_model.nxdl.xml @@ -36,5 +36,86 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributed_definitions/NXaberration_model_ceos.nxdl.xml b/contributed_definitions/NXaberration_model_ceos.nxdl.xml deleted file mode 100644 index 3325e1569a..0000000000 --- a/contributed_definitions/NXaberration_model_ceos.nxdl.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - CEOS definitions/model for aberrations of electro-magnetic lenses. - - See `S. J. Pennycock and P. D. Nellist <https://doi.org/10.1007/978-1-4419-7200-2>`_ (page 44ff, and page 118ff) - for different definitions available and further details. Table 7-2 of Ibid. - publication (page 305ff) documents how to convert from the NION to the - CEOS definitions. - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contributed_definitions/NXaberration_model_nion.nxdl.xml b/contributed_definitions/NXaberration_model_nion.nxdl.xml deleted file mode 100644 index 8903c73db2..0000000000 --- a/contributed_definitions/NXaberration_model_nion.nxdl.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Nion definitions/model for aberrations of electro-magnetic lenses. - - See `S. J. Pennycock and P. D. Nellist <https://doi.org/10.1007/978-1-4419-7200-2>`_ (page 44ff, and page 118ff) - for different definitions available and further details. Table 7-2 of Ibid. - publication (page 305ff) documents how to convert from the Nion to the - CEOS definitions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contributed_definitions/NXcorrector_cs.nxdl.xml b/contributed_definitions/NXcorrector_cs.nxdl.xml index af816bcc41..c42da92eb5 100644 --- a/contributed_definitions/NXcorrector_cs.nxdl.xml +++ b/contributed_definitions/NXcorrector_cs.nxdl.xml @@ -109,8 +109,7 @@ Place for storing measured or estimated aberrations (for each image or final). - - + diff --git a/contributed_definitions/NXem.nxdl.xml b/contributed_definitions/NXem.nxdl.xml index 0edb3ac079..70ea14e5fb 100644 --- a/contributed_definitions/NXem.nxdl.xml +++ b/contributed_definitions/NXem.nxdl.xml @@ -1005,8 +1005,7 @@ technical components of the corrector--> - - + @@ -1060,7 +1059,7 @@ basically optional use of NXaberration therein at least some value required--> - + diff --git a/contributed_definitions/nyaml/NXaberration_model.yaml b/contributed_definitions/nyaml/NXaberration_model.yaml index 534762555d..bb53dff370 100644 --- a/contributed_definitions/nyaml/NXaberration_model.yaml +++ b/contributed_definitions/nyaml/NXaberration_model.yaml @@ -10,4 +10,92 @@ type: group NXaberration_model(NXobject): model: enumeration: [ceos, nion] - (NXaberration): + # (NXaberration): + + # specifically-named aberrations following the CEOS convention + c_1(NXaberration): + a_1(NXaberration): + b_2(NXaberration): + a_2(NXaberration): + c_3(NXaberration): + s_3(NXaberration): + a_3(NXaberration): + # based on feedback from Thilo Remmele the following aberrations could be measured + # (enhanced mode, tilt angle > 30 mrad) but are not corrected + b_4(NXaberration): + d_4(NXaberration): + a_4(NXaberration): + c_5(NXaberration): + s_5(NXaberration): + r_5(NXaberration): + a_6(NXaberration): + + # further comments from Thilo Remmele (Leibniz-Institut für Kristallzüchtung) + # ThermoFisher uses CEOS correctors but makes customizations to these in their microscopes + # Aberration naming schema: C_order_multiplicity (similar to NXem, but with + # another coordinate system and in addition with a confidence entry. + # Aberrations with multiplicity 0 have no angle entry (C1,C3,C5,.., CEOS notation) + # contrast transferfuntion: ctf = e^(-i*Xi(g)) in Fourier space + # aberration function: + # Xi(g) = 2*pi/lamda{ 1/2 * (lamda*g)^2 (C20 + C22 cos[2(phi-phi_22)] + # +1/3 * (lamda*g)^3 (C31 cos[(phi-phi_31) + C33 cos[3(phi-phi_33) + # +1/4 * (lamda*g)^4 (C40 + C42 cos[2(phi-phi_42)] + C44 cos[4(phi-phi_42)] + # +1/f * (lamda*g)^f Sum (Cfm cos[m(phi-phi_fm)] where m=[0,2,..f] for even f and m=[1,3,..,f] for odd f + + # Thilo Remmele also mentions that there is a mapping of aberration coefficient names: + # C_2_0 -> C1 Defocus + # C_2_2 -> A1 2-fold astigmatism + # C_3_3 -> A2 3-fold astigmatism + # C_3_1 -> B2 axial coma + # C_4_0 -> C3 spherical aberration + # C_4_4 -> A3 4-fold astigmatism + # C_4_2 -> S3 star aberration + # C_5_5 -> A4 5-fold astigmatism + + # C_5_1 -> B4 axial coma + # C_5_3 -> D4 three lobe aberration + # C_6_0 -> C5 spherical aberration + # C_6_2 -> S5 star aberration + # C_6_4 -> R5 rosette aberration + # C_6_6 -> A5 6-fold astigmatism + + # In a session with HRTEM images the corrector is commonly aligned. + # The final measurement with the estimated residual aberrations + # should be saved in a corrector.html file (an example is appended + # at the end of this file. Unfortunately the datetime is not included + # in that html output, nor is the used outer tilt angle and exposure time. + # The datetime may be estimated from the file datetime and the Delta t entry, + # but caution if that datetime is not preserved on file transfers! + # More than one detector entry could occure but is not common. + # A seperate corrector schema, so it can be easily exchanged to other correctors if necessary. + # It might be useful to collect all the corrector entries in one table, for example to analyse the performance of the corrector. + # The corrector entry of the nexus em definition lacks the confidence information and the + # parameter settings for the estimation oft the aberrations. + + # specifically-named aberrations following the Nion convention + c_1_0(NXaberration): + c_1_2_a(NXaberration): + c_1_2_b(NXaberration): + c_2_1_a(NXaberration): + c_2_1_b(NXaberration): + c_2_3_a(NXaberration): + c_2_3_b(NXaberration): + c_3_0(NXaberration): + c_3_2_a(NXaberration): + c_3_2_b(NXaberration): + c_3_4_a(NXaberration): + c_3_4_b(NXaberration): + c_4_1_a(NXaberration): + c_4_1_b(NXaberration): + c_4_3_a(NXaberration): + c_4_3_b(NXaberration): + c_4_5_a(NXaberration): + c_4_5_b(NXaberration): + c_5_0(NXaberration): + c_5_2_a(NXaberration): + c_5_2_b(NXaberration): + c_5_4_a(NXaberration): + c_5_4_b(NXaberration): + c_5_6_a(NXaberration): + c_5_6_b(NXaberration): + diff --git a/contributed_definitions/nyaml/NXaberration_model_ceos.yaml b/contributed_definitions/nyaml/NXaberration_model_ceos.yaml deleted file mode 100644 index 14f9556140..0000000000 --- a/contributed_definitions/nyaml/NXaberration_model_ceos.yaml +++ /dev/null @@ -1,71 +0,0 @@ -category: base -doc: | - CEOS definitions/model for aberrations of electro-magnetic lenses. - - See `S. J. Pennycock and P. D. Nellist `_ (page 44ff, and page 118ff) - for different definitions available and further details. Table 7-2 of Ibid. - publication (page 305ff) documents how to convert from the NION to the - CEOS definitions. -type: group -NXaberration_model_ceos(NXaberration_model): - model: - enumeration: [ceos] - c_1(NXaberration): - a_1(NXaberration): - b_2(NXaberration): - a_2(NXaberration): - c_3(NXaberration): - s_3(NXaberration): - a_3(NXaberration): - - # based on feedback from Thilo Remmele the following aberrations could be measured - # (enhanced mode, tilt angle > 30 mrad) but are not corrected - b_4(NXaberration): - d_4(NXaberration): - a_4(NXaberration): - c_5(NXaberration): - s_5(NXaberration): - r_5(NXaberration): - a_6(NXaberration): - - # further comments from Thilo Remmele (Leibniz-Institut für Kristallzüchtung) - # ThermoFisher uses CEOS correctors but makes customizations to these in their microscopes - # Aberration naming schema: C_order_multiplicity (similar to NXem, but with - # another coordinate system and in addition with a confidence entry. - # Aberrations with multiplicity 0 have no angle entry (C1,C3,C5,.., CEOS notation) - # contrast transferfuntion: ctf = e^(-i*Xi(g)) in Fourier space - # aberration function: - # Xi(g) = 2*pi/lamda{ 1/2 * (lamda*g)^2 (C20 + C22 cos[2(phi-phi_22)] - # +1/3 * (lamda*g)^3 (C31 cos[(phi-phi_31) + C33 cos[3(phi-phi_33) - # +1/4 * (lamda*g)^4 (C40 + C42 cos[2(phi-phi_42)] + C44 cos[4(phi-phi_42)] - # +1/f * (lamda*g)^f Sum (Cfm cos[m(phi-phi_fm)] where m=[0,2,..f] for even f and m=[1,3,..,f] for odd f - - # Thilo Remmele also mentions that there is a mapping of aberration coefficient names: - # C_2_0 -> C1 Defocus - # C_2_2 -> A1 2-fold astigmatism - # C_3_3 -> A2 3-fold astigmatism - # C_3_1 -> B2 axial coma - # C_4_0 -> C3 spherical aberration - # C_4_4 -> A3 4-fold astigmatism - # C_4_2 -> S3 star aberration - # C_5_5 -> A4 5-fold astigmatism - - # C_5_1 -> B4 axial coma - # C_5_3 -> D4 three lobe aberration - # C_6_0 -> C5 spherical aberration - # C_6_2 -> S5 star aberration - # C_6_4 -> R5 rosette aberration - # C_6_6 -> A5 6-fold astigmatism - - # In a session with HRTEM images the corrector is commonly aligned. - # The final measurement with the estimated residual aberrations - # should be saved in a corrector.html file (an example is appended - # at the end of this file. Unfortunately the datetime is not included - # in that html output, nor is the used outer tilt angle and exposure time. - # The datetime may be estimated from the file datetime and the Delta t entry, - # but caution if that datetime is not preserved on file transfers! - # More than one detector entry could occure but is not common. - # A seperate corrector schema, so it can be easily exchanged to other correctors if necessary. - # It might be useful to collect all the corrector entries in one table, for example to analyse the performance of the corrector. - # The corrector entry of the nexus em definition lacks the confidence information and the - # parameter settings for the estimation oft the aberrations. diff --git a/contributed_definitions/nyaml/NXaberration_model_nion.yaml b/contributed_definitions/nyaml/NXaberration_model_nion.yaml deleted file mode 100644 index 2d47ab703f..0000000000 --- a/contributed_definitions/nyaml/NXaberration_model_nion.yaml +++ /dev/null @@ -1,37 +0,0 @@ -category: base -doc: | - Nion definitions/model for aberrations of electro-magnetic lenses. - - See `S. J. Pennycock and P. D. Nellist `_ (page 44ff, and page 118ff) - for different definitions available and further details. Table 7-2 of Ibid. - publication (page 305ff) documents how to convert from the Nion to the - CEOS definitions. -type: group -NXaberration_model_nion(NXaberration_model): - model: - enumeration: [nion] - c_1_0(NXaberration): - c_1_2_a(NXaberration): - c_1_2_b(NXaberration): - c_2_1_a(NXaberration): - c_2_1_b(NXaberration): - c_2_3_a(NXaberration): - c_2_3_b(NXaberration): - c_3_0(NXaberration): - c_3_2_a(NXaberration): - c_3_2_b(NXaberration): - c_3_4_a(NXaberration): - c_3_4_b(NXaberration): - c_4_1_a(NXaberration): - c_4_1_b(NXaberration): - c_4_3_a(NXaberration): - c_4_3_b(NXaberration): - c_4_5_a(NXaberration): - c_4_5_b(NXaberration): - c_5_0(NXaberration): - c_5_2_a(NXaberration): - c_5_2_b(NXaberration): - c_5_4_a(NXaberration): - c_5_4_b(NXaberration): - c_5_6_a(NXaberration): - c_5_6_b(NXaberration): diff --git a/contributed_definitions/nyaml/NXcorrector_cs.yaml b/contributed_definitions/nyaml/NXcorrector_cs.yaml index 1b63a0df3e..54cb4ca3ed 100644 --- a/contributed_definitions/nyaml/NXcorrector_cs.yaml +++ b/contributed_definitions/nyaml/NXcorrector_cs.yaml @@ -65,8 +65,7 @@ NXcorrector_cs(NXcomponent_em): (NXprocess): doc: | Place for storing measured or estimated aberrations (for each image or final). - ceos(NXaberration_model_ceos): - nion(NXaberration_model_nion): + (NXaberration_model): # technical design perspective (NXlens_em): (NXaperture_em): diff --git a/contributed_definitions/nyaml/NXem.yaml b/contributed_definitions/nyaml/NXem.yaml index d14c03723c..b3af61ae8a 100644 --- a/contributed_definitions/nyaml/NXem.yaml +++ b/contributed_definitions/nyaml/NXem.yaml @@ -913,9 +913,7 @@ NXem(NXobject): zemlin_tableauID(NXprocess): exists: [min, 1, max, infty] (NXprocess): - ceos(NXaberration_model_ceos): - exists: optional - nion(NXaberration_model_nion): + (NXaberration_model): exists: optional # we could write down how to store the aberrations but we should not force to add aberrations # basically optional use of NXaberration therein at least some value required @@ -973,7 +971,7 @@ NXem(NXobject): exists: [min, 0, max, infty] aperture_emID(NXaperture_em): exists: [min, 0, max, infty] - monochromator_emID(NXmonochromator_em): + monochromator_emID(NXmonochromator): exists: [min, 0, max, infty] applied(NX_BOOLEAN): sensorID(NXsensor): diff --git a/manual/source/classes/contributed_definitions/em-structure.rst b/manual/source/classes/contributed_definitions/em-structure.rst index 6d9e29bf53..e903d067de 100644 --- a/manual/source/classes/contributed_definitions/em-structure.rst +++ b/manual/source/classes/contributed_definitions/em-structure.rst @@ -91,7 +91,7 @@ The following base classes are proposed to support modularizing the storage of p Base classes to describe different coordinate systems used and/or to be harmonized or transformed into one another and respective transformations. - :ref:`NXaberration_model`, :ref:`NXaberration_model_ceos`, :ref:`NXaberration_model_nion`, :ref:`NXaberration`: + :ref:`NXaberration_model`, :ref:`NXaberration`: Base classes to describe procedures and values for the calibration of aberrations based on conventions of different companies active in the field of aberration correction. From 968b9bc4a707439733b5a59c3a7859d9979e4a2c Mon Sep 17 00:00:00 2001 From: mkuehbach Date: Thu, 27 Jun 2024 16:34:29 +0200 Subject: [PATCH 2/5] Rename NXcomponent_em to NXcomponent --- .../{NXcomponent_em.nxdl.xml => NXcomponent.nxdl.xml} | 2 +- .../nyaml/{NXcomponent_em.yaml => NXcomponent.yaml} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename contributed_definitions/{NXcomponent_em.nxdl.xml => NXcomponent.nxdl.xml} (94%) rename contributed_definitions/nyaml/{NXcomponent_em.yaml => NXcomponent.yaml} (97%) diff --git a/contributed_definitions/NXcomponent_em.nxdl.xml b/contributed_definitions/NXcomponent.nxdl.xml similarity index 94% rename from contributed_definitions/NXcomponent_em.nxdl.xml rename to contributed_definitions/NXcomponent.nxdl.xml index 4abe45201a..603f8d3c1e 100644 --- a/contributed_definitions/NXcomponent_em.nxdl.xml +++ b/contributed_definitions/NXcomponent.nxdl.xml @@ -21,7 +21,7 @@ # # For further information, see http://www.nexusformat.org --> - + Base class for components of an instrument - real ones or a simulated ones. diff --git a/contributed_definitions/nyaml/NXcomponent_em.yaml b/contributed_definitions/nyaml/NXcomponent.yaml similarity index 97% rename from contributed_definitions/nyaml/NXcomponent_em.yaml rename to contributed_definitions/nyaml/NXcomponent.yaml index dcb3e7c195..61fd4205ae 100644 --- a/contributed_definitions/nyaml/NXcomponent_em.yaml +++ b/contributed_definitions/nyaml/NXcomponent.yaml @@ -2,7 +2,7 @@ category: base doc: | Base class for components of an instrument - real ones or a simulated ones. type: group -NXcomponent_em(NXobject): +NXcomponent(NXobject): \@depends_on(NX_CHAR): doc: | Specifies the position of the component by pointing to the last From ff05fc4ccb4dc987908cb2a1445cb4a4f466f7f5 Mon Sep 17 00:00:00 2001 From: mkuehbach Date: Thu, 27 Jun 2024 16:56:06 +0200 Subject: [PATCH 3/5] Replaced all locations where NXcomponent_em was used for NXcomponent, replaced all locations where NXaperture_em was used for NXaperture --- .../NXaperture_em.nxdl.xml | 48 ---------------- .../NXcorrector_cs.nxdl.xml | 6 +- .../NXebeam_column.nxdl.xml | 6 +- contributed_definitions/NXem.nxdl.xml | 56 +++++++++++++++---- .../NXibeam_column.nxdl.xml | 18 +----- contributed_definitions/NXlens_em.nxdl.xml | 2 +- contributed_definitions/NXscanbox_em.nxdl.xml | 5 +- contributed_definitions/NXstage_lab.nxdl.xml | 2 +- .../nyaml/NXaperture_em.yaml | 24 -------- .../nyaml/NXcorrector_cs.yaml | 6 +- .../nyaml/NXebeam_column.yaml | 6 +- contributed_definitions/nyaml/NXem.yaml | 54 ++++++++++++++---- .../nyaml/NXibeam_column.yaml | 15 +---- contributed_definitions/nyaml/NXlens_em.yaml | 2 +- .../nyaml/NXscanbox_em.yaml | 3 +- .../nyaml/NXstage_lab.yaml | 2 +- .../contributed_definitions/em-structure.rst | 9 +-- 17 files changed, 118 insertions(+), 146 deletions(-) delete mode 100644 contributed_definitions/NXaperture_em.nxdl.xml delete mode 100644 contributed_definitions/nyaml/NXaperture_em.yaml diff --git a/contributed_definitions/NXaperture_em.nxdl.xml b/contributed_definitions/NXaperture_em.nxdl.xml deleted file mode 100644 index ac33c427b3..0000000000 --- a/contributed_definitions/NXaperture_em.nxdl.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Base class for an individual aperture for beams in electron microscopy. - - - - - Relevant value from the control software. - - This is not always just the diameter of the aperture (not even in the case) - of a circular aperture. Usually, it is a value that is set in the control - software whereby a specific configuration of an aperture is selected by the - software. - - The control software of commercial microscope typically offers the user - access at a high abstraction level because of which many details about - the actual settings of the electrical components are typically unknown. - - However, if more details are known or should be documented one should - use the description field for this. - - - - diff --git a/contributed_definitions/NXcorrector_cs.nxdl.xml b/contributed_definitions/NXcorrector_cs.nxdl.xml index c42da92eb5..78c03a2c54 100644 --- a/contributed_definitions/NXcorrector_cs.nxdl.xml +++ b/contributed_definitions/NXcorrector_cs.nxdl.xml @@ -21,7 +21,7 @@ # # For further information, see http://www.nexusformat.org --> - + The symbols used in the schema to specify e.g. dimensions of arrays. @@ -43,7 +43,7 @@ and microscope. Many of their technical details is proprietary knowledge. If functionalities for correcting multiple aberrations are included in - one :ref:`NXcomponent_em` `like it is reported here <https://www.ceos-gmbh.de/en/research/electrostat>`_ + one :ref:`NXcomponent` `like it is reported here <https://www.ceos-gmbh.de/en/research/electrostat>`_ use multiple groups: * :ref:`NXcorrector_cs` for spherical aberration @@ -114,6 +114,6 @@ - + diff --git a/contributed_definitions/NXebeam_column.nxdl.xml b/contributed_definitions/NXebeam_column.nxdl.xml index 3840d10958..d4fc0f1538 100644 --- a/contributed_definitions/NXebeam_column.nxdl.xml +++ b/contributed_definitions/NXebeam_column.nxdl.xml @@ -22,7 +22,7 @@ # For further information, see http://www.nexusformat.org --> @@ -98,10 +98,10 @@ relevant from maintenance point of view--> - + - + diff --git a/contributed_definitions/NXem.nxdl.xml b/contributed_definitions/NXem.nxdl.xml index 70ea14e5fb..62948768eb 100644 --- a/contributed_definitions/NXem.nxdl.xml +++ b/contributed_definitions/NXem.nxdl.xml @@ -422,7 +422,7 @@ likewise if you provide fabrication details you need to provide vendor and model - + @@ -465,7 +465,7 @@ technical design perspective--> - + Device reshaping an ellipse-shaped electron beam to a circular one. @@ -480,7 +480,7 @@ technical design perspective--> - + Electron biprism as it is used e.g. for electron holography. @@ -498,7 +498,7 @@ like it is an glass lens (i.e. optical) NXlens but both concepts have in common that they can be assumed to be specialization of a super class lenses i.e. devices which can affect the pathes of beams --> - + Device that causes a change in the phase of an electron wave. @@ -541,7 +541,7 @@ lenses i.e. devices which can affect the pathes of beams - + @@ -974,7 +974,25 @@ lenses i.e. devices which can affect the pathes of beams - + + + + Relevant value from the control software. + + This is not always just the diameter of the aperture (not even in the case) + of a circular aperture. Usually, it is a value that is set in the control + software whereby a specific configuration of an aperture is selected by the + software. + + The control software of commercial microscope typically offers the user + access at a high abstraction level because of which many details about + the actual settings of the electrical components are typically unknown. + + However, if more details are known or should be documented one should + use the description field for this. + + + Device for improving energy resolution or reducing chromatic aberration. @@ -1011,7 +1029,7 @@ technical components of the corrector--> - + Device reshaping an ellipse-shaped electron beam to a circular one. @@ -1040,8 +1058,8 @@ basically optional use of NXaberration therein at least some value required--> - - + + @@ -1058,7 +1076,25 @@ basically optional use of NXaberration therein at least some value required--> - + + + + Relevant value from the control software. + + This is not always just the diameter of the aperture (not even in the case) + of a circular aperture. Usually, it is a value that is set in the control + software whereby a specific configuration of an aperture is selected by the + software. + + The control software of commercial microscope typically offers the user + access at a high abstraction level because of which many details about + the actual settings of the electrical components are typically unknown. + + However, if more details are known or should be documented one should + use the description field for this. + + + diff --git a/contributed_definitions/NXibeam_column.nxdl.xml b/contributed_definitions/NXibeam_column.nxdl.xml index c2fc3a6d3c..8d2374bfac 100644 --- a/contributed_definitions/NXibeam_column.nxdl.xml +++ b/contributed_definitions/NXibeam_column.nxdl.xml @@ -21,12 +21,7 @@ # # For further information, see http://www.nexusformat.org --> - - + Base class for a set of components equipping an instrument with FIB capabilities. @@ -51,7 +46,6 @@ instruments are built can inherit but that is even stronger promoting the idea a * `J. Lili <https://www.osti.gov/servlets/purl/924801>`_ - The source which creates the ion beam. @@ -116,18 +110,12 @@ NEW ISSUE: (at which location?).--> To be defined more specifically. Community suggestions are welcome. - - - Collection of axis-based translations and rotations to describe the - location and geometry of the component in the instrument. - - - + - + diff --git a/contributed_definitions/NXlens_em.nxdl.xml b/contributed_definitions/NXlens_em.nxdl.xml index 2e185370a8..97450992a9 100644 --- a/contributed_definitions/NXlens_em.nxdl.xml +++ b/contributed_definitions/NXlens_em.nxdl.xml @@ -26,7 +26,7 @@ has_part pole_piece https://purls.helmholtz-metadaten.de/emg/EMG_00000039--> - + Base class for an electro-magnetic lens or a compound lens. diff --git a/contributed_definitions/NXscanbox_em.nxdl.xml b/contributed_definitions/NXscanbox_em.nxdl.xml index b36394726f..eae75cd135 100644 --- a/contributed_definitions/NXscanbox_em.nxdl.xml +++ b/contributed_definitions/NXscanbox_em.nxdl.xml @@ -21,7 +21,7 @@ # # For further information, see http://www.nexusformat.org --> - + Scan box and coils which deflect a beam of charged particles in a controlled manner. @@ -102,8 +102,7 @@ +(NXlens_em):--> - + Base class for a stage (lab) used to hold, orient, and prepare a specimen. diff --git a/contributed_definitions/nyaml/NXaperture_em.yaml b/contributed_definitions/nyaml/NXaperture_em.yaml deleted file mode 100644 index 3dd75f400f..0000000000 --- a/contributed_definitions/nyaml/NXaperture_em.yaml +++ /dev/null @@ -1,24 +0,0 @@ -category: base -doc: | - Base class for an individual aperture for beams in electron microscopy. -type: group -NXaperture_em(NXcomponent_em): - # user perspective - value(NX_NUMBER): - doc: | - Relevant value from the control software. - - This is not always just the diameter of the aperture (not even in the case) - of a circular aperture. Usually, it is a value that is set in the control - software whereby a specific configuration of an aperture is selected by the - software. - - The control software of commercial microscope typically offers the user - access at a high abstraction level because of which many details about - the actual settings of the electrical components are typically unknown. - - However, if more details are known or should be documented one should - use the description field for this. - unit: NX_ANY - # control level - # technical design level \ No newline at end of file diff --git a/contributed_definitions/nyaml/NXcorrector_cs.yaml b/contributed_definitions/nyaml/NXcorrector_cs.yaml index 54cb4ca3ed..615598af2c 100644 --- a/contributed_definitions/nyaml/NXcorrector_cs.yaml +++ b/contributed_definitions/nyaml/NXcorrector_cs.yaml @@ -10,7 +10,7 @@ doc: | and microscope. Many of their technical details is proprietary knowledge. If functionalities for correcting multiple aberrations are included in - one :ref:`NXcomponent_em` `like it is reported here `_ + one :ref:`NXcomponent` `like it is reported here `_ use multiple groups: * :ref:`NXcorrector_cs` for spherical aberration @@ -23,7 +23,7 @@ symbols: The symbols used in the schema to specify e.g. dimensions of arrays. n_img: | Number of images taken, at least one. -NXcorrector_cs(NXcomponent_em): +NXcorrector_cs(NXcomponent): # user perspective applied(NX_BOOLEAN): doc: | @@ -68,5 +68,5 @@ NXcorrector_cs(NXcomponent_em): (NXaberration_model): # technical design perspective (NXlens_em): - (NXaperture_em): + (NXaperture): # (NXdeflector): diff --git a/contributed_definitions/nyaml/NXebeam_column.yaml b/contributed_definitions/nyaml/NXebeam_column.yaml index eefdc4b162..276c90f879 100644 --- a/contributed_definitions/nyaml/NXebeam_column.yaml +++ b/contributed_definitions/nyaml/NXebeam_column.yaml @@ -2,7 +2,7 @@ category: base doc: | Base class for a set of components providing a controllable electron beam. type: group -# NXebeam_column is an NXobject instead of an NXcomponent_em to make that +# NXebeam_column is an NXobject instead of an NXcomponent to make that # part "an electron gun" reusable in other context NXebeam_column(NXobject): operation_mode(NX_CHAR): @@ -56,10 +56,10 @@ NXebeam_column(NXobject): Collection of axis-based translations and rotations to describe the location and geometry of the component in the instrument. (NXlens_em): - (NXaperture_em): + (NXaperture): (NXmonochromator): (NXcorrector_cs): - (NXcomponent_em): + (NXcomponent): (NXsensor): (NXactuator): (NXbeam): diff --git a/contributed_definitions/nyaml/NXem.yaml b/contributed_definitions/nyaml/NXem.yaml index b3af61ae8a..cb8c2cd0b2 100644 --- a/contributed_definitions/nyaml/NXem.yaml +++ b/contributed_definitions/nyaml/NXem.yaml @@ -387,7 +387,7 @@ NXem(NXobject): model(NX_CHAR): identifier(NX_CHAR): exists: recommended - aperture_emID(NXaperture_em): + apertureID(NXaperture): exists: [min, 0, max, infty] fabrication(NXfabrication): exists: optional @@ -424,7 +424,7 @@ NXem(NXobject): model(NX_CHAR): identifier(NX_CHAR): exists: recommended - corrector_ax(NXcomponent_em): + corrector_ax(NXcomponent): exists: [min, 0, max, 1] doc: - | @@ -441,7 +441,7 @@ NXem(NXobject): model(NX_CHAR): identifier(NX_CHAR): exists: recommended - biprism(NXcomponent_em): + biprism(NXcomponent): exists: optional doc: - | @@ -452,7 +452,7 @@ NXem(NXobject): model(NX_CHAR): identifier(NX_CHAR): exists: recommended - phase_plateID(NXcomponent_em): + phase_plateID(NXcomponent): # contributed definition NXwaveplate is a closely related concept but may fit even better but waveplate # has been defined from the perspective of classical optics # same challenge like with NXlens and NXlens_em, an electrostatic lens is not the same concept @@ -502,7 +502,7 @@ NXem(NXobject): model(NX_CHAR): identifier(NX_CHAR): exists: recommended - aperture_emID(NXaperture_em): + apertureID(NXaperture): exists: [min, 0, max, infty] fabrication(NXfabrication): exists: optional @@ -879,8 +879,25 @@ NXem(NXobject): unit: NX_CURRENT lens_emID(NXlens_em): exists: [min, 0, max, infty] - aperture_emID(NXaperture_em): + apertureID(NXaperture): exists: [min, 0, max, infty] + value(NX_NUMBER): + doc: + - | + Relevant value from the control software. + - | + This is not always just the diameter of the aperture (not even in the case) + of a circular aperture. Usually, it is a value that is set in the control + software whereby a specific configuration of an aperture is selected by the + software. + + The control software of commercial microscope typically offers the user + access at a high abstraction level because of which many details about + the actual settings of the electrical components are typically unknown. + + However, if more details are known or should be documented one should + use the description field for this. + unit: NX_ANY monochromatorID(NXmonochromator): exists: [min, 0, max, infty] doc: @@ -917,7 +934,7 @@ NXem(NXobject): exists: optional # we could write down how to store the aberrations but we should not force to add aberrations # basically optional use of NXaberration therein at least some value required - corrector_ax(NXcomponent_em): + corrector_ax(NXcomponent): exists: [min, 0, max, 1] doc: - | @@ -946,9 +963,9 @@ NXem(NXobject): are unknown or not directly controllable as the control software of the microscope does not enable or was not configured to display these values (for end users). unit: NX_ANY - biprism(NXcomponent_em): + biprism(NXcomponent): exists: [min, 0, max, 1] - phase_plateID(NXcomponent_em): + phase_plateID(NXcomponent): exists: [min, 0, max, infty] sensorID(NXsensor): exists: [min, 0, max, infty] @@ -969,8 +986,25 @@ NXem(NXobject): voltage(NX_NUMBER): lens_emID(NXlens_em): exists: [min, 0, max, infty] - aperture_emID(NXaperture_em): + apertureID(NXaperture): exists: [min, 0, max, infty] + value(NX_NUMBER): + doc: + - | + Relevant value from the control software. + - | + This is not always just the diameter of the aperture (not even in the case) + of a circular aperture. Usually, it is a value that is set in the control + software whereby a specific configuration of an aperture is selected by the + software. + + The control software of commercial microscope typically offers the user + access at a high abstraction level because of which many details about + the actual settings of the electrical components are typically unknown. + + However, if more details are known or should be documented one should + use the description field for this. + unit: NX_ANY monochromator_emID(NXmonochromator): exists: [min, 0, max, infty] applied(NX_BOOLEAN): diff --git a/contributed_definitions/nyaml/NXibeam_column.yaml b/contributed_definitions/nyaml/NXibeam_column.yaml index 7a416e526c..f4e2984c6d 100644 --- a/contributed_definitions/nyaml/NXibeam_column.yaml +++ b/contributed_definitions/nyaml/NXibeam_column.yaml @@ -23,13 +23,8 @@ doc: | * `J. Lili `_ type: group -# NXibeam_column is an NXobject instead of an NXcomponent_em to make that -# part "an ion gun" reusable in other context because if it where an NXcomponent_em it can only be used for -# em unless NXcomponent becomes a general base class from which all physical objects from which -# instruments are built can inherit but that is even stronger promoting the idea and use of base class inheritance -NXibeam_column(NXobject): +NXibeam_column(NXcomponent): (NXchamber): - (NXfabrication): ion_source(NXsource): doc: | The source which creates the ion beam. @@ -75,15 +70,11 @@ NXibeam_column(NXobject): doc: | To be defined more specifically. Community suggestions are welcome. unit: NX_ENERGY - (NXtransformations): - doc: | - Collection of axis-based translations and rotations to describe the - location and geometry of the component in the instrument. # NEW ISSUE: details about the life/up-time of the source relevant from maintenance point of view (NXlens_em): - (NXaperture_em): + (NXaperture): (NXmonochromator): - (NXcomponent_em): + (NXcomponent): (NXsensor): (NXactuator): (NXbeam): diff --git a/contributed_definitions/nyaml/NXlens_em.yaml b/contributed_definitions/nyaml/NXlens_em.yaml index eedc3fd8ae..ad26d199fd 100644 --- a/contributed_definitions/nyaml/NXlens_em.yaml +++ b/contributed_definitions/nyaml/NXlens_em.yaml @@ -13,7 +13,7 @@ doc: | type: group # more consolidation to harvest from a generic component base class # with other research fields (MPES, XPS, OPT) could be useful -NXlens_em(NXcomponent_em): +NXlens_em(NXcomponent): # user perspective value(NX_NUMBER): doc: | diff --git a/contributed_definitions/nyaml/NXscanbox_em.yaml b/contributed_definitions/nyaml/NXscanbox_em.yaml index 18569230ea..10597ef5be 100644 --- a/contributed_definitions/nyaml/NXscanbox_em.yaml +++ b/contributed_definitions/nyaml/NXscanbox_em.yaml @@ -8,7 +8,7 @@ doc: | The scanbox directs the probe of charged particles (electrons, ions) to controlled locations according to a scan scheme and plan. type: group -NXscanbox_em(NXcomponent_em): # await discussion on base class NXscan_control +NXscanbox_em(NXcomponent): # await discussion on base class NXscan_control # user perspective scan_schema(NX_CHAR): doc: | @@ -72,7 +72,6 @@ NXscanbox_em(NXcomponent_em): # await discussion on base class NXscan_control unit: NX_ANGLE # technical design perspective # (NXlens_em): - # (NXaperture_em): (NXdeflector): # (NXcg_point_set): # NEW ISSUE: build on work of EMglossary with HMC and use duty cycle instead diff --git a/contributed_definitions/nyaml/NXstage_lab.yaml b/contributed_definitions/nyaml/NXstage_lab.yaml index d5dbdf182a..326824c563 100644 --- a/contributed_definitions/nyaml/NXstage_lab.yaml +++ b/contributed_definitions/nyaml/NXstage_lab.yaml @@ -79,7 +79,7 @@ doc: | We are looking forward to suggestions from the scientists. type: group -NXstage_lab(NXcomponent_em): +NXstage_lab(NXcomponent): design(NX_CHAR): doc: | Principal design of the stage. diff --git a/manual/source/classes/contributed_definitions/em-structure.rst b/manual/source/classes/contributed_definitions/em-structure.rst index e903d067de..f26e75121b 100644 --- a/manual/source/classes/contributed_definitions/em-structure.rst +++ b/manual/source/classes/contributed_definitions/em-structure.rst @@ -65,15 +65,12 @@ The following base classes are proposed to support modularizing the storage of p A base class serving the possibility to group the components relevant for generating and shaping an ion beam of an instrument to offer focused-ion beam (milling) capabilities. - :ref:`NXcomponent_em`: - A base class to describe a hardware component for e.g. building a microscope. + :ref:`NXcomponent`: + A base class to describe components aka devices to building an instrument like a microscope irrespective whether that is a real one or a simulated one. :ref:`NXlens_em`: A base class to detail an electro-magnetic lens. In practice, an electron microscope has many such lenses. It is possible to specify as many lenses as necessary to represent eventually each single lens of the microscope and thus describe how the lenses are affecting the electron beam. This can offer opportunities for developers of software tools which strive to model the instrument e.g. to create digital twins of the instrument. We understand there is still a way to go with this to arrive there though. Consequently, we suggest to focus first on which details should be collected for a lens as a component so that developers of application definitions can take immediate advantage of this work. - :ref:`NXaperture_em`: - A base class to describe an aperture. - :ref:`NXdeflector`: A base class to describe a component to deflect a beam of charged particles. @@ -98,7 +95,7 @@ The following base classes are proposed to support modularizing the storage of p :ref:`NXcorrector_cs`: A base class to describe details about corrective lens or compound lens devices which reduce the (spherical) aberrations of an electron beam. - + :ref:`NXscanbox_em`: A base class to represent the component of an electron microscope which realizes a controlled deflection (and eventually shift, blanking, and/or descanning) of the electron beam to illuminate the specimen in a controlled manner From cb7423929fd9be0bcca8171826d3bf07d83ca98a Mon Sep 17 00:00:00 2001 From: mkuehbach Date: Thu, 27 Jun 2024 18:38:21 +0200 Subject: [PATCH 4/5] Fused NXimage_r_set, NXimage_c_set, NXimage_r_set_diff into a single more meaty base class NXimage_set, the partner in crime for NXspectrum_set --- contributed_definitions/NXapm.nxdl.xml | 10 +- contributed_definitions/NXem.nxdl.xml | 160 ++--- contributed_definitions/NXem_adf.nxdl.xml | 21 +- contributed_definitions/NXem_ebsd.nxdl.xml | 5 +- contributed_definitions/NXem_eds.nxdl.xml | 9 +- contributed_definitions/NXem_img.nxdl.xml | 1 - contributed_definitions/NXem_method.nxdl.xml | 3 +- contributed_definitions/NXem_sim.nxdl.xml | 1 - .../NXevent_data_em.nxdl.xml | 4 +- .../NXimage_c_set.nxdl.xml | 471 -------------- .../NXimage_r_set.nxdl.xml | 333 ---------- .../NXimage_r_set_diff.nxdl.xml | 179 ------ contributed_definitions/NXimage_set.nxdl.xml | 581 +++++++++++++++++- .../NXspectrum_set.nxdl.xml | 28 +- contributed_definitions/nyaml/NXapm.yaml | 10 +- contributed_definitions/nyaml/NXem.yaml | 168 ++--- contributed_definitions/nyaml/NXem_adf.yaml | 11 +- contributed_definitions/nyaml/NXem_ebsd.yaml | 5 +- contributed_definitions/nyaml/NXem_eds.yaml | 9 +- contributed_definitions/nyaml/NXem_img.yaml | 1 - .../nyaml/NXem_method.yaml | 3 +- contributed_definitions/nyaml/NXem_sim.yaml | 1 - .../nyaml/NXevent_data_em.yaml | 4 +- .../nyaml/NXimage_c_set.yaml | 272 -------- .../nyaml/NXimage_r_set.yaml | 188 ------ .../nyaml/NXimage_r_set_diff.yaml | 123 ---- .../nyaml/NXimage_set.yaml | 377 +++++++++++- .../nyaml/NXspectrum_set.yaml | 32 +- dev_tools/tests/test_nxdl_utils.py | 6 +- .../contributed_definitions/em-structure.rst | 8 +- 30 files changed, 1094 insertions(+), 1930 deletions(-) delete mode 100644 contributed_definitions/NXimage_c_set.nxdl.xml delete mode 100644 contributed_definitions/NXimage_r_set.nxdl.xml delete mode 100644 contributed_definitions/NXimage_r_set_diff.nxdl.xml delete mode 100644 contributed_definitions/nyaml/NXimage_c_set.yaml delete mode 100644 contributed_definitions/nyaml/NXimage_r_set.yaml delete mode 100644 contributed_definitions/nyaml/NXimage_r_set_diff.yaml diff --git a/contributed_definitions/NXapm.nxdl.xml b/contributed_definitions/NXapm.nxdl.xml index 43dcbfd2d0..d6a03e3419 100644 --- a/contributed_definitions/NXapm.nxdl.xml +++ b/contributed_definitions/NXapm.nxdl.xml @@ -664,7 +664,7 @@ NEW ISSUE: add section for propagation_delay(NXprocess) ? NEW ISSUE: make recon an own subentry NXapm_reconstruction NEW ISSUE: different algorithms used one could create a class for each reconstruction method NEW ISSUE: make this rather an own subentry NXapm_ranging--> - + SEM or TEM image of the initial specimen i.e. ideally taken prior to the data acquisition. @@ -673,16 +673,16 @@ NEW ISSUE: make this rather an own subentry NXapm_ranging--> - - + + - + - + diff --git a/contributed_definitions/NXem.nxdl.xml b/contributed_definitions/NXem.nxdl.xml index 62948768eb..26f4ff2c67 100644 --- a/contributed_definitions/NXem.nxdl.xml +++ b/contributed_definitions/NXem.nxdl.xml @@ -610,231 +610,168 @@ lenses i.e. devices which can affect the pathes of beams - + + + - + - + - - - - - - - + - + - + - + - + - + - + - + - - - - - - - - - - + - + - + - - - - - - - + - + - - - - - - - + - + - + - + - + - - - - - - - - - - - - + - - + + - + - + - - - - - - - + - + - + - + - - + + - + - + - + - + - - - - - - - - - - + - + - + - - + + - + - + - - - - - - - - - - - - - + - + - + @@ -855,6 +792,7 @@ lenses i.e. devices which can affect the pathes of beams + diff --git a/contributed_definitions/NXem_adf.nxdl.xml b/contributed_definitions/NXem_adf.nxdl.xml index 8d6649fda9..35bc42e65f 100644 --- a/contributed_definitions/NXem_adf.nxdl.xml +++ b/contributed_definitions/NXem_adf.nxdl.xml @@ -22,23 +22,6 @@ # For further information, see http://www.nexusformat.org --> - - - - Number of images in the stack. - - - - - Number of pixel per image in the slow direction. - - - - - Number of pixel per image in the fast direction. - - - Base class method-specific for annular dark field imaging. @@ -50,7 +33,7 @@ For now the base class provides for scans for which the settings, binning, and energy resolution is the same for each scan point. - + Annulus inner (first value) and outer (second value) half angle. @@ -60,6 +43,4 @@ - diff --git a/contributed_definitions/NXem_ebsd.nxdl.xml b/contributed_definitions/NXem_ebsd.nxdl.xml index 60fa38e170..c3212627e8 100644 --- a/contributed_definitions/NXem_ebsd.nxdl.xml +++ b/contributed_definitions/NXem_ebsd.nxdl.xml @@ -215,9 +215,8 @@ pattern_available(NX_BOOLEAN): - If available and it is stored in an instance of an application definition - this field gives the path of an :ref:`NXimage_r_set_diff` - where the simulated pattern are stored. + If available and it is stored in an instance of an application definition this field gives + the path of an :ref:`NXimage_set` where the simulated pattern are stored. diff --git a/contributed_definitions/NXem_eds.nxdl.xml b/contributed_definitions/NXem_eds.nxdl.xml index 43cde1ab9f..6397ac4868 100644 --- a/contributed_definitions/NXem_eds.nxdl.xml +++ b/contributed_definitions/NXem_eds.nxdl.xml @@ -25,10 +25,6 @@ - Number of X-ray photon energy (bins), the fastest direction. @@ -160,14 +156,14 @@ but even a label InL is not physically not meaning ful enough, only with the kno that in an SEM and using an EDS detector, i.e. not a monochromating unit the energy resolution is not sufficient to resolve specific signals like e.g. separate certain lines therefore we use for now the--> - + Individual element-specific EDS/EDX/EDXS/SXES mapping A composition map is an image whose intensities for each pixel are the accumulated X-ray quanta *under the curve(s)* of a set of peaks. - These element-specific EDS maps are NXimage_r_set instances + These element-specific EDS maps are :ref:`NXimage_set` instances and need to be named with the name of the element from the element_names field. @@ -219,5 +215,4 @@ therefore we use for now the--> - diff --git a/contributed_definitions/NXem_img.nxdl.xml b/contributed_definitions/NXem_img.nxdl.xml index 79574ecaa4..159b342c1e 100644 --- a/contributed_definitions/NXem_img.nxdl.xml +++ b/contributed_definitions/NXem_img.nxdl.xml @@ -59,5 +59,4 @@ - diff --git a/contributed_definitions/NXem_method.nxdl.xml b/contributed_definitions/NXem_method.nxdl.xml index 502703f38e..b469980872 100644 --- a/contributed_definitions/NXem_method.nxdl.xml +++ b/contributed_definitions/NXem_method.nxdl.xml @@ -41,8 +41,7 @@ - - + diff --git a/contributed_definitions/NXem_sim.nxdl.xml b/contributed_definitions/NXem_sim.nxdl.xml index 66282e001d..610fe885c1 100644 --- a/contributed_definitions/NXem_sim.nxdl.xml +++ b/contributed_definitions/NXem_sim.nxdl.xml @@ -55,6 +55,5 @@ abTEM and other simulation packages, TEMgym, etc.--> - diff --git a/contributed_definitions/NXevent_data_em.nxdl.xml b/contributed_definitions/NXevent_data_em.nxdl.xml index 16958d8ec9..85f847e3da 100644 --- a/contributed_definitions/NXevent_data_em.nxdl.xml +++ b/contributed_definitions/NXevent_data_em.nxdl.xml @@ -147,9 +147,7 @@ follow-up modifications to support arriving at an improved :ref:`NXevent_data_em` base class. - - - + diff --git a/contributed_definitions/NXimage_c_set.nxdl.xml b/contributed_definitions/NXimage_c_set.nxdl.xml deleted file mode 100644 index c6837e47ab..0000000000 --- a/contributed_definitions/NXimage_c_set.nxdl.xml +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - - - Number of images in the (hyper)stack. - - - - - Number of pixel per image in the slowest direction. - - - - - Number of pixel per image in the slow direction. - - - - - Number of pixel per image in the fast direction. - - - - - Specialized base class container for reporting a set of images in reciprocal space. - - In practice, complex numbers are encoded via some formatted pair of real values. - Typically, fast Algorithms for computing Fourier Transformations (FFT) are - used to encode images in reciprocal (frequency) space. FFT libraries are used - for implementing the key functionalities of these mathematical operations. - - Different libraries use different representations and encoding of the - image computed. Details can be found in the respective sections of the - typical FFT libraries: - - * `FFTW by M. Frigo and S. G. Johnson <https://www.fftw.org/fftw3_doc/Tutorial.html#Tutorial>`_ - * `Intel MKL by the Intel Co. <https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/fourier-transform-functions.html>`_ - * `cuFFT by the NVidia Co. <https://docs.nvidia.com/cuda/cufft/index.html>`_ - - Users are strongly advised to inspect carefully which specific conventions - their library uses to be able to store and modify the implementation of their - code so that the serialized representations as it is detailed - here for NeXus matches with their intention. - - One- and two-dimensional FFTs should use the stack(NXdata) instances. - Three-dimensional FFTs should use the hyperstack(NXdata) instances. - - - - - One-dimensional image. - - - - Image intensity of the real part. - - - - - - - - Image intensity of the imaginary part. - - - - - - - - Magnitude of the image intensity. - - - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - - - Two-dimensional image. - - - - Image intensity of the real part. - - - - - - - - - Image intensity of the imaginary part. - - - - - - - - - Magnitude of the image intensity. - - - - - - - - - Pixel coordinate center along j direction. - - - - - - - Coordinate along j direction. - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - - - Three-dimensional image. - - - - Image intensity of the real part. - - - - - - - - - - Image intensity of the imaginary part. - - - - - - - - - - Magnitude of the image intensity. - - - - - - - - - - Pixel coordinate center along k direction. - - - - - - - Coordinate along k direction. - - - - - - Pixel coordinate center along j direction. - - - - - - - Coordinate along j direction. - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - - - Collection of one-dimensional images. - - - - Image intensity of the real part. - - - - - - - - - Image intensity of the imaginary part. - - - - - - - - - Magnitude of the image intensity. - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - - - Collection of two-dimensional images. - - - - Image intensity of the real part. - - - - - - - - - - Image intensity of the imaginary part. - - - - - - - - - - Magnitude of the image intensity. - - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along j direction. - - - - - - - Coordinate along j direction. - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - - - Collection of three-dimensional images. - - - - Image intensity of the real part. - - - - - - - - - - - Image intensity of the imaginary part. - - - - - - - - - - - Magnitude of the image intensity. - - - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along k direction. - - - - - - - Coordinate along k direction. - - - - - - Pixel coordinate center along j direction. - - - - - - - Coordinate along j direction. - - - - - - Pixel coordinate center along i direction. - - - - - - - Coordinate along i direction. - - - - - diff --git a/contributed_definitions/NXimage_r_set.nxdl.xml b/contributed_definitions/NXimage_r_set.nxdl.xml deleted file mode 100644 index 78f01002b7..0000000000 --- a/contributed_definitions/NXimage_r_set.nxdl.xml +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - Number of images in the stack. - - - - - Number of pixel per image in the slowest direction. - - - - - Number of pixel per image in the slow direction. - - - - - Number of pixel per image in the fast direction. - - - - - Specialized base class container for reporting a set of images in real space. - - - - - One-dimensional image. - - - - Image intensity values. - - - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - - - Two-dimensional image. - - - - Image intensity values. - - - - - - - - - Pixel coordinate center along y direction. - - - - - - - Coordinate along y direction. - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - - - Three-dimensional image. - - - - Image intensity values. - - - - - - - - - - Pixel coordinate center along z direction. - - - - - - - Coordinate along z direction. - - - - - - Pixel coordinate center along y direction. - - - - - - - Coordinate along y direction. - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - - - Collection of one-dimensional images. - - - - Image intensity values. - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - - - Collection of two-dimensional images. - - - - Image intensity values. - - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along y direction. - - - - - - - Coordinate along y direction. - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - - - Collection of three-dimensional images. - - - - Image intensity values. - - - - - - - - - - - Image identifier - - - - - - - Image identifier. - - - - - - Pixel coordinate center along z direction. - - - - - - - Coordinate along z direction. - - - - - - Pixel coordinate center along y direction. - - - - - - - Coordinate along y direction. - - - - - - Pixel coordinate center along x direction. - - - - - - - Coordinate along x direction. - - - - - diff --git a/contributed_definitions/NXimage_r_set_diff.nxdl.xml b/contributed_definitions/NXimage_r_set_diff.nxdl.xml deleted file mode 100644 index d0602017a7..0000000000 --- a/contributed_definitions/NXimage_r_set_diff.nxdl.xml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - Number of scanned points. Scan point may have none, one, or more pattern. - - - - - Number of diffraction pattern. - - - - - Number of pixel per pattern in the slow direction. - - - - - Number of pixel per pattern in the fast direction. - - - - - Base class specialized for reporting a cuboidal stack of diffraction pattern. - - Diffraction pattern, whether they were simulated or measured are the raw data - for computational workflows to characterize the phase and orientation - of crystalline regions in matter. - - Steps of post-processing the diffraction patterns should be documented using - method-specific specialized base classes. All eventual post-processing of - resulting orientation maps (2D or 3D) should be documented via :ref:`NXms_recon`. - - To implement an example how this base class can be used we focused in FAIRmat - on Kikuchi diffraction pattern here specifically the research community - of Electron Backscatter Diffraction (EBSD). - - For this reason, this base class and the :ref:`NXem_ebsd` base class extend the - work of `M. A. Jackson et al. <https://doi.org/10.1186/2193-9772-3-4>`_ - (one of the developers of DREAM.3D) and the H5OINA public file format developed by - `P. Pinard et al. <https://doi.org/10.1017/S1431927621006103>`_ with Oxford Instruments. - - Kikuchi pattern are typically collected with FIB/SEM microscopes, - for two- and three-dimensional orientation microscopy. - - For a detailed overview of these techniques see e.g. - - * `M. A. Groeber et al. <https://doi.org/10.1186/2193-9772-3-5>`_ - * `A. J. Schwartz et al. <https://doi.org/10.1007/978-1-4757-3205-4>`_ - * `P. A. Rottman et al. <https://doi.org/10.1016/j.mattod.2021.05.003>`_ - - Serial-sectioning demands a recurrent sequence of ion milling and measuring. - This suggests that each serial section is at least an own NXevent_data_em - instance. The three-dimensional characterization as such demands a computational - step where the maps for each serial section get cleaned, aligned, and registered - into an image stack. This image stack represents a digital model of the - inspected microstructural volume. Often this volume is called a (representative) - volume element (RVE). Several software packages exists for performing - these post-processing tasks. - - This example may inspire users of other types of diffraction methods. - - - - Category which type of diffraction pattern is reported. - - - - - - - - Collected diffraction pattern as an image stack. As raw and closest to the - first retrievable measured data as possible, i.e. do not use this - container to store already averaged, filtered or whatever post-processed - pattern unless these are generated unmodifiably in such manner by the - instrument given the way how the instrument and control software - was configured for your microscope session. - - - - Array which resolves the scan point to which each pattern belongs. - - Scan points are evaluated in sequence starting from scan point zero - until scan point n_sc - 1. Evaluating the cumulated of this array - decodes which pattern in intensity belongs to which scan point. - - Take an example with three scan points: The first scan point has one - pattern, the second has three pattern, the last scan point has no - pattern. In this case the scan_point_identifier are 0, 1, 1, 1. - The length of the scan_point_identifier array is four because four - pattern were measured in total. - - In most cases usually one pattern is averaged by the detector for - some amount of time and then reported as one pattern. - - - - - - - - Intensity of the diffraction pattern. - - - - - - - - - - Pattern intensity - - - - - - - Pattern are enumerated starting from 0 to n_p - 1. - - - - - - - Pattern identifier - - - - - - - diff --git a/contributed_definitions/NXimage_set.nxdl.xml b/contributed_definitions/NXimage_set.nxdl.xml index b2521608d7..c3f33bd683 100644 --- a/contributed_definitions/NXimage_set.nxdl.xml +++ b/contributed_definitions/NXimage_set.nxdl.xml @@ -22,59 +22,592 @@ # For further information, see http://www.nexusformat.org --> + - + - Number of images in the stack. + Number of images in the stack, for stacks the slowest direction. - + - Number of pixel per image in the slow direction. + Number of pixels per image in the slow direction (k equivalent to z). - + - Number of pixel per image in the fast direction. + Number of pixels per image in the fast direction (j equivalent to y). + + + + + Number of pixels per image in the fastest direction (i equivalent to x). - Base class for reporting a set of images. + Base class for reporting a set of images in real or reciprocal space. + + For images in reciprocal space in practice, complex numbers are encoded via some + formatted pair of real values. Typically, fast Algorithms for computing Fourier Transformations + (FFT) are used to encode images in reciprocal (frequency) space. FFT libraries are used + for implementing the key functionalities of these mathematical operations. + + Different libraries use different representations and encoding of the image computed. + Details can be found in the respective sections of the typical FFT libraries - This class provides a base vocabulary to be used for specialized :ref:`NXimage_set` - base classes like :ref:`NXimage_r_set` and :ref:`NXimage_c_set`. + * `FFTW by M. Frigo and S. G. Johnson <https://www.fftw.org/fftw3_doc/Tutorial.html#Tutorial>`_ + * `Intel MKL by the Intel Co. <https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/fourier-transform-functions.html>`_ + * `cuFFT by the NVidia Co. <https://docs.nvidia.com/cuda/cufft/index.html>`_ + + Users are strongly advised to inspect carefully which specific conventions + their library uses to be able to store and modify the implementation of their + code such that the serialized representations, as it is detailed here for NeXus, + matches. + + It is frequently the case that several images are combined using processing. In this case, + the number of images which are combined in a collection is not necessarily the same + for each collection. The NXimage_set base class addresses this logical distinction through + the notation of image_identifier and group_identifier. + That is image identifier are always counting from offset in increments of one. Each image + is an own entity. A group may contain no, or several such images. - Details how NXdata instance inside instance of (specialized) - :ref:`NXimage_set` were processed from the detector readings/raw data. + Details how NXdata instance were processed from detector readings/raw data. - Resolvable data artifact (e.g. filename) from which the all values in - the :ref:`NXdata` instances in this :ref:`NXimage_set` were loaded - during parsing. + Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + instances in this :ref:`NXimage_set` were loaded during parsing. - Possibility to document from which specific other serialized resource - as the source pieces of information where processed when NeXus is used - as a semantic file format to serialize that information differently. + Possibility to document from which specific other serialized resource as the source + pieces of information were processed when using NeXus as a semantic file format + to serialize that information differently. The group in combination with an added field *absolute_path* therein adds context. + + + Reference to a location inside the artifact that points to the specific group of values + that were processed if the artifacts contains several groups of values and thus + further resolving of ambiguities is required. + + - - - Imaging (data collection) mode of the instrument during acquisition - of the data in this :ref:`NXimage_set` instance. - - + Link or name of an :ref:`NXdetector` instance with which the data were collected. - + + + Program used for processing. + + + + + + The reference space in which the image set is defined. + + + + + + + + + One-dimensional image. + + + + Real part of the image intensity per pixel. + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + Magnitude of the image intensity. + + + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + + + + + Two-dimensional image. + + + + Real part of the image intensity per pixel. + + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + + Magnitude of the image intensity. + + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + + Pixel coordinate center along fast direction. + + + + + + + Coordinate along fast direction. + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + + + + + Three-dimensional image. + + + + Real part of the image intensity per pixel. + + + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + + + Magnitude of the image intensity. + + + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + + + Pixel coordinate center along slow direction. + + + + + + + Coordinate along slow direction. + + + + + + Pixel coordinate center along fast direction. + + + + + + + Coordinate along fast direction. + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + + + + + Collection of one-dimensional images. + + + + Real part of the image intensity per pixel. + + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + + Magnitude of the image intensity. + + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + + Group identifier for each image. + + + + + + + + Image identifier + + + + + + + Image identifier. + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + + + + + Collection of two-dimensional images. + + + + Real part of the image intensity per pixel. + + + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + + + Magnitude of the image intensity. + + + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + + + Group identifier for each image. + + + + + + + + Image identifier + + + + + + + Image identifier. + + + + + + Pixel coordinate center along fast direction. + + + + + + + Coordinate along fast direction. + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + + + + + Collection of three-dimensional images. + + + + Real part of the image intensity per pixel. + + + + + + + + + + + Imaginary part of the image intensity per pixel. + + + + + + + + + + + Magnitude of the image intensity. + + + + + + + + + + + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + + + + + + + + + + + Group identifier for each image. + + + + + + + + Image identifier + + + + + + + Image identifier. + + + + + + Pixel coordinate center along slow direction. + + + + + + + Coordinate along slow direction. + + + + + + Pixel coordinate center along fast direction. + + + + + + + Coordinate along fast direction. + + + + + + Pixel coordinate center along fastest direction. + + + + + + + Coordinate along fastest direction. + + + diff --git a/contributed_definitions/NXspectrum_set.nxdl.xml b/contributed_definitions/NXspectrum_set.nxdl.xml index 55f2131302..9863b67b44 100644 --- a/contributed_definitions/NXspectrum_set.nxdl.xml +++ b/contributed_definitions/NXspectrum_set.nxdl.xml @@ -25,22 +25,22 @@ - Number of scan points. + Number of scan points (slowest dimension). - Number of pixel in the slowest direction. + Number of pixel in the slow direction. - Number of pixel in the slow direction. + Number of pixel in the fast direction. - Number of pixel in the fast direction. + Number of pixel in the fastest direction. @@ -66,16 +66,22 @@ NXspectrum_set to reduce redundant fields and specialized NXspectrum_r/c_set--> - Resolvable data artifact (e.g. filename) from which the all values in - the :ref:`NXdata` instances in this :ref:`NXspectrum_set` were - loaded during parsing. + Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + instances in this :ref:`NXspectrum_set` were loaded during parsing. - Possibility to document from which specific other serialized resource - as the source pieces of information where processed when NeXus is used - as a semantic file format to serialize that information differently. + Possibility to document from which specific other serialized resource as the source + pieces of information were processed when using NeXus as a semantic file format + to serialize that information differently. - The group in combination with an add field *absolute_path* therein adds context. + The group in combination with an added field *absolute_path* therein adds context. + + + Reference to a location inside the artifact that points to the specific group of values + that were processed if the artifacts contains several groups of values and thus + further resolving of ambiguities is required. + + diff --git a/contributed_definitions/nyaml/NXapm.yaml b/contributed_definitions/nyaml/NXapm.yaml index 3cf277d03a..7963f1520c 100644 --- a/contributed_definitions/nyaml/NXapm.yaml +++ b/contributed_definitions/nyaml/NXapm.yaml @@ -574,7 +574,7 @@ NXapm(NXobject): # NEW ISSUE: different algorithms used one could create a class for each reconstruction method # NEW ISSUE: make this rather an own subentry NXapm_ranging - initial_specimen(NXimage_r_set): + initial_specimen(NXimage_set): exists: recommended doc: | SEM or TEM image of the initial specimen i.e. @@ -583,12 +583,12 @@ NXapm(NXobject): \@signal(NX_CHAR): \@axes(NX_CHAR): \@AXISNAME_indices(NX_CHAR): - intensity(NX_NUMBER): - axis_y(NX_NUMBER): - dim: (n_y,) + real(NX_NUMBER): + axis_j(NX_NUMBER): + dim: (n_j,) \@long_name(NX_CHAR): axis_x(NX_NUMBER): - dim: (n_x,) + dim: (n_i,) \@long_name(NX_CHAR): # one could use a stack_threed(NXdata) to record # a time series of the specimen shape evolution diff --git a/contributed_definitions/nyaml/NXem.yaml b/contributed_definitions/nyaml/NXem.yaml index cb8c2cd0b2..0ea78f04f5 100644 --- a/contributed_definitions/nyaml/NXem.yaml +++ b/contributed_definitions/nyaml/NXem.yaml @@ -573,7 +573,7 @@ NXem(NXobject): exists: recommended end_time(NX_DATE_TIME): exists: recommended - (NXimage_r_set): + (NXimage_set): exists: [min, 0, max, infty] (NXprocess): source(NXserialized): @@ -582,116 +582,45 @@ NXem(NXobject): path(NX_CHAR): checksum(NX_CHAR): algorithm(NX_CHAR): + absolute_path(NX_CHAR): + exists: recommended detector_identifier(NX_CHAR): + space(NX_CHAR): image_oned(NXdata): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): \@AXISNAME_indices(NX_INT): title(NX_CHAR): - intensity(NX_NUMBER): - \@long_name(NX_CHAR): - axis_x(NX_NUMBER): - \@long_name(NX_CHAR): - image_twod(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_INT): - title(NX_CHAR): - intensity(NX_NUMBER): - \@long_name(NX_CHAR): - axis_y(NX_NUMBER): - \@long_name(NX_CHAR): - axis_x(NX_NUMBER): - \@long_name(NX_CHAR): - image_threed(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_INT): - title(NX_CHAR): - intensity(NX_NUMBER): - \@long_name(NX_CHAR): - axis_z(NX_NUMBER): - \@long_name(NX_CHAR): - axis_y(NX_NUMBER): - \@long_name(NX_CHAR): - axis_x(NX_NUMBER): - \@long_name(NX_CHAR): - stack_oned(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_INT): - title(NX_CHAR): - intensity(NX_NUMBER): - \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): - \@long_name(NX_CHAR): - axis_x(NX_NUMBER): + real(NX_NUMBER): \@long_name(NX_CHAR): - stack_twod(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_INT): - title(NX_CHAR): - intensity(NX_NUMBER): + imag(NX_NUMBER): + exists: optional \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): + magnitude(NX_NUMBER): + exists: optional \@long_name(NX_CHAR): - axis_y(NX_NUMBER): + intensity(NX_COMPLEX): + exists: optional \@long_name(NX_CHAR): - axis_x(NX_NUMBER): + axis_i(NX_NUMBER): \@long_name(NX_CHAR): - stack_threed(NXdata): + image_twod(NXdata): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): \@AXISNAME_indices(NX_INT): title(NX_CHAR): - intensity(NX_NUMBER): - \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): - \@long_name(NX_CHAR): - axis_z(NX_NUMBER): - \@long_name(NX_CHAR): - axis_y(NX_NUMBER): - \@long_name(NX_CHAR): - axis_x(NX_NUMBER): - \@long_name(NX_CHAR): - (NXimage_c_set): - exists: [min, 0, max, infty] - (NXprocess): - source(NXserialized): - exists: recommended - type(NX_CHAR): - path(NX_CHAR): - checksum(NX_CHAR): - algorithm(NX_CHAR): - detector_identifier(NX_CHAR): - image_oned(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: real(NX_NUMBER): \@long_name(NX_CHAR): imag(NX_NUMBER): + exists: optional \@long_name(NX_CHAR): - axis_i(NX_NUMBER): - \@long_name(NX_CHAR): - image_twod(NXdata): - exists: optional - \@signal(NX_CHAR): - \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: - real(NX_NUMBER): + magnitude(NX_NUMBER): + exists: optional \@long_name(NX_CHAR): - imag(NX_NUMBER): + intensity(NX_COMPLEX): + exists: optional \@long_name(NX_CHAR): axis_j(NX_NUMBER): \@long_name(NX_CHAR): @@ -701,11 +630,18 @@ NXem(NXobject): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: + \@AXISNAME_indices(NX_INT): + title(NX_CHAR): real(NX_NUMBER): \@long_name(NX_CHAR): imag(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + magnitude(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + intensity(NX_COMPLEX): + exists: optional \@long_name(NX_CHAR): axis_k(NX_NUMBER): \@long_name(NX_CHAR): @@ -717,13 +653,23 @@ NXem(NXobject): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: + \@AXISNAME_indices(NX_INT): + title(NX_CHAR): real(NX_NUMBER): \@long_name(NX_CHAR): imag(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + magnitude(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + intensity(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + group_identifier(NX_INT): + exists: optional \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): + image_identifier(NX_INT): \@long_name(NX_CHAR): axis_i(NX_NUMBER): \@long_name(NX_CHAR): @@ -731,13 +677,23 @@ NXem(NXobject): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: + \@AXISNAME_indices(NX_INT): + title(NX_CHAR): real(NX_NUMBER): \@long_name(NX_CHAR): imag(NX_NUMBER): + exists: optional \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): + magnitude(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + intensity(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + group_identifier(NX_INT): + exists: optional + \@long_name(NX_CHAR): + image_identifier(NX_INT): \@long_name(NX_CHAR): axis_j(NX_NUMBER): \@long_name(NX_CHAR): @@ -747,13 +703,23 @@ NXem(NXobject): exists: optional \@signal(NX_CHAR): \@axes(NX_CHAR): - \@AXISNAME_indices(NX_CHAR): - title: + \@AXISNAME_indices(NX_INT): + title(NX_CHAR): real(NX_NUMBER): \@long_name(NX_CHAR): imag(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + magnitude(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + intensity(NX_NUMBER): + exists: optional + \@long_name(NX_CHAR): + group_identifier(NX_INT): + exists: optional \@long_name(NX_CHAR): - axis_image_identifier(NX_INT): + image_identifier(NX_INT): \@long_name(NX_CHAR): axis_k(NX_NUMBER): \@long_name(NX_CHAR): @@ -770,6 +736,8 @@ NXem(NXobject): path(NX_CHAR): checksum(NX_CHAR): algorithm(NX_CHAR): + absolute_path(NX_CHAR): + exists: recommended detector_identifier(NX_CHAR): spectrum_zerod(NXdata): exists: optional diff --git a/contributed_definitions/nyaml/NXem_adf.yaml b/contributed_definitions/nyaml/NXem_adf.yaml index 02a21e52cb..c64af34d45 100644 --- a/contributed_definitions/nyaml/NXem_adf.yaml +++ b/contributed_definitions/nyaml/NXem_adf.yaml @@ -9,20 +9,11 @@ doc: | For now the base class provides for scans for which the settings, binning, and energy resolution is the same for each scan point. -symbols: - n_images: | - Number of images in the stack. - n_y: | - Number of pixel per image in the slow direction. - n_x: | - Number of pixel per image in the fast direction. type: group NXem_adf(NXem_method): - (NXimage_r_set): + (NXimage_set): half_angle_interval(NX_NUMBER): doc: | Annulus inner (first value) and outer (second value) half angle. unit: NX_ANGLE dim: (2,) - # all information about annular dark field images is composed from - # the NXimage_r_set_em base class diff --git a/contributed_definitions/nyaml/NXem_ebsd.yaml b/contributed_definitions/nyaml/NXem_ebsd.yaml index 4a34650c4b..fc267416f7 100644 --- a/contributed_definitions/nyaml/NXem_ebsd.yaml +++ b/contributed_definitions/nyaml/NXem_ebsd.yaml @@ -169,9 +169,8 @@ NXem_ebsd(NXem_method): group as an instance of :ref:`NXem_sim`. \@depends_on(NX_CHAR): doc: | - If available and it is stored in an instance of an application definition - this field gives the path of an :ref:`NXimage_r_set_diff` - where the simulated pattern are stored. + If available and it is stored in an instance of an application definition this field gives + the path of an :ref:`NXimage_set` where the simulated pattern are stored. source(NXserialized): doc: | Reference (e.g. path and filename) to an existent digital resource which diff --git a/contributed_definitions/nyaml/NXem_eds.yaml b/contributed_definitions/nyaml/NXem_eds.yaml index 8c3878d729..047b07e866 100644 --- a/contributed_definitions/nyaml/NXem_eds.yaml +++ b/contributed_definitions/nyaml/NXem_eds.yaml @@ -13,10 +13,6 @@ doc: | # NEW ISSUE: use computational geometry to offer arbitrary scan pattern # NEW ISSUE: make the binning flexible per scan point symbols: - # n_p: Number of scan points - # n_z: Number of pixel along the z direction, the slowest direction - # n_y: Number of pixel along the y direction, the slow direction - # n_x: Number of pixel along the x direction, the fast direction n_photon_energy: | Number of X-ray photon energy (bins), the fastest direction. n_elements: | @@ -98,14 +94,14 @@ NXem_eds(NXem_method): # that in an SEM and using an EDS detector, i.e. not a monochromating unit the energy # resolution is not sufficient to resolve specific signals like e.g. separate certain lines # therefore we use for now the - (NXimage_r_set): + (NXimage_set): doc: | Individual element-specific EDS/EDX/EDXS/SXES mapping A composition map is an image whose intensities for each pixel are the accumulated X-ray quanta *under the curve(s)* of a set of peaks. - These element-specific EDS maps are NXimage_r_set instances + These element-specific EDS maps are :ref:`NXimage_set` instances and need to be named with the name of the element from the element_names field. @@ -141,4 +137,3 @@ NXem_eds(NXem_method): under peaks was factorized to display the joint intensity of the image. unit: NX_UNITLESS - # everything else is composed from NXimage_r_set diff --git a/contributed_definitions/nyaml/NXem_img.yaml b/contributed_definitions/nyaml/NXem_img.yaml index 8c257d121a..57f9202445 100644 --- a/contributed_definitions/nyaml/NXem_img.yaml +++ b/contributed_definitions/nyaml/NXem_img.yaml @@ -22,4 +22,3 @@ NXem_img(NXem_method): doc: | Which imaging mode was used? enumeration: [secondary_electron, backscattered_electron] - IMAGE_R_SET(NXimage_r_set): diff --git a/contributed_definitions/nyaml/NXem_method.yaml b/contributed_definitions/nyaml/NXem_method.yaml index 31ca4520f9..f4d7df4a14 100644 --- a/contributed_definitions/nyaml/NXem_method.yaml +++ b/contributed_definitions/nyaml/NXem_method.yaml @@ -16,7 +16,6 @@ NXem_method(NXobject): doc: | Details about processing steps. sequence_index(NX_INT): - (NXimage_r_set): - (NXimage_c_set): + (NXimage_set): (NXspectrum_set): # add links to relevant data diff --git a/contributed_definitions/nyaml/NXem_sim.yaml b/contributed_definitions/nyaml/NXem_sim.yaml index 81fe20db1b..38492d66e2 100644 --- a/contributed_definitions/nyaml/NXem_sim.yaml +++ b/contributed_definitions/nyaml/NXem_sim.yaml @@ -31,4 +31,3 @@ NXem_sim(NXem_method): # sequence_index(N): (NXprogram): (NXcg_geodesic_mesh): - (NXimage_r_set_diff): diff --git a/contributed_definitions/nyaml/NXevent_data_em.yaml b/contributed_definitions/nyaml/NXevent_data_em.yaml index 71df3c5982..b0a98d0388 100644 --- a/contributed_definitions/nyaml/NXevent_data_em.yaml +++ b/contributed_definitions/nyaml/NXevent_data_em.yaml @@ -118,9 +118,7 @@ NXevent_data_em(NXobject): The reason why in this base class the field event_type is nonetheless kept is to offer a place whereby practically users may enter data for follow-up modifications to support arriving at an improved :ref:`NXevent_data_em` base class. - (NXimage_r_set_diff): - (NXimage_r_set): - (NXimage_c_set): + (NXimage_set): (NXspectrum_set): em_lab(NXinstrument): doc: | diff --git a/contributed_definitions/nyaml/NXimage_c_set.yaml b/contributed_definitions/nyaml/NXimage_c_set.yaml deleted file mode 100644 index 303017ab1f..0000000000 --- a/contributed_definitions/nyaml/NXimage_c_set.yaml +++ /dev/null @@ -1,272 +0,0 @@ -category: base -doc: | - Specialized base class container for reporting a set of images in reciprocal space. - - In practice, complex numbers are encoded via some formatted pair of real values. - Typically, fast Algorithms for computing Fourier Transformations (FFT) are - used to encode images in reciprocal (frequency) space. FFT libraries are used - for implementing the key functionalities of these mathematical operations. - - Different libraries use different representations and encoding of the - image computed. Details can be found in the respective sections of the - typical FFT libraries: - - * `FFTW by M. Frigo and S. G. Johnson `_ - * `Intel MKL by the Intel Co. `_ - * `cuFFT by the NVidia Co. `_ - - Users are strongly advised to inspect carefully which specific conventions - their library uses to be able to store and modify the implementation of their - code so that the serialized representations as it is detailed - here for NeXus matches with their intention. - - One- and two-dimensional FFTs should use the stack(NXdata) instances. - Three-dimensional FFTs should use the hyperstack(NXdata) instances. -symbols: - n_images: | - Number of images in the (hyper)stack. - n_k: | - Number of pixel per image in the slowest direction. - n_j: | - Number of pixel per image in the slow direction. - n_i: | - Number of pixel per image in the fast direction. -type: group -NXimage_c_set(NXimage_set): - # details about the FFT library used could for instance be stored in the - # NXprocess group which the NXimage_c_set base class can borrow from its - # NXimage_set parent base class - # process information are composable from the NXimage_set base class - image_oned(NXdata): - doc: | - One-dimensional image. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_i,) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_i,) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_i) - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY # NX_RECIPROCAL_LENGTH - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. - - image_twod(NXdata): - doc: | - Two-dimensional image. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_j, n_i) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_j, n_i) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_j, n_i) - axis_j(NX_NUMBER): - doc: | - Pixel coordinate center along j direction. - unit: NX_ANY # NX_RECIPROCAL_LENGTH - dim: (n_j,) - \@long_name(NX_CHAR): - doc: | - Coordinate along j direction. - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY # NX_RECIPROCAL_LENGTH - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. - - image_threed(NXdata): - doc: | - Three-dimensional image. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_k, n_j, n_i) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_k, n_j, n_i) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_k, n_j, n_i) - axis_k(NX_NUMBER): - doc: | - Pixel coordinate center along k direction. - unit: NX_ANY # NX_RECIPROCAL_LENGTH - dim: (n_k,) - \@long_name(NX_CHAR): - doc: | - Coordinate along k direction. - axis_j(NX_NUMBER): - doc: | - Pixel coordinate center along j direction. - unit: NX_ANY - dim: (n_j,) - \@long_name(NX_CHAR): - doc: | - Coordinate along j direction. - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. - - stack_oned(NXdata): - doc: | - Collection of one-dimensional images. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_images, n_i) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_images, n_i) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_images, n_i) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. - - stack_twod(NXdata): - doc: | - Collection of two-dimensional images. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_images, n_j, n_i) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_images, n_j, n_i) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_images, n_j, n_i) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_j(NX_NUMBER): - doc: | - Pixel coordinate center along j direction. - unit: NX_ANY - dim: (n_j,) - \@long_name(NX_CHAR): - doc: | - Coordinate along j direction. - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. - - stack_threed(NXdata): - doc: | - Collection of three-dimensional images. - real(NX_NUMBER): - doc: | - Image intensity of the real part. - unit: NX_UNITLESS - dim: (n_images, n_k, n_j, n_i) - imag(NX_NUMBER): - doc: | - Image intensity of the imaginary part. - unit: NX_UNITLESS - dim: (n_images, n_k, n_j, n_i) - magnitude(NX_NUMBER): - doc: | - Magnitude of the image intensity. - unit: NX_UNITLESS - dim: (n_images, n_k, n_j, n_i) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_k(NX_NUMBER): - doc: | - Pixel coordinate center along k direction. - unit: NX_ANY - dim: (n_k,) - \@long_name(NX_CHAR): - doc: | - Coordinate along k direction. - axis_j(NX_NUMBER): - doc: | - Pixel coordinate center along j direction. - unit: NX_ANY - dim: (n_j,) - \@long_name(NX_CHAR): - doc: | - Coordinate along j direction. - axis_i(NX_NUMBER): - doc: | - Pixel coordinate center along i direction. - unit: NX_ANY - dim: (n_i,) - \@long_name(NX_CHAR): - doc: | - Coordinate along i direction. diff --git a/contributed_definitions/nyaml/NXimage_r_set.yaml b/contributed_definitions/nyaml/NXimage_r_set.yaml deleted file mode 100644 index 5c63988c65..0000000000 --- a/contributed_definitions/nyaml/NXimage_r_set.yaml +++ /dev/null @@ -1,188 +0,0 @@ -category: base -doc: | - Specialized base class container for reporting a set of images in real space. -symbols: - n_images: | - Number of images in the stack. - n_z: | - Number of pixel per image in the slowest direction. - n_y: | - Number of pixel per image in the slow direction. - n_x: | - Number of pixel per image in the fast direction. -type: group -NXimage_r_set(NXimage_set): - # process information are composable from the NXimage_set base class - image_oned(NXdata): - doc: | - One-dimensional image. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_x,) - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. - - image_twod(NXdata): - doc: | - Two-dimensional image. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_y, n_x) - axis_y(NX_NUMBER): - doc: | - Pixel coordinate center along y direction. - unit: NX_LENGTH - dim: (n_y,) - \@long_name(NX_CHAR): - doc: | - Coordinate along y direction. - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. - - image_threed(NXdata): - doc: | - Three-dimensional image. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_z, n_y, n_x) - axis_z(NX_NUMBER): - doc: | - Pixel coordinate center along z direction. - unit: NX_LENGTH - dim: (n_z,) - \@long_name(NX_CHAR): - doc: | - Coordinate along z direction. - axis_y(NX_NUMBER): - doc: | - Pixel coordinate center along y direction. - unit: NX_LENGTH - dim: (n_y,) - \@long_name(NX_CHAR): - doc: | - Coordinate along y direction. - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. - - stack_oned(NXdata): - doc: | - Collection of one-dimensional images. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_images, n_x) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. - - stack_twod(NXdata): - doc: | - Collection of two-dimensional images. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_images, n_y, n_x) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_y(NX_NUMBER): - doc: | - Pixel coordinate center along y direction. - unit: NX_LENGTH - dim: (n_y,) - \@long_name(NX_CHAR): - doc: | - Coordinate along y direction. - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. - - stack_threed(NXdata): - doc: | - Collection of three-dimensional images. - intensity(NX_NUMBER): - doc: | - Image intensity values. - unit: NX_UNITLESS - dim: (n_images, n_z, n_y, n_x) - axis_image_identifier(NX_INT): - doc: | - Image identifier - unit: NX_UNITLESS - dim: (n_images,) - \@long_name(NX_CHAR): - doc: | - Image identifier. - axis_z(NX_NUMBER): - doc: | - Pixel coordinate center along z direction. - unit: NX_LENGTH - dim: (n_z,) - \@long_name(NX_CHAR): - doc: | - Coordinate along z direction. - axis_y(NX_NUMBER): - doc: | - Pixel coordinate center along y direction. - unit: NX_LENGTH - dim: (n_y,) - \@long_name(NX_CHAR): - doc: | - Coordinate along y direction. - axis_x(NX_NUMBER): - doc: | - Pixel coordinate center along x direction. - unit: NX_LENGTH - dim: (n_x,) - \@long_name(NX_CHAR): - doc: | - Coordinate along x direction. diff --git a/contributed_definitions/nyaml/NXimage_r_set_diff.yaml b/contributed_definitions/nyaml/NXimage_r_set_diff.yaml deleted file mode 100644 index 5a0e27e283..0000000000 --- a/contributed_definitions/nyaml/NXimage_r_set_diff.yaml +++ /dev/null @@ -1,123 +0,0 @@ -category: base -doc: | - Base class specialized for reporting a cuboidal stack of diffraction pattern. - - Diffraction pattern, whether they were simulated or measured are the raw data - for computational workflows to characterize the phase and orientation - of crystalline regions in matter. - - Steps of post-processing the diffraction patterns should be documented using - method-specific specialized base classes. All eventual post-processing of - resulting orientation maps (2D or 3D) should be documented via :ref:`NXms_recon`. - - To implement an example how this base class can be used we focused in FAIRmat - on Kikuchi diffraction pattern here specifically the research community - of Electron Backscatter Diffraction (EBSD). - - For this reason, this base class and the :ref:`NXem_ebsd` base class extend the - work of `M. A. Jackson et al. `_ - (one of the developers of DREAM.3D) and the H5OINA public file format developed by - `P. Pinard et al. `_ with Oxford Instruments. - - Kikuchi pattern are typically collected with FIB/SEM microscopes, - for two- and three-dimensional orientation microscopy. - - For a detailed overview of these techniques see e.g. - - * `M. A. Groeber et al. `_ - * `A. J. Schwartz et al. `_ - * `P. A. Rottman et al. `_ - - Serial-sectioning demands a recurrent sequence of ion milling and measuring. - This suggests that each serial section is at least an own NXevent_data_em - instance. The three-dimensional characterization as such demands a computational - step where the maps for each serial section get cleaned, aligned, and registered - into an image stack. This image stack represents a digital model of the - inspected microstructural volume. Often this volume is called a (representative) - volume element (RVE). Several software packages exists for performing - these post-processing tasks. - - This example may inspire users of other types of diffraction methods. -symbols: - n_sc: | - Number of scanned points. Scan point may have none, one, or more pattern. - n_p: | - Number of diffraction pattern. - n_y: | - Number of pixel per pattern in the slow direction. - n_x: | - Number of pixel per pattern in the fast direction. -type: group -NXimage_r_set_diff(NXimage_r_set): - pattern_type(NX_CHAR): - doc: | - Category which type of diffraction pattern is reported. - enumeration: [kikuchi] - stack(NXdata): - doc: | - Collected diffraction pattern as an image stack. As raw and closest to the - first retrievable measured data as possible, i.e. do not use this - container to store already averaged, filtered or whatever post-processed - pattern unless these are generated unmodifiably in such manner by the - instrument given the way how the instrument and control software - was configured for your microscope session. - scan_point_identifier(NX_INT): - doc: | - Array which resolves the scan point to which each pattern belongs. - - Scan points are evaluated in sequence starting from scan point zero - until scan point n_sc - 1. Evaluating the cumulated of this array - decodes which pattern in intensity belongs to which scan point. - - Take an example with three scan points: The first scan point has one - pattern, the second has three pattern, the last scan point has no - pattern. In this case the scan_point_identifier are 0, 1, 1, 1. - The length of the scan_point_identifier array is four because four - pattern were measured in total. - - In most cases usually one pattern is averaged by the detector for - some amount of time and then reported as one pattern. - unit: NX_UNITLESS - dim: (n_p,) - intensity(NX_NUMBER): - doc: | - Intensity of the diffraction pattern. - unit: NX_UNITLESS - dim: (n_p, n_y, n_x) - # n_p fast 2, n_y faster 1, n_x fastest 0 - # in axes fast to fastest - # while for _indices fastest to fast - \@long_name(NX_CHAR): - doc: | - Pattern intensity - # \@signal: intensity - # \@axes: [pattern_identifier, ypos, xpos] - # \@xpos_indices: 0 - # \@ypos_indices: 1 - # \@pattern_identifier_indices: 2 - pattern_identifier(NX_INT): - doc: | - Pattern are enumerated starting from 0 to n_p - 1. - unit: NX_UNITLESS - dim: (n_p,) - \@long_name(NX_CHAR): - doc: | - Pattern identifier - # the following fields are taken from the NXimage_r_set base class - # axis_y(R): - # axis_x(R): - -# If we envision a (knowledge) graph for EBSD it consists of individual sub-graphs -# which convey information about the specimen preparation, the measurement of -# the specimen in the electron microscope, the indexing of the collected -# Kikuchi pattern stack, eventual post-processing of the indexed orientation -# images via similarity grouping algorithms to yield (grains, texture). -# Conceptually, these post-processing steps are most frequently serving -# the idea how can one reconstruct so-called microstructural features -# (grains, phases, interfaces) to infer material properties. -# In practice this calls for workflows which quantify correlations between -# the spatial arrangement of the microstructural features, the individual -# (thermodynamic, chemo-mechanical) properties of the features with the -# properties of materials at a coarser scale. -# With NXem and related NXms base classes we propose a covering -# and general solution how to handle such (meta)data with NeXus. diff --git a/contributed_definitions/nyaml/NXimage_set.yaml b/contributed_definitions/nyaml/NXimage_set.yaml index 48cbedb1f5..dbaaf04da1 100644 --- a/contributed_definitions/nyaml/NXimage_set.yaml +++ b/contributed_definitions/nyaml/NXimage_set.yaml @@ -1,38 +1,367 @@ category: base -doc: | - Base class for reporting a set of images. +doc: +- | + Base class for reporting a set of images in real or reciprocal space. +- | + For images in reciprocal space in practice, complex numbers are encoded via some + formatted pair of real values. Typically, fast Algorithms for computing Fourier Transformations + (FFT) are used to encode images in reciprocal (frequency) space. FFT libraries are used + for implementing the key functionalities of these mathematical operations. - This class provides a base vocabulary to be used for specialized :ref:`NXimage_set` - base classes like :ref:`NXimage_r_set` and :ref:`NXimage_c_set`. + Different libraries use different representations and encoding of the image computed. + Details can be found in the respective sections of the typical FFT libraries + + * `FFTW by M. Frigo and S. G. Johnson `_ + * `Intel MKL by the Intel Co. `_ + * `cuFFT by the NVidia Co. `_ + + Users are strongly advised to inspect carefully which specific conventions + their library uses to be able to store and modify the implementation of their + code such that the serialized representations, as it is detailed here for NeXus, + matches. + + It is frequently the case that several images are combined using processing. In this case, + the number of images which are combined in a collection is not necessarily the same + for each collection. The NXimage_set base class addresses this logical distinction through + the notation of image_identifier and group_identifier. + That is image identifier are always counting from offset in increments of one. Each image + is an own entity. A group may contain no, or several such images. +# for details about NXimage_r_set_diff see +# https://github.com/FAIRmat-NFDI/nexus_definitions/commit/0682943baaef54d4a6386b5433f9721af6d3d81b +# and here contributed_definitions/NXimage_r_set_diff.nxdl.xml symbols: - n_images: | - Number of images in the stack. - n_y: | - Number of pixel per image in the slow direction. - n_x: | - Number of pixel per image in the fast direction. + n_img: | + Number of images in the stack, for stacks the slowest direction. + n_k: | + Number of pixels per image in the slow direction (k equivalent to z). + n_j: | + Number of pixels per image in the fast direction (j equivalent to y). + n_i: | + Number of pixels per image in the fastest direction (i equivalent to x). type: group NXimage_set(NXobject): (NXprocess): doc: | - Details how NXdata instance inside instance of (specialized) - :ref:`NXimage_set` were processed from the detector readings/raw data. + Details how NXdata instance were processed from detector readings/raw data. source(NXserialized): - doc: | - Resolvable data artifact (e.g. filename) from which the all values in - the :ref:`NXdata` instances in this :ref:`NXimage_set` were loaded - during parsing. - - Possibility to document from which specific other serialized resource - as the source pieces of information where processed when NeXus is used - as a semantic file format to serialize that information differently. + doc: + - | + Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + instances in this :ref:`NXimage_set` were loaded during parsing. + - | + Possibility to document from which specific other serialized resource as the source + pieces of information were processed when using NeXus as a semantic file format + to serialize that information differently. The group in combination with an added field *absolute_path* therein adds context. - mode(NX_CHAR): - doc: | - Imaging (data collection) mode of the instrument during acquisition - of the data in this :ref:`NXimage_set` instance. + absolute_path(NX_CHAR): + doc: + - | + Reference to a location inside the artifact that points to the specific group of values + that were processed if the artifacts contains several groups of values and thus + further resolving of ambiguities is required. + # mode(NX_CHAR): + # doc: | + # Imaging (data collection) mode of the instrument during acquisition. detector_identifier(NX_CHAR): doc: | Link or name of an :ref:`NXdetector` instance with which the data were collected. (NXprogram): + doc: | + Program used for processing. + space(NX_CHAR): + doc: + - | + The reference space in which the image set is defined. + enumeration: [real, reciprocal] + + image_oned(NXdata): + doc: | + One-dimensional image. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_i,) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_i,) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_i,) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_i,) + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. + + image_twod(NXdata): + doc: | + Two-dimensional image. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_j, n_i) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_j, n_i) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_j, n_i) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_j, n_i) + axis_j(NX_NUMBER): + doc: | + Pixel coordinate center along fast direction. + unit: NX_LENGTH + dim: (n_j,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fast direction. + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. + + image_threed(NXdata): + doc: | + Three-dimensional image. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_k, n_j, n_i) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_k, n_j, n_i) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_k, n_j, n_i) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_k, n_j, n_i) + axis_k(NX_NUMBER): + doc: | + Pixel coordinate center along slow direction. + unit: NX_LENGTH + dim: (n_k,) + \@long_name(NX_CHAR): + doc: | + Coordinate along slow direction. + axis_j(NX_NUMBER): + doc: | + Pixel coordinate center along fast direction. + unit: NX_LENGTH + dim: (n_j,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fast direction. + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. + + stack_oned(NXdata): + doc: | + Collection of one-dimensional images. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_i) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_i) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_img, n_i) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_img, n_i) + group_identifier(NX_INT): + doc: | + Group identifier for each image. + unit: NX_UNITLESS + dim: (n_img,) + image_identifier(NX_INT): + doc: | + Image identifier + unit: NX_UNITLESS + dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Image identifier. + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. + + stack_twod(NXdata): + doc: | + Collection of two-dimensional images. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_j, n_i) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_j, n_i) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_img, n_j, n_i) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_img, n_j, n_i) + group_identifier(NX_INT): + doc: | + Group identifier for each image. + unit: NX_UNITLESS + dim: (n_img,) + image_identifier(NX_INT): + doc: | + Image identifier + unit: NX_UNITLESS + dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Image identifier. + axis_y(NX_NUMBER): + doc: | + Pixel coordinate center along fast direction. + unit: NX_LENGTH + dim: (n_j,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fast direction. + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. + + stack_threed(NXdata): + doc: | + Collection of three-dimensional images. + real(NX_NUMBER): + doc: | + Real part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_k, n_j, n_i) + imag(NX_NUMBER): + doc: | + Imaginary part of the image intensity per pixel. + unit: NX_UNITLESS + dim: (n_img, n_k, n_j, n_i) + magnitude(NX_NUMBER): + doc: | + Magnitude of the image intensity. + unit: NX_UNITLESS + dim: (n_img, n_k, n_j, n_i) + intensity(NX_COMPLEX): + doc: | + Image intensity as a complex number as an alternative + to real and imag fields if values are stored as interleaved + complex numbers. + unit: NX_UNITLESS + dim: (n_img, n_k, n_j, n_i) + group_identifier(NX_INT): + doc: | + Group identifier for each image. + unit: NX_UNITLESS + dim: (n_img,) + image_identifier(NX_INT): + doc: | + Image identifier + unit: NX_UNITLESS + dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Image identifier. + axis_k(NX_NUMBER): + doc: | + Pixel coordinate center along slow direction. + unit: NX_LENGTH + dim: (n_k,) + \@long_name(NX_CHAR): + doc: | + Coordinate along slow direction. + axis_j(NX_NUMBER): + doc: | + Pixel coordinate center along fast direction. + unit: NX_LENGTH + dim: (n_j,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fast direction. + axis_i(NX_NUMBER): + doc: | + Pixel coordinate center along fastest direction. + unit: NX_LENGTH + dim: (n_i,) + \@long_name(NX_CHAR): + doc: | + Coordinate along fastest direction. diff --git a/contributed_definitions/nyaml/NXspectrum_set.yaml b/contributed_definitions/nyaml/NXspectrum_set.yaml index 5cee48ffea..1f5284889b 100644 --- a/contributed_definitions/nyaml/NXspectrum_set.yaml +++ b/contributed_definitions/nyaml/NXspectrum_set.yaml @@ -8,13 +8,13 @@ doc: | For randomly or dissimilarly spaced scan points use collection instead. symbols: n_p: | - Number of scan points. + Number of scan points (slowest dimension). n_z: | - Number of pixel in the slowest direction. - n_y: | Number of pixel in the slow direction. - n_x: | + n_y: | Number of pixel in the fast direction. + n_x: | + Number of pixel in the fastest direction. n_energy: | Number of energy bins. type: group @@ -26,16 +26,22 @@ NXspectrum_set(NXobject): doc: | Details how spectra were processed from the detector readings. source(NXserialized): - doc: | - Resolvable data artifact (e.g. filename) from which the all values in - the :ref:`NXdata` instances in this :ref:`NXspectrum_set` were - loaded during parsing. - - Possibility to document from which specific other serialized resource - as the source pieces of information where processed when NeXus is used - as a semantic file format to serialize that information differently. + doc: + - | + Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + instances in this :ref:`NXspectrum_set` were loaded during parsing. + - | + Possibility to document from which specific other serialized resource as the source + pieces of information were processed when using NeXus as a semantic file format + to serialize that information differently. - The group in combination with an add field *absolute_path* therein adds context. + The group in combination with an added field *absolute_path* therein adds context. + absolute_path(NX_CHAR): + doc: + - | + Reference to a location inside the artifact that points to the specific group of values + that were processed if the artifacts contains several groups of values and thus + further resolving of ambiguities is required. mode(NX_CHAR): doc: | Imaging (data collection) mode of the instrument during acquisition diff --git a/dev_tools/tests/test_nxdl_utils.py b/dev_tools/tests/test_nxdl_utils.py index 8618271d31..19eccd7e85 100644 --- a/dev_tools/tests/test_nxdl_utils.py +++ b/dev_tools/tests/test_nxdl_utils.py @@ -78,19 +78,19 @@ def test_get_node_at_nxdl_path(): assert node.attrib["type"] == "NXem_msr" node = nexus.get_node_at_nxdl_path( - "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_C_SET/image_threed", + "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_SET/image_threed", elem=elem, ) assert node.attrib["type"] == "NXdata" node = nexus.get_node_at_nxdl_path( - "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_C_SET/image_threed/AXISNAME_indices", + "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_SET/image_threed/AXISNAME_indices", elem=elem, ) assert node.attrib["name"] == "AXISNAME_indices" node = nexus.get_node_at_nxdl_path( - "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_C_SET/image_threed/axis_j", + "/ENTRY/measurement/EVENT_DATA_EM_SET/EVENT_DATA_EM/IMAGE_SET/image_threed/axis_j", elem=elem, ) assert node.attrib["type"] == "NX_NUMBER" diff --git a/manual/source/classes/contributed_definitions/em-structure.rst b/manual/source/classes/contributed_definitions/em-structure.rst index f26e75121b..06b8de3326 100644 --- a/manual/source/classes/contributed_definitions/em-structure.rst +++ b/manual/source/classes/contributed_definitions/em-structure.rst @@ -114,9 +114,12 @@ The following base classes are proposed to support modularizing the storage of p :ref:`NXevent_data_em_set`: A base class to group all :ref:`NXevent_data_em` instances. - :ref:`NXimage_set`, :ref:`NXimage_r_set`, :ref:`NXimage_c_set`, :ref:`NXimage_r_set_diff`: + :ref:`NXimage_set`: Base classes for storing acquisition details for individual images or stacks of images. + :ref:`NXspectrum_set`: + A base class and specializations comparable to :ref:`NXimage_set` but for storing spectra. + :ref:`NXinteraction_vol_em`: A base class to describe details about e.g. the assumed or simulated volume of interaction of the electrons with the specimen. @@ -134,9 +137,6 @@ The following base classes are proposed to support modularizing the storage of p :ref:`NXcircuit`, :ref:`NXcircuit_board`, :ref:`NXadc`, :ref: `NXdac`: Base classes to describe integrated circuits (ICs). Further consolidation of these base classes is planned. - :ref:`NXspectrum_set`: - A base class and specializations comparable to :ref:`NXimage_set` but for storing spectra. - .. _EmAnalysisClasses: From f0ca58a085e12e1396133010454835c613980822 Mon Sep 17 00:00:00 2001 From: mkuehbach Date: Thu, 4 Jul 2024 12:24:47 +0200 Subject: [PATCH 5/5] Implemented @lukaspie suggestions --- contributed_definitions/NXimage_set.nxdl.xml | 240 ++++++++++-------- .../nyaml/NXimage_set.yaml | 234 +++++++++-------- 2 files changed, 262 insertions(+), 212 deletions(-) diff --git a/contributed_definitions/NXimage_set.nxdl.xml b/contributed_definitions/NXimage_set.nxdl.xml index c3f33bd683..4c24730417 100644 --- a/contributed_definitions/NXimage_set.nxdl.xml +++ b/contributed_definitions/NXimage_set.nxdl.xml @@ -33,46 +33,59 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Number of pixels per image in the slow direction (k equivalent to z). + Number of image points along the slow direction (k equivalent to z). - Number of pixels per image in the fast direction (j equivalent to y). + Number of image points along the fast direction (j equivalent to y). - Number of pixels per image in the fastest direction (i equivalent to x). + Number of image points along the fastest direction (i equivalent to x). Base class for reporting a set of images in real or reciprocal space. + Typically an image is understood as a discretized representation of intensity distribution that was + detected or simulated for which most often equidistantly spaced sampling is used. + The terms pixel and voxel identify the smallest discretization unit of such a representation. + Under these conditions pixel and voxel are polygonal or polyhedral unit cells of the underlying + tessellation of the region of interest within the reference space. + + If the sampling is not equispaced, the shape and size of pixel and voxel change but still their + reference space is tessellated. In this case the term (image) point is eventually a more appropriate + term to use. Therefore, all docstrings in this base class refer to points. + + This base class represents images generated from equispaced or non-equispaced sampling. + For images in reciprocal space in practice, complex numbers are encoded via some - formatted pair of real values. Typically, fast Algorithms for computing Fourier Transformations + formatted pair of real values. Typically, fast algorithms for computing Fourier transformations (FFT) are used to encode images in reciprocal (frequency) space. FFT libraries are used for implementing the key functionalities of these mathematical operations. - Different libraries use different representations and encoding of the image computed. - Details can be found in the respective sections of the typical FFT libraries + Different libraries use different representations and encoding of the images. + Details can be found in the respective sections of the typical FFT libraries documentations * `FFTW by M. Frigo and S. G. Johnson <https://www.fftw.org/fftw3_doc/Tutorial.html#Tutorial>`_ - * `Intel MKL by the Intel Co. <https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/fourier-transform-functions.html>`_ + * `Intel MKL by the Intel Co. <https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2024-2/fourier-transform-functions.html>`_ * `cuFFT by the NVidia Co. <https://docs.nvidia.com/cuda/cufft/index.html>`_ + * `NFFT by the Chemnitz group <https://www-user.tu-chemnitz.de/~potts/nfft/>`_ for non-equispaced computations - Users are strongly advised to inspect carefully which specific conventions - their library uses to be able to store and modify the implementation of their - code such that the serialized representations, as it is detailed here for NeXus, - matches. + Users are strongly advised to inspect carefully which specific conventions their library uses + to enable storing and modifying the implementation of their code such that the serialized + representations as they are detailed here for NeXus match. - It is frequently the case that several images are combined using processing. In this case, + It is often the case that several images are combined using processing. In this case, the number of images which are combined in a collection is not necessarily the same - for each collection. The NXimage_set base class addresses this logical distinction through - the notation of image_identifier and group_identifier. - That is image identifier are always counting from offset in increments of one. Each image - is an own entity. A group may contain no, or several such images. + for each collection. The NXimage_set base class addresses this logical distinction + through the notation of image_identifier and group_identifier concepts. + That is image_identifier are always counting from offset in increments of one. + as each image is its own entity. By contrast, a group may contain no, or several images. + Consequently, group_identifier are not required to be contiguous. @@ -80,7 +93,7 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + Resolvable data artifact (e.g. file) from which all values in the :ref:`NXdata` instances in this :ref:`NXimage_set` were loaded during parsing. Possibility to document from which specific other serialized resource as the source @@ -125,35 +138,35 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> One-dimensional image. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Imaginary part of the image intensity per point. - + - Magnitude of the image intensity. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -161,14 +174,14 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. @@ -177,38 +190,38 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> Two-dimensional image. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. - + - Magnitude of the image intensity. + Imaginary part of the image intensity per point. - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -217,27 +230,27 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. - Coordinate along fast direction. + Point coordinate along the fast direction. - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. @@ -246,9 +259,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> Three-dimensional image. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. @@ -256,9 +270,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. @@ -266,9 +280,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Magnitude of the image intensity. + Imaginary part of the image intensity per point. @@ -276,11 +290,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -290,40 +303,40 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Pixel coordinate center along slow direction. + Point coordinate along the slow direction. - Coordinate along slow direction. + Point coordinate along the slow direction. - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. - Coordinate along fast direction. + Point coordinate along the fast direction. - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. @@ -332,38 +345,38 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> Collection of one-dimensional images. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. - + - Magnitude of the image intensity. + Imaginary part of the image intensity per point. - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -372,11 +385,16 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Group identifier for each image. + Group identifier + + + Group identifier + + @@ -387,20 +405,20 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Image identifier. + Image identifier - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. @@ -409,9 +427,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> Collection of two-dimensional images. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. @@ -419,9 +438,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. @@ -429,9 +448,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Magnitude of the image intensity. + Imaginary part of the image intensity per point. @@ -439,11 +458,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -453,11 +471,16 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Group identifier for each image. + Group identifier + + + Group identifier + + @@ -474,27 +497,27 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. - Coordinate along fast direction. + Point coordinate along the fast direction. - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. @@ -503,9 +526,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> Collection of three-dimensional images. - + - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. @@ -514,9 +538,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. @@ -525,9 +549,9 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Magnitude of the image intensity. + Imaginary part of the image intensity per point. @@ -536,11 +560,10 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - + - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. @@ -551,11 +574,16 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Group identifier for each image. + Group identifier + + + Group identifier + + @@ -566,46 +594,46 @@ and here contributed_definitions/NXimage_r_set_diff.nxdl.xml--> - Image identifier. + Image identifier - Pixel coordinate center along slow direction. + Point coordinate along the slow direction. - Coordinate along slow direction. + Point coordinate along the slow direction. - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. - Coordinate along fast direction. + Point coordinate along the fast direction. - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. - Coordinate along fastest direction. + Point coordinate along the fastest direction. diff --git a/contributed_definitions/nyaml/NXimage_set.yaml b/contributed_definitions/nyaml/NXimage_set.yaml index dbaaf04da1..ccfa0b34d5 100644 --- a/contributed_definitions/nyaml/NXimage_set.yaml +++ b/contributed_definitions/nyaml/NXimage_set.yaml @@ -3,29 +3,42 @@ doc: - | Base class for reporting a set of images in real or reciprocal space. - | + Typically an image is understood as a discretized representation of intensity distribution that was + detected or simulated for which most often equidistantly spaced sampling is used. + The terms pixel and voxel identify the smallest discretization unit of such a representation. + Under these conditions pixel and voxel are polygonal or polyhedral unit cells of the underlying + tessellation of the region of interest within the reference space. + + If the sampling is not equispaced, the shape and size of pixel and voxel change but still their + reference space is tessellated. In this case the term (image) point is eventually a more appropriate + term to use. Therefore, all docstrings in this base class refer to points. + + This base class represents images generated from equispaced or non-equispaced sampling. + For images in reciprocal space in practice, complex numbers are encoded via some - formatted pair of real values. Typically, fast Algorithms for computing Fourier Transformations + formatted pair of real values. Typically, fast algorithms for computing Fourier transformations (FFT) are used to encode images in reciprocal (frequency) space. FFT libraries are used for implementing the key functionalities of these mathematical operations. - Different libraries use different representations and encoding of the image computed. - Details can be found in the respective sections of the typical FFT libraries + Different libraries use different representations and encoding of the images. + Details can be found in the respective sections of the typical FFT libraries documentations * `FFTW by M. Frigo and S. G. Johnson `_ - * `Intel MKL by the Intel Co. `_ + * `Intel MKL by the Intel Co. `_ * `cuFFT by the NVidia Co. `_ + * `NFFT by the Chemnitz group `_ for non-equispaced computations - Users are strongly advised to inspect carefully which specific conventions - their library uses to be able to store and modify the implementation of their - code such that the serialized representations, as it is detailed here for NeXus, - matches. + Users are strongly advised to inspect carefully which specific conventions their library uses + to enable storing and modifying the implementation of their code such that the serialized + representations as they are detailed here for NeXus match. - It is frequently the case that several images are combined using processing. In this case, + It is often the case that several images are combined using processing. In this case, the number of images which are combined in a collection is not necessarily the same - for each collection. The NXimage_set base class addresses this logical distinction through - the notation of image_identifier and group_identifier. - That is image identifier are always counting from offset in increments of one. Each image - is an own entity. A group may contain no, or several such images. + for each collection. The NXimage_set base class addresses this logical distinction + through the notation of image_identifier and group_identifier concepts. + That is image_identifier are always counting from offset in increments of one. + as each image is its own entity. By contrast, a group may contain no, or several images. + Consequently, group_identifier are not required to be contiguous. # for details about NXimage_r_set_diff see # https://github.com/FAIRmat-NFDI/nexus_definitions/commit/0682943baaef54d4a6386b5433f9721af6d3d81b # and here contributed_definitions/NXimage_r_set_diff.nxdl.xml @@ -33,11 +46,11 @@ symbols: n_img: | Number of images in the stack, for stacks the slowest direction. n_k: | - Number of pixels per image in the slow direction (k equivalent to z). + Number of image points along the slow direction (k equivalent to z). n_j: | - Number of pixels per image in the fast direction (j equivalent to y). + Number of image points along the fast direction (j equivalent to y). n_i: | - Number of pixels per image in the fastest direction (i equivalent to x). + Number of image points along the fastest direction (i equivalent to x). type: group NXimage_set(NXobject): (NXprocess): @@ -46,7 +59,7 @@ NXimage_set(NXobject): source(NXserialized): doc: - | - Resolvable data artifact (e.g. filename) from which all values in the :ref:`NXdata` + Resolvable data artifact (e.g. file) from which all values in the :ref:`NXdata` instances in this :ref:`NXimage_set` were loaded during parsing. - | Possibility to document from which specific other serialized resource as the source @@ -78,159 +91,162 @@ NXimage_set(NXobject): image_oned(NXdata): doc: | One-dimensional image. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_i,) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_i,) - intensity(NX_COMPLEX): + imag(NX_NUMBER): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_i,) - magnitude(NX_NUMBER): + complex(NX_COMPLEX): doc: | - Magnitude of the image intensity. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_i,) axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction. image_twod(NXdata): doc: | Two-dimensional image. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_j, n_i) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_j, n_i) - magnitude(NX_NUMBER): + imag(NX_NUMBER): doc: | - Magnitude of the image intensity. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_j, n_i) - intensity(NX_COMPLEX): + complex(NX_COMPLEX): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_j, n_i) axis_j(NX_NUMBER): doc: | - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. unit: NX_LENGTH dim: (n_j,) \@long_name(NX_CHAR): doc: | - Coordinate along fast direction. + Point coordinate along the fast direction. axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction. image_threed(NXdata): doc: | Three-dimensional image. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_k, n_j, n_i) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_k, n_j, n_i) - magnitude(NX_NUMBER): + imag(NX_NUMBER): doc: | - Magnitude of the image intensity. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_k, n_j, n_i) - intensity(NX_COMPLEX): + complex(NX_COMPLEX): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_k, n_j, n_i) axis_k(NX_NUMBER): doc: | - Pixel coordinate center along slow direction. + Point coordinate along the slow direction. unit: NX_LENGTH dim: (n_k,) \@long_name(NX_CHAR): doc: | - Coordinate along slow direction. + Point coordinate along the slow direction. axis_j(NX_NUMBER): doc: | - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. unit: NX_LENGTH dim: (n_j,) \@long_name(NX_CHAR): doc: | - Coordinate along fast direction. + Point coordinate along the fast direction. axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction. stack_oned(NXdata): doc: | Collection of one-dimensional images. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_img, n_i) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_i) - magnitude(NX_NUMBER): + imag(NX_NUMBER): doc: | - Magnitude of the image intensity. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_i) - intensity(NX_COMPLEX): + complex(NX_COMPLEX): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_img, n_i) group_identifier(NX_INT): doc: | - Group identifier for each image. + Group identifier unit: NX_UNITLESS dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Group identifier image_identifier(NX_INT): doc: | Image identifier @@ -238,46 +254,49 @@ NXimage_set(NXobject): dim: (n_img,) \@long_name(NX_CHAR): doc: | - Image identifier. + Image identifier axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction. stack_twod(NXdata): doc: | Collection of two-dimensional images. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_img, n_j, n_i) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_j, n_i) - magnitude(NX_NUMBER): + imag(NX_NUMBER): doc: | - Magnitude of the image intensity. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_j, n_i) - intensity(NX_COMPLEX): + complex(NX_COMPLEX): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_img, n_j, n_i) group_identifier(NX_INT): doc: | - Group identifier for each image. + Group identifier unit: NX_UNITLESS dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Group identifier image_identifier(NX_INT): doc: | Image identifier @@ -288,51 +307,54 @@ NXimage_set(NXobject): Image identifier. axis_y(NX_NUMBER): doc: | - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. unit: NX_LENGTH dim: (n_j,) \@long_name(NX_CHAR): doc: | - Coordinate along fast direction. + Point coordinate along the fast direction. axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction. stack_threed(NXdata): doc: | Collection of three-dimensional images. - real(NX_NUMBER): + intensity(NX_NUMBER): doc: | - Real part of the image intensity per pixel. + Intensity for real-valued images as an alternative for real. + Magnitude of the image intensity for complex-valued data. unit: NX_UNITLESS dim: (n_img, n_k, n_j, n_i) - imag(NX_NUMBER): + real(NX_NUMBER): doc: | - Imaginary part of the image intensity per pixel. + Real part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_k, n_j, n_i) - magnitude(NX_NUMBER): + imag(NX_NUMBER): doc: | - Magnitude of the image intensity. + Imaginary part of the image intensity per point. unit: NX_UNITLESS dim: (n_img, n_k, n_j, n_i) - intensity(NX_COMPLEX): + complex(NX_COMPLEX): doc: | - Image intensity as a complex number as an alternative - to real and imag fields if values are stored as interleaved - complex numbers. + Image intensity as a complex number as an alternative to real and + imaginary fields if values are stored as interleaved complex numbers. unit: NX_UNITLESS dim: (n_img, n_k, n_j, n_i) group_identifier(NX_INT): doc: | - Group identifier for each image. + Group identifier unit: NX_UNITLESS dim: (n_img,) + \@long_name(NX_CHAR): + doc: | + Group identifier image_identifier(NX_INT): doc: | Image identifier @@ -340,28 +362,28 @@ NXimage_set(NXobject): dim: (n_img,) \@long_name(NX_CHAR): doc: | - Image identifier. + Image identifier axis_k(NX_NUMBER): doc: | - Pixel coordinate center along slow direction. + Point coordinate along the slow direction. unit: NX_LENGTH dim: (n_k,) \@long_name(NX_CHAR): doc: | - Coordinate along slow direction. + Point coordinate along the slow direction. axis_j(NX_NUMBER): doc: | - Pixel coordinate center along fast direction. + Point coordinate along the fast direction. unit: NX_LENGTH dim: (n_j,) \@long_name(NX_CHAR): doc: | - Coordinate along fast direction. + Point coordinate along the fast direction. axis_i(NX_NUMBER): doc: | - Pixel coordinate center along fastest direction. + Point coordinate along the fastest direction. unit: NX_LENGTH dim: (n_i,) \@long_name(NX_CHAR): doc: | - Coordinate along fastest direction. + Point coordinate along the fastest direction.