Closed apoorva6262 closed 2 years ago
Hi @apoorva6262,
Most likely this is because the data is in Volts (which is the default in MNE), when it should be in microVolts. You can solve this by doing:
sig *= 1e6 # Multiply signal in-place by a million
Hope this helps, Raphael
@raphaelvallat , thanks that worked. I see that it prints the number of rows which represents the number of spindles . How do you get an average of the "duration" for the total number of spindles ?
Also there is a slight difference between pre-filtering the data and then running spindle detection vs spindle detection only. For example, pre-filtering the signal at 10-15hz and then run spindle detection vs spindle detection only at 10-15hz. How is that different ?
Hi @apoorva6262,
1) To see average spindles parameters, aggregated by channel and sleep stage (if you specify an hypnogram)
sp = yasa.spindles_detect(...)
sp.summary(grp_chan=True, grp_stage=True)
2) You should NOT filter your data in the sigma band prior to running the spindles detection. Indeed, YASA needs the full broadband signal (e.g. 0.5-30 Hz) to calculate the relative sigma power:
Thanks, Raphael
Hi,
I preprocessed the sleep data which was in .edf format in MNE. I changed the channel names in accordance to 1020 montage on MNE and saved it as .set file. I am currently interested in detecting sleep spindles in the n2, n3 and rem phase for c3 and c4 channel. I used the function spindles _detect and got this error (image below). Is it because the data is not getting converted to the right units ?
Thanks, Apoorva.