API#

Design and manufacture nulling coils#

Optimize stream functions, discretize into current loops, join interactively, and export to KiCAD.

BiplanarCoil(planemesh, center[, N_suh, ...])

Biplanar coil.

get_sphere_points(center[, n, sidelength])

get_target_field(target_type, target_points)

Set field in target region using spherical harmonics.

Evaluation metrics#

Evaluate performance using efficiency and homogeneity.

efficiency(biplanar_coil, target_points, ...)

Compute efficiency with discretized current loops.

homogeneity(biplanar_coil, target_field, ...)

Compute homogeneity percentage with discretized current loops.

Simulating PCBs#

Load the completed coil path from KiCAD and compute the total magnetic field from a combination of PCBs.

PCB([fname, offset, loops, pcb_dict])

PCBPanel([pcb_folder, half_names, standoff, ...])

load_panel(path[, standoff, flip, rearrange])

Loads and returns PCBPanel

combined_panel_field(panels, currents, ...)

Compute field from multiple sets of panels

plot_field_colormap(field, grid, axis[, ax, ...])

Plot colormap of one field axis along an x-z plane between panels.

plot_panel_profile(panel, current[, ...])

Plot line profile for panel.

plot_panel(panel, target_size, n_points, ...)

Creates 2d colormap, line profile, and arrow field map for coil.

plot_combined_panels(panels, currents, ...)

Plots multiple panels and their combined fields in 3D

Data Analysis#

Analyze the performance of a coil design.

get_good_chs(fnames)

Get good channels from txt files with residual fields.

load_remnant_fields(fname, ch_names[, bias])

Load remnant fields from txt file.

add_ch_loc(raws, info_helmet, ch_mapping)

Add channel locations.

read_opm_info(fname)

Read info for OPM.

find_events(raw, **kwargs)

Find events in OPM-MEG data.