Convert Processed data to NWB Functions

Convert processed DeepLabCut(DLC) Data to NWb Structure

convprocessed2nwb.convprocessed_dlc2nwb(filepath, varargin)

converts processed xy dlc data to nwb

Example usage:

[nwb] = convprocessed_dlc2nwb(filepath, ‘identifier’, identifier)

[nwb] = convprocessed_dlc2nwb(filepath, ‘nwb_in’, nwb)

[nwb] = convprocessed_dlc2nwb(filepath, ‘nwb_in’, nwb, ‘identifier’, identifier)

Inputs

filepath: processed dlc data using deep lab cut, required

Name-Value (optional parameters):

‘nwb_in’: input an exist nwb, default [] create a new nwb

‘identifier’: input an identifier, default ‘’ create an empty character string

Output:

nwb —- nwb structure containing processed xy position information

Variable names and the command to get them:

filepath: path of the file, can be obtained in jointsXY.description, stored as character

jointsXY: SpatialSeries object containing information from the file
nwb.processing.get(‘DLC_2D_XYpos’).nwbdatainterface.get(‘DLCXYPosition’).spatialseries.get(camname);
NOTE: 1.camname is in the format of ‘camera-index’, it is in character form

2.each spatialseries object represents information from a single camera of the recording

DLCXYPosition: Position object that stores the SpatialSeries Objects named jointsXY
nwb.processing.get(‘DLC_2D_XYpos’).nwbdatainterface.get(‘DLCXYPosition’)
NOTE: 1.This position object contains a set of all spatialseries objects, each one of which represents one camera
2.To get the set of all spatialseries objects, use

nwb.processing.get(‘DLC_2D_XYpos’).nwbdatainterface.get(‘DLCXYPosition’).spatialseries

3.To add another spatialseries to the spatialseries set inside the position object, use

nwb.processing.get(‘DLC_2D_XYpos’).nwbdatainterface.get(‘DLCXYPosition’).spatialseries.set(char(camname), jointsXY);

DLC_2D_mod: ProcessingModule object that contains a description and Position object named DLCXYPosition

nwb.processing.get(‘DLC_2D_XYpos’)

Convert processed Eye Tracking Data to NWb Structure

convprocessed2nwb.convprocessed_eye2nwb(filepath, varargin)

converts raw eyetracking data to nwb.processing using a preprocessed module

Example usage:

[nwb] = convprocessed_eye2nwb(filepath, ‘identifier’, identifier)

[nwb] = convprocessed_eye2nwb(filepath, ‘nwb_in’, nwb)

[nwb] = convprocessed_eye2nwb(filepath, ‘nwb_in’, nwb, ‘identifier’, identifier)

Inputs

filepath(required): filepath of the raw eyetracking data (txt file)

Name-Value (optional parameters):

‘nwb_in’: input an exist nwb, default [] create a new nwb

‘identifier’: input an identifier, default ‘’ create an empty character string

Output:

nwb —- nwb structure containing processed eyetracking data information

Variable names and the command to get them:

eyeTracking: SpatialSeries object containing processed eyetracking information from the txt file

nwb.processing.get(‘EyeTrackingInfo’).nwbdatainterface.get(‘EyeTrackingPos’).spatialseries.get(‘eyeTracking’);

EyeTrackingPos: Position object that stores the SpatialSeries Objects named eyeTracking

nwb.processing.get(‘EyeTrackingInfo’).nwbdatainterface.get(‘EyeTrackingPos’);

EyeTrackingInfo: ProcessingModule object that contains a description and Position object named EyeTrackingPos

nwb.processing.get(‘EyeTrackingInfo’);