From b364883050fa9084b049a86893fbd4496504e949 Mon Sep 17 00:00:00 2001 From: Ray Osborn Date: Sun, 8 Feb 2026 22:12:04 -0600 Subject: [PATCH 1/3] Add the NXgoniometer class to NXinstrument This is not yet ratified by the NIAC, but it is currently in use in the NXRefine package. --- src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml b/src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml index 523761f..3ecef78 100644 --- a/src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml +++ b/src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml @@ -60,6 +60,7 @@ + From ffc5113cc2e925262616ea682a3858a958800c2b Mon Sep 17 00:00:00 2001 From: Ray Osborn Date: Mon, 9 Feb 2026 10:07:40 -0600 Subject: [PATCH 2/3] Filter keyword arguments with a value of None This prevents such arguments from being added to the attributes, e.g., `field=NXfield(1.0, units=None)` will no longer save a units attribute containing an empty string. --- src/nexusformat/nexus/tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nexusformat/nexus/tree.py b/src/nexusformat/nexus/tree.py index 075e06d..cb66c2d 100644 --- a/src/nexusformat/nexus/tree.py +++ b/src/nexusformat/nexus/tree.py @@ -2912,7 +2912,7 @@ def __init__(self, value=None, name='unknown', shape=None, dtype=None, if v is not None) if attrs is None: attrs = {} - attrs.update(kwargs) + attrs.update({k: v for k, v in kwargs.items() if v is not None}) self._attrs = AttrDict(self, attrs=attrs) self._memfile = None self._uncopied_data = None From b38c65f19c48b2d4b2f7088ae93fa8d754c3e0c9 Mon Sep 17 00:00:00 2001 From: Ray Osborn Date: Tue, 17 Feb 2026 11:10:11 -0600 Subject: [PATCH 3/3] Update NXentry --- src/nexusformat/definitions/base_classes/NXentry.nxdl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nexusformat/definitions/base_classes/NXentry.nxdl.xml b/src/nexusformat/definitions/base_classes/NXentry.nxdl.xml index 6641a1a..127d7bd 100644 --- a/src/nexusformat/definitions/base_classes/NXentry.nxdl.xml +++ b/src/nexusformat/definitions/base_classes/NXentry.nxdl.xml @@ -208,7 +208,7 @@ A small image that is representative of the entry. An example of this is a 640x480 jpeg image automatically produced by a low resolution plot of the NXdata. - + The mime type should be an ``image/*``