class_docstr: Raw object from 4D Neuroimaging MagnesWH3600 data.
  
  Parameters
  ----------
  pdf_fname : path-like
      Path to the processed data file (PDF).
  config_fname : path-like
      Path to system config file.
  head_shape_fname : path-like | None
      Path to the head shape file.
  rotation_x : float
      Degrees to tilt x-axis for sensor frame misalignment. Ignored
      if convert is True.
  translation : array-like, shape (3,)
      The translation to place the origin of coordinate system
      to the center of the head. Ignored if convert is True.
  convert : bool
      Convert to Neuromag coordinates or not.
  rename_channels : bool
      Whether to keep original 4D channel labels or not. Defaults to True.
  sort_by_ch_name : bool
      Reorder channels according to channel label. 4D channels don't have
      monotonically increasing numbers in their labels. Defaults to True.
  ecg_ch : str | None
      The 4D name of the ECG channel. If None, the channel will be treated
      as regular EEG channel.
  eog_ch : tuple of str | None
      The 4D names of the EOG channels. If None, the channels will be treated
      as regular EEG channels.
  %(preload)s
  
      .. versionadded:: 0.11
  
  %(verbose)s
class_docstr_tok: ["Raw","object","from","4D","Neuroimaging","MagnesWH3600","data",".","Parameters","--","--","--","--","--","pdf_fname",":","path-like","Path","to","the","processed","data","file","(","PDF",")",".","config_fname",":","path-like","Path","to","system","config","file",".","head_shape_fname",":","path-like","|","None","Path","to","the","head","shape","file",".","rotation_x",":","float","Degrees","to","tilt","x-axis","for","sensor","frame","misalignment",".","Ignored","if","convert","is","True",".","translation",":","array-like",",","shape","(","3",",",")","The","translation","to","place","the","origin","of","coordinate","system","to","the","center","of","the","head",".","Ignored","if","convert","is","True",".","convert",":","bool","Convert","to","Neuromag","coordinates","or","not",".","rename_channels",":","bool","Whether","to","keep","original","4D","channel","labels","or","not",".","Defaults","to","True",".","sort_by_ch_name",":","bool","Reorder","channels","according","to","channel","label",".","4D","channels","do","n't","have","monotonically","increasing","numbers","in","their","labels",".","Defaults","to","True",".","ecg_ch",":","str","|","None","The","4D","name","of","the","ECG","channel",".","If","None",",","the","channel","will","be","treated","as","regular","EEG","channel",".","eog_ch",":","tuple","of","str","|","None","The","4D","names","of","the","EOG","channels",".","If","None",",","the","channels","will","be","treated","as","regular","EEG","channels",".","%","(","preload",")","s","..","versionadded",":",":","0.11","%","(","verbose",")","s"]
docstr: Read a segment of data from a file.
docstr_tok: ["Read","a","segment","of","data","from","a","file","."]
code: def _read_segment_file(self, data, idx, fi, start, stop, cals, mult):
      """Read a segment of data from a file."""
      bti_info = self._raw_extras[fi]
      fname_or_bytes = bti_info["pdf"]
      dtype = bti_info["dtype"]
      assert len(bti_info["chs"]) == self._raw_extras[fi]["orig_nchan"]
      n_channels = len(bti_info["chs"])
      n_bytes = np.dtype(dtype).itemsize
      data_left = (stop - start) * n_channels
      read_cals = np.empty((bti_info["total_chans"],))
      for ch in bti_info["chs"]:
          read_cals[ch["index"]] = ch["cal"]
  
      block_size = ((int(100e6) // n_bytes) // n_channels) * n_channels
      block_size = min(data_left, block_size)
      # extract data in chunks
      with _bti_open(fname_or_bytes, "rb") as fid:
          fid.seek(bti_info["bytes_per_slice"] * start, 0)
          for sample_start in (
              np.arange(0, data_left, block_size) // n_channels
          ):
              count = min(
                  block_size, data_left - sample_start * n_channels
              )
              if isinstance(fid, BytesIO):
                  block = np.frombuffer(fid.getvalue(), dtype, count)
              else:
                  block = np.fromfile(fid, dtype, count)
              sample_stop = sample_start + count // n_channels
              shape = (
                  sample_stop - sample_start,
                  bti_info["total_chans"],
              )
              block.shape = shape
              data_view = data[:, sample_start:sample_stop]
              one = np.empty(block.shape[::-1])
  
              for ii, b_i_o in enumerate(bti_info["order"]):
                  one[ii] = block[:, b_i_o] * read_cals[b_i_o]
              _mult_cal_one(data_view, one, idx, cals, mult)
  
imports: import functools
  import os.path
  from io import BytesIO
  from itertools import count
  import numpy
  from ..._fiff._digitization import _make_bti_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.tag import _coil_trans_to_loc, _loc_to_coil_trans
  from ..._fiff.utils import _mult_cal_one, read_str
  from ...transforms import Transform, combine_transforms, invert_transform
  from ...utils import _stamp_to_dt, _validate_type, logger, path_like, verbose
  from ..base import BaseRaw
  from .constants import BTI
  from .read import read_char, read_dev_header, read_double, read_double_matrix, read_float, read_float_matrix, read_int16, read_int16_matrix, read_int32, read_int64, read_transform, read_uint16, read_uint32
label_desc: Use image node_id 2 for calling the RawBTi obj's underlying member method code with example usage: obj._read_segment_file(data, idx, fi, start, stop, cals, mult) without return types