petersenpeter / CellExplorer

CellExplorer is a graphical user interface, a standardized processing module and data structure for exploring and classifying single cells acquired using extracellular electrodes.
https://cellexplorer.org/
BSD 3-Clause "New" or "Revised" License
96 stars 59 forks source link

Error when saving cell metrics as .nwb file through GUI #100

Closed slcalgin closed 8 months ago

slcalgin commented 1 year ago

Operating system Windows 10 Pro

Matlab version R2023a

Describe the bug There is an error when trying to save cell metrics as an .nwb file through the GUI.

Matlab error log

In saveCellMetrics2nwb (line 18) In saveCellMetrics (line 23) In CellExplorer/saveMetrics (line 9961) In CellExplorer/saveAsDialog (line 9930) In uiwait (line 81) In CellExplorer (line 392) In main_CellExplorer (line 18) Unrecognized function or variable 'generateExtension'.

Error in saveCellMetrics2nwb (line 18) generateExtension('ndx-cell-explorer.namespace.yaml');

Error in saveCellMetrics (line 23) saveCellMetrics2nwb(cell_metrics,file);

Error in CellExplorer/saveMetrics (line 9961) saveCellMetrics(cell_metrics,file);

Error in CellExplorer/saveAsDialog (line 9930) saveMetrics(cell_metrics,fullfile(SavePath,file));

Error while evaluating Menu Callback.

Screenshots image Additional context Add any other context about the problem here.

petersenpeter commented 1 year ago

Hi

Make sure to install the NWB Matlab toolset beforehand: https://github.com/NeurodataWithoutBorders/matnwb

Follow this tutorial to work with the nwb format: https://cellexplorer.org/tutorials/nwb-tutorial/

Let me know if this fixes your issue.

slcalgin commented 1 year ago

thank you, I've added the toolset. I intend to save a batch cell_metrics, and it now sends this error, that makes sense, the batch cell_metrics.general doesn't have the "basepath" field but basepaths...

cell_metrics.general.basename ans = 'batch of sessions'

nwb_file = [cell_metrics.general.basename, '.cellmetrics.cellinfo.nwb']; nwb = saveCellMetrics2nwb(cell_metrics, nwb_file); Unrecognized field name "basepath".

Error in saveCellMetrics2nwb (line 22) 'session_description', cell_metrics.general.basepath, ...

should I save the cell_metrics for each session to nwb, one at a time?

petersenpeter commented 11 months ago

Hi. Sorry for not getting back to you sooner, but unfortunately, I can't troubleshoot from these copied lines. Could you share your dataset with me?

In general, I recommend saving the sessions individually, but saving a batch of sessions together is possible.

slcalgin commented 11 months ago

Hi Peter,

No worries! I've sent you an email with my dataset. I'll try saving my sessions individually in the meantime.

Thanks!

petersenpeter commented 8 months ago

Hi

I closed the issue. Feel free to open it again.