[FieldTrip] psd for brief segments

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu Mar 4 14:01:21 CET 2021


Hi Mubeen,

Thanks that article looks interesting, I'll check it out.

Concerning plotting, please see:
https://www.fieldtriptoolbox.org/tutorial/plotting/

By the way, you said you were not interested in time-resolved analyses
(that's why I suggested cfg.method = 'mtmfft'), but your data structure
shows you did do so (probably using cfg.method = 'mtmconvol') as you have a
time-axis in your data.
Doing a Welch-method (averaging after doing a frequency analysis over
multiple overlapping windows) is indeed common and can be very good
in reducing noise, but I wanted to disambiguate that.

FT plotting functions can do the averaging over time for you, allowing you
some more exploration on the fly. Alternatively, you can use ft_selectdata,
using cfg.avgovertime = 'yes'; and cfg.latency = [t0 t1]; to do so, if I'm
not mistaken. You'll need to do that if you want to end up with an
average spectra from that data you showed, in case you want to compare
against a control period.

Cheers,
Stephen




Op do 4 mrt. 2021 om 12:42 schreef mubeen afzal <mubafzal at hotmail.com>:

> Thanks very much Stephen for your input. My understanding for many of the
> clinical outcome studies when they talk about 'peak paroxysm frequency'
> they look at the slow wave frequency. However you are probably right,
> frequency analysis doesnt make sense if there is one cycle spike/wave only.
> I think some of the quantitative studies leave out brief fragment in the
> method sections (This is an excellent recent paper on quantitative analysis
> - Ivan C. Zibrandtsen, Jonas M. Nielsen, Troels W. Kjaer, Quantitative
> characteristics of spike-wave paroxysms in genetic generalized epilepsy,
> Clinical Neurophysiology)
>
> I might try out what you suggested in terms of electrode comparison of
> power spectrum.
>
> Could you also please direct me on how to plot multi-channel powerspectrum
> in field trip once we have the freqanalysis structure. Frequency vs
> Powspctrm for all channels in one figure? .e 27 channel lines plotted for
> power(y-axis) vs frequency (x-axis) and ignore the time domain? I have done
> it in brainstorm but I have been wanting to do it in fieldtrip but havent
> worked it out as yet.
>
>
>
> Regards,
> Mubeen
>
>
> ------------------------------
> *From:* fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Stephen
> Whitmarsh <stephen.whitmarsh at gmail.com>
> *Sent:* Thursday, March 4, 2021 10:18 AM
> *To:* FieldTrip discussion list <fieldtrip at science.ru.nl>
> *Subject:* Re: [FieldTrip] psd for brief segments
>
> Hi Mubeen,
>
> I think it depends partly on what you consider "reliable". Any time series
> can be expressed in the frequency domain, and that would be
> an accurate representation.
> Typically reliability would be a consideration based on how reproducible a
> phenomenon can be shown to be, and in this case you only have one event.
> However, it occurs on multiple electrodes, so that might give you a sense
> of reliability (And the possibility of averaging the spectrum)
>
> Perhaps try something like this:
> A) Do an FFT on every electrode in the green timewindow (cfg.method =
> 'mtmfft' in ft_freqanalysis, no need for tapers).
> B) Do an FFT on every electrode in a window of equal size right before.
> Plot the results in the same figure: B in black, A in red. Plot an average
> for both time windows as well. You can see whether you can spot a
> difference in the spectra that is consistent over electrodes.
> You can then try out different window sizes to see how much that makes a
> difference.
>
> In the end though, expressing something in terms of frequencies only makes
> sense to me if there is some periodicity in the signal, so I am not sure a
> frequency analysis is appropriate for describing (the low frequency) part
> of spike-waves. As I said earlier, a peak detection (perhaps after some
> high-pass filtering) might be more to the point, depending on what you're
> after.
>
> Hope this helps,
> Stephen
>
>
>
>
> Op do 4 mrt. 2021 om 06:12 schreef mubeen afzal <mubafzal at hotmail.com>:
>
> Hi fieldtrip team,
>
> I wanted to ask the experts here if power can be calculated on such brief
> segment of generalised spike/wave. In the 30 minute recording this subject
> had only this single spike. Can a peak PSD be reliably calculated for such
> a brief segment and if so what window size and taper should ideally be
> used. I am using 4 second windows for other subjects who have 2 or more
> cycles of the spike/slow wave. I am not really interested in time-resolved
> frequency band. Just the freq-power relationship. This is quite confusing
> for me. All help will be highly appreciated.
>
> Regards,
> Mubeen
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=04%7C01%7C%7Cd1372b26b09f48a0307108d8dee12d0f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637504406013419666%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xz9AsAMr8x4OYnTu0tvUn94d6zZDiaEbpAk%2B3LVAQ2s%3D&reserved=0>
> https://doi.org/10.1371/journal.pcbi.1002202
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=04%7C01%7C%7Cd1372b26b09f48a0307108d8dee12d0f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637504406013429664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GdUmLksTrxKSxijEBkfJoKXD85vOtG1lJW5WrXjXoQU%3D&reserved=0>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210304/18ce243c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12757 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210304/18ce243c/attachment.png>


More information about the fieldtrip mailing list