Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to run analysis on several datasets in GUI? #26

Open
skjerns opened this issue Mar 14, 2022 · 2 comments
Open

Possibility to run analysis on several datasets in GUI? #26

skjerns opened this issue Mar 14, 2022 · 2 comments

Comments

@skjerns
Copy link

skjerns commented Mar 14, 2022

I'm having a colleague with no coding experience that would like to run some spindle analysis. Wonambi seems perfect for this!

However, it seems like each participantt would need to be loaded&analysed individually, is that correct?

@jnobyrne
Copy link
Contributor

Hi ! Yes that's right, we don't offer any way of batch processing datasets from the GUI. In order to do so, you'll need to run a script, e.g.

`from wonambi import Dataset
from wonambi.detect import DetectSpindle

method = 'Lacourse2018'
records_list = ['Subject1.edf', 'Suibject2.edf', ...]
annotations_list = ['Subject1.xml', 'Subject2.xml', ...]
rater = 'rater_name_here'
stage = ['NREM2']
cat = (1, 1, 1, 0)
chan = ['Cz']
ref_chan = ['M1', 'M2']
event_name = 'event_name_here'

detector =DetectSpindle(method)
for rec_file, annot_file in zip(records_list, annotations_list):
dset = Dataset(rec_file)
annot = Annotations(annot_file, rater=rater)
segments = fetch(dset, annot, cat=cat, stage=stage)
segments.read_data(chan=chan, ref_chan=ref_chan)
data = segments[0]['data']
spindles = detector(data)
spindles.to_annot(annot_file)`

One day soon I plan to post some simple example scripts.

@skjerns
Copy link
Author

skjerns commented Mar 17, 2022

perfect, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants