From 807a32d1eb4bc4ec00492922cf1d033d191799a8 Mon Sep 17 00:00:00 2001 From: Sebastian Brueckner Date: Fri, 27 Sep 2024 14:36:56 +0200 Subject: [PATCH] Refactor pointing vector variable name and add conditional check for manual settings in Ramanspectroscopy class --- src/nomad_ikz_raman/schema_packages/raman.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/nomad_ikz_raman/schema_packages/raman.py b/src/nomad_ikz_raman/schema_packages/raman.py index d5c0ce1..294bb5f 100644 --- a/src/nomad_ikz_raman/schema_packages/raman.py +++ b/src/nomad_ikz_raman/schema_packages/raman.py @@ -301,14 +301,14 @@ class Sample(CompositeSystemReference): 'name', 'reference', 'lab_id', - 'pointing_vector', + 'pointing_vector_direction', 'crystallographic_direction_of_E_vector', ], ), overview=True, ) ) - pointing_vector = Quantity( + pointing_vector_direction = Quantity( type=str, description='Pointing vector referenced to surface normal in h k l, e.g. (100).', a_eln={'component': 'StringEditQuantity'}, @@ -612,9 +612,10 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: 'Z', ) self.measurement_settings = measurementsettings - self.manual_settings = ManualSettings() - self.manual_settings.polarization = Polarization() - self.manual_settings.filters = Filters() + if not self.manual_settings: + self.manual_settings = ManualSettings() + self.manual_settings.polarization = Polarization() + self.manual_settings.filters = Filters() ramanspectrometerref = RamanSpectrometerReference() ramanspectrometerref.lab_id = raman_dict.get('InstrumentID') ramanspectrometerref.normalize(archive, logger)