class_docstr: Raw object from CTF directory.
  
  Parameters
  ----------
  directory : path-like
      Path to the CTF data (ending in ``'.ds'``).
  system_clock : str
      How to treat the system clock. Use ``"truncate"`` (default) to truncate
      the data file when the system clock drops to zero, and use ``"ignore"``
      to ignore the system clock (e.g., if head positions are measured
      multiple times during a recording).
  %(preload)s
  clean_names : bool, optional
      If True main channel names and compensation channel names will
      be cleaned from CTF suffixes. The default is False.
  %(verbose)s
  
  See Also
  --------
  mne.io.Raw : Documentation of attributes and methods.
class_docstr_tok: ["Raw","object","from","CTF","directory",".","Parameters","--","--","--","--","--","directory",":","path-like","Path","to","the","CTF","data","(","ending","in","``","'.ds","'","``",")",".","system_clock",":","str","How","to","treat","the","system","clock",".","Use","``","``","truncate","''","``","(","default",")","to","truncate","the","data","file","when","the","system","clock","drops","to","zero",",","and","use","``","``","ignore","''","``","to","ignore","the","system","clock","(","e.g.",",","if","head","positions","are","measured","multiple","times","during","a","recording",")",".","%","(","preload",")","s","clean_names",":","bool",",","optional","If","True","main","channel","names","and","compensation","channel","names","will","be","cleaned","from","CTF","suffixes",".","The","default","is","False",".","%","(","verbose",")","s","See","Also","--","--","--","--","mne.io.Raw",":","Documentation","of","attributes","and","methods","."]
docstr: Read a chunk of raw data.
docstr_tok: ["Read","a","chunk","of","raw","data","."]
code: def _read_segment_file(self, data, idx, fi, start, stop, cals, mult):
      """Read a chunk of raw data."""
      si = self._raw_extras[fi]
      offset = 0
      trial_start_idx, r_lims, d_lims = _blk_read_lims(
          start, stop, int(si["block_size"])
      )
      with open(self._filenames[fi], "rb") as fid:
          for bi in range(len(r_lims)):
              samp_offset = (bi + trial_start_idx) * si["res4_nsamp"]
              n_read = min(
                  si["n_samp_tot"] - samp_offset, si["block_size"]
              )
              # read the chunk of data
              # have to be careful on Windows and make sure we are using
              # 64-bit integers here
              with np.errstate(over="raise"):
                  pos = np.int64(CTF.HEADER_SIZE)
                  pos += np.int64(samp_offset) * si["n_chan"] * 4
              fid.seek(pos, 0)
              this_data = np.fromfile(
                  fid, ">i4", count=si["n_chan"] * n_read
              )
              this_data.shape = (si["n_chan"], n_read)
              this_data = this_data[:, r_lims[bi, 0] : r_lims[bi, 1]]
              data_view = data[:, d_lims[bi, 0] : d_lims[bi, 1]]
              _mult_cal_one(data_view, this_data, idx, cals, mult)
              offset += n_read
  
imports: import os
  import numpy
  from ..._fiff._digitization import _format_dig_points
  from ..._fiff.utils import _blk_read_lims, _mult_cal_one
  from ...utils import _check_fname, _check_option, _clean_names, fill_doc, logger, verbose
  from ..base import BaseRaw
  from .constants import CTF
  from .eeg import _read_eeg, _read_pos
  from .hc import _read_hc
  from .info import _annotate_bad_segments, _compose_meas_info, _read_bad_chans
  from .markers import _read_annotations_ctf_call
  from .res4 import _make_ctf_name, _read_res4
  from .trans import _make_ctf_coord_trans_set
label_desc: Use image node_id 2 for calling the RawCTF obj's underlying member method code with example usage: obj._read_segment_file(data, idx, fi, start, stop, cals, mult) without return types