Skip to content

Commit

Permalink
Base class templates (#51)
Browse files Browse the repository at this point in the history
* Refactored cg_primitive base classes for two key aspects: i) make all primitives inherit from new base class NXcg_primitive_set which makes a substantial number of repeated properties of specialized primitive base classes unnecessary, ii) introducing a rigorous mathematical set theoretical approach to describe the number type N, N0, Z, R, R+, R, iii) introduce short hand notation to reduce writing costs for shape/dimensions of arrays: now numpy syntax is used, for scalars (), (1, can be omitted, experience in FAIRmat has shown that in almost all cases the optional doc string to a dimension was almost never used and thus yaml based descriptions can be written more succinct, iv) proof-read docstrings and shortened them, introduced the suggestion to use info: as a keyword which should for now be just appended to the docstring as usual but in the future should be treated as a comment, i.e. only meant for human contextualization but ignored for semantic interpretation of concepts, a key difference that I hope this will bring is to reduce also the length of base classes and appdef as they show up in html pages, specifically for appdefs like NXem many of the conceptual ideas which these docstrings currently contain would be much better placed in a proper documentation instead of the actual class definition in the hope that the overall appearance of classes becomes easier and faster for people to power read; maybe this also works against some criticism that NeXus is considered complex, I have to say with the outsourcing of NXcg_primitive_set I feel it is damn simple now

* Refactoring of NXcs base classes

* First lot of refactoring EM base classes, the rest tomorrow, NXapm will not be refactored before the APT&M2023 conference in Sept2023, also because feedback from Leoben was positive enough that no immediate changes wrt to appdefs and base classes were required

* Summarize the current state of the discussion about coordinate systems with the proposed NXcoordinate_system and NXcoordinate_system_set base classes and best practice recommendations how they should be used including feedback from discussions with Florian Dobner and Tamás Haraszti

* Summary of the discussion how to handle conventions and method-specific conventions for EM and methods used in EM

* Base classes for implemented examples for pole figures, orientation distribution function, event_data, stage_lab, and ebsd_crystal_structure_model

* NXms_ipf base class and dos2unix to correct newlines

* Introducing NXem_method base class as a template how to write method-specific deep base classes to describe the terms and taxononmy of method-specific branches to be hooked into appdefs like NXem

* Base class inheritance proposal for a now even stronger modularized schema set for electron microscopy research, two tasks remain: i) refactor what is now a method-specific instance rather than an appdef (NXem_ebsd) (mainly to be able to fuse all examples of em-specific data converters including new ebsd examples into one em parser for pynxtools), ii) refactor NXem which is now clearly a specific appdef specializing the NXem_base deep base class, specialization work needs to define which fields and groups from all the possible ones now composable via base classes (inheritance) are required in an appdef NXem for NOMAD OASIS

* NXem_ebsd refactored into a base class to use it as a method-specific group inside the NXem application definition, next step: i) refactor NXem_sim, ii) finalize refactoring of NXem appdef (for Nomad oasis)

* finished draft of NXem_ebsd, NXem_correlation, and NXem appdef, cleaning the branch

* Add proposal for storing mtx cfg, fixed nxtime datatypes

* 2d microstructure projection

* Inspection how proposed, info, N0, N, R, Z value type abbreviations, and dimensions could be added to nyamlforward

* A likely too simplistic but at least working nyaml2nxdl forward mapping to explore further usage of refactored EM base classes. Info keyword has to be a child of doc or the respective text be removed from the standard and put into proposal-specific documentation, how to store what and where so that the schema docstring remain succinct and slim but all these conceptual ideas get not forgotten, typically the would be part of a tech report, i.e. in my opinion all what is under info: sections of a docstring should move to some documentation to tell the story to humans, next test these NXDLs with the NeXus documentation system

* Minor fix to handle info keyword spotted while compiling the documentation

* Fixes to compile with NeXus documentation test suite and sphinx

* Deactivated the annoying clean yaml via make clean for dev purposes

* Minor fix in em_base, this completes the appdef/base class work for now on the refactored EM, there are still some spurious info fields now, which should be removed when a decision has been made wrt to how to deal with info: keyword fields in general, next steps: i) make decision on info, ii) test refactored EM proposal with pynxtools em-parser v2, iii) implement backwards

* Styling via black

* Added yaml2nxdl-forward-converted NXDL files to all refactored base classes and the refactored NXem

* Added NXroot header for the em appdef and its base template appdef

* Continuing the refactoring of EM and APM plus related base classes for CG and MS based on suggestions from user meetings, discussions with Sandor, represents work with the MPES sprint #83

* Continuing on #83

* Continuing #83, NXcs_*

* Continuing #83, ipf, pf, odf

* Continuing on #83, support classes for EM

* Continued on #83, coordinate system, further base classes supporting EM

* Continuing #83, event_data_set and event_data description substantially condensed amongst other points

* Added cross-references to base classes for rst, continuing #83

* Aligned old NXem_ebsd_conventions with NXcoordinate_system for #83

* Reviewed method-specific base classes, ebsd, eds, eels, #83

* #83, NXms_recon

* #83, composed constraints on the NXem appdef

* Consolidated with changes that happened in between on the fairmat branch based on 1016aa0, NXms_recon has still an issue and is therefore deactivated currently, method-specific landing pages need to be updated

* Consolidated further with fairmat 15624c0

* Fixing some missing references

* Fixed syntax error to compile NXms_recon, docs building also now, reviewing intro pages remains

* Consistencies of dimensionality to use NX_POSINT and an enumeration

* Recompiled NXDL files using new nyaml module 3d500ced7e4ca57683957c1d61a8d0cb62eccf53, removed, modified by taking the one from fairmat, and synced all files which were binarily different between this feature branch and the fairmat branch specifically commit a15798b of the fairmat branch

* Deactivated em-based tests which because of a refactoring of em are not expected to work anymore

* Fix improper Latex notation in math environment for polyline, face_list, nanochem

* Added recompiled NXidentifier, NXserialized NXDLs which triggered pipeline errors in CatChen gh action

* Some round of proof-reading

* Fixed test_nxdl_utils to reflect and use refactored locations of refactored NXem

* Added feedback from @phyy-nx, @PeterC-DLS, and @prjemian from discussed here https://github.com/nexusformat/definitions PR nexusformat#1271

* Black formatting

* Reactivated data type check for e.g. NXem NX_NUMBER

* Implementing NX_DATE_TIME suggestion of @sanbrock

---------

Co-authored-by: markus.kuehbach <[email protected]>
# Conflicts:
#	applications/NXapm.nxdl.xml
#	applications/NXem.nxdl.xml
#	base_classes/NXaberration.nxdl.xml
#	base_classes/NXcg_alpha_complex.nxdl.xml
#	base_classes/NXcg_cylinder_set.nxdl.xml
#	base_classes/NXcg_face_list_data_structure.nxdl.xml
#	base_classes/NXcg_geodesic_mesh.nxdl.xml
#	base_classes/NXcg_grid.nxdl.xml
#	base_classes/NXcg_half_edge_data_structure.nxdl.xml
#	base_classes/NXcg_marching_cubes.nxdl.xml
#	base_classes/NXcg_polyline_set.nxdl.xml
#	base_classes/NXcg_triangulated_surface_mesh.nxdl.xml
#	base_classes/NXcg_unit_normal_set.nxdl.xml
#	base_classes/NXcoordinate_system_set.nxdl.xml
#	base_classes/NXcorrector_cs.nxdl.xml
#	base_classes/NXcs_computer.nxdl.xml
#	base_classes/NXcs_filter_boolean_mask.nxdl.xml
#	base_classes/NXcs_prng.nxdl.xml
#	base_classes/NXcs_profiling.nxdl.xml
#	base_classes/NXcs_profiling_event.nxdl.xml
#	base_classes/NXdeflector.nxdl.xml
#	base_classes/NXebeam_column.nxdl.xml
#	base_classes/NXem_ebsd.nxdl.xml
#	base_classes/NXevent_data_em.nxdl.xml
#	base_classes/NXevent_data_em_set.nxdl.xml
#	base_classes/NXibeam_column.nxdl.xml
#	base_classes/NXimage_set.nxdl.xml
#	base_classes/NXion.nxdl.xml
#	base_classes/NXlens_em.nxdl.xml
#	base_classes/NXoptical_system_em.nxdl.xml
#	base_classes/NXpump.nxdl.xml
#	base_classes/NXregistration.nxdl.xml
#	base_classes/NXscanbox_em.nxdl.xml
#	base_classes/NXspectrum_set.nxdl.xml
#	base_classes/NXstage_lab.nxdl.xml
#	contributed_definitions/NXaberration_model.nxdl.xml
#	contributed_definitions/NXaberration_model_ceos.nxdl.xml
#	contributed_definitions/NXaberration_model_nion.nxdl.xml
#	contributed_definitions/NXaperture_em.nxdl.xml
#	contributed_definitions/NXapm_paraprobe_results_nanochem.nxdl.xml
#	contributed_definitions/NXcg_ellipsoid_set.nxdl.xml
#	contributed_definitions/NXcg_hexahedron_set.nxdl.xml
#	contributed_definitions/NXcg_parallelogram_set.nxdl.xml
#	contributed_definitions/NXcg_point_set.nxdl.xml
#	contributed_definitions/NXcg_polygon_set.nxdl.xml
#	contributed_definitions/NXcg_polyhedron_set.nxdl.xml
#	contributed_definitions/NXcg_sphere_set.nxdl.xml
#	contributed_definitions/NXcg_tetrahedron_set.nxdl.xml
#	contributed_definitions/NXcg_triangle_set.nxdl.xml
#	contributed_definitions/NXchamber.nxdl.xml
#	contributed_definitions/NXcomponent_em.nxdl.xml
#	contributed_definitions/NXcs_gpu_sys.nxdl.xml
#	contributed_definitions/NXcs_io_obj.nxdl.xml
#	contributed_definitions/NXcs_io_sys.nxdl.xml
#	contributed_definitions/NXcs_mm_sys.nxdl.xml
#	contributed_definitions/NXem_adf.nxdl.xml
#	contributed_definitions/NXem_conventions.nxdl.xml
#	contributed_definitions/NXem_conventions_ebsd.nxdl.xml
#	contributed_definitions/NXem_ebsd_crystal_structure_model.nxdl.xml
#	contributed_definitions/NXgraph_edge_set.nxdl.xml
#	contributed_definitions/NXgraph_node_set.nxdl.xml
#	contributed_definitions/NXgraph_root.nxdl.xml
#	contributed_definitions/NXimage_r_set_diff.nxdl.xml
#	contributed_definitions/NXimage_set_em_adf.nxdl.xml
#	contributed_definitions/NXimage_set_em_kikuchi.nxdl.xml
#	contributed_definitions/NXinteraction_vol_em.nxdl.xml
#	contributed_definitions/NXisocontour.nxdl.xml
#	contributed_definitions/NXms.nxdl.xml
#	contributed_definitions/NXms_feature_set.nxdl.xml
#	contributed_definitions/NXms_ipf.nxdl.xml
#	contributed_definitions/NXms_mtex_config.nxdl.xml
#	contributed_definitions/NXms_odf.nxdl.xml
#	contributed_definitions/NXms_odf_set.nxdl.xml
#	contributed_definitions/NXms_pf.nxdl.xml
#	contributed_definitions/NXms_pf_set.nxdl.xml
#	contributed_definitions/NXms_recon.nxdl.xml
#	contributed_definitions/NXms_score_results.nxdl.xml
#	contributed_definitions/NXorientation_set.nxdl.xml
#	contributed_definitions/NXrotation_set.nxdl.xml
#	contributed_definitions/NXspectrum_set_em_eels.nxdl.xml
#	contributed_definitions/NXspectrum_set_em_xray.nxdl.xml
#	contributed_definitions/nyaml/NXaberration.yaml
#	contributed_definitions/nyaml/NXaberration_model.yaml
#	contributed_definitions/nyaml/NXaberration_model_ceos.yaml
#	contributed_definitions/nyaml/NXaberration_model_nion.yaml
#	contributed_definitions/nyaml/NXaperture_em.yaml
#	contributed_definitions/nyaml/NXapm.yaml
#	contributed_definitions/nyaml/NXapm_paraprobe_results_nanochem.yaml
#	contributed_definitions/nyaml/NXcg_alpha_complex.yaml
#	contributed_definitions/nyaml/NXcg_cylinder_set.yaml
#	contributed_definitions/nyaml/NXcg_ellipsoid_set.yaml
#	contributed_definitions/nyaml/NXcg_face_list_data_structure.yaml
#	contributed_definitions/nyaml/NXcg_geodesic_mesh.yaml
#	contributed_definitions/nyaml/NXcg_grid.yaml
#	contributed_definitions/nyaml/NXcg_half_edge_data_structure.yaml
#	contributed_definitions/nyaml/NXcg_hexahedron_set.yaml
#	contributed_definitions/nyaml/NXcg_marching_cubes.yaml
#	contributed_definitions/nyaml/NXcg_parallelogram_set.yaml
#	contributed_definitions/nyaml/NXcg_point_set.yaml
#	contributed_definitions/nyaml/NXcg_polygon_set.yaml
#	contributed_definitions/nyaml/NXcg_polyhedron_set.yaml
#	contributed_definitions/nyaml/NXcg_polyline_set.yaml
#	contributed_definitions/nyaml/NXcg_roi_set.yaml
#	contributed_definitions/nyaml/NXcg_sphere_set.yaml
#	contributed_definitions/nyaml/NXcg_tetrahedron_set.yaml
#	contributed_definitions/nyaml/NXcg_triangle_set.yaml
#	contributed_definitions/nyaml/NXcg_triangulated_surface_mesh.yaml
#	contributed_definitions/nyaml/NXcg_unit_normal_set.yaml
#	contributed_definitions/nyaml/NXchamber.yaml
#	contributed_definitions/nyaml/NXcoordinate_system_set.yaml
#	contributed_definitions/nyaml/NXcorrector_cs.yaml
#	contributed_definitions/nyaml/NXcs_computer.yaml
#	contributed_definitions/nyaml/NXcs_filter_boolean_mask.yaml
#	contributed_definitions/nyaml/NXcs_io_obj.yaml
#	contributed_definitions/nyaml/NXcs_io_sys.yaml
#	contributed_definitions/nyaml/NXcs_mm_sys.yaml
#	contributed_definitions/nyaml/NXcs_prng.yaml
#	contributed_definitions/nyaml/NXcs_profiling.yaml
#	contributed_definitions/nyaml/NXcs_profiling_event.yaml
#	contributed_definitions/nyaml/NXdeflector.yaml
#	contributed_definitions/nyaml/NXebeam_column.yaml
#	contributed_definitions/nyaml/NXem.yaml
#	contributed_definitions/nyaml/NXem_ebsd.yaml
#	contributed_definitions/nyaml/NXevent_data_em.yaml
#	contributed_definitions/nyaml/NXevent_data_em_set.yaml
#	contributed_definitions/nyaml/NXfabrication.yaml
#	contributed_definitions/nyaml/NXgraph_edge_set.yaml
#	contributed_definitions/nyaml/NXgraph_node_set.yaml
#	contributed_definitions/nyaml/NXgraph_root.yaml
#	contributed_definitions/nyaml/NXibeam_column.yaml
#	contributed_definitions/nyaml/NXimage_set.yaml
#	contributed_definitions/nyaml/NXinteraction_vol_em.yaml
#	contributed_definitions/nyaml/NXion.yaml
#	contributed_definitions/nyaml/NXisocontour.yaml
#	contributed_definitions/nyaml/NXlens_em.yaml
#	contributed_definitions/nyaml/NXms.yaml
#	contributed_definitions/nyaml/NXms_feature_set.yaml
#	contributed_definitions/nyaml/NXms_score_results.yaml
#	contributed_definitions/nyaml/NXoptical_system_em.yaml
#	contributed_definitions/nyaml/NXpump.yaml
#	contributed_definitions/nyaml/NXrotation_set.yaml
#	contributed_definitions/nyaml/NXscanbox_em.yaml
#	contributed_definitions/nyaml/NXspectrum_set.yaml
#	contributed_definitions/nyaml/NXstage_lab.yaml
#	dev_tools/tests/test_nxdl_utils.py
#	manual/source/classes/contributed_definitions/cgms-structure.rst
#	manual/source/classes/contributed_definitions/em-structure.rst
#	manual/source/classes/contributed_definitions/icme-structure.rst
  • Loading branch information
mkuehbach authored and lukaspie committed Dec 11, 2024
1 parent 3bc8bd9 commit 9440d9b
Show file tree
Hide file tree
Showing 92 changed files with 4,908 additions and 9,987 deletions.
1,696 changes: 0 additions & 1,696 deletions applications/NXapm.nxdl.xml

This file was deleted.

2,036 changes: 0 additions & 2,036 deletions applications/NXem.nxdl.xml

This file was deleted.

55 changes: 0 additions & 55 deletions base_classes/NXaberration.nxdl.xml

This file was deleted.

6 changes: 3 additions & 3 deletions base_classes/NXcg_alpha_complex.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
6 changes: 3 additions & 3 deletions base_classes/NXcg_cylinder_set.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
146 changes: 72 additions & 74 deletions base_classes/NXcg_face_list_data_structure.nxdl.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -21,8 +21,9 @@
#
# For further information, see http://www.nexusformat.org
-->
<!--duplicate of an NXoff_geometry ?-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" name="NXcg_face_list_data_structure" extends="NXobject" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<!--
duplicate of an NXoff_geometry ?-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_face_list_data_structure" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<symbols>
<doc>
The symbols used in the schema to specify e.g. dimensions of arrays.
Expand Down Expand Up @@ -59,128 +60,120 @@
</symbol>
</symbols>
<doc>
Computational geometry description of geometric primitives via a face and edge list.
Computational geometry of primitives via a face-and-edge-list data structure.

Primitives must not be degenerated or self-intersect.
Such descriptions of primitives are frequently used for triangles and polyhedra
to store them on disk for visualization purposes. Although storage efficient,
such a description is not well suited for topological and neighborhood queries
of especially meshes that are built from primitives.
Primitives must neither be degenerated nor self-intersect but can differ in
their properties. A face-and-edge-list-based description of primitives is
frequently used for triangles and polyhedra to store them on disk for
visualization purposes (see OFF, PLY, VTK, or STL file formats).

In this case, scientists may need a different view on the primitives which
is better represented for instance with a half_edge_data_structure instance.
The reason to split thus the geometric description of primitives, sets, and
specifically meshes of primitives is to keep the structure simple enough for
users without these computational geometry demands but also enable those more
computational geometry savy users the storing of the additionally relevant
data structure.
Although this description is storage efficient it is not well suited for
topological analyses though. In this case, scientists may need a different
view on the primitives which is better represented with e.g. a
half_edge_data_structure.

This is beneficial and superior over NXoff_geometry because for instance a
half_edge_data_structure instance can be immediately use to reinstantiate
the set without having to recompute the half_edge_structure from the vertex
and face-list based representation and thus offer a more efficient route
to serve applications where topological and graph-based operations are key.
Having an own base class for the data structure how primitives are stored is
useful to embrace both users with small or very detailed specification demands.
</doc>
<attribute name="depends_on" type="NX_CHAR">
<doc>
Hint to help resolve in which Euclidean coordinate system
field values vertices are defined.
</doc>
</attribute>
<field name="dimensionality" type="NX_POSINT" units="NX_UNITLESS">
<doc>
Dimensionality.
Dimensionality of the primitives described.
</doc>
</field>
<!--resulting in a design similar to that of NXoff_geometry and the XDMF mixed primitive topology-->
<field name="number_of_vertices" type="NX_POSINT" units="NX_UNITLESS">
<field name="number_of_vertices" type="NX_INT" units="NX_UNITLESS">
<doc>
Array which specifies of how many vertices each face is built.
Each entry represent the total number of vertices for face, irrespectively
whether vertices are shared among faces/are unique or not.
Number of vertices for each face.

Each entry represents the total number of vertices for that face,
irrespectively whether vertices are shared among faces or not.
</doc>
<dimensions rank="1">
<dim index="1" value="n_f"/>
</dimensions>
</field>
<field name="number_of_edges" type="NX_POSINT" units="NX_UNITLESS">
<field name="number_of_edges" type="NX_INT" units="NX_UNITLESS">
<doc>
Number of edges.
Number of edges for each face.

Each entry represents the total number of edges for that face,
irrespectively whether edges are shared across faces or not.
</doc>
<dimensions rank="1">
<dim index="1" value="n_e"/>
</dimensions>
</field>
<field name="number_of_faces" type="NX_POSINT" units="NX_UNITLESS">
<field name="number_of_faces" type="NX_INT" units="NX_UNITLESS">
<doc>
Number of faces.
Number of faces of the primitives.
</doc>
</field>
<field name="vertex_identifier_offset" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer which specifies the first index to be used for distinguishing
identifiers for vertices. Identifiers are defined either implicitly
or explicitly. For implicit indexing the identifiers are defined on the
interval [identifier_offset, identifier_offset+c-1].
For explicit indexing the identifier array has to be defined.
Integer offset whereby the identifier of the first member
of the vertices differs from zero.

The identifier_offset field can for example be used to communicate if
identifiers are expected to start from 1 (referred to as Fortran-/Matlab-)
or from 0 (referred to as C-, Python-style index notation) respectively.
Identifier can be defined explicitly or implicitly.
Inspect the definition of NXcg_primitive_set for further details.
</doc>
</field>
<field name="edge_identifier_offset" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer which specifies the first index to be used for distinguishing
identifiers for edges. Identifiers are defined either implicitly
or explicitly. For implicit indexing the identifiers are defined on the
interval [identifier_offset, identifier_offset+c-1].
For explicit indexing the identifier array has to be defined.
Integer offset whereby the identifier of the first member
of the edges differs from zero.

The identifier_offset field can for example be used to communicate if
identifiers are expected to start from 1 (referred to as Fortran-/Matlab-)
or from 0 (referred to as C-, Python-style index notation) respectively.
Identifier can be defined explicitly or implicitly.
Inspect the definition of NXcg_primitive_set for further details.
</doc>
</field>
<field name="face_identifier_offset" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer which specifies the first index to be used for distinguishing
identifiers for faces. Identifiers are defined either implicitly
or explicitly. For implicit indexing the identifiers are defined on the
interval [identifier_offset, identifier_offset+c-1].
For explicit indexing the identifier array has to be defined.
Integer offset whereby the identifier of the first member
of the faces differs from zero.

The identifier_offset field can for example be used to communicate if
identifiers are expected to start from 1 (referred to as Fortran-/Matlab-)
or from 0 (referred to as C-, Python-style index notation) respectively.
Identifier can be defined explicitly or implicitly.
Inspect the definition of NXcg_primitive_set for further details.
</doc>
</field>
<field name="vertex_identifier" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer used to distinguish vertices explicitly.
Integer identifier to distinguish all vertices explicitly.
</doc>
<dimensions rank="1">
<dim index="1" value="n_v"/>
</dimensions>
</field>
<field name="edge_identifier" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer used to distinguish edges explicitly.
Integer used to distinguish all edges explicitly.
</doc>
<dimensions rank="1">
<dim index="1" value="n_e"/>
</dimensions>
</field>
<field name="face_identifier" type="NX_INT" units="NX_UNITLESS">
<doc>
Integer used to distinguish faces explicitly.
Integer used to distinguish all faces explicitly.
</doc>
<dimensions rank="1">
<dim index="1" value="n_f"/>
</dimensions>
</field>
<field name="vertices" type="NX_NUMBER" units="NX_LENGTH">
<field name="vertices" type="NX_NUMBER" units="NX_ANY">
<doc>
Positions of the vertices.

Users are encouraged to reduce the vertices to unique set of positions
and vertices as this supports a more efficient storage of the geometry data.
Users are encouraged to reduce the vertices to a unique set as this may
result in a more efficient storage of the geometry data.
It is also possible though to store the vertex positions naively in which
case vertices_are_unique is likely False.
Naively here means that one for example stores each vertex of a triangle
mesh even though many vertices are shared between triangles and thus
the positions of these vertices do not have to be duplicated.
case vertices_are_unique is likely False. Naively here means that each
vertex is stored even though many share the same positions.
</doc>
<dimensions rank="2">
<dim index="1" value="n_v"/>
Expand All @@ -189,7 +182,7 @@
</field>
<field name="edges" type="NX_INT" units="NX_UNITLESS">
<doc>
The edges are stored as a pairs of vertex identifier values.
The edges are stored as pairs of vertex identifier.
</doc>
<dimensions rank="2">
<dim index="1" value="n_e"/>
Expand All @@ -198,7 +191,7 @@
</field>
<field name="faces" type="NX_INT" units="NX_UNITLESS">
<doc>
Array of identifiers from vertices which describe each face.
The faces are stored as a concatenated array of vertex identifier tuples.

The first entry is the identifier of the start vertex of the first face,
followed by the second vertex of the first face, until the last vertex
Expand All @@ -207,7 +200,7 @@

Therefore, summating over the number_of_vertices, allows to extract
the vertex identifiers for the i-th face on the following index interval
of the faces array: [$\sum_i = 0}^{i = n-1}$, $\sum_{i=0}^{i = n}$].
of the faces array: :math:`[\sum_{i = 0}^{i = n-1}, \sum_{i=0}^{i = n}]`.
</doc>
<dimensions rank="1">
<dim index="1" value="n_total"/>
Expand All @@ -216,18 +209,23 @@
<!--properties-->
<field name="vertices_are_unique" type="NX_BOOLEAN">
<doc>
If true indicates that the vertices are all placed at different positions
and have different identifiers, i.e. no points overlap or are counted twice.
If true, indicates that the vertices are all placed at different positions
and have different identifiers, i.e. no points overlap or are counted more
than once.
</doc>
</field>
<field name="edges_are_unique" type="NX_BOOLEAN">
<doc>
If true indicates that no edge is stored twice. Users are encouraged to
consider and use the half_edge_data_structure instead as this will work
towards achieving a cleaner graph-based description if relevant and possible.
If true, indicates that no edge is stored more than once.

Users are encouraged to consider using a half_edge_data_structure instead.
</doc>
</field>
<field name="faces_are_unique" type="NX_BOOLEAN">
<doc>
If true, indicates that no face is stored more than once.
</doc>
</field>
<field name="faces_are_unique" type="NX_BOOLEAN"/>
<field name="winding_order" type="NX_INT" units="NX_UNITLESS">
<doc>
Specifies for each face which winding order was used if any:
Expand Down
6 changes: 3 additions & 3 deletions base_classes/NXcg_geodesic_mesh.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
6 changes: 3 additions & 3 deletions base_classes/NXcg_grid.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
6 changes: 3 additions & 3 deletions base_classes/NXcg_half_edge_data_structure.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
6 changes: 3 additions & 3 deletions base_classes/NXcg_marching_cubes.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2014-2024 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2023 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand Down
Loading

0 comments on commit 9440d9b

Please sign in to comment.