Skip to content

← neural package

InterpolateMissingChannels

Interpolate missing channels in the given data.

Given a list of desired channel labels, this node will attempt to produce an output signal that has all channels in that list, and will interpolate channels that are not present in the data if needed. This node can use spherical-spline or least-squares interpolation. More Info... Version 1.5.1

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

ref_data

Reference data. Can be provided as an alternative to the desired_channels.

  • verbose name: Ref Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: IN

prior_cov

Prior covariance matrix.

  • verbose name: Prior Cov
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: IN

desired_channels

Desired channels. This node will attempt to ensure that the given channels are present in the output data and interpolate them if necessary. Ignored if ref_data provided.

  • verbose name: Desired Channels
  • default value: None
  • port type: ListPort
  • value type: list (can be None)

reinterpolate_existing

Whether to reinterpolate channels even if the desired label is already in the current channel list. This can be used to force a reinterpolation of existing channels at locations in a specific template.

  • verbose name: Reinterpolate Existing
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

montage_type

Choose the montage to use from among a list of common options. If set to auto, the best-matching montage will be used.

  • verbose name: Montage Type
  • default value: auto
  • port type: EnumPort
  • value type: str (can be None)

montage

Optionally a montage file (.l ocs format) to use. This may be a montage file that ships with Neuropype (available in resources/montages), in which case only the filename is needed, or the full path to a montage located elsewhere. If specified, this will take precedence over the montage type field.

  • verbose name: Montage File
  • default value:
  • port type: StringPort
  • value type: str (can be None)

additive_noise_scale

Scale of additive noise. Optional scale factor for Gaussian noise that can be added to each interpolated channel to prevent rank deficiency. Scale is relative to the overall data's standard deviation (assuming that channels are zero mean).

  • verbose name: Additive Noise Scale
  • default value: 0
  • port type: FloatPort
  • value type: float (can be None)

mode

Interpolation mode. The spherical-spline mode will interpolate the channel based on its scalp location using spherical spline interpolation. The other two modes, which require that the prior_cov input is provided, will interpolate the channel using a statistical criterion based on a priori between-channel covariance. The lstsq method uses a least-squares solution, and the pinv method uses the pseudoinverse. The former is in theory more accurate but may leave exact zero channels in the data with greater likelihood than the pinv method.

  • verbose name: Mode
  • default value: spherical-spline
  • port type: EnumPort
  • value type: str (can be None)

backend

Compute backend to use. The cupy and torch backends can be as much as 10x faster on large problems if the system has a CUDA-capable GPU installed. For CPU-only systems, the torch-cpu mode can still yield a substantial speed boost over numpy. Keep means to use whatever was used to create the incoming data.

  • verbose name: Backend
  • default value: keep
  • port type: EnumPort
  • value type: str (can be None)

precision

Numeric precision to use. Can be reduced to save memory (e.g. if running on GPU). Only needed for the largest of problems, and only used by the geometric and huber centroids.

  • verbose name: Precision
  • default value: keep
  • port type: EnumPort
  • value type: str (can be None)

min_ev

Minimum eigenvalue threshold. If left undefined, this will be set according to the precision. If negative, then the absolute value of negative eigenvalues will be used.

  • verbose name: Min Ev
  • default value: None
  • port type: FloatPort
  • value type: float (can be None)

randseed

Random seed to use for interpolation.

  • verbose name: Randseed
  • default value: 12345
  • port type: IntPort
  • value type: int (can be None)

verbose

Show verbose output.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)