evedataviewer.io module
io module of the evedataviewer package.
Quick&dirty reimplementation of the ASpecD concept of IO.
This module will be obsolete as soon as the radiometry package based on the ASpecD framework starts to exist.
For the time being, only a subset of the interfaces of the respective classes are implemented, to allow for a convenient drop-in replacement with the radiometry package.
- evedataviewer.io.report_problematic_file(filename='')
Helper function reporting files that cannot be read by paradise.
Some EVE files cannot be imported using paradise. To further investigate these problems, the file names are reported by appending them to a file in the user’s home directory. The log file is currently hard-coded to
~/.paradise_problematic_files
.- Parameters:
filename (
str
) – Name (usually the full path) of the problematic file to be reported
- class evedataviewer.io.ImporterFactory
Bases:
object
Factory returning appropriate importer objects.
- static get_importer(source='')
Obtain importer for a given data source.
- Parameters:
source (
str
) –Name of the file to be imported
This is the only information the factory gets to decide upon which importer to return.
- Returns:
Object that can be used to actually import the data.
The source is passed on to the importer.
- Return type:
importer
- class evedataviewer.io.Importer
Bases:
object
Base class for importers.
Although not formally an abstract class, it does not implement any actual functionality, but leaves this for the child classes
- import_into(dataset=None)
Import data into the given dataset.
- Parameters:
dataset (
evedataviewer.dataset.Dataset
) – Dataset to import the data into
- class evedataviewer.io.DummyImporter
Bases:
Importer
Dummy implementation of an importer for testing purposes only.
The data are generated with a random component, to make subsequent imports generally distinguishable.
For a reasonably realistic dataset, a series of device_data entries are created each having randomly created names.
Note
Although the “data” imported into the dataset are complete fake data, the importer will probably be updated with the model underlying the dataset class
evedataviewer.dataset.Dataset
. This allows for testing the viewer without access to real data.- import_into(dataset=None)
Import data into the given dataset.
- Parameters:
dataset (
evedataviewer.dataset.Dataset
) – Dataset to import the data into
- class evedataviewer.io.EveHDF5Importer
Bases:
Importer
Importer for EVE HDF5 files.
Currently, the importer uses the paradise module written by Mika Pflüger. However, it is planned to soon replace this with evefile.
Warning
As of now (2023-12), the importer is only rudimentary, importing only the data, but no metadata. Relevant metadata will follow in conjunction with developing a rich data model for the dataset.
All channels are stored as
device_data
in the dataset and the preferred channel and preferred axis set if available. Otherwise, the first channel will be set as preferred and the index used as corresponding axis.Furthermore, a “PosCounter” entry will be added to
device_data
as a “dummy device”. Thus, you are able to set the position counter as axis.- import_into(dataset=None)
Import data into the given dataset.
- Parameters:
dataset (
evedataviewer.dataset.Dataset
) – Dataset to import the data into