<jupyter_start><jupyter_text>I generate electrode locations of Biosemi montages and save them in the `data_dir` folder. I then use them in Matlab to generate separate forward structures. For some reason I have to multiply them by 10000.<jupyter_code>import mne
import numpy as np
%matplotlib inline 
%config InlineBackend.figure_format = 'retina'

# Parameters for loading the .mat file
data_dir = "C:/Users/Mircea/Google Drive/Data/nn-dipole-fitting/"

layouts = [16,32,64,128,256]
for layout in layouts:
    montage = mne.channels.read_montage(f"biosemi{layout}",transform=False)
    np.savetxt(f"{data_dir}Biosemi_{layout:03d}.csv", np.array(montage.pos), delimiter=",")

montage = mne.channels.read_montage("biosemi64",transform=False)
montage.plot(scale_factor=100)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11, 'fraction_numerical': 0.03, 'mean_word_length': 6.416666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '105886', 'license': 'MIT', 'n_tokens_mistral': 295, 'n_tokens_neox': 271, 'n_words': 68, 'path': 'Single_Dipole/Python/Save_Biosemi_Electrode_Locations.ipynb', 'repo_name': 'mirceast/nn-dipole-fitting', 'size': '800'}