BeNeuroLab / beneuro_experimental_data_organization

Code for checking, moving, and processing the data recorded in the lab
0 stars 3 forks source link

neural data dim: conversion to pyaldata #80

Open AtMostafa opened 1 week ago

AtMostafa commented 1 week ago

if there is 1 time point in a state, the neural data collapses in a 1D array, instead of a 2D array where the time dimension has a size of 1

martinesparza commented 1 week ago

See this commit on the convert_nwb_to_pyaldata branch. Does this fix the issue? @AtMostafa

AtMostafa commented 1 week ago

hmm... doesn't look like it

You can try on M037_2024_09_03_16_30 @ trial 133

martinesparza commented 1 week ago

So this may actually be an issue of scipy.io.loadmat(file_name, simplify_cells=True). From scipy documentation:

[simplify_cells] If True, this automatically sets struct_as_record to False and squeeze_me to True, which is required to simplify cells.

squeeze_me : bool, optional. Whether to squeeze unit matrix dimensions or not.

@bagibence Would this change be backward incompatible with monkey data? Perhaps its time to fork pyaldata into the labs space...