km3pipe.io.evt
¶
Pumps for the EVT simulation dataformat.
Module Contents¶
Classes¶
Provides a pump for EVT-files. |
|
Standard parser to create numpy times from EVT raw data. |
Functions¶
|
Decode string to ASCII if possible |
|
Creates new blob entries for the given blob keys |
|
Creates new blob entries for the given blob keys |
Attributes¶
- class km3pipe.io.evt.EvtPump(name=None, **parameters)[source]¶
Provides a pump for EVT-files.
- Parameters:
- filename: str
The file to read the events from.
- parsers: list of str or callables
The parsers to apply for each blob (e.g. parsers=[‘km3sim’, a_parser]) You can also pass your own function, which takes a single argument blob and mutates it. str values will be looked up in the kp.io.evt.EVT_PARSERS dictionary and ignored if not found. If parsers=’auto’, the EvtPump will try to find the appropriate parsers, which is the default behaviour. [default: ‘auto’]
- cache_enabled: bool
If enabled, a cache of the event indices is created when loading the file. Enable it if you want to jump around and inspect the events non-consecutively. [default: False]
- basename: str
The common part of the filenames if you want to process multiple files e.g. file1.evt, file2.evt and file3.evt. During processing, the files will be concatenated behind the scenes. You need to specify the index_stop and index_start (1 and 3 for the example).
- suffix: str
A string to append to each filename (before “.evt”), when basename is given. [default: ‘’]
- index_start: int
The starting index if you process multiple files at once. [default: 1]
- index_stop: int
The last index if you process multiple files at once. [default: 1]
- n_digits: int or None
The number of digits for indexing multiple files. [default: None] None means no leading zeros.
- exclude_tags: list of strings
The tags in the EVT file, which should be ignored (e.g. if they cause parse errors)