Handy programs to visualize NIRS data (6): plotAverage

55 sec read

This is the 6th post of the series: Handy programs to visualize NIRS data

When we do an experiment, we often repeat an event (or block) for a few times. For example, in a typical finger tapping task, we ask the participants to do a finger tapping for 20s, then rest for 20s, then repeat the whole tap-rest paradigm for 10 time.

After we extract the NIRS time courses, we often need to know the average of the signal over all repetitions of the event. In the finger tapping experiment, we want to know the average signal across 10 blocks of finger tapping.

What we need to do is:

  1. Know the timing of each block (of course!)
  2. cut the NIRS signal into pieces. The starting points should be a few seconds before the onset timing of the experiment block; and the ending points should be a few seconds after the offset of the experiment block.
  3. Align the pieces and average
  4. Also calculate the standard deviation (or error) of the average
  5. plot
The attached cuixuNIRSretrieve.m and plotAverage can automatically do the above steps. Below is a plot done by plotAverage. In this example, there are two types of events, fs and fb. Each was repeated 10 times. The plot below plot the average of each of the event, and also the standard deviation (the shaded area). The vertical grey bar is the onset timing of the events. From the plot we can see that fb elicits a bigger response than fs does.
plotAverage
plotAverage
You can download the two scripts at:



写作助手,把中式英语变成专业英文


Want to receive new post notification? 有新文章通知我

第五十八期fNIRS Journal Club通知2024/12/07, 10am 王硕教授团队

理解噪音中的言语对老年听力损失患者来说是一个重大挑战。来自首都医科大学附属北京同仁医院耳鼻咽喉科研究所王硕教授团队的助理研究员王松建将为大家介绍他们采用同步EEG-fNIRS技术,从神经与血流动力学两
Wanling Zhu
10 sec read

第五十七期fNIRS Journal Club视频 王欣悦博士

Youtube: https://youtu.be/vyo-kECC2Ps 优酷:https://v.youku.com/v_show/id_XNjQzNTA0ODIwMA==.html 肢体语言——
Wanling Zhu
20 sec read

第五十七期fNIRS Journal Club通知2024/11/02, 10am 王欣悦博士

肢体语言——例如人际距离、眼神、手势等,如何影响我们的交流,是一个有趣的谜题。它们是优雅而神秘的代码,无本可依、无人知晓,却又无人不懂。来自南京师范大学的王欣悦博士将分享如何通过fNIRS超扫描技术,
Wanling Zhu
16 sec read

5 Replies to “Handy programs to visualize NIRS data (6): plotAverage”

  1. Hi Cui,

    Thanks for your generous contribution, I am just wondering if the normal hyspectral camera can take pictures inside potatos
    Any external light can penetrate the potato body(tub)?

    Thanks lot , if you can provide some confirmation.

    regards,
    Dom

  2. Hi Xu

    We would like to use your scripts to average and plot NIRS data.

    Do you may have sample data to test it? I am especially not sure how the eventOnset (structure, the onset time (in seconds) of event) should look like.

    many thanks in advance
    lisa

  3. @Xu Cui
    Hi Xu, I can’t open the link above. Can you send the example of data again?
    I am in doubt whether the data is the output of NirsLAB block average since the signal event specifies a column vector, but I have been exporting Oxy and Deoxy which results a text document with two columns. Additionally, the time onset differs from participant from another as my finger tapping blocks were randomized, should I create eventOnset for each participant?

    kind regards,
    Artur

Leave a Reply

Your email address will not be published. Required fields are marked *