v2.0.0
Loading...
Searching...
No Matches
inv_hpi_fit_data.h File Reference

Per-coil magnetic-dipole fitting workspace — Nelder-Mead optimiser plus leadfield computation for HPI coil localisation. More...

#include "../inv_global.h"
#include "inv_hpi_fit.h"
#include "inv_sensor_set.h"
#include <Eigen/Core>
#include <QSharedPointer>
Include dependency graph for inv_hpi_fit_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  INVLIB::DipFitError
 Residual error and moment vector from a single magnetic dipole fit iteration. More...
struct  INVLIB::HPISortStruct
 Helper for sorting HPI coil dipole fits by matching each fit to the nearest expected coil position. More...
class  INVLIB::InvHpiFitData
 Per-coil magnetic-dipole fitter (leadfield, residual, Nelder-Mead refinement) for the HPI pipeline. More...

Namespaces

namespace  FIFFLIB
 FIFF file I/O, in-memory data structures and high-level readers/writers.
namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).

Detailed Description

Per-coil magnetic-dipole fitting workspace — Nelder-Mead optimiser plus leadfield computation for HPI coil localisation.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

INVLIB::InvHpiFitData implements the inner loop of InvHpiFit: for every HPI coil it computes the magnetic-dipole leadfield in an infinite homogeneous medium, evaluates the residual between the model field and the measured projection, and runs a Nelder-Mead simplex search (fminsearch) to refine the coil position. Helper structs DipFitError and HPISortStruct carry per-iteration diagnostics and the post-fit coil-ordering metadata. The leadfield and fit-error routines are validated against the FieldTrip magnetic_dipole / ft_compute_leadfield reference implementations.

Definition in file inv_hpi_fit_data.h.