cogpy.plot.hv.xarray_hv

HoloViews helpers for xarray objects.

This module contains small utilities that make it easier to create quick “viewer-like” HoloViews objects from xarray tensors.

The functions are intentionally lightweight and avoid any repo-specific assumptions (no pipeline context, no derivative paths).

Functions

add_click_hair(obj, *, kdim[, value, snap, ...])

Add a clickable 1D hair (vertical/horizontal line) to a HoloViews object.

add_time_hair(obj, *[, time_kdim, t, snap, ...])

Add a clickable "time hair" (vertical line) to a HoloViews Curve or Layout.

apml_crosshair_from_channel(*, ...[, color, ...])

Return a DynamicMap crosshair (HLine*VLine) from a selected channel controller.

bind_apml_tap_to_channel_controller(obj, *, ...)

Bind Tap on an AP×ML view to update ch_controller.value.

channel_geometry_from_time_channel(sig_tc, *)

Extract per-channel (AP, ML) arrays from a standardized (time, ch) signal.

grid_movie(sigx, *[, x_dim, y_dim, ...])

Create a dynamic HoloViews Image "movie" over remaining dimensions.

grid_movie_linked_to_controller(sigx, *, ...)

Grid movie whose displayed frame follows a Param controller value.

grid_movie_with_time_curve(sigx, *[, ...])

Common viewer layout: spatial "grid movie" + time curve with a linked time hair.

hair_from_controller(*, controller[, ...])

Create a DynamicMap hair (VLine/HLine) driven by a Param controller.

multichannel_view(sig, *[, time_dim, ...])

Umbrella wrapper for cogpy.plot.multichannel_timeseries.multichannel_timeseries_view() that accepts common ECoG xarray schemas.

normalize_coords_to_index(sigx[, coos])

Replace selected coordinate values with 0..N-1 indices.

selected_channel_curve(sig_tc, *, ch_controller)

Return a DynamicMap curve for the channel selected by ch_controller.value.

snap_ch_from_apml(ap, ml, *, ap_ch, ml_ch)

Return nearest channel index given an (AP, ML) point.

standardize_time_channel_with_geometry(sig, *)

Standardize a grid signal to (time, ch) and return per-channel geometry.

to_time_channel(sig, *[, time_dim, ch_dim, ...])

Umbrella helper to standardize signals to (time, ch).