From be3e5dc0f10af8b61b43f80e529cd4c19f3d2a76 Mon Sep 17 00:00:00 2001 From: Sarthak Kapoor Date: Fri, 31 Jan 2025 15:34:08 +0100 Subject: [PATCH] Hide array_index --- src/nomad_measurements/xrd/schema.py | 40 ++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/nomad_measurements/xrd/schema.py b/src/nomad_measurements/xrd/schema.py index b93722e..b5638d4 100644 --- a/src/nomad_measurements/xrd/schema.py +++ b/src/nomad_measurements/xrd/schema.py @@ -41,7 +41,9 @@ from nomad.datamodel.metainfo.annotations import ( ELNAnnotation, ELNComponentEnum, + Filter, H5WebAnnotation, + SectionProperties, ) from nomad.datamodel.metainfo.basesections import ( CompositeSystemReference, @@ -582,7 +584,15 @@ class XRDResult1D(XRDResult): Section containing the result of a 1D X-ray diffraction scan. """ - m_def = Section() + m_def = Section( + a_eln=ELNAnnotation( + properties=SectionProperties( + visible=Filter( + exclude=['array_index'], + ), + ), + ) + ) def generate_plots(self): """ @@ -767,7 +777,15 @@ class XRDResultRSM(XRDResult): Section containing the result of a Reciprocal Space Map (RSM) scan. """ - m_def = Section() + m_def = Section( + a_eln=ELNAnnotation( + properties=SectionProperties( + visible=Filter( + exclude=['array_index'], + ), + ), + ) + ) q_parallel = Quantity( type=np.dtype(np.float64), shape=['*', '*'], @@ -982,6 +1000,15 @@ class XRDResult1DHDF5(XRDResult): Section containing the result of a 1D X-ray diffraction scan. """ + m_def = Section( + a_eln=ELNAnnotation( + properties=SectionProperties( + visible=Filter( + exclude=['array_index'], + ), + ), + ) + ) intensity = Quantity( type=HDF5Reference, description='The count at each 2-theta value, dimensionless', @@ -1264,6 +1291,15 @@ class XRDResultRSMHDF5(XRDResult): Section containing the result of a Reciprocal Space Map (RSM) scan. """ + m_def = Section( + a_eln=ELNAnnotation( + properties=SectionProperties( + visible=Filter( + exclude=['array_index'], + ), + ), + ) + ) intensity = Quantity( type=HDF5Reference, description='The count at each 2-theta value, dimensionless',