# MNE-NIRS: montage and plot\_topo of GLM results

**URL:** <https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655>\
**Category:** Support & Discussions\
**Created:** [April 16, 2024, 5:15pm UTC](https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655 "2024-04-16T17:15:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MelanieP](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MelanieP](https://mne.discourse.group/u/MelanieP)\
**Post date:** [April 16, 2024, 5:15pm UTC](https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655/1 "2024-04-16T17:15:21Z")

</div>

Dear all,

- MNE version: 1.6.1
- MNE-NIRS version: 0.6.0
- operating system: linux CentOS 7

I am trying to process old NIRx data.  
I managed to convert the data from .nirs to .snirf format.

I created a montage from the optodes and fiducials locations I had (X, Y, Z coordinates in MNI space) using `mne.channels.make_dig_montage` and `set_montage`, and the position of the optodes looks correct when I use `montage.plot()`:

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/a/ae502ce7dbb3784e9de62fb9081f183a303b59f9.png)

I then computed the haemoglobin data and solved a very simple GLM (it’s just a finger-tapping task alternating with rest). I tried to plot the GLM parameters using `plot_topo(conditions=['Task'])`  
but the channel positions are not correct at all, I obtain such plots:

![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/6/674d0e8f5ad6a5969c106d5ac91b97794f1fee86.png)

How can my custom montage be recognized by plot\_topo()? I understand that plot\_topo() needs a layout as input, not a montage, so how can I obtain a layout information from a custom montage?

Thanks in advance for your help  
Melanie

---

<div class="post-metadata">

**Author:** ![yameen1809](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yameen1809/32/3644_2.png) [@yameen1809](https://mne.discourse.group/u/yameen1809)\
**Post date:** [May 7, 2024, 8:12pm UTC](https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655/2 "2024-05-07T20:12:54Z")

</div>

Hei, can you please tell me how you converted the nirs to .snirf format?

---

<div class="post-metadata">

**Author:** ![yameen1809](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yameen1809/32/3644_2.png) [@yameen1809](https://mne.discourse.group/u/yameen1809)\
**Post date:** [May 7, 2024, 8:41pm UTC](https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655/3 "2024-05-07T20:41:05Z")

</div>

mentioning an mne expert @rob-luke here. I am facing the same problem, would be great if you could help us out here and shed some light into this matter on why are the plots coming outside the head. In my case i am reading a .wl1 file

---

<div class="post-metadata">

**Author:** ![MelanieP](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MelanieP](https://mne.discourse.group/u/MelanieP)\
**Post date:** [July 26, 2024, 3:38pm UTC](https://mne.discourse.group/t/mne-nirs-montage-and-plot-topo-of-glm-results/8655/4 "2024-07-26T15:38:12Z")

</div>

I’m deeply sorry I took so long to answer. In fact I did not find any solution.

I ended up with reading directly the .nirs data using mne.io.read\_raw\_nirx and I did not have the registration problem any more. I did not use the .snirf format.
