From 956884195732c0d5b38a8b7281791f85f6157e69 Mon Sep 17 00:00:00 2001
From: Remy Prechelt <prechelt@hawaii.edu>
Date: Fri, 5 Feb 2021 21:34:14 -1000
Subject: [PATCH] Make pandas the default file format and cleanup library.

---
 python/corsika/io/library.py                   |  3 ---
 python/corsika/io/outputs/observation_plane.py | 12 +++++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/python/corsika/io/library.py b/python/corsika/io/library.py
index 22208f792..1db756baf 100644
--- a/python/corsika/io/library.py
+++ b/python/corsika/io/library.py
@@ -179,9 +179,6 @@ class Library(object):
             # type from the proccesses subdirectory
             try:
 
-                # create the name of the module containing this output class
-                # module_name = re.sub(r"(?<!^)(?=[A-Z])", "_", out_type).lower()
-
                 # instantiate the output and store it in our dict
                 component = getattr(outputs, out_type)(op.join(path, subdir))
 
diff --git a/python/corsika/io/outputs/observation_plane.py b/python/corsika/io/outputs/observation_plane.py
index 00ac90dd4..bd18edc8e 100644
--- a/python/corsika/io/outputs/observation_plane.py
+++ b/python/corsika/io/outputs/observation_plane.py
@@ -55,7 +55,7 @@ class ObservationPlane(Output):
         """
         return self.__data is not None and self.__config is not None
 
-    def astype(self, dtype: str = "parquet", **kwargs: Any) -> Any:
+    def astype(self, dtype: str = "pandas", **kwargs: Any) -> Any:
         """
         Load the particle data from this observation plane.
 
@@ -71,7 +71,7 @@ class ObservationPlane(Output):
         Any:
             The return type of this method is determined by `dtype`.
         """
-        if dtype == "parquet":
+        if dtype == "arrow":
             return self.__data
         elif dtype == "pandas":
             return self.__data.to_pandas()
@@ -79,7 +79,7 @@ class ObservationPlane(Output):
             raise ValueError(
                 (
                     f"Unknown format '{dtype}' for ObservationPlane. "
-                    "We currently only support ['parquet', 'pandas']."
+                    "We currently only support ['arrow', 'pandas']."
                 )
             )
 
@@ -97,3 +97,9 @@ class ObservationPlane(Output):
             The configuration file for this output.
         """
         return self.__config
+
+    def __repr__(self) -> str:
+        """
+        Return a string representation of this class.
+        """
+        return f"ObservationPlane('{self.config['name']}')"
-- 
GitLab