当前位置: 首页 > 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.
在这里插入图片描述

相关文章:

【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 y…...

好用的AI搜索引擎

1. 360AI 搜索 访问 360AI 搜索: https://www.huntagi.com/sites/1706642948656.html 360AI 搜索介绍: 360AI 搜索,新一代智能答案引擎,值得信赖的智能搜索伙伴,为复杂搜索提供专业支持,解锁更相关、更全面的答案。AI…...

十、Java集合 ★ ✔(模块18-20)【泛型、通配符、List、Set、TreeSet、自然排序和比较器排序、Collections、可变参数、Map】

day05 泛型,数据结构,List,Set 今日目标 泛型使用 数据结构 List Set 1 泛型 1.1 泛型的介绍 ★ 泛型是一种类型参数,专门用来保存类型用的 最早接触泛型是在ArrayList,这个E就是所谓的泛型了。使用ArrayList时,只要给E指定某一个类型…...

阿里云开源 Qwen2-Audio 音频聊天和预训练大型音频语言模型

Qwen2-Audio由阿里巴巴集团Qwen团队开发,它能够接受各种音频信号输入,对语音指令进行音频分析或直接文本回复。与以往复杂的层次标签不同,Qwen2-Audio通过使用自然语言提示简化了预训练过程,并扩大了数据量。 喜好儿网 Qwen2-Au…...

SpringBoot集成MQTT实现交互服务通信

引言 本文是springboot集成mqtt的一个实战案例。 gitee代码库地址:源码地址 一、什么是MQTT MQTT(Message Queuing Telemetry Transport,消息队列遥测传输协议),是一种基于发布/订阅(publish/subscribe&…...

python实现插入排序、快速排序

python实现插入排序、快速排序 算法步骤: Python实现插入排序快速排序算法步骤: Python实现快速排序算法时间复杂度 插入排序是一种简单直观的排序算法。它的基本思想是通过构建有序序列,对于未排序数据,在已排序序列中从后向前扫…...

Spring Boot集成kudu快速入门Demo

1.什么是kudu 在Kudu出现前,由于传统存储系统的局限性,对于数据的快速输入和分析还没有一个完美的解决方案,要么以缓慢的数据输入为代价实现快速分析,要么以缓慢的分析为代价实现数据快速输入。随着快速输入和分析场景越来越多&a…...

html超文本传输协议

在今天的Web开发学习中&#xff0c;我掌握了一些HTML和CSS的基础知识&#xff0c;下面我将分享我的学习笔记&#xff0c;帮助大家快速构建一个简单的Web界面。 一、HTML基础标签 1. 网站头 使用<title>标签定义网页的标题。 html <title>我的第一个网页</t…...

利用AI辅助制作ppt封面

如何利用AI辅助制作一个炫酷的PPT封面 标题使用镂空字背景替换为动态视频 标题使用镂空字 1.首先&#xff0c;新建一个空白的ppt页面&#xff0c;插入一张你认为符合主题的图片&#xff0c;占满整个可视页面。 2.其次&#xff0c;插入一个矩形&#xff0c;右键选择设置形状格式…...

【spring boot】初学者项目快速练手

一小时带你从0到1实现一个SpringBoot项目开发_哔哩哔哩_bilibili 一、简介 二、项目结构 三、代码结构 1.生成框架 Spring Initializr 快速生成一个初始的项目代码&#xff0c;会生成一个demo文件 打开intellj idea&#xff0c;导入demo文件 2.目录结构 源码都放在src-ma…...

Laravel+swoole 实现websocket长链接

需要使用 swoole 扩展 我使用的是 swoole 5.x start 方法启动服务 和 定时器 调整 listenQueue 定时器可以降低消息通讯延迟 定时器会自动推送队列里面的消息 testMessage 方法测试给指定用户推送消息 使用 laravel console 启动 <?phpnamespace App\Console\Comman…...

【C#】Array和List

C#中的List<T>和数组&#xff08;T[]&#xff09;在某些方面是相似的&#xff0c;因为它们都是用来存储一系列元素的集合。然而&#xff0c;它们在功能和使用上有一些重要的区别&#xff1a; 数组&#xff08;Array&#xff09; 固定大小&#xff1a;数组的大小在声明时…...

SpringCloud网关的实现原理与使用指南

Spring Cloud网关是一个基于Spring Cloud的微服务网关&#xff0c;它是一个独立的项目&#xff0c;可以对外提供API接口服务&#xff0c;负责请求的转发和路由。本文将介绍Spring Cloud网关的实现原理和使用指南。 一、Spring Cloud网关的实现原理 Spring Cloud网关基于Spring…...

LabVIEW 与 PLC 通讯方式

在工业自动化中&#xff0c;LabVIEW 与 PLC&#xff08;可编程逻辑控制器&#xff09;的通信至关重要&#xff0c;常见的通信方式包括 OPC、Modbus、EtherNet/IP、Profibus/Profinet 和 Serial&#xff08;RS232/RS485&#xff09;。这些通信协议各有特点和应用场景&#xff0c…...

数据结构初阶·排序算法(内排序)

目录 前言&#xff1a; 1 冒泡排序 2 选择排序 3 插入排序 4 希尔排序 5 快速排序 5.1 Hoare版本 5.2 挖坑法 5.3 前后指针法 5.4 非递归快排 6 归并排序 6.1递归版本归并 6.2 非递归版本归并 7 计数排序 8 排序总结 前言&#xff1a; 目前常见的排序算法有9种…...

PL/SQL oracle上多表关联的一些记录

1.记录自己在PL/SQL上写的几张表的关联条件没有跑出来的一些优化 1. join后面跟上筛选条件 left join on t1.id t2.id and --- 带上分区字段&#xff0c;如 t1.month 202405, 操作跑不出来的一些问题&#xff0c;可能是数据量过大&#xff0c;未做分区过滤 2. 创建…...

Java.Net.UnknownHostException:揭开网络迷雾,解锁异常处理秘籍

在Java编程的浩瀚宇宙中&#xff0c;java.net.UnknownHostException犹如一朵不时飘过的乌云&#xff0c;让开发者在追求网络畅通无阻的道路上遭遇小挫。但别担心&#xff0c;今天我们就来一场说走就走的探险&#xff0c;揭秘这个异常的真面目&#xff0c;并手把手教你几招应对之…...

第十课:telnet(远程登入)

如何远程管理网络设备&#xff1f; 只要保证PC和路由器的ip是互通的&#xff0c;那么PC就可以远程管理路由器&#xff08;用telnet技术管理&#xff09;。 我们搭建一个下面这样的简单的拓扑图进行介绍 首先我们点击云&#xff0c;把云打开&#xff0c;点击增加 我们绑定vmn…...

【概率论三】参数估计:点估计(矩估计、极大似然法)、区间估计

文章目录 一. 点估计1. 矩估计法2. 极大似然法2.1. 似然函数2.2. 极大似然估计法 3. 评价估计量的标准3.1. 无偏性3.2. 有效性3.3. 一致性 二. 区间估计1. 区间估计的概念2. 正态总体参数的区间估计 参数估计讲什么 由样本来确定未知参数参数估计分为点估计与区间估计 一. 点估…...

自动化产线 搭配数据采集监控平台 创新与突破

自动化产线在现在的各行各业中应用广泛&#xff0c;已经是现在的生产趋势&#xff0c;不同的自动化生产设备充斥在各行各业中&#xff0c;自动化的设备会产生很多的数据&#xff0c;这些数据如何更科学化的管理&#xff0c;更优质的利用&#xff0c;就需要数据采集监控平台来完…...

AI-调查研究-01-正念冥想有用吗?对健康的影响及科学指南

点一下关注吧&#xff01;&#xff01;&#xff01;非常感谢&#xff01;&#xff01;持续更新&#xff01;&#xff01;&#xff01; &#x1f680; AI篇持续更新中&#xff01;&#xff08;长期更新&#xff09; 目前2025年06月05日更新到&#xff1a; AI炼丹日志-28 - Aud…...

日语AI面试高效通关秘籍:专业解读与青柚面试智能助攻

在如今就业市场竞争日益激烈的背景下&#xff0c;越来越多的求职者将目光投向了日本及中日双语岗位。但是&#xff0c;一场日语面试往往让许多人感到步履维艰。你是否也曾因为面试官抛出的“刁钻问题”而心生畏惧&#xff1f;面对生疏的日语交流环境&#xff0c;即便提前恶补了…...

《Playwright:微软的自动化测试工具详解》

Playwright 简介:声明内容来自网络&#xff0c;将内容拼接整理出来的文档 Playwright 是微软开发的自动化测试工具&#xff0c;支持 Chrome、Firefox、Safari 等主流浏览器&#xff0c;提供多语言 API&#xff08;Python、JavaScript、Java、.NET&#xff09;。它的特点包括&a…...

2024年赣州旅游投资集团社会招聘笔试真

2024年赣州旅游投资集团社会招聘笔试真 题 ( 满 分 1 0 0 分 时 间 1 2 0 分 钟 ) 一、单选题(每题只有一个正确答案,答错、不答或多答均不得分) 1.纪要的特点不包括()。 A.概括重点 B.指导传达 C. 客观纪实 D.有言必录 【答案】: D 2.1864年,()预言了电磁波的存在,并指出…...

Spring AI 入门:Java 开发者的生成式 AI 实践之路

一、Spring AI 简介 在人工智能技术快速迭代的今天&#xff0c;Spring AI 作为 Spring 生态系统的新生力量&#xff0c;正在成为 Java 开发者拥抱生成式 AI 的最佳选择。该框架通过模块化设计实现了与主流 AI 服务&#xff08;如 OpenAI、Anthropic&#xff09;的无缝对接&…...

STM32HAL库USART源代码解析及应用

STM32HAL库USART源代码解析 前言STM32CubeIDE配置串口USART和UART的选择使用模式参数设置GPIO配置DMA配置中断配置硬件流控制使能生成代码解析和使用方法串口初始化__UART_HandleTypeDef结构体浅析HAL库代码实际使用方法使用轮询方式发送使用轮询方式接收使用中断方式发送使用中…...

Android写一个捕获全局异常的工具类

项目开发和实际运行过程中难免会遇到异常发生&#xff0c;系统提供了一个可以捕获全局异常的工具Uncaughtexceptionhandler&#xff0c;它是Thread的子类&#xff08;就是package java.lang;里线程的Thread&#xff09;。本文将利用它将设备信息、报错信息以及错误的发生时间都…...

ArcPy扩展模块的使用(3)

管理工程项目 arcpy.mp模块允许用户管理布局、地图、报表、文件夹连接、视图等工程项目。例如&#xff0c;可以更新、修复或替换图层数据源&#xff0c;修改图层的符号系统&#xff0c;甚至自动在线执行共享要托管在组织中的工程项。 以下代码展示了如何更新图层的数据源&…...

解密鸿蒙系统的隐私护城河:从权限动态管控到生物数据加密的全链路防护

摘要 本文以健康管理应用为例&#xff0c;展示鸿蒙系统如何通过细粒度权限控制、动态权限授予、数据隔离和加密存储四大核心机制&#xff0c;实现复杂场景下的用户隐私保护。我们将通过完整的权限请求流程和敏感数据处理代码&#xff0c;演示鸿蒙系统如何平衡功能需求与隐私安…...

dvwa11——XSS(Reflected)

LOW 分析源码&#xff1a;无过滤 和上一关一样&#xff0c;这一关在输入框内输入&#xff0c;成功回显 <script>alert(relee);</script> MEDIUM 分析源码&#xff0c;是把<script>替换成了空格&#xff0c;但没有禁用大写 改大写即可&#xff0c;注意函数…...