neurocarto.views.probe
- class neurocarto.views.probe.ProbeView
Probe view.
- __init__(config, desp)
- Parameters:
config (CartoConfig)
desp (ProbeDesp[M, E])
- data_electrodes: dict[int, ColumnDataSource]
dict {state: ColumnDataSource}
- property name: str
view name
- setup(f, **kwargs)
Setup controls and plotting.
- Parameters:
f (figure) – figure in middle panel
kwargs – control or plotting related parameters.
- Returns:
row list.
- Return type:
list[UIElement]
- reset(chmap=None)
Reset channelmap.
- Parameters:
chmap (int | M | None) – channelmap code
- update_electrode()
Refresh channelmap
- refresh_selection()
Rerun electrode selection and refresh channelmap
- get_electrodes(s, *, state=None)
Get electrodes in source s.
- Parameters:
s (None | int | list[int] | ColumnDataSource) – electrode source.
state (int | None) – filter electrodes with its state in returns
- Returns:
electrodes
- Return type:
list[E]
- get_captured_electrodes(d=None, *, reset=False)
Get captured electrodes.
- Parameters:
d (ColumnDataSource | None) – one of
data_electrodesreset – reset the selecting state.
- Returns:
captured electrodes.
- Return type:
set[E]
- get_captured_electrodes_index(d=None, *, reset=False)
Get captured electrodes.
- Parameters:
d (ColumnDataSource | None) – one of {#data_electrodes}
reset – reset the selecting state.
- Returns:
index-list of captured electrodes.
- Return type:
list[int]
- update_electrode_position(d, e)
Show electrodes.
- Parameters:
d (ColumnDataSource) – one of
data_electrodese (Iterable[E]) – new electrodes
- set_highlight(s, *, invalid=True)
Highlight electrodes.
- Parameters:
s (Iterable[E]) – selected electrode set
invalid – extend the highlight set to include co-electrodes
- set_state_for_captured(state, electrodes=None)
Set electrode state for selected electrodes.
- Parameters:
state (int) – new state. value in ProbeDesp.:attr:~neurocarto.probe.ProbeDesp.STATE_USED, ProbeDesp.:attr:~neurocarto.probe.ProbeDesp.STATE_UNUSED
electrodes (list[int | E] | None) – captured electrodes.
- set_category_for_captured(category, electrodes=None)
Set electrode category value for selected electrodes.
- Parameters:
category (int) – category value from
ProbeDesp.CATE_*electrodes (list[int | E] | None) – captured electrodes.
- filter_records(records, *, reset=False)
Filter records which source came from itself.
It is also used to modify the records and return the equivalence steps.
- Parameters:
records (list[RecordStep])
reset – reset view to the initial state? If so, you can add extra action in return.
- Returns:
filtered records
- Return type:
list[RecordStep]
- replay_record(record)
Replay the record step.
Warning
Do not call this method directly, because it might cause
add_record()be invoked during the replay. Use RecordManager.replay()instead.- Parameters:
record (RecordStep)