Skip to content

ndi.fun.doc.probe.probeLocations4probes

  PROBELOCATIONS4PROBES - Create and add probe_location documents for a set of probes.

    DOCS = PROBELOCATIONS4PROBES(S, PROBES, ONTOLOGY_LOOKUP_STRINGS, ...)

    Creates NDI documents of type 'probe_location' for each probe specified in the
    cell array PROBES. The location for each probe is specified by a corresponding
    entry in the ONTOLOGY_LOOKUP_STRINGS cell array.

    Inputs:
      S - An ndi.session.dir object representing the current session.
      PROBES - A cell array of ndi.probe objects.
      ONTOLOGY_LOOKUP_STRINGS - A cell array of strings, where each string is a
        prefixed term for ontology lookup (e.g., 'UBERON:0000411'). The number
        of elements must match the number of probes.

    This function also accepts an optional name-value argument:

    | Parameter (default) | Description                                  |
    |---------------------|----------------------------------------------|
    | doAdd (true)        | If true, adds the created documents to the   |
    |                     |   session database `S`.                      |

    Returns a cell array of the newly created ndi.document objects.

    Example:
      % Assuming S is an ndi.session.dir object and myprobes is a cell array of probes
      locations = {'UBERON:0002436', 'UBERON:0000411'}; % V1, visual cortex
      location_docs = probeLocations4probes(S, myprobes, locations);