<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">
<div>
<div>Dear fieldtrip community,<br>
<br>
</div>
I have encountered a problem of time-frequency transformation on continuous data. Basically, the frequency spectrum established a rhythmic pattern as indicated in figures below (the first figure and the blue line in the second figure).
<br>
</div>
<div>The code I use are as below:<br>
<br>
</div>
<div>cfg = [];<br>
    cfg.reref = 'yes';<br>
    cfg.refchannel = 'all';<br>
    cfg.datafile = 'subj1.dat';<br>
    cfg.headerfile = 'subj1.vhdr'; <br>
    cfg.bsfilter = 'yes';<br>
    cfg.bsfreq = [49 51; 99 101; 149 151; 199 201];<br>
    data_all = ft_preprocessing(cfg);<br>
<br>
    <br>
    cfg = [];<br>
    cfg.method = 'wavelet';<br>
    cfg.output = 'pow';<br>
    cfg.keeptrials = 'yes';<br>
    cfg.foi = 1:1:200;<br>
    cfg.toi = 0:0.01:size(data_all.time{1},2)/data_all.fsample;<br>
    cfg.trials = 'all';<br>
    freq = ft_freqanalysis(cfg,data_all);<br>
<br>
</div>
<div><br>
</div>
<div>There are different methods I tried to improve the result<br>
</div>
<div>1). highpass filter the data (0.1 Hz)<br>
</div>
<div>2). bandpass filter the data ([0.1 300Hz])<br>
</div>
<div>3). detrend the data <br>
<br>
</div>
<div>Among these methods, 1) and 2) works better and generate the same result, but can still see the rhythmic pattern of the frequency spectrum with lower amplitude and slower frequencies of the saw-tooth pattern (The green line in the second figure).<br>
</div>
<div>3) does not work at all. <br>
<br>
</div>
<div>Any idea of why the saw-tooth pattern appears in the frequency spectrum? How to efficiently improve the result?<br>
</div>
<div>Thanks!<br>
</div>
<div>
<div><br>
<br>
<img alt="Inline image 3" src="cid:ii_14fff947a4e7213a" height="530" width="339"><br>
<br>
</div>
<div>Best,<br>
</div>
<div>Hui<br>
</div>
<div><br>
</div>
</div>
</div>
</body>
</html>