Skip to content

ndi.fun.probe.extracellularInfo

  NDI.FUN.PROBE.EXTRACELLULARINFO - summarize the extracellular neurons imported from a probe

  [INFO, SUMMARY] = NDI.FUN.PROBE.EXTRACELLULARINFO(S, PROBE, ...)

  Returns information about the extracellular neurons that were determined
  (e.g. spike-sorted and imported) from the ndi.probe (or ndi.element) PROBE in
  the ndi.session S. This is a way of viewing data that has ALREADY been
  imported into the database; nothing is read from disk and nothing is changed.
  It is the database-side counterpart to NDI.FUN.PROBE.IMPORT.KILOSORT.GETINFO,
  which summarizes a sort on disk before it is imported.

  A neuron is considered to belong to PROBE if it is an ndi.element whose
  underlying element is PROBE (depends_on 'underlying_element_id' == PROBE.id())
  and that has an associated 'neuron_extracellular' document (depends_on
  'element_id' == that neuron element). This is exactly the relationship created
  by NDI.FUN.PROBE.IMPORT.KILOSORT.PROBE.

  INFO is a struct array (one entry per neuron, sorted by cluster_index) with
  fields:
    element_name         - name of the neuron ndi.element (e.g. 'probe_3')
    element_id           - document id of the neuron element
    cluster_index        - cluster id the neuron came from (from the document)
    quality_label        - curation label (e.g. 'good', 'mua')
    quality_number       - numeric quality value
    pipeline             - the 'app.name' provenance string recorded on the
                             document (e.g. the spike-sorting pipeline), or ''
    number_of_channels   - number of channels in the mean waveform
    number_of_samples_per_channel - samples per channel in the mean waveform
    neuron_extracellular - the full 'neuron_extracellular' property structure
                             from the document (mean_waveform, etc.)
    document             - the neuron_extracellular ndi.document object

  If PROBE has no imported extracellular neurons, INFO is a 0x0 struct array
  with these fields and SUMMARY says so.

  SUMMARY is a multiline character array giving a human-readable version of INFO.

  Name/value pairs:
  ---------------------------------------------------------------------------------
  | Parameter (default)      | Description                                         |
  |--------------------------|-----------------------------------------------------|
  | quality_labels ([])      | If non-empty, a string array restricting the result |
  |                          |   to neurons whose quality_label is in the list      |
  |                          |   (matched case-insensitively).                     |
  ---------------------------------------------------------------------------------

  Example:
     S = ndi.session.dir('/path/to/session');
     p = S.getprobes('type','n-trode');
     [info, summary] = ndi.fun.probe.extracellularInfo(S, p{1});
     disp(summary);

  See also: NDI.FUN.PROBE.IMPORT.KILOSORT.PROBE, NDI.FUN.PROBE.IMPORT.KILOSORT.GETINFO