From b0d6e98b78dbef93f9fef9e96e7200f74af9d5b3 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 16 Nov 2017 17:09:41 +0000 Subject: [PATCH 01/15] Add NXoff_geometry definition --- base_classes/NXoff_geometry.nxdl.xml | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 base_classes/NXoff_geometry.nxdl.xml diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml new file mode 100644 index 0000000000..276410ad5e --- /dev/null +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -0,0 +1,87 @@ + + + + + + + Geometry (shape) description. + + The format closely matches the Object File Format (OFF) which can be output by most CAD software. + It can be used to describe the shape of any beamline component, including detectors. + + + + + Two or three-dimensional array of coordinates for vertices. + + + + + + + + + + + + + List of indices of vertices in the vertices dataset to form each face, right-hand rule for face normal. + + + + + + + + + + + The start index in ``vertex_indices`` for each face. + + + + + + + + + + + List of pairs of index in the "faces" dataset and detector id. + Note, not every face in faces has to be a detecting surface or boundary of detecting volume. + Can use multiple entries with the same detector id to define detector volumes. + + + + + + + + + + From 069b07054524227599318a256189d738ce772185 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 16 Nov 2017 17:15:56 +0000 Subject: [PATCH 02/15] Correct field description refering to incorrectly named other field --- base_classes/NXoff_geometry.nxdl.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml index 276410ad5e..96807552cf 100644 --- a/base_classes/NXoff_geometry.nxdl.xml +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -33,6 +33,8 @@ The format closely matches the Object File Format (OFF) which can be output by most CAD software. It can be used to describe the shape of any beamline component, including detectors. + In the case of detectors it can be used to define the shape of a single pixel, or, + for the case that pixel shape is non-uniform, to describe the shape of the whole detector. @@ -50,7 +52,7 @@ - List of indices of vertices in the vertices dataset to form each face, right-hand rule for face normal. + List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. @@ -61,7 +63,7 @@ - The start index in ``vertex_indices`` for each face. + The start index in ``winding_order`` for each face. From 812875aa4de9baeaa73d3a645496b800eed461e5 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Fri, 17 Nov 2017 10:16:40 +0000 Subject: [PATCH 03/15] Add symbols table to NXoff_geometry --- base_classes/NXoff_geometry.nxdl.xml | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml index 96807552cf..f3ca0547d8 100644 --- a/base_classes/NXoff_geometry.nxdl.xml +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -28,23 +28,28 @@ version="1.0" type="group" extends="NXobject"> + + These symbols will be used below. + number of vertices in the shape + number of faces in the shape + number faces which are detecting surfaces or form the boundary of detecting volumes + + - Geometry (shape) description. - + Geometry (shape) description. The format closely matches the Object File Format (OFF) which can be output by most CAD software. - It can be used to describe the shape of any beamline component, including detectors. + It can be used to describe the shape of any beamline component, including detectors. In the case of detectors it can be used to define the shape of a single pixel, or, - for the case that pixel shape is non-uniform, to describe the shape of the whole detector. + if the pixel shapes are non-uniform, to describe the shape of the whole detector. - Two or three-dimensional array of coordinates for vertices. + List of x,y or x,y,z coordinates for vertices. - - - - + + + @@ -52,11 +57,11 @@ - List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. + List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. - + @@ -66,7 +71,7 @@ The start index in ``winding_order`` for each face. - + @@ -80,7 +85,7 @@ - + From c28198a8d47e768b6e2a636fe39228342c498174 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Fri, 17 Nov 2017 11:07:52 +0000 Subject: [PATCH 04/15] Refine description of coords --- base_classes/NXoff_geometry.nxdl.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml index f3ca0547d8..0af97dca02 100644 --- a/base_classes/NXoff_geometry.nxdl.xml +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -45,7 +45,11 @@ - List of x,y or x,y,z coordinates for vertices. + + List of x,y or x,y,z coordinates for vertices. z coordinates are treated as zeroes if omitted. + The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. + If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. + @@ -79,7 +83,7 @@ - List of pairs of index in the "faces" dataset and detector id. + List of pairs of index in the "faces" dataset and detector id. Used only if describing a detector. Note, not every face in faces has to be a detecting surface or boundary of detecting volume. Can use multiple entries with the same detector id to define detector volumes. From b22643220e6bde76ca30eaa8afb5dcedbb459cf7 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Fri, 17 Nov 2017 11:08:13 +0000 Subject: [PATCH 05/15] Add definition of NXcylinderical_geometry --- base_classes/NXcylindrical_geometry.nxdl.xml | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 base_classes/NXcylindrical_geometry.nxdl.xml diff --git a/base_classes/NXcylindrical_geometry.nxdl.xml b/base_classes/NXcylindrical_geometry.nxdl.xml new file mode 100644 index 0000000000..d09b013576 --- /dev/null +++ b/base_classes/NXcylindrical_geometry.nxdl.xml @@ -0,0 +1,87 @@ + + + + + + + These symbols will be used below. + number of vertices required to define all cylinders in the shape + number of cylinders in the shape + number cylinders which are detectors + + + + Geometry description for cylindrical shapes. + This class can be used in place of ``NXoff_geometry`` when an exact representation for cylinders is preferred. + For example, for Helium-tube, neutron detectors. + It can be used to describe the shape of any beamline component, including detectors. + In the case of detectors it can be used to define the shape of a single pixel, or, + if the pixel shapes are non-uniform, to describe the shape of the whole detector. + + + + + + List of x,y or x,y,z coordinates for vertices. z coordinates are treated as zeroes if omitted. + The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. + If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. + + + + + + + + + + + + + List of indices of vertices in the ``vertices`` dataset to form each cylinder. + Each cylinder is described by three vertices A, B, C. + First vertex A lies on the cylinder axis and circular face, second point B on edge of the same face as A, and third point C at the other face and on axis. + + + + + + + + + + + + Maps cylinders in ``cylinder``, by index, with a detector id. + + + + + + + + From c537026310bba7c946e72ce0b486b47b19c8ca71 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Fri, 17 Nov 2017 11:40:14 +0000 Subject: [PATCH 06/15] Add optional shape description groups to NXdetector --- base_classes/NXdetector.nxdl.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/base_classes/NXdetector.nxdl.xml b/base_classes/NXdetector.nxdl.xml index 4f51aa838a..eff43e755e 100644 --- a/base_classes/NXdetector.nxdl.xml +++ b/base_classes/NXdetector.nxdl.xml @@ -719,4 +719,24 @@ subdivision of a detector. + + + Shape description of each pixel. Use only if all pixels in the detector are of uniform shape. + + + + + Shape description of the whole detector. Use only if pixels in the detector are not of uniform shape. + + + + + Shape description of each pixel. Use only if all pixels in the detector are of uniform shape and require being described by cylinders. + + + + + Shape description of the whole detector. Use only if pixels in the detector are not of uniform shape and require being described by cylinders. + + From 804eff7c0bf0b2debf1f9c99d29ca636dabe254e Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Fri, 17 Nov 2017 12:17:20 +0000 Subject: [PATCH 07/15] Convert all tabs to space to solve indentation problems, require three dimensions for vertex coords. --- base_classes/NXcylindrical_geometry.nxdl.xml | 70 +++--- base_classes/NXdetector.nxdl.xml | 248 +++++++++---------- base_classes/NXoff_geometry.nxdl.xml | 86 +++---- 3 files changed, 202 insertions(+), 202 deletions(-) diff --git a/base_classes/NXcylindrical_geometry.nxdl.xml b/base_classes/NXcylindrical_geometry.nxdl.xml index d09b013576..16fdaae0ac 100644 --- a/base_classes/NXcylindrical_geometry.nxdl.xml +++ b/base_classes/NXcylindrical_geometry.nxdl.xml @@ -2,9 +2,9 @@ - + These symbols will be used below. number of vertices required to define all cylinders in the shape number of cylinders in the shape number cylinders which are detectors - + Geometry description for cylindrical shapes. This class can be used in place of ``NXoff_geometry`` when an exact representation for cylinders is preferred. For example, for Helium-tube, neutron detectors. It can be used to describe the shape of any beamline component, including detectors. - In the case of detectors it can be used to define the shape of a single pixel, or, + In the case of detectors it can be used to define the shape of a single pixel, or, if the pixel shapes are non-uniform, to describe the shape of the whole detector. - - - - - - List of x,y or x,y,z coordinates for vertices. z coordinates are treated as zeroes if omitted. + + + + + + List of x,y,z coordinates for vertices. The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. - + - + - - - - - - + + + + + + List of indices of vertices in the ``vertices`` dataset to form each cylinder. Each cylinder is described by three vertices A, B, C. First vertex A lies on the cylinder axis and circular face, second point B on edge of the same face as A, and third point C at the other face and on axis. - - + + - - - - - - Maps cylinders in ``cylinder``, by index, with a detector id. - + + + + + + Maps cylinders in ``cylinder``, by index, with a detector id. + - - - + + + diff --git a/base_classes/NXdetector.nxdl.xml b/base_classes/NXdetector.nxdl.xml index eff43e755e..ec5559e9bc 100644 --- a/base_classes/NXdetector.nxdl.xml +++ b/base_classes/NXdetector.nxdl.xml @@ -2,9 +2,9 @@ - + These symbols will be used below. number of vertices in the shape number of faces in the shape number faces which are detecting surfaces or form the boundary of detecting volumes - + Geometry (shape) description. The format closely matches the Object File Format (OFF) which can be output by most CAD software. It can be used to describe the shape of any beamline component, including detectors. - In the case of detectors it can be used to define the shape of a single pixel, or, + In the case of detectors it can be used to define the shape of a single pixel, or, if the pixel shapes are non-uniform, to describe the shape of the whole detector. - - - - - - List of x,y or x,y,z coordinates for vertices. z coordinates are treated as zeroes if omitted. + + + + + + List of x,y,z coordinates for vertices. The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. - + - + - - - - - - - List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. - - + + + + + + + List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. + + - - - - - - The start index in ``winding_order`` for each face. - + + + + + + The start index in ``winding_order`` for each face. + - - - - - - + + + + + + List of pairs of index in the "faces" dataset and detector id. Used only if describing a detector. Note, not every face in faces has to be a detecting surface or boundary of detecting volume. Can use multiple entries with the same detector id to define detector volumes. - + - - - + + + From a650c1b3e5c8a6afa7d6c1e946af64d101100672 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 15 Mar 2018 13:42:08 +0000 Subject: [PATCH 08/15] Improve description of the detector_faces dataset --- base_classes/NXoff_geometry.nxdl.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml index 2a95466722..7fbeece9d5 100644 --- a/base_classes/NXoff_geometry.nxdl.xml +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -83,8 +83,9 @@ - List of pairs of index in the "faces" dataset and detector id. Used only if describing a detector. - Note, not every face in faces has to be a detecting surface or boundary of detecting volume. + List of pairs of index in the "faces" dataset and detector id. Face IDs in the first column, and corresponding detector IDs in the second column. + This dataset should only be used only if the ``NXoff_geometry`` group is describing a detector. + Note, the face indices must be in ascending order but need not be consecutive as not every face in faces need be a detecting surface or boundary of detecting volume. Can use multiple entries with the same detector id to define detector volumes. From e6eb97b22a9243d1e1f3daea871edb7d02a2beca Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 12 Apr 2018 09:16:54 +0100 Subject: [PATCH 09/15] Fix index typo --- base_classes/NXcylindrical_geometry.nxdl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_classes/NXcylindrical_geometry.nxdl.xml b/base_classes/NXcylindrical_geometry.nxdl.xml index 16fdaae0ac..1346ff84e6 100644 --- a/base_classes/NXcylindrical_geometry.nxdl.xml +++ b/base_classes/NXcylindrical_geometry.nxdl.xml @@ -69,7 +69,7 @@ - + From 67b958134e63f61a8db56af3daaf8bce45722092 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 12 Apr 2018 09:20:19 +0100 Subject: [PATCH 10/15] Reduce line length --- base_classes/NXcylindrical_geometry.nxdl.xml | 16 ++++++++---- base_classes/NXoff_geometry.nxdl.xml | 26 ++++++++++++++------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/base_classes/NXcylindrical_geometry.nxdl.xml b/base_classes/NXcylindrical_geometry.nxdl.xml index 1346ff84e6..6a8fbcbf48 100644 --- a/base_classes/NXcylindrical_geometry.nxdl.xml +++ b/base_classes/NXcylindrical_geometry.nxdl.xml @@ -30,14 +30,16 @@ These symbols will be used below. - number of vertices required to define all cylinders in the shape + number of vertices required to define all cylinders in + the shape number of cylinders in the shape number cylinders which are detectors Geometry description for cylindrical shapes. - This class can be used in place of ``NXoff_geometry`` when an exact representation for cylinders is preferred. + This class can be used in place of ``NXoff_geometry`` when an exact + representation for cylinders is preferred. For example, for Helium-tube, neutron detectors. It can be used to describe the shape of any beamline component, including detectors. In the case of detectors it can be used to define the shape of a single pixel, or, @@ -48,8 +50,11 @@ List of x,y,z coordinates for vertices. - The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. - If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. + The origin of the coordinates is the position of the parent component, for + example the NXdetector which the geometry describes. + If the shape describes a single pixel for a detector with uniform pixel shape + then the origin is the position of each pixel as described by the + ``x/y/z_pixel_offset`` datasets in ``NXdetector``. @@ -64,7 +69,8 @@ List of indices of vertices in the ``vertices`` dataset to form each cylinder. Each cylinder is described by three vertices A, B, C. - First vertex A lies on the cylinder axis and circular face, second point B on edge of the same face as A, and third point C at the other face and on axis. + First vertex A lies on the cylinder axis and circular face, second point B + on edge of the same face as A, and third point C at the other face and on axis. diff --git a/base_classes/NXoff_geometry.nxdl.xml b/base_classes/NXoff_geometry.nxdl.xml index 7fbeece9d5..bbced8336a 100644 --- a/base_classes/NXoff_geometry.nxdl.xml +++ b/base_classes/NXoff_geometry.nxdl.xml @@ -32,12 +32,14 @@ These symbols will be used below. number of vertices in the shape number of faces in the shape - number faces which are detecting surfaces or form the boundary of detecting volumes + number faces which are detecting surfaces or form the + boundary of detecting volumes Geometry (shape) description. - The format closely matches the Object File Format (OFF) which can be output by most CAD software. + The format closely matches the Object File Format (OFF) which can be output + by most CAD software. It can be used to describe the shape of any beamline component, including detectors. In the case of detectors it can be used to define the shape of a single pixel, or, if the pixel shapes are non-uniform, to describe the shape of the whole detector. @@ -47,8 +49,11 @@ List of x,y,z coordinates for vertices. - The origin of the coordinates is the position of the parent component, for example the NXdetector which the geometry describes. - If the shape describes a single pixel for a detector with uniform pixel shape then the origin is the position of each pixel as described by the ``x/y/z_pixel_offset`` datasets in ``NXdetector``. + The origin of the coordinates is the position of the parent component, for + example the NXdetector which the geometry describes. + If the shape describes a single pixel for a detector with uniform pixel + shape then the origin is the position of each pixel as described by the + ``x/y/z_pixel_offset`` datasets in ``NXdetector``. @@ -61,7 +66,8 @@ - List of indices of vertices in the ``vertices`` dataset to form each face, right-hand rule for face normal. + List of indices of vertices in the ``vertices`` dataset to form each face, + right-hand rule for face normal. @@ -83,9 +89,13 @@ - List of pairs of index in the "faces" dataset and detector id. Face IDs in the first column, and corresponding detector IDs in the second column. - This dataset should only be used only if the ``NXoff_geometry`` group is describing a detector. - Note, the face indices must be in ascending order but need not be consecutive as not every face in faces need be a detecting surface or boundary of detecting volume. + List of pairs of index in the "faces" dataset and detector id. Face IDs in + the first column, and corresponding detector IDs in the second column. + This dataset should only be used only if the ``NXoff_geometry`` group is + describing a detector. + Note, the face indices must be in ascending order but need not be + consecutive as not every face in faces need be a detecting surface or + boundary of detecting volume. Can use multiple entries with the same detector id to define detector volumes. From f2a1150f05d7267475c9fe9cac8587b8f47ed582 Mon Sep 17 00:00:00 2001 From: Matthew D Jones Date: Thu, 12 Apr 2018 09:26:35 +0100 Subject: [PATCH 11/15] Reduce line length in NXdetector.nxdl.xml --- base_classes/NXdetector.nxdl.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/base_classes/NXdetector.nxdl.xml b/base_classes/NXdetector.nxdl.xml index e72245d972..f2a331443c 100644 --- a/base_classes/NXdetector.nxdl.xml +++ b/base_classes/NXdetector.nxdl.xml @@ -2,9 +2,9 @@