How to use SpectralTrainConfig

4 posts
Was this reply useful? Learn more...
   
[-] zhiz z +0 points · over 1 year ago

How to set up Values in Spectral Train Config

4 posts
Was this reply useful? Learn more...
   
[-] zhiz z +0 points · over 1 year ago

I put my EDF file in the data folder, but I am not sure how to set the XML suffix, the analysis parameters and such. Please help. My console log:

Spectral Analysis

Getting matched EDF/XML files EDF File names for which an XML file could not be found record-[2016.04.09-23.16.57].edf Number of EDF files for which a matched XML file could not be found: 1 EDF File names for which an XML file could not be found record-[2016.04.09-23.16.57].edf Number of EDF files for which a matched XML file could not be found: 1 Checking EDFs for required signals Warning: Could not write output file (C:\Users\zhizh\Desktop\GSF 2016 data\Resultfolder\study_FileLisWithCheck.xlsx) In BlockEdfSummarizeClass/summarizeSignalLabels (line 450) In SpectralTrainClass/computeSpectralTrain (line 642) In SpectralTrainFig>pb_fig_band_Callback (line 878) In gui_mainfcn (line 95) In SpectralTrainFig (line 89) In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)SpectralTrainFig('pb_fig_band_Callback',hObject,eventdata,guidata(hObject)) Warning: Signal Check error: Check signal labels

In SpectralTrainClass/computeSpectralTrain (line 651) In SpectralTrainFig>pb_fig_band_Callback (line 878) In gui_mainfcn (line 95) In SpectralTrainFig (line 89) In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)SpectralTrainFig('pb_fig_band_Callback',hObject,eventdata,guidata(hObject))

109 posts
Was this reply useful? Learn more...
   
[-] mrueschman +0 points · over 1 year ago

Zhiz,

Are you trying to use this tool with an EDF that you have created? I believe the tool was designed with the NSRR data in mind, for which we have EDF (signal data) and XML (annotation data) pairs. Please let us know more about your particular use case and I can ask someone more familiar with the tool to comment.

Thanks,

Mike

4 posts
Was this reply useful? Learn more...
   
[-] zhiz z +0 points · over 1 year ago

Hi mrueschman,

Yea, I was trying to use it with data I created. I only got an output EDF file which may not even be in the required format. If there is a way to get it working my my personal data that would be great. Or maybe I can try to so some of the analysis used in SpectralTrainConfig separately.

Thanks alot! Zhiz

109 posts
Was this reply useful? Learn more...
   
[-] mrueschman +0 points · over 1 year ago

Zhiz,

I will ping a couple other NSRR Core Members to see if they have any thoughts/ideas about using the Spectral tool with non-NSRR data.

Mike

6 posts
Was this reply useful? Learn more...
   
[-] SaraMariani +0 points · over 1 year ago

Hi Zhiz,

SpectralTrainFig "wants" matched pairs of EDF and XML files for it to run. For example, if your EDF is named myfile.EDF and your corresponding XML file with the annotations is named myfile.XML, in the GUI you will have to select -XML in the "XML suffix" field. The XML annotation file is necessary because it contains the sleep stages, which the function needs to compute the summaries and plot the figures.

Assuming you have those annotations in a different format, you could try to write your own XML file using a function like this: http://www.mathworks.com/matlabcentral/fileexchange/28639-struct2xml. However, I do not know what your EDF files look like and I am not 100% sure the toolbox will work for your data, as different sleep scoring softwares generate EDF files with different header format.

If you are only interested in the artifact detection and epoch-by-epoch spectral analysis part, you will find the related code in lines ~888-1100 of the subfunction SpectralTrainClass.m, which you can apply to your data once you load them with the function BlockEdfLoadClass.m. I hope this helps!

Sara

4 posts
Was this reply useful? Learn more...
   
[-] zhiz z +0 points · over 1 year ago

Hi Sara,

Thanks for your help. And also yours Mike. I will try to explore the epoch by epoch analysis part.

Zhiz

Write a Reply