# Coregistration using Captrak Digitization - Could Not read Measurement Data

**URL:** <https://mne.discourse.group/t/coregistration-using-captrak-digitization-could-not-read-measurement-data/3732>\
**Category:** Support & Discussions\
**Tags:** ﻿source-localization, preprocessing, eeg, montage\
**Created:** [September 25, 2021, 12:25am UTC](https://mne.discourse.group/t/coregistration-using-captrak-digitization-could-not-read-measurement-data/3732 "2021-09-25T00:25:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aar40](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@aar40](https://mne.discourse.group/u/aar40)\
**Post date:** [September 25, 2021, 12:25am UTC](https://mne.discourse.group/t/coregistration-using-captrak-digitization-could-not-read-measurement-data/3732/1 "2021-09-25T00:25:29Z")

</div>

- MNE-Python version: 0.23.4
- operating system: Linux - Ubuntu 20.04

**Issue:** I am trying to use EEG data for co-registration, however, the EEG points do not show on the coregistration GUI. And I checked the montage to see if that was the issue and it had no measurement data. Below is my code - I am trying to figure out if this is data collection issue or software.

**Error:**

```python
patient = user_input: ("E39") in this case
montage_name = traverse('/CapTrak', patient, patient, '.bvct')
montage = mne.channels.read_dig_captrak(montage_name)
montage.save(pathlib.Path('/mnt/d/Aidan/' + patient + '/Digitization') / 'Captrak_Digitization.fif')
data = pathlib.Path('/mnt/d/Aidan/' + patient + '/Digitization') / 'Captrak_Digitization.fif'
info = mne.io.read_info(data)

```

 ![Mne_forum_error](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/ffe6f213009bb17b3597f45281a1b635962d0814.png)

**Double checking Sensor locations**

```python
Raw.set_montage(montage)
Raw.plot_sensors()

```

 ![mne_forum_sensor_locs](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/fec8525cd3dcc6c7774a1d66ee5bedf13c5f021c.png)

**Coregistration**  
`mne.gui.coregistration(subject = patient, subjects_dir=SUBJECTS_DIR, inst = data)`

 ![mne_forum](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/4459b7946d987c7609210c57c63db5a12ecd50a8.png)

Thanks for any and all assistance!

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [September 25, 2021, 8:10am UTC](https://mne.discourse.group/t/coregistration-using-captrak-digitization-could-not-read-measurement-data/3732/2 "2021-09-25T08:10:17Z")

</div>

Hello @aar40 and welcome to the forum!

> [@aar40](#):
>
> ```python
> montage.save(pathlib.Path('/mnt/d/Aidan/' + patient + '/Digitization') / 'Captrak_Digitization.fif')
> data = pathlib.Path('/mnt/d/Aidan/' + patient + '/Digitization') / 'Captrak_Digitization.fif'
> info = mne.io.read_info(data)
> 
> ```

This is bound to fail, as you’re trying to load the saved **montage** as **measurement info**. This doesn’t make sense 😅

I think the confusion here stems from the fact that in the coregistration UI, one field is labeled “Digitization source”. **This field does not refer to a montage file** , but to a file containing the participant’s **measurement info** – typically a `.fif` file that contains all the measurement data and the `.info` structure (which is what the coregistration UI will use to display the digitization points).

So what you need to do:

- Load your EEG data in MNE-Python
- Read the correct montage from disk
- Add the montage to the EEG data, e.g. via `raw.set_montage(your_montage)`
- Save the data to disk, e.g. via `raw.save('outfile.fif')`
- When starting the coregistration UI, pass the path to this file via the `inst` parameter

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![aar40](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@aar40](https://mne.discourse.group/u/aar40)\
**Post date:** [September 28, 2021, 5:24pm UTC](https://mne.discourse.group/t/coregistration-using-captrak-digitization-could-not-read-measurement-data/3732/3 "2021-09-28T17:24:06Z")

</div>

Amazing! This makes so much more sense 😄
