Skip to content

ndi.example.fun.get_unique_bath_components

 GET_UNIQUE_BATH_COMPONENTS - Extract unique ontologyName and name entries from stimulus_bath documents.

    UNIQUE_DATA = GET_UNIQUE_BATH_COMPONENTS(NDI_SESSION_OBJ)

    This function searches for all documents of type 'stimulus_bath' within
    the provided NDI session or dataset object, extracts the 'ontologyName' and 'name'
    entries from their 'mixture_table' fields, and returns a table containing
    the unique combinations of these entries.

    Inputs:
        NDI_SESSION_OBJ: An ndi.session or ndi.dataset object representing the NDI session
                         or dataset to search.

    Outputs:
        UNIQUE_DATA: A Matlab table containing the unique combinations of
                     'ontologyName' and 'name' entries found in the
                     'mixture_table' fields of all 'stimulus_bath' documents.

  Example:
    % if S is an ndi.session or ndi.dataset object
    unique_data = ndi.example.fun.get_unique_bath_components(S);