From 1f1c6e9d39f706393a42215d7ff7585d21e7ffe2 Mon Sep 17 00:00:00 2001 From: Sarthak Kapoor <57119427+ka-sarthak@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:18:38 +0100 Subject: [PATCH] Harmonzing class name for raw file (#77) * Update class name for XRD data file * Harmonize raw file class name for transmission --- src/nomad_measurements/transmission/parser.py | 4 ++-- src/nomad_measurements/xrd/parser.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nomad_measurements/transmission/parser.py b/src/nomad_measurements/transmission/parser.py index 6d434b93..08eb78c1 100644 --- a/src/nomad_measurements/transmission/parser.py +++ b/src/nomad_measurements/transmission/parser.py @@ -38,7 +38,7 @@ ) -class TransmissionDataFile(EntryData): +class RawFileTransmissionData(EntryData): measurement = Quantity( type=ELNTransmission, a_eln=ELNAnnotation( @@ -59,5 +59,5 @@ def parse(self, mainfile: str, archive: 'EntryArchive', logger) -> None: entry = ELNTransmission.m_from_dict(ELNTransmission.m_def.a_template) entry.data_file = data_file file_name = f'{data_file[:-6]}.archive.json' - archive.data = TransmissionDataFile(measurement=create_archive(entry,archive,file_name)) + archive.data = RawFileTransmissionData(measurement=create_archive(entry,archive,file_name)) archive.metadata.entry_name = data_file[:-4] + ' data file' \ No newline at end of file diff --git a/src/nomad_measurements/xrd/parser.py b/src/nomad_measurements/xrd/parser.py index b188796d..f14166d6 100644 --- a/src/nomad_measurements/xrd/parser.py +++ b/src/nomad_measurements/xrd/parser.py @@ -38,7 +38,7 @@ ) -class XRDDataFile(EntryData): +class RawFileXRDData(EntryData): ''' Section for a XRD data file. ''' @@ -66,5 +66,5 @@ def parse( entry = ELNXRayDiffraction.m_from_dict(ELNXRayDiffraction.m_def.a_template) entry.data_file = data_file file_name = f'{"".join(data_file.split(".")[:-1])}.archive.json' - archive.data = XRDDataFile(measurement=create_archive(entry,archive,file_name)) + archive.data = RawFileXRDData(measurement=create_archive(entry,archive,file_name)) archive.metadata.entry_name = f'{data_file} data file'