class_docstr: Parser for Elekta data acquisition settings.
  
  This class parses parameters (e.g. events and averaging categories) that
  are defined in the Elekta TRIUX/VectorView data acquisition software (DACQ)
  and stored in ``info['acq_pars']``. It can be used to reaverage raw data
  according to DACQ settings and modify original averaging settings if
  necessary.
  
  Parameters
  ----------
  %(info_not_none)s This is where the DACQ parameters will be taken from.
  
  Attributes
  ----------
  categories : list
      List of averaging categories marked active in DACQ.
  events : list
      List of events that are in use (referenced by some averaging category).
  reject : dict
      Rejection criteria from DACQ that can be used with mne.Epochs.
      Note that mne does not support all DACQ rejection criteria
      (e.g. spike, slope).
  flat : dict
      Flatness rejection criteria from DACQ that can be used with mne.Epochs.
  acq_dict : dict
      All DACQ parameters.
  
  See Also
  --------
  mne.io.Raw.acqparser : Access the parser through a Raw attribute.
  
  Notes
  -----
  Any averaging category (also non-active ones) can be accessed by indexing
  as ``acqparserfif['category_name']``.
docstr: Collect DACQ events into a dict.
  
  Events are keyed by number starting from 1 (DACQ index of event).
  Each event is itself represented by a dict containing the event
  parameters.
docstr_tok: ["Collect","DACQ","events","into","a","dict",".","Events","are","keyed","by","number","starting","from","1","(","DACQ","index","of","event",")",".","Each","event","is","itself","represented","by","a","dict","containing","the","event","parameters","."]
code: def _events_from_acq_pars(self):
      """Collect DACQ events into a dict.
  
      Events are keyed by number starting from 1 (DACQ index of event).
      Each event is itself represented by a dict containing the event
      parameters.
      """
      # lookup table for event number -> bits for old DACQ versions
      _compat_event_lookup = {
          1: 1,
          2: 2,
          3: 4,
          4: 8,
          5: 16,
          6: 32,
          7: 3,
          8: 5,
          9: 6,
          10: 7,
          11: 9,
          12: 10,
          13: 11,
          14: 12,
          15: 13,
          16: 14,
          17: 15,
      }
      events = dict()
      for evnum in range(1, self.nevent + 1):
          evnum_s = str(evnum).zfill(2)  # '01', '02' etc.
          evdi = dict()
          event_vars = (
              self._event_vars_compat
              if self.compat
              else self._event_vars
          )
          for var in event_vars:
              # name of DACQ variable, e.g. 'ERFeventNewBits01'
              acq_key = "ERFevent" + var + evnum_s
              # corresponding dict key, e.g. 'newbits'
              dict_key = var.lower()
              val = self.acq_dict[acq_key]
              # type convert numeric values
              if dict_key in [
                  "newbits",
                  "oldbits",
                  "newmask",
                  "oldmask",
              ]:
                  val = int(val)
              elif dict_key in ["delay"]:
                  val = float(val)
              evdi[dict_key] = val
              evdi["in_use"] = False  # __init__() will set this
          evdi["index"] = evnum
          if self.compat:
              evdi["name"] = str(evnum)
              evdi["oldmask"] = 63
              evdi["newmask"] = 63
              evdi["oldbits"] = 0
              evdi["newbits"] = _compat_event_lookup[evnum]
          events[evnum] = evdi
      return events
  
imports: from collections.abc import Sequence
  from pathlib import Path
  import numpy
  from ._fiff.constants import FIFF
  from ._fiff.open import fiff_open
  from ._fiff.pick import pick_channels
  from ._fiff.tag import read_tag
  from ._fiff.tree import dir_tree_find
  from ._fiff.write import end_block, start_and_end_file, start_block, write_int
  from .utils import _check_fname, _check_integer_or_list, _check_on_missing, _check_option, _get_stim_channel, _on_missing, _pl, _validate_type, check_fname, fill_doc, logger, verbose, warn
label_desc: Use image node_id 5 for calling the AcqParserFIF obj's underlying member method code with example usage: obj._events_from_acq_pars() and returns: events