diff --git a/python/corsika/io/library.py b/python/corsika/io/library.py index 22208f792d5ef0f024e0bd19c9d325d31fa96596..1db756baf5628e6cbcb5eaa32cd2ccd467689ef8 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 00ac90dd43b0daf6c27f379da1d1eccb609e7a11..bd18edc8ed89b20f5b68faac1a87370775bfb9b1 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']}')"