class_docstr: Raw object from FIL-OPMEG formatted data.
  
  Parameters
  ----------
  binfile : path-like
      Path to the MEG data binary (ending in ``'_meg.bin'``).
  precision : str, optional
      How is the data represented? ``'single'`` if 32-bit or
      ``'double'`` if 64-bit (default is single).
  %(preload)s
  
  Returns
  -------
  raw : instance of RawFIL
      The raw data.
      See :class:`mne.io.Raw` for documentation of attributes and methods.
  
  See Also
  --------
  mne.io.Raw : Documentation of attributes and methods of RawFIL.
code: def __init__(self, binfile, precision="single", preload=False):
      if precision == "single":
          dt = np.dtype(">f")
          bps = 4
      else:
          dt = np.dtype(">d")
          bps = 8
  
      sample_info = dict()
      sample_info["dt"] = dt
      sample_info["bps"] = bps
  
      files = _get_file_names(binfile)
  
      chans = _from_tsv(files["chans"])
      nchans = len(chans["name"])
      nsamples = (
          _determine_nsamples(files["bin"], nchans, precision) - 1
      )
      sample_info["nsamples"] = nsamples
  
      raw_extras = list()
      raw_extras.append(sample_info)
  
      chans["pos"] = [None] * nchans
      chans["ori"] = [None] * nchans
      if files["positions"].is_file():
          chanpos = _from_tsv(files["positions"])
          nlocs = len(chanpos["name"])
          for ii in range(0, nlocs):
              idx = chans["name"].index(chanpos["name"][ii])
              tmp = np.array(
                  [
                      chanpos["Px"][ii],
                      chanpos["Py"][ii],
                      chanpos["Pz"][ii],
                  ]
              )
              chans["pos"][idx] = tmp.astype(np.float64)
              tmp = np.array(
                  [
                      chanpos["Ox"][ii],
                      chanpos["Oy"][ii],
                      chanpos["Oz"][ii],
                  ]
              )
              chans["ori"][idx] = tmp.astype(np.float64)
      else:
          warn("No sensor position information found.")
  
      with open(files["meg"]) as fid:
          meg = json.load(fid)
      info = _compose_meas_info(meg, chans)
  
      super().__init__(
          info,
          preload,
          filenames=[files["bin"]],
          raw_extras=raw_extras,
          last_samps=[nsamples],
          orig_format=precision,
      )
  
      if files["coordsystem"].is_file():
          with open(files["coordsystem"]) as fid:
              csys = json.load(fid)
          hc = csys["HeadCoilCoordinates"]
  
          for key in hc:
              if key.lower() == "lpa":
                  lpa = np.asarray(hc[key])
              elif key.lower() == "rpa":
                  rpa = np.asarray(hc[key])
              elif key.lower().startswith("nas"):
                  nas = np.asarray(hc[key])
              else:
                  warn(f"{key} is not a valid fiducial name!")
  
          size = np.linalg.norm(nas - rpa)
          unit, sf = _size2units(size)
          # TODO: These are not guaranteed to exist and could lead to a
          # confusing error message, should fix later
          lpa /= sf
          rpa /= sf
          nas /= sf
  
          t = get_ras_to_neuromag_trans(nas, lpa, rpa)
  
          # transform fiducial points
          nas = apply_trans(t, nas)
          lpa = apply_trans(t, lpa)
          rpa = apply_trans(t, rpa)
  
          with self.info._unlock():
              self.info["dig"] = _make_dig_points(
                  nasion=nas, lpa=lpa, rpa=rpa, coord_frame="meg"
              )
      else:
          warn(
              "No fiducials found in files, defaulting sensor array to "
              "FIFFV_COORD_DEVICE, this may cause problems later!"
          )
          t = np.eye(4)
  
      with self.info._unlock():
          self.info["dev_head_t"] = Transform(
              FIFF.FIFFV_COORD_DEVICE, FIFF.FIFFV_COORD_HEAD, t
          )
  
imports: import json
  import pathlib
  import numpy
  from ..._fiff._digitization import _make_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _read_segments_file
  from ..._fiff.write import get_new_file_id
  from ...transforms import Transform, apply_trans, get_ras_to_neuromag_trans
  from ...utils import _check_fname, fill_doc, verbose, warn
  from ..base import BaseRaw
  from .sensors import _get_plane_vectors, _get_pos_units, _refine_sensor_orientation, _size2units
label_desc: Use image node_id 1 to create a new RawFIL object from inherited base classes: BaseRaw with example: obj = RawFIL(binfile, precision, preload)