aind_ephys_utils package

Subpackages

Submodules

Module contents

Helpful methods for exploring in vivo electrophysiology data.

aind_ephys_utils.configure_defaults(*, plot: bool = True, display: bool = True, print_options: bool = True, savefig_dpi: int | None = 300) None

Apply recommended global defaults explicitly.

Parameters:
  • plot – If True, apply matplotlib defaults for export-friendly figures.

  • display – If True, set xarray display options for compact DataArray rendering.

  • print_options – If True, set numpy print options for concise array display.

  • savefig_dpi – Save DPI to set when plot=True. If None, leaves current value.

aind_ephys_utils.validate(da: DataArray, *, kind: str | None = None, require_time_coord: bool = True, check_ragged_contents: bool = True) ValidationResult

Validate that a DataArray conforms to the conventions expected by .ephys.

Parameters:
  • da – The DataArray to validate.

  • kind – If provided, require that the DataArray matches this inferred kind. One of: “spikes_ragged”, “continuous”, “binned”, “events”.

  • require_time_coord – If True, require a ‘time’ coordinate whenever there is a time dimension.

  • check_ragged_contents – If True, sample-check ragged spike contents for basic shape/dtype sanity.

Return type:

ValidationResult