:py:mod:`km3pipe.io.evt` ======================== .. py:module:: km3pipe.io.evt .. autoapi-nested-parse:: Pumps for the EVT simulation dataformat. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3pipe.io.evt.EvtPump km3pipe.io.evt.Parser Functions ~~~~~~~~~ .. autoapisummary:: km3pipe.io.evt.try_decode_string km3pipe.io.evt.parse_corant km3pipe.io.evt.parse_propa Attributes ~~~~~~~~~~ .. autoapisummary:: km3pipe.io.evt.log km3pipe.io.evt.KM3SIM_TAGS km3pipe.io.evt.GSEAGEN_TAGS km3pipe.io.evt.KM3_TAGS km3pipe.io.evt.EVT_PARSERS .. py:data:: log .. py:function:: try_decode_string(text) Decode string to ASCII if possible .. !! processed by numpydoc !! .. py:class:: EvtPump(name=None, **parameters) 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) .. !! processed by numpydoc !! .. py:method:: configure() Configure module, like instance variables etc. .. !! processed by numpydoc !! .. py:method:: prepare_blobs() Populate the blobs .. !! processed by numpydoc !! .. py:method:: extract_header() Create a dictionary with the EVT header information .. !! processed by numpydoc !! .. py:method:: get_blob(index) Return a blob with the event at the given index .. !! processed by numpydoc !! .. py:method:: process(blob=None) Pump the next blob to the modules .. !! processed by numpydoc !! .. py:method:: finish() Clean everything up. .. !! processed by numpydoc !! .. py:class:: Parser(tag_description) Standard parser to create numpy times from EVT raw data. The `tag_description` is a dict of tuples. The key is the target blob-key, the value is tuple of "target blob-key" and "numpy dtype". .. !! processed by numpydoc !! .. py:data:: KM3SIM_TAGS .. py:data:: GSEAGEN_TAGS .. py:data:: KM3_TAGS .. py:function:: parse_corant(blob) Creates new blob entries for the given blob keys .. !! processed by numpydoc !! .. py:function:: parse_propa(blob) Creates new blob entries for the given blob keys .. !! processed by numpydoc !! .. py:data:: EVT_PARSERS