IMPORT_DATA - Build an NDI session with subjects from a Birren lab epochs table.
S = NDI.SETUP.CONV.BIRREN.IMPORT_DATA(DATAPATH)
This function takes a base directory path to create and populate a new NDI session.
It reads the epoch information directly from 'sayaTable.xls' located within DATAPATH.
It performs the following steps:
1. Reads the epoch metadata from 'sayaTable.xls'.
2. Initializes a new NDI session directly in the specified DATAPATH and adds
the 'sjbirrenlab' DAQ systems using ndi.setup.lab.
3. Uses the ndi.setup.NDIMaker.subjectMaker.addSubjectsFromTable method
to process the EPOCHSTABLE, create NDI documents for each unique subject,
and add them to the session's database.
4. Prepares the epochs table with a subject-specific postfix and calls the
epochProbeMapMaker a single time to generate all map files efficiently.
5. Creates a treatment table based on the metadata in the epochs table.
Inputs:
dataPath (char) - The full path to the directory where 'sayaTable.xls' is located
and where the NDI session will be created.
Outputs:
S (ndi.session.dir) - The newly created NDI session object, now populated
with the subjects from the table.
Example:
myDataPath = '/path/to/my/labdata_session';
if ~exist(myDataPath,'dir'), mkdir(myDataPath); end
% Ensure 'sayaTable.xls' and data subdirectories are in myDataPath
newSession = ndi.setup.conv.birren.import_data(myDataPath);