class_docstr: Raw object from a Persyst file.
  
  Parameters
  ----------
  fname : path-like
      Path to the Persyst header (.lay) file.
  %(preload)s
  %(verbose)s
  
  See Also
  --------
  mne.io.Raw : Documentation of attributes and methods.
class_docstr_tok: ["Raw","object","from","a","Persyst","file",".","Parameters","--","--","--","--","--","fname",":","path-like","Path","to","the","Persyst","header","(",".lay",")","file",".","%","(","preload",")","s","%","(","verbose",")","s","See","Also","--","--","--","--","mne.io.Raw",":","Documentation","of","attributes","and","methods","."]
docstr: Read a segment of data from a file.
  
  The Persyst software  records raw data in either 16 or 32 bit
  binary files. In addition, it stores the calibration to convert
  data to uV in the lay file.
docstr_tok: ["Read","a","segment","of","data","from","a","file",".","The","Persyst","software","records","raw","data","in","either","16","or","32","bit","binary","files",".","In","addition",",","it","stores","the","calibration","to","convert","data","to","uV","in","the","lay","file","."]
code: def _read_segment_file(self, data, idx, fi, start, stop, cals, mult):
      """Read a segment of data from a file.
  
      The Persyst software  records raw data in either 16 or 32 bit
      binary files. In addition, it stores the calibration to convert
      data to uV in the lay file.
      """
      dtype = self._raw_extras[fi]["dtype"]
      n_chs = self._raw_extras[fi]["n_chs"]
      dat_fname = self._filenames[fi]
  
      # compute samples count based on start and stop
      time_length_samps = stop - start
  
      # read data from .dat file into array of correct size, then calibrate
      # records = recnum rows x inf columns
      count = time_length_samps * n_chs
  
      # seek the dat file
      with open(dat_fname, "rb") as dat_file_ID:
          # allow offset to occur
          dat_file_ID.seek(n_chs * dtype.itemsize * start, 1)
  
          # read in the actual record starting at possibly offset
          record = np.fromfile(dat_file_ID, dtype=dtype, count=count)
  
      # chs * rows
      # cast as float32; more than enough precision
      record = np.reshape(record, (n_chs, -1), "F").astype(np.float32)
  
      # calibrate to convert to V and handle mult
      _mult_cal_one(data, record, idx, cals, mult)
  
file_path: mne-python/mne/io/persyst/persyst.py
imports: import os
  import os.path
  from collections import OrderedDict
  from datetime import datetime, timezone
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import create_info
  from ..._fiff.utils import _mult_cal_one
  from ...annotations import Annotations
  from ...utils import _check_fname, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
label_desc: Use image node_id 2 for calling the RawPersyst obj's underlying member method code with example usage: obj._read_segment_file(data, idx, fi, start, stop, cals, mult) without return types