neurocarto.util.edit.probe

neurocarto.util.edit.probe.new_channelmap(controller, code)

Create a new channelmap with type code.

Parameters:
  • code (int | str) – channelmap type code.

  • controller (ControllerView)

Returns:

new channelmap instance.

See:

ProbeView. reset()

See:

BlueprintFunctions. new_channelmap()

Return type:

Any

neurocarto.util.edit.probe.capture_electrode(self, controller, index, state=None, mode='replace')

Capture electrodes.

Parameters:
  • index (ndarray[tuple[int, ...], dtype[int64]] | ndarray[tuple[int, ...], dtype[bool]]) – index (Array[E, N]) or bool (Array[bool, E]) array.

  • state (list[int] | None) – restrict electrodes on given states.

  • mode (Literal['r', 'replace', 'a', 'append', 'x', 'exclude'])

  • self (BlueprintFunctions)

  • controller (ControllerView)

See:

ProbeView. set_captured_electrodes()

See:

BlueprintFunctions. capture_electrode()

neurocarto.util.edit.probe.clear_capture_electrode(controller)

clear capturing.

See:

ProbeView. clear_capture_electrode()

See:

BlueprintFunctions. clear_capture_electrode()

Parameters:

controller (ControllerView)

neurocarto.util.edit.probe.captured_electrodes(controller, all=False)

get captured electrodes.

Parameters:
Returns:

index of captured electrodes.

See:

ProbeView. get_captured_electrodes_index()

See:

BlueprintFunctions. captured_electrodes()

Return type:

ndarray[tuple[int, …], dtype[int64]]

neurocarto.util.edit.probe.set_state_for_captured(self, controller, state, index=None)

Set state for captured electrodes.

Parameters:
  • state (int) – a state value

  • index (ndarray[tuple[int, ...], dtype[int64]] | ndarray[tuple[int, ...], dtype[bool]] | None) – index (Array[E, N]) or bool (Array[bool, E]) array.

  • self (BlueprintFunctions)

  • controller (ControllerView)

See:

capture_electrode()

See:

ProbeView. set_state_for_captured()

See:

BlueprintFunctions. set_state_for_captured()

neurocarto.util.edit.probe.set_category_for_captured(self, controller, category, index=None)

Set category for captured electrodes.

Parameters:
  • category (int) – a category value

  • index (ndarray[tuple[int, ...], dtype[int64]] | ndarray[tuple[int, ...], dtype[bool]] | None) – index (Array[E, N]) or bool (Array[bool, E]) array.

  • self (BlueprintFunctions)

  • controller (ControllerView)

See:

capture_electrode()

See:

ProbeView. set_category_for_captured()

See:

BlueprintFunctions. set_category_for_captured()

neurocarto.util.edit.probe.refresh_selection(self, controller, selector=None)

refresh electrode selection base on current blueprint.

Parameters:
See:

ProbeView. refresh_selection()

See:

BlueprintFunctions. refresh_selection()

neurocarto.util.edit.probe.select_electrodes(self, chmap=None, blueprint=None, **kwargs)

Run electrode selection for a channelmap based on the blueprint.

Parameters:
  • self (BlueprintFunctions)

  • chmap (M | None)

  • blueprint (list[ElectrodeDesp] | ndarray[tuple[int, ...], dtype[int64]] | None)

  • kwargs – selector extra parameters

Returns:

selection result

See:

ProbeDesp.:attr:~neurocarto.probe.ProbeDesp.select_electrodes

Return type:

M