Skip to content

ndi.setup.conv.vhlab.doStacyImport

  DOSTACYIMPORT - Imports VH Lab subject and stimulus metadata into an NDI session.

    DOSTACYIMPORT(S, ...)

    This function serves as a pipeline to import metadata for a VH Lab
    experimental session, represented by the ndi.session.dir object S.

    The import process is divided into several stages:
    1.  Subject Information: Reads subject data using `subjectInfoTable`,
        checks for existing subject documents in the session, and creates
        new documents only for new subjects using `subjectMaker`.
    2.  Stimulus Approaches: Reads epoch-specific approaches and purposes
        using `approachMappingTable` and creates the corresponding NDI
        documents using `stimulusDocMaker`.
    3.  Treatments: (Placeholder) A section is reserved for importing
        treatment data.

    This function can also take name/value pairs that modify its behavior:
    |------------------|----------------------------------------------------|
    | 'Overwrite'      | A boolean (true/false) that determines whether to  |
    | (false)          | overwrite existing documents. Default is false.    |
    |------------------|----------------------------------------------------|

    Example:
        % Assuming 'mySession' is a valid ndi.session.dir object
        mySession = ndi.session.dir('/path/to/vhlab/session');
        ndi.setup.conv.vhlab.doStacyImport(mySession, 'Overwrite', true);