docstr: Read a frame or all frames from the file
  
  Parameters
  ----------
  index : int
      Select the index-th frame from the file. If index is `...`,
      select all frames and stack them along a new axis.
  
  Returns
  -------
  A Numpy array of pixel values.
docstr_tok: ["Read","a","frame","or","all","frames","from","the","file","Parameters","--","--","--","--","--","index",":","int","Select","the","index-th","frame","from","the","file",".","If","index","is","`","...","`",",","select","all","frames","and","stack","them","along","a","new","axis",".","Returns","--","--","--","-","A","Numpy","array","of","pixel","values","."]
code: def read(self, *, index: int = ...) -> np.ndarray:
      """Read a frame or all frames from the file
  
      Parameters
      ----------
      index : int
          Select the index-th frame from the file. If index is `...`,
          select all frames and stack them along a new axis.
  
      Returns
      -------
      A Numpy array of pixel values.
  
      """
  
      if index is Ellipsis:
          read_offset = Spec.data_start
          count = self._shape[0] * self._shape[1] * self._len
          out_shape = (self._len, *self._shape)
      elif index < 0:
          raise IndexError(f"Index `{index}` is smaller than 0.")
      elif index >= self._len:
          raise IndexError(
              f"Index `{index}` exceeds the number of frames stored in this file (`{self._len}`)."
          )
      else:
          read_offset = (
              Spec.data_start
              + index
              * self._shape[0]
              * self._shape[1]
              * self._dtype.itemsize
          )
          count = self._shape[0] * self._shape[1]
          out_shape = self._shape
  
      self._file.seek(read_offset)
      data = np.fromfile(self._file, dtype=self._dtype, count=count)
      return data.reshape(out_shape)
  
imports: from datetime import datetime
  import logging
  import os
  from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, Union
  import warnings
  import numpy
  from ..core.request import Request, IOMode, InitializationError
  from ..core.v3_plugin_api import PluginV3, ImageProperties
label_desc: Use image node_id 2 for calling the SpePlugin obj's underlying member method code with example usage: obj.read() and returns: data