class_docstr: Forward class to represent info from forward solution.
  
  Like :class:`mne.Info`, this data structure behaves like a dictionary.
  It contains all metadata necessary for a forward solution.
  
  .. warning::
      This class should not be modified or created by users.
      Forward objects should be obtained using
      :func:`mne.make_forward_solution` or :func:`mne.read_forward_solution`.
  
  Attributes
  ----------
  ch_names : list of str
      A convenience wrapper accessible as ``fwd.ch_names`` which wraps
      ``fwd['info']['ch_names']``.
  
  See Also
  --------
  mne.make_forward_solution
  mne.read_forward_solution
  
  Notes
  -----
  Forward data is accessible via string keys using standard
  :class:`python:dict` access (e.g., ``fwd['nsource'] == 4096``):
  
      source_ori : int
          The source orientation, either ``FIFF.FIFFV_MNE_FIXED_ORI`` or
          ``FIFF.FIFFV_MNE_FREE_ORI``.
      coord_frame : int
          The coordinate frame of the forward solution, usually
          ``FIFF.FIFFV_COORD_HEAD``.
      nsource : int
          The number of source locations.
      nchan : int
          The number of channels.
      sol : dict
          The forward solution, with entries:
  
          ``'data'`` : ndarray, shape (n_channels, nsource * n_ori)
              The forward solution data. The shape will be
              ``(n_channels, nsource)`` for a fixed-orientation forward and
              ``(n_channels, nsource * 3)`` for a free-orientation forward.
          ``'row_names'`` : list of str
              The channel names.
      mri_head_t : instance of Transform
          The mri ↔ head transformation that was used.
      info : instance of :class:`~mne.Info`
          The measurement information (with contents reduced compared to that
          of the original data).
      src : instance of :class:`~mne.SourceSpaces`
          The source space used during forward computation. This can differ
          from the original source space as:
  
          1. Source points are removed due to proximity to (or existing
             outside)
             the inner skull surface.
          2. The source space will be converted to the ``coord_frame`` of the
             forward solution, which typically means it gets converted from
             MRI to head coordinates.
      source_rr : ndarray, shape (n_sources, 3)
          The source locations.
      source_nn : ndarray, shape (n_sources, 3)
          The source normals. Will be all +Z (``(0, 0, 1.)``) for volume
          source spaces. For surface source spaces, these are normal to the
          cortical surface.
      surf_ori : int
          Whether ``sol`` is surface-oriented with the surface normal in the
          Z component (``FIFF.FIFFV_MNE_FIXED_ORI``) or +Z in the given
          ``coord_frame`` in the Z component (``FIFF.FIFFV_MNE_FREE_ORI``).
  
  Forward objects also have some attributes that are accessible via ``.``
  access, like ``fwd.ch_names``.
class_docstr_tok: ["Forward","class","to","represent","info","from","forward","solution",".","Like",":","class",":","`","mne.Info","`",",","this","data","structure","behaves","like","a","dictionary",".","It","contains","all","metadata","necessary","for","a","forward","solution",".","..","warning",":",":","This","class","should","not","be","modified","or","created","by","users",".","Forward","objects","should","be","obtained","using",":","func",":","`","mne.make_forward_solution","`","or",":","func",":","`","mne.read_forward_solution","`",".","Attributes","--","--","--","--","--","ch_names",":","list","of","str","A","convenience","wrapper","accessible","as","``","fwd.ch_names","``","which","wraps","``","fwd","[","'info","'","]","[","'ch_names","'","]","``",".","See","Also","--","--","--","--","mne.make_forward_solution","mne.read_forward_solution","Notes","--","--","-","Forward","data","is","accessible","via","string","keys","using","standard",":","class",":","`","python",":","dict","`","access","(","e.g.",",","``","fwd","[","'nsource","'","]","==","4096","``",")",":","source_ori",":","int","The","source","orientation",",","either","``","FIFF.FIFFV_MNE_FIXED_ORI","``","or","``","FIFF.FIFFV_MNE_FREE_ORI","``",".","coord_frame",":","int","The","coordinate","frame","of","the","forward","solution",",","usually","``","FIFF.FIFFV_COORD_HEAD","``",".","nsource",":","int","The","number","of","source","locations",".","nchan",":","int","The","number","of","channels",".","sol",":","dict","The","forward","solution",",","with","entries",":","``","'data","'","``",":","ndarray",",","shape","(","n_channels",",","nsource","*","n_ori",")","The","forward","solution","data",".","The","shape","will","be","``","(","n_channels",",","nsource",")","``","for","a","fixed-orientation","forward","and","``","(","n_channels",",","nsource","*","3",")","``","for","a","free-orientation","forward",".","``","'row_names","'","``",":","list","of","str","The","channel","names",".","mri_head_t",":","instance","of","Transform","The","mri","\u2194","head","transformation","that","was","used",".","info",":","instance","of",":","class",":","`","~mne.Info","`","The","measurement","information","(","with","contents","reduced","compared","to","that","of","the","original","data",")",".","src",":","instance","of",":","class",":","`","~mne.SourceSpaces","`","The","source","space","used","during","forward","computation",".","This","can","differ","from","the","original","source","space","as",":","1",".","Source","points","are","removed","due","to","proximity","to","(","or","existing","outside",")","the","inner","skull","surface",".","2",".","The","source","space","will","be","converted","to","the","``","coord_frame","``","of","the","forward","solution",",","which","typically","means","it","gets","converted","from","MRI","to","head","coordinates",".","source_rr",":","ndarray",",","shape","(","n_sources",",","3",")","The","source","locations",".","source_nn",":","ndarray",",","shape","(","n_sources",",","3",")","The","source","normals",".","Will","be","all","+Z","(","``","(","0",",","0",",","1",".",")","``",")","for","volume","source","spaces",".","For","surface","source","spaces",",","these","are","normal","to","the","cortical","surface",".","surf_ori",":","int","Whether","``","sol","``","is","surface-oriented","with","the","surface","normal","in","the","Z","component","(","``","FIFF.FIFFV_MNE_FIXED_ORI","``",")","or","+Z","in","the","given","``","coord_frame","``","in","the","Z","component","(","``","FIFF.FIFFV_MNE_FREE_ORI","``",")",".","Forward","objects","also","have","some","attributes","that","are","accessible","via","``",".","``","access",",","like","``","fwd.ch_names","``","."]
docstr: Copy the Forward instance.
docstr_tok: ["Copy","the","Forward","instance","."]
code: def copy(self):
      """Copy the Forward instance."""
      return Forward(deepcopy(self))
  
imports: import os
  import re
  import shutil
  import tempfile
  from copy import deepcopy
  from os import PathLike
  from os import path
  from pathlib import Path
  from time import time
  import numpy
  from scipy import sparse
  from .._fiff.constants import FIFF
  from .._fiff.matrix import _read_named_matrix, _transpose_named_matrix, write_named_matrix
  from .._fiff.meas_info import Info, _make_ch_names_mapping, _read_bad_channels, _read_extended_ch_info, _write_bad_channels, _write_ch_infos, write_info
  from .._fiff.open import fiff_open
  from .._fiff.pick import pick_channels, pick_channels_forward, pick_info, pick_types
  from .._fiff.tag import find_tag, read_tag
  from .._fiff.tree import dir_tree_find
  from .._fiff.write import end_block, start_and_end_file, start_block, write_coord_trans, write_id, write_int, write_string
  from ..epochs import BaseEpochs
  from ..evoked import Evoked, EvokedArray
  from ..html_templates import _get_html_template
  from ..io import BaseRaw, RawArray
  from ..label import Label
  from ..source_estimate import _BaseSourceEstimate, _BaseVectorSourceEstimate
  from ..source_space._source_space import _get_src_nn, _read_source_spaces_from_tree, _set_source_space_vertices, _src_kind_dict, _write_source_spaces_to_fid, find_source_space_hemi
  from ..surface import _normal_orth
  from ..transforms import invert_transform, transform_surface_to, write_trans
  from ..utils import _check_compensation_grade, _check_fname, _check_option, _check_stc_units, _import_h5io_funcs, _on_missing, _stamp_to_dt, _validate_type, check_fname, fill_doc, get_subjects_dir, has_mne_c, logger, repr_html, run_subprocess, verbose, warn
label_desc: Use image node_id 1 for calling the Forward obj's underlying member method code with example usage: obj.copy() and returns: Forward