Skip to content

Commit

Permalink
rename Phi parser and mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Jan 31, 2024
1 parent e2bc021 commit e8d1d00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions pynxtools/dataconverter/readers/xps/file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@

from typing import List, Dict

from pynxtools.dataconverter.readers.xps.phi.spe_pro_phi import MapperPhi
from pynxtools.dataconverter.readers.xps.sle.sle_specs import SleMapperSpecs
from pynxtools.dataconverter.readers.xps.spe.spe_phi import SpeMapperPhi

# from pynxtools.dataconverter.readers.xps.slh.slh_specs import SlhMapperSpecs
from pynxtools.dataconverter.readers.xps.pro.pro_phi import ProMapperPhi
from pynxtools.dataconverter.readers.xps.txt.txt_scienta import TxtMapperScienta

# from pynxtools.dataconverter.readers.xps.txt.txt_specs import TxtMapperSpecs
Expand All @@ -42,12 +41,13 @@
class XpsDataFileParser:
"""Class intended for receiving any type of XPS data file."""

__prmt_file_ext__ = ["sle", "txt", "vms", "xml", "xy"]
__prmt_file_ext__ = ["pro", "sle", "spe", "txt", "vms", "xml", "xy"]
__prmt_metadata_file_ext__ = ["slh"]
__vendors__ = ["kratos", "phi", "scienta", "specs", "unkwown"]
__prmt_vndr_cls: Dict[str, Dict] = {
"pro": {"phi": MapperPhi},
"sle": {"specs": SleMapperSpecs},
"spe": {"phi": SpeMapperPhi},
"spe": {"phi": MapperPhi},
# "slh": {"specs": SlhMapperSpecs},
"txt": {
"scienta": TxtMapperScienta,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""
Parser for reading XPS (X-ray Photoelectron Spectroscopy) data from
Specs Lab Prodigy XY exports, to be passed to mpes nxdl
(NeXus Definition Language) template.
Phi PHI Versaprobe instruments (.spe or .pro format), to be passed to
mpes nxdl (NeXus Definition Language) template.
"""

# Copyright The NOMAD Authors.
#
# This file is part of NOMAD. See https://nomad-lab.eu for further info.
Expand Down Expand Up @@ -40,10 +39,10 @@
)


class SpeMapperPhi(XPSMapper):
class MapperPhi(XPSMapper):
"""
Class for restructuring .xy data file from
Specs vendor into python dictionary.
Phi vendor into python dictionary.
"""

config_file = "config_spe_phi.json"
Expand All @@ -53,11 +52,11 @@ def __init__(self):
self.write_channels_to_data = True

def _select_parser(self):
return SpeParser()
return PhiParser()

def parse_file(self, file, **kwargs):
"""
Parse the file using the Specs XY parser.
Parse the file using the Phi sle/pro parser.
Parameters
----------
Expand Down Expand Up @@ -583,7 +582,7 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map):
# =============================================================================


class SpeParser: # pylint: disable=too-few-public-methods
class PhiParser: # pylint: disable=too-few-public-methods
"""
A parser for reading in PHI Versaprobe data in the .spe or
.pro format.
Expand Down

0 comments on commit e8d1d00

Please sign in to comment.