Estimation of the phase and amplitude envelope
To extract the low (4-7 Hz) and high (100-140 Hz) frequency signals, we bandpass filter the data, using a least-squares linear-phase FIR filter of order 375 for the high frequency signal, and order 50 for the low frequency signal. This was done in MATLAB, and the specific code can be found in lines 35-59 of the simfun.m file found in our GitHub repository (https://github.com/Eden-Kramer-Lab/GLM-CFC/blob/master/simfun.m).
CAUTION: We note that filtering choices are data dependent, and we cannot prescribe a general approach here (i.e., the specific choices made here to filter may not work for every data set).
To extract the phase and amplitude envelope from the low and high frequency signals, we first compute the analytic signals with the Hilbert transform. The amplitude envelope is found by taking the absolute value of the analytic signal, while the phase is found by taking the angle. This was done in MATLAB, and the specific code can be found in lines 24-27 of the glmfun.m file found in our GitHub repository (https://github.com/Eden-Kramer-Lab/GLM-CFC/blob/master/glmfun.m).