class_docstr: Class for time operations on any MNE object that has a time axis.
class_docstr_tok: ["Class","for","time","operations","on","any","MNE","object","that","has","a","time","axis","."]
docstr: Convert seconds to index into data.
  
  Parameters
  ----------
  tmin : int | float | None
      Start time of data to get in seconds.
  tmax : int | float | None
      End time of data to get in seconds.
  
  Returns
  -------
  start : int
      Integer index into data corresponding to tmin.
  stop : int
      Integer index into data corresponding to tmax.
docstr_tok: ["Convert","seconds","to","index","into","data",".","Parameters","--","--","--","--","--","tmin",":","int","|","float","|","None","Start","time","of","data","to","get","in","seconds",".","tmax",":","int","|","float","|","None","End","time","of","data","to","get","in","seconds",".","Returns","--","--","--","-","start",":","int","Integer","index","into","data","corresponding","to","tmin",".","stop",":","int","Integer","index","into","data","corresponding","to","tmax","."]
code: def _handle_tmin_tmax(self, tmin, tmax):
      """Convert seconds to index into data.
  
      Parameters
      ----------
      tmin : int | float | None
          Start time of data to get in seconds.
      tmax : int | float | None
          End time of data to get in seconds.
  
      Returns
      -------
      start : int
          Integer index into data corresponding to tmin.
      stop : int
          Integer index into data corresponding to tmax.
  
      """
      _validate_type(
          tmin,
          types=("numeric", None),
          item_name="tmin",
          type_name="int, float, None",
      )
      _validate_type(
          tmax,
          types=("numeric", None),
          item_name="tmax",
          type_name="int, float, None",
      )
  
      # handle tmin/tmax as start and stop indices into data array
      n_times = self.times.size
      start = 0 if tmin is None else self.time_as_index(tmin)[0]
      stop = n_times if tmax is None else self.time_as_index(tmax)[0]
  
      # truncate start/stop to the open interval [0, n_times]
      start = min(max(0, start), n_times)
      stop = min(max(0, stop), n_times)
  
      return start, stop
  
imports: import json
  import logging
  from collections import OrderedDict
  from copy import deepcopy
  import numpy
  from ._logging import verbose, warn
  from .check import _check_pandas_installed, _check_preload, _validate_type
  from .numerics import _time_mask, object_hash, object_size
label_desc: Use image node_id 2 for calling the TimeMixin obj's underlying member method code with example usage: obj._handle_tmin_tmax(tmin, tmax) and returns: start,  stop