Skip to content

Commit

Permalink
Harmonzing class name for raw file (#77)
Browse files Browse the repository at this point in the history
* Update class name for XRD data file

* Harmonize raw file class name for transmission
  • Loading branch information
ka-sarthak authored Jan 31, 2024
1 parent 2ed41c4 commit 1f1c6e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/nomad_measurements/transmission/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
)


class TransmissionDataFile(EntryData):
class RawFileTransmissionData(EntryData):
measurement = Quantity(
type=ELNTransmission,
a_eln=ELNAnnotation(
Expand All @@ -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'
4 changes: 2 additions & 2 deletions src/nomad_measurements/xrd/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
)


class XRDDataFile(EntryData):
class RawFileXRDData(EntryData):
'''
Section for a XRD data file.
'''
Expand Down Expand Up @@ -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'

0 comments on commit 1f1c6e9

Please sign in to comment.