subscribe via RSS

  • Dive into ESPIRiT, from Theory to Practice

    This post summarizes the ESPIRiT algorithm for estimating coil sensitivies in MRI. It took me months to grasp the theory behind it.
  • cuda编程-矩阵乘法优化

    上一篇blog实现了一个基本的cuda程序,本篇记录如何实现矩阵乘法并加速。
  • CMake Cheatsheet

    CMake is a popular cross-platform build system that allows developers to use a common interface to define a set of rules to build the source code with diff...
  • cuda编程-基本概念

    当今科学计算越来越复杂,各种模型越来越大,使用SVM做分类的时代早已一去不复返,通过GPU加速应用的重要性不言而喻。我在MRI领域工作的这几年,经常碰高度复杂的MRI应用,Matlab计算时间在几小时到几天不等,即使高度优化的C++的程序也需要10至30分钟左右。这些应用的CPU利用率已然接近100%,因此通...
  • Powerful Bregman Methods

    The Bregman method is an iterative method to solve convex optimization problems with equality constraints.
  • Total Variation Denoising Problem

    Total variation (TV) denoising, also known as TV regularization or TV filtering, is a powerful technique widely used in various fields, including medical ima...
  • Tensor Decompositions

    This post contains some userful tensor notation and tricks which I have seen and collected.
  • Preconditioned Conjugate Gradient Method

    This weekend I learned Preconditioned Conjugate Gradient method with Jonathan Richard Schewchuk’s lecture note “An Introduction to the Conjugate Gradient Met...
  • In-place Circshift

    Last week I was attempting to implement an in-place fftshift function in c++. I hoped this function could perform shifting along any given dimension of N-d...
  • So How to Choose Tolerance for pinv?

    The Moore-Penrose inverse or the pseudoinverse $\mathbf{A}^+ \in \mathbb{R}^{n \times m}$ of a matrix $\mathbf{A} \in \mathbb{R}^{m \times n}$ is a kind of...
  • How to Measure Memory Usage in C++

    I’ve been struggling with calculating the memory usage for a week. Here’s the case: I got a program that needs to estimate how much memory it may consume d...
  • Build Modern C++ Projects in VSCode

    I use Visual Studio when I work at the company. Visual Studio does provide a better coding experience on the Windows platform. But honestly, the majority o...
  • Robust Principle Component Analysis

    Principle component analysis (PCA) is the most widely used dimension reduction technique. Given a matrix $\mathbf{X} \in \mathbb{R}^{m \times n}$ in which e...
  • Scientific Computing in VS Code

    I used to do all scientific computing work on Jupyter notebooks. My most common way of debugging was print, which is definitely not the best way to do so. ...
  • Fourier Transform

    The Fourier transform decomposes a function into different frequency components, which can be summed to represent the original function.
  • Makefile使用规则

    出于工作需要,我要开始系统学习c++了。目前我的主力台式机是Linux系统,最常用的编辑器是VS Code,所以想要得到一个比较完整的C/C++工程方案,似乎学习Makefile的相关规则是必不可少的。本文的内容主要源于makefile tutorial by example。
  • 为什么要少用逆矩阵

    我经常会在线性代数教材以及论坛讨论中看到不建议使用逆矩阵$\mathbf{A}^{-1}$来求解线性方程$\mathbf{A}\mathbf{x}=\mathbf{b}$,尽管我一直遵循这样的原则(实践中逆矩阵确实不够稳定),但仍然不明白不使用逆矩阵的理由。本文总结了我在网上看到的一些关于逆矩阵的讨论,希望能...
  • 矩阵微积分

    矩阵微分和矩阵求导几乎是求解优化问题不可避免的必学内容,这一方面的内容老实说我很难完全掌握。这里记录一下一些常用的矩阵微分求导的规范和技巧。
  • 主成分分析PCA

    主成分分析(Principle Component Analysis,PCA)是常用的一种矩阵分解算法,PCA通过旋转原始空间来使得数据在各个正交轴上的投影最大,通过选择前几个正交轴可以实现数据降维的目的。
  • manjaro踩坑记(2022更新版)

    从2019年到2022年,manjaro发行版渡过了我的整个博士生涯。最近毕业重新装了系统,依然选择了最新的manjaro KDE Plasma 21.2.4(本来装了arch,大小问题不断被劝退了。基本上这台linux主机要跟着我进入人生下一阶段,作为主力台式机也不打算再折腾了。安装过程中有一些新的学习体会...
  • MATLAB分布式集群搭建记录

    本篇的内容可能过时啦 虽然我很久不用MATLAB处理日常工作,但是实验室主流依然是MATLAB(用Python的就那么几个T_T)。以前小伙伴们跑程序都是拷贝程序和数据到实验室的计算服务器上,手工开N个MATLAB窗口做运算。现在实验室规模扩大,这种手工的方式越来越繁琐。我从前用MATLAB时就想试试集群计...
  • Psychopy事件响应

    Psychopy提供了很多IO交互方式,当然,最根本的还是键盘和鼠标。本节介绍Psychopy鼠标和键盘的编程技巧。
  • 共空间模式CSP

    共空间模式(common spatial pattern,CSP)是脑-机接口领域常用的一类空间滤波算法,尤其在运动想象范式分类上具有较好的效果,是运动想象范式的基准算法之一。
  • 如何在Psychopy中新建窗口

    窗口(windows)是刺激呈现的舞台,任何刺激对象都需要指定其所属的窗口对象。Pyschopy的Window对象位于psychopy.visual模块中,一个最简单的窗口示例如下
  • Psychopy坐标系统与显示器设置

    Psychopy提供了5种不同的坐标单位(unit),使用者只需提供刺激对应的坐标单位,Psychopy会自动计算刺激所对应的像素点范围。这种多坐标单位的好处在于,能够开发和设备无关的刺激呈现,不需要每次实验都对刺激的大小和呈现位置进行调整。其劣势则是需要精心挑选刺激对应的坐标单位,有时还要在不同单位间进行转换...
  • Psychopy安装和使用

    Psychopy是基于Python的心理学实验设计软件,由英国诺丁汉大学的Jon Peirce主持开发。Psychopy结合了OpenGL的图形优势和Python的语法特性,给科学家们提供了快速构建高性能的图形刺激界面的工具。