【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.
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/3247857.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

用Docker来开发

未完成。。。 现在好像用Docker是越来越多了。之前其实也看过docker的原理,大概就是cgroup那些,不过现在就不看原理了,不谈理论,只看实际中怎么用,解决眼前问题。 用docker来做开发,其实就是解决的编译环境…

ArkUI-动画

属性动画 属性动画是通过设置组建的animation属性来给组件添加动画,当组件的width、height、Opacity、backgroundColor、scale、rotate、translate等属性变更时,可以实现渐变过渡效果 Text().position({x: 10, //x轴坐标y: 0 //y轴坐标}).rotate…

在 PostgreSQL 里如何处理数据的存储优化和查询优化的优先级权衡?

🍅关注博主🎗️ 带你畅游技术世界,不错过每一次成长机会!📚领书:PostgreSQL 入门到精通.pdf 文章目录 在 PostgreSQL 里如何处理数据的存储优化和查询优化的优先级权衡一、存储优化与查询优化的概述&#x…

阿里:深入探讨Java的分层编译

本文主要探讨Java虚拟机(JVM)中的分层编译(Tiered Compilation)机制及其对程序性能的影响。 前言 一开始接触到分层编译是因为我们这的服务每次发布/重启后都会短暂地出现CPU满线程池满的情况,然后过一段时间又能自动…

学习008-01-03 Customize the Application UI and Behavior(自定义应用程序UI和行为)

Customize the Application UI and Behavior(自定义应用程序UI和行为) In XAF, the data model defines the database structure and UI. Changes to your entity classes affect the UI. For example, if you add a new property to an entity class, …

C++ | Leetcode C++题解之第239题滑动窗口最大值

题目&#xff1a; 题解&#xff1a; class Solution { public:vector<int> maxSlidingWindow(vector<int>& nums, int k) {int n nums.size();vector<int> prefixMax(n), suffixMax(n);for (int i 0; i < n; i) {if (i % k 0) {prefixMax[i] num…

MySQL(7)内外连接+索引

目录 1.内外连接; 2. 索引; 1.内外连接: 1.1内连接: 语法: select 字段 from 表名 inner join 表名 on 字段限制; 1.2 外连接: 分为左右外连接; (1)左外连接: 语法: select * from 表名 left join 表名 on 字段限制. &#x1f330;查询所有学生的成绩&#xff0c;如果这个学生…

MySQL(8)事务

目录 1.事务; 1.事务: 1.1 如果CURD不加限制会这么样子? 可能造成数据同时被修改, 数据修改的结果是未知的.(可以想一下之前的抢票线程问题) 1.2 事务概念: 事务就是一组DML语句组成&#xff0c;这些语句在逻辑上存在相关性&#xff0c;这一组DML语句要么全部成功&#xff0…

【Python实战因果推断】40_双重差分11

目录 Heterogeneous Effect over Time Heterogeneous Effect over Time 有好消息也有坏消息。首先是好消息&#xff1a;你已经发现了问题所在。也就是说&#xff0c;你知道 TWFE 在应用于具有时间异构效应的交错采用数据时是有偏差的。用更专业的术语来说&#xff0c;您的数据…

TDesign组件库日常应用的一些注意事项

【前言】Element&#xff08;饿了么开源组件库&#xff09;在国内使用的普及率和覆盖率高于TDesign-vue&#xff08;腾讯开源组件库&#xff09;&#xff0c;这也导致日常开发遇到组件使用上的疑惑时&#xff0c;网上几乎搜索不到其文章解决方案&#xff0c;只能深挖官方文档或…

大厂面试官问我:Redis为什么使用哈希槽的方式进行数据分片?为什么不适用一致性哈希的方式?【后端八股文十三:Redis 集群哈希八股文合集(1)】

本文为【Redis 集群哈希 八股文合集&#xff08;1&#xff09;】初版&#xff0c;后续还会进行优化更新&#xff0c;欢迎大家关注交流~ hello hello~ &#xff0c;这里是绝命Coding——老白~&#x1f496;&#x1f496; &#xff0c;欢迎大家点赞&#x1f973;&#x1f973;关注…

pdf怎么转换成图片?3种PDF转图片方法分享

pdf怎么转换成图片&#xff1f;将PDF转换成图片不仅满足了快速分享的需求&#xff0c;还便于在多种平台上展示。特别是在社交媒体、演示文稿或在线文档中&#xff0c;图片格式的PDF页面更加直观易用。此外&#xff0c;转换成图片后&#xff0c;我们还可以利用图片编辑工具对PDF…

【Linux】启动的秘密花园:深入GRUB、Init系统和Systemd

&#x1f407;明明跟你说过&#xff1a;个人主页 &#x1f3c5;个人专栏&#xff1a;《Linux &#xff1a;从菜鸟到飞鸟的逆袭》&#x1f3c5; &#x1f516;行路有良友&#xff0c;便是天堂&#x1f516; 目录 一、引言 1、Linux的起源与发展 2、Linux的特点 3、Linux启…

Java中的迭代器(Iterator)

Java中的迭代器&#xff08;Iterator&#xff09; 1、 迭代器的基本方法2、 迭代器的使用示例3、注意事项4、克隆与序列化5、结论 &#x1f496;The Begin&#x1f496;点点关注&#xff0c;收藏不迷路&#x1f496; 在Java中&#xff0c;迭代器&#xff08;Iterator&#xff0…

隐性行为克隆——机器人的复杂行为模仿学习的新表述

介绍 论文地址&#xff1a;https://arxiv.org/pdf/2109.00137.pdf 源码地址&#xff1a;https://github.com/opendilab/DI-engine.git 近年来&#xff0c;人们对机器人学习进行了大量研究&#xff0c;并取得了许多成果。其中&#xff0c;模仿学习法尤其受到关注。这是一种从人…

无线通信 | 发射系统架构:两次变频发射机和直接变频发射机

微信公众号上线,搜索公众号小灰灰的FPGA,关注可获取相关源码,定期更新有关FPGA的项目以及开源项目源码,包括但不限于各类检测芯片驱动、低速接口驱动、高速接口驱动、数据信号处理、图像处理以及AXI总线等 本节目录 一、发射系统架构 1、两次变频发射机 2、直接变频发射机…

微信小程序 vant-weapp的 SwipeCell 滑动单元格 van-swipe-cell 滑动单元格不显示 和 样式问题 滑动后删除样式不显示

在微信小程序开发过程中 遇到个坑 此处引用 swipeCell 组件 刚开始是组件不显示 然后又遇到样式不生效 首先排除问题 是否在.json文件中引入了组件 {"usingComponents": {"van-swipe-cell": "vant/weapp/swipe-cell/index","van-cell-gro…

图新地球-如何快速绘制各种形状的箭头(一分钟小视频演示)

0.序 随着近几年测绘成果的完善&#xff0c;很多检察院、规划院、自然资源局等政府与事业单位&#xff0c;日常的应用也都不在仅仅局限于原来的卫星影像底图了&#xff0c;很多院都应用上了无人机航测高分辨率影像以及倾斜模型。 可能经常需要再道路中央标注汽车行驶方向、掉头…

AQS源码解析(ReentrantLock)

什么是AQS:Juc中的大多数同步器都是围绕着一些相同的基础行为&#xff0c;比如等待队列&#xff0c;条件队列&#xff0c;共享&#xff0c;独占获取变量这些行为&#xff0c;抽象出来就是基于AQS&#xff08;AbstractQueuedSynchronizer&#xff09;实现的。所以可以把AQS看成这…

Iterator 与 ListIterator:Java 集合框架中的遍历器比较

Iterator 与 ListIterator&#xff1a;Java 集合框架中的遍历器比较 1、Iterator1.1 特点 2、ListIterator2.1 特点 3、Iterator 和 ListIterator 的区别4、示例4.1 使用 Iterator 遍历 Set4.2 使用 ListIterator 遍历 List 并修改 5、总结 &#x1f496;The Begin&#x1f49…