当前位置: 首页 > news >正文

【Neural signal processing and analysis zero to hero】- 2

Nonstationarities and effects of the FT

course from youtube: 传送地址
在这里插入图片描述
在这里插入图片描述

why we need extinguish stationary and non-stationary signal, because most of neural signal is non-stationary.
在这里插入图片描述

Welch’s method for smooth spectral decomposition

Full FFT method

you can see there are a lot of non stationarity x’ and temporal dynamics in this time domain signal so for example here you see when you look in the power spectrum you see very clearly that there is a peak at this frequency range and you know I don’t have the labels in here but this is somewhere around 40 to 50 Hertz so you see that there is a peak in the gamma somewhere around 40 to 50 Hertz so you see that there is a peak in the gamma frequency range here however just from looking at this Fourier transform result.
在这里插入图片描述

Welch’s method

在这里插入图片描述that is generally the result of Welch’s method it’s going to smooth out the power spectrum quite a bit
在这里插入图片描述
在这里插入图片描述

The filter-Hilbert time-frequency method

we have a signal that happens to be a Morley wavelet, there is only a real valued Morley wavelet. so the amplitude get split between the positive and the negative frequencies.
在这里插入图片描述
this actually is a complex valued signal so when you take the Hilbert transform of a real valued signal the output is in fact a complex valued signal so it has a real part and an imaginary part the real part is in green the imaginary part is an orange dashed line so why does this happen and how does the Hilbert transform at work well the way that the Hilbert transform is implemented in computers is often something like this now you look at frequency graph and this looks familiar this is the power spectrum of the complex morley wavelet. but that’s actually not what we created what we created was the Hilbert transform of a real valued wavelet and in fact what the Hilbert transform does is to take the FFT of the signal which is this go into the frequency domain 0 out all of the negative frequencies double the amplitudes of the positive frequencies and then take the inverse Fourier transform .
so what happens when you do that you know you go from wavelet from a real-valued signal into the frequency domain(bottom left) you will blitter 8 the negative frequencies double the amplitudes of the positive frequencies(bottom right) and then take the inverse Fourier transform that ends up giving us a complex valued wavelet(top right).
在这里插入图片描述
the goal of the Hilbert transform is not a complex valued signal also called an analytic signal that we can use to extract power or amplitude and phase information in addition to the real part of the signal so application of the Hilbert transform it converts a real valued signal into a complex valued analytic signal this result as it turns out is analogous to the result of complex more late wavelet convolution.
在这里插入图片描述
在这里插入图片描述
because of this really really important point and that is that the power and phase at each single time point resulting from the Hilbert transform come from the frequency that has the most power at that single time point. so therefore the output of the Hilbert transform is interpretable only for narrowband signals so that means that you shouldn’t apply the Hilbert to narrowband data but of course EEG and LFP our broadband phenomenon they have energy at a whole range of frequencies.
在这里插入图片描述
so what is the solution what do we do is to filter the data first so we apply a filter to the data that gets us from our original signal which is broadband to a filtered signal which is narrowband and then you can apply the Hilbert transform to this narrowband filtered signal.
在这里插入图片描述

Designing FIR bandpass filters

FIR(finite impulse response).
you have six data points, you need one at 0 that’s for DC and you need one at 1 and that’s for Nyquist and the you have four other points and these defines the shape of the filter in the frequency domain so these two points(top two) would correspond to the cut-offs that you are interested in. other tow points at axis called transition zone.
在这里插入图片描述
the idea of having a transition zone like this is that you don’t want to specify the filter with perfect edges you don’t want a sharp edge in the frequency domain and the reason why is because that will introduce or sharp edges in the frequency domain when you take the inverse Fourier transform that sharp edge that’s going to produce a lot of ripple effects in the time domain which can introduce artefactual oscillations.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

The Short-time Fourier transform

Fourier transform as computing the dot product between this kernel and this entire signal and then so we use as a pivot to start talking about wavelets and convolution.
we can focus the analysis on one specific time window, so come up with the solution of taking this kernel and sliding it along the data but you might also have come up with a solution of instead of doing the Fourier transform on the entire signal you only do the a Fourier transform on one little segment of the signal.
在这里插入图片描述
here is a time domain signal and then what we do is we cut out one snippet one epoch of this signal and that gives us a smaller signal that looks like the second graph, it gets tapered to attenuate the edges at the beginning and at the end.
we take the Fourier transform of the tapered version of the signal and then compute the power spectrum. then you take this power spectrum and you rotate it and color it, so in the second graph, frequency is on the x axis and power is on the y axis. in the second graph frequency is on the y axis and color is like z axis represent power. so we get one column in this time frequency matrix and what you do is take this window of time and you slide it over by hundred milliseconds or maybe 50 milliseconds.
在这里插入图片描述

one interesting difference between the short time Fourier transform and wavelet convolution:
wavelet convolution we build up the time frequency plane one frequency at a time for all time points and here with short time Fourier transform we building up the time frequency plane one time point at a time or on time chunk at a time over all frequencies at once. and then we’re looping over the different time points.

Comparing wavelet, filter-Hilbert, and STFFT

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

The multitaper method

if you have data are really non-time-locked, then they would be lost in the trail averaging, so what we want to do is have a method that is more robust to these temporal jitters essentially by smoothing over frequency and over time to allow you to identify these four features and averaged them together .
在这里插入图片描述
how do we average across these larger time windows well it worked by starting from these things called sleep tapers. these tapers are all orthogonal to each other so they are all mutually uncorrelated, so if you use these tapers on the same data they are going to highlight different features.
在这里插入图片描述
how does the multi taper method work well we start with our snippet of data, you take this first sleepy and taper and element-wise multiplication. and that’s going to give you a resulting time series that looks like this. and then move to the next taper, and we obtained a different one, we obtained four different time series.
在这里插入图片描述
now what we do is take the Fourier transform from each of these individual tapered time series and then extract power that gives you four different power spectra.
在这里插入图片描述
then we just average them together and that gives us one power spectrum and this corresponds to the multi taper estimate of the spectrum of the data snippet in在这里插入图片描述
or using these different tapers and you can contrast this with a normal Fourier transform which would look like this so this is just the power spectrum from regular Fourier transform of the same data snippet so this spectrum and this spectrum come from exactly the same data these have been pushed through the multi taper method and this is just one FFT。
what you can see here is that the kind of prominent features of the spectrum are preserved and even a bit enhanced they are smooth in this spectrum but what you lose from the multi taper spectrum is kind of the finer details of the spectrum.
在这里插入图片描述
在这里插入图片描述

With-subject, cross-trail regression

Time-frequency brain-behavior correlations
we can do many trails for one subject, and we plot behavior-brain relationship graph, we want to fit a line taht goes through this blue dots.
在这里插入图片描述
this is a map that not a time frequency graph, all though the x axis is time and the y axis is frequency, but the color is corresponds to a correlation coefficient, so what you see is the energy over trails is related to the different reaction times over different trails.
在这里插入图片描述
the problem is how do we go about implementing this in an intelligent way. so we’re gonna do that using statistics and using the framework of the general linear model often abbreviated GLM.
在这里插入图片描述

Temporal resolution vs. precision

在这里插入图片描述
for wavelet convolution and filter Hilbert the time frequency analysis does not change the temporal resolution so if you have your data recorded at a kilohertz and then you do a wavelet convolution for time frequency analysis, the results of time frequency analysis are still at one kilohertz. you haven’t loss any time point, however what you done is reduce the temporal precision.
why? the answer is that it had to do with the amount of smoothing that gets imposed by the wavelet pr the filtering.
在这里插入图片描述

Separating phase-locked from non-phase-locked activity

we call a signal phased if the exact timing and also the phase time series is the same on every trail and therefore it survives trail averaging and we call a signal component non phase locked if the phase and exact timing is variable on different trails.
sometimes in the literature people call this evoked and induced.
在这里插入图片描述
在这里插入图片描述
for example, the blue line is ERP, the green is original signal, so the orange line is Non-phase-locked = Total - erp, then you can apply your time frequency analysis to this orange line, that will give you the time frequency power of the non phase-locked part of the signal.
the second graph, we can see the erp is small, so we don’t actually removing that much from the signal trail data, so separating out the erp or the phase-locked in the non phase-locked part of the signal is sample to do one thing: subtracting the ERP from the total signal that has to be done not only separately for each channel of course but also separately for each experiment condition so if you have an experiment with multiple different kinds of conditions different experiment conditions then you want to subtract compute and subtract the ERP separately for each condition for each single trial that comes from that condition that’s important to prevent any differences in the ERP from infecting the from introducing artificial differences in the total or the non phase-locked part of the signal.
在这里插入图片描述
after separating, you can make several time frequency plots and look like this.
在这里插入图片描述

Edge effects, buffer zones, and data epoch length

these red demons here on the side all the way on the left and all the way on the right these are edge effects they’re artifacts and they are contaminating their overriding the other signals the other features that are actually happening in the EEG data.
在这里插入图片描述
where do edge effects come from?
imagine if something like this is in your data then you’re going to get this now this is kind of as expected this isn’t really wrong. this is the correct answer however these edge effects can be so large that they will overwhelm whatever is the time frequency dynamics that are happening in the signal obviously there’s nothing happening in this signal but you can imagine that if this kind of an edge is superimposed on top of your EEG signal that this is going to be really difficult.
this is going to add an artifact that’s going to make it difficult to interpret what’s actually happening endogenously in a signal that was coming from the brain.
在这里插入图片描述
the solution is to accept the edge effects will be present and you just make sure that those edge effects are not going to contaminate the time windows that you are interested in.
so it related to cutting your epoch so cutting you continuous data into epochs.
在这里插入图片描述
one of the initial steps of pre-processing your data are to identify the timing of different events that happen in the experiment or if it’s spontaneous data or resting-state data. cut up the data into 2 seconds segment and then you cut epochs around each of these events and these from you trials.

在这里插入图片描述
so this would be the data frame from trail 1. but this still have edge effects

在这里插入图片描述
there are two solutions of dealing with edge effects what you can do instead is come up with one of two strategies to make sure that the edge effects are not going to contaminate the part of the signal that you want to interpret.
so the first solution is what I call the buffer zone approach so essentially what you want to do is make sure that you cut your epochs sufficiently long you want your time epochs your trials to be cut sufficiently wide such that the edge effects will totally subside. by the time you get to the time window that you are actually interested in. The only reason why the epochs are cut this long is so that the edge effects can fully subside both we get to the time period that I’m actually interested in.
the another approach is clipping approach, here the idea is that you estimate what parts of the data could be contaminated by edge effects and then you basically just remove those pixels from the time frequency plot in practice that can be done by setting the values to be n a n.
在这里插入图片描述

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 注册安全分析报告:OneApm
  • 【D3.js in Action 3 精译_020】2.6 用 D3 设置与修改元素样式 + 名人专访(Nadieh Bremer)+ 2.7 本章小结
  • centos5离线安装git
  • 达梦+flowable改造
  • 2024-07-19 Unity插件 Odin Inspector10 —— Misc Attributes
  • TCP滑动窗口和流量控制详解
  • ChatGPT对话:Windows如何将Python训练模型转换为TensorFlow.js格式
  • R语言画散点图-饼图-折线图-柱状图-箱线图-直方图-等高线图-曲线图-热力图-雷达图-韦恩图(二D)
  • FlutterWeb启动耗时优化
  • MFC:只允许产生一个应用程序实例的具体实现
  • 【AI教程-吴恩达讲解Prompts】第1篇 - 课程简介
  • 浅谈Visual Studio 2022
  • Docker安装笔记
  • 百分点科技携智慧政务解决方案亮相GITEX AFRICA 2024
  • FastAPI 学习之路(五十二)WebSockets(八)接受/发送json格式消息
  • 230. Kth Smallest Element in a BST
  • Apache Pulsar 2.1 重磅发布
  • C++11: atomic 头文件
  • CSS进阶篇--用CSS开启硬件加速来提高网站性能
  • httpie使用详解
  • javascript从右向左截取指定位数字符的3种方法
  • SQL 难点解决:记录的引用
  • webgl (原生)基础入门指南【一】
  • windows下mongoDB的环境配置
  • 从零开始在ubuntu上搭建node开发环境
  • 等保2.0 | 几维安全发布等保检测、等保加固专版 加速企业等保合规
  • 聚类分析——Kmeans
  • 目录与文件属性:编写ls
  • 排序算法学习笔记
  • 如何编写一个可升级的智能合约
  • 如何用vue打造一个移动端音乐播放器
  • 实战|智能家居行业移动应用性能分析
  • 通过获取异步加载JS文件进度实现一个canvas环形loading图
  • 策略 : 一文教你成为人工智能(AI)领域专家
  • 教程:使用iPhone相机和openCV来完成3D重建(第一部分) ...
  • ​DB-Engines 11月数据库排名:PostgreSQL坐稳同期涨幅榜冠军宝座
  • # include “ “ 和 # include < >两者的区别
  • # 利刃出鞘_Tomcat 核心原理解析(七)
  • # 日期待t_最值得等的SUV奥迪Q9:空间比MPV还大,或搭4.0T,香
  • ###C语言程序设计-----C语言学习(6)#
  • #职场发展#其他
  • $con= MySQL有关填空题_2015年计算机二级考试《MySQL》提高练习题(10)
  • (003)SlickEdit Unity的补全
  • (175)FPGA门控时钟技术
  • (2/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (20)docke容器
  • (55)MOS管专题--->(10)MOS管的封装
  • (8)Linux使用C语言读取proc/stat等cpu使用数据
  • (done) 两个矩阵 “相似” 是什么意思?
  • (python)数据结构---字典
  • (附源码)php投票系统 毕业设计 121500
  • (附源码)spring boot建达集团公司平台 毕业设计 141538
  • (附源码)springboot家庭装修管理系统 毕业设计 613205
  • (十)Flink Table API 和 SQL 基本概念
  • (五)Python 垃圾回收机制