pub struct ForwardOperator {
pub gain: Array2<f64>,
pub source_nn: Array2<f64>,
pub n_sources: usize,
pub orientation: SourceOrientation,
pub depth_exp: Option<f64>,
}Expand description
Forward operator (gain matrix + metadata).
The gain matrix maps source activations to sensor measurements:
x(t) = G @ j(t) + noise.
§Construction
- From a raw gain matrix:
ForwardOperator::new_fixedorForwardOperator::new_free. - From electrode positions + source space:
forward::make_sphere_forward.
Fields§
§gain: Array2<f64>Gain matrix, shape [n_channels, n_sources × n_orient].
source_nn: Array2<f64>Source normals/orientations, shape [n_sources × n_orient, 3].
n_sources: usizeNumber of source locations.
orientation: SourceOrientationOrientation mode.
depth_exp: Option<f64>Depth-weighting exponent (0.8 for MEG, 2–5 for EEG). None = no depth weighting.
Implementations§
Source§impl ForwardOperator
impl ForwardOperator
Sourcepub fn new_fixed(gain: Array2<f64>) -> Self
pub fn new_fixed(gain: Array2<f64>) -> Self
Create a fixed-orientation forward operator from a gain matrix
[n_channels, n_sources].
Source normals are initialised to zero; set ForwardOperator::source_nn
manually if you need proper normals for PickOri::Normal.
Trait Implementations§
Source§impl Clone for ForwardOperator
impl Clone for ForwardOperator
Source§fn clone(&self) -> ForwardOperator
fn clone(&self) -> ForwardOperator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ForwardOperator
impl RefUnwindSafe for ForwardOperator
impl Send for ForwardOperator
impl Sync for ForwardOperator
impl Unpin for ForwardOperator
impl UnsafeUnpin for ForwardOperator
impl UnwindSafe for ForwardOperator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more