From ae63a20e702b2fa8df2b55b40d00a5226f8458aa Mon Sep 17 00:00:00 2001 From: Andrea Albino Date: Mon, 28 Oct 2024 15:41:44 +0100 Subject: [PATCH 1/2] SampleHolder small changes --- .../vapor_deposition/general.py | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/nomad_material_processing/vapor_deposition/general.py b/src/nomad_material_processing/vapor_deposition/general.py index 741237b..1e10197 100644 --- a/src/nomad_material_processing/vapor_deposition/general.py +++ b/src/nomad_material_processing/vapor_deposition/general.py @@ -31,6 +31,7 @@ Component, CompositeSystemReference, Entity, + EntityReference, PubChemPureSubstanceSection, PureSubstanceSection, ) @@ -118,6 +119,21 @@ class InsertReduction(Entity): ) +class InsertReductionPDIReference(EntityReference): + """ + A section used for referencing a FilledSubstrateHolderPDI. + """ + + reference = Quantity( + type=InsertReduction, + description='Optional description of insert if used.', + a_eln=ELNAnnotation( + component='ReferenceEditQuantity', + label='Insert Reduction Reference', + ), + ) + + class SubstrateHolderPosition(ArchiveSection): """ One casing position of the substrate holder. @@ -159,14 +175,6 @@ class SubstrateHolderPosition(ArchiveSection): slot_geometry = SubSection( section_def=Geometry, ) - insert_reduction = Quantity( - type=InsertReduction, - description='Optional description of insert if used.', - a_eln=ELNAnnotation( - component='ReferenceEditQuantity', - label='ThinFilmStackMbe Reference', - ), - ) class SubstrateHolder(Entity): @@ -192,7 +200,7 @@ class SubstrateHolder(Entity): component=ELNComponentEnum.StringEditQuantity, label='holder_id' ), ) - material = SubSection(section_def=PubChemPureSubstanceSection, repeats=True) + holder_material = SubSection(section_def=PubChemPureSubstanceSection, repeats=True) thickness = Quantity( type=float, unit='meter', @@ -243,6 +251,12 @@ class FilledSubstrateHolderPosition(SubstrateHolderPosition): One casing position of the filled substrate holder. """ + insert_reduction = SubSection( + section_def=InsertReductionPDIReference, + description=""" + The Insert reduction placed in this position. + """, + ) substrate = SubSection( section_def=CompositeSystemReference, description=""" @@ -261,7 +275,7 @@ class FilledSubstrateHolder(SubstrateHolder): description='A reference to an empty substrate holder.', a_eln=ELNAnnotation( component='ReferenceEditQuantity', - label='ThinFilmStackMbe Reference', + label='Empty Substrate Holder Reference', ), ) positions = SubSection( From 462f17112dd0cc85996d97a416706e0ad6fd61c4 Mon Sep 17 00:00:00 2001 From: Andrea Albino <95371554+aalbino2@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:14:07 +0100 Subject: [PATCH 2/2] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hampus Näsström --- src/nomad_material_processing/vapor_deposition/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nomad_material_processing/vapor_deposition/general.py b/src/nomad_material_processing/vapor_deposition/general.py index 1e10197..527cd49 100644 --- a/src/nomad_material_processing/vapor_deposition/general.py +++ b/src/nomad_material_processing/vapor_deposition/general.py @@ -119,7 +119,7 @@ class InsertReduction(Entity): ) -class InsertReductionPDIReference(EntityReference): +class InsertReductionReference(EntityReference): """ A section used for referencing a FilledSubstrateHolderPDI. """ @@ -252,7 +252,7 @@ class FilledSubstrateHolderPosition(SubstrateHolderPosition): """ insert_reduction = SubSection( - section_def=InsertReductionPDIReference, + section_def=InsertReductionReference, description=""" The Insert reduction placed in this position. """,