From s.huertaspenen at gmail.com Thu Mar 2 14:46:22 2023 From: s.huertaspenen at gmail.com (Silvana Huertas) Date: Thu, 2 Mar 2023 14:46:22 +0100 Subject: [Simnibs-discuss] Error when running ROI analysis Message-ID: Hi, I have been using SimNIBS for a while and I was doing ROI analysis with the older version of SimNIBS, without problem. Now I'm using SimNIBS 4.0 and I'm having issues when running a ROI analysis. When I run the function subject_atlas, I get an error saying: 'myComputer\AppData\Local\Temp\tp85edc3b8_954a_4a0f_b3cc_3328def26ca0 is not a directory.' I can't find anything about this error. I meshed my MRIs using charm. Do you know what is this error? And how can I work it out? Kind regards, Silvana -------------- next part -------------- An HTML attachment was scrubbed... URL: From sfrandsen at bwh.harvard.edu Thu Mar 2 21:34:04 2023 From: sfrandsen at bwh.harvard.edu (Frandsen, Summer Brianne) Date: Thu, 2 Mar 2023 20:34:04 +0000 Subject: [Simnibs-discuss] E-field brain matter options Message-ID: Hi, In previous SimNIBS versions (e.g. V 3.2.6), the default electric field modeling simulations included both grey and white matter when using the gui. However, the newest version appears to be use only grey matter. It seems like there is a way to change this option (e.g. including white matter) when scripting simulations, but I have been unable to find an option that allows me to do in the gui. Is there a way to do this in the gui? Thanks, Summer. Frandsen The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 15567505275 at 163.com Fri Mar 3 14:06:41 2023 From: 15567505275 at 163.com (Will Shao) Date: Fri, 3 Mar 2023 21:06:41 +0800 (CST) Subject: [Simnibs-discuss] Error ROI Analysis Using Surfaces Message-ID: <2824abf5.62b4.186a794f19a.Coremail.15567505275@163.com> Dear all, SimNIBS has really helped me a lot, I would like to thank all the developers . I am a graduate student from China. I have a problem when using SimNIBS. I really hope that all the developers can help me. When I use "ROI Analysis Using Surfaces", I want to use DK68 which is not provided by SImNIBS for analysis, and then I added DK68.annot in \fsaverage_atlase and added DK68 information in subject_atlas, but this problem occurred in my operation This is very disturbing to me. I guess it may be I should rewrite a paragraph in subject_atlas appropriately, or the DK68.annot I added (segmented according to MNI152 in FreeSurfer) does not match the original annotation file information of SimNIBS.( It means that it is possible that the developer was split according to MNI305 using FreeSurfer 6.0, while I was split according to MNI155 FreeSurfer 7.3.2, and the information contained in the split may vary greatly).Because I loaded the original annotation file of SimNIBS into the segmented cerebral cortex, and the color information of the brain area is all chaotic, as shown in the figure. I really hope that the developers can help me solve this problem. I am very grateful for this. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 29562 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1677848681147.png Type: image/png Size: 1317907 bytes Desc: not available URL: From sfrandsen at bwh.harvard.edu Fri Mar 3 16:18:00 2023 From: sfrandsen at bwh.harvard.edu (Frandsen, Summer Brianne) Date: Fri, 3 Mar 2023 15:18:00 +0000 Subject: [Simnibs-discuss] E-field brain matter options In-Reply-To: <9a23168c7766afe2d3b35b976144175b9baa151f.camel@drcmr.dk> References: <9a23168c7766afe2d3b35b976144175b9baa151f.camel@drcmr.dk> Message-ID: Hi Oula. Sorry, I should have clarified! I?m talking about the nifti files that are output when using the simnibs simulation GUI. The only files I can get output are the ones with gray matter tissue. Thanks, Summer From: Oula Puonti Date: Friday, March 3, 2023 at 8:33 AM To: Frandsen, Summer Brianne , discuss at simnibs.org Subject: Re: [Simnibs-discuss] E-field brain matter options External Email - Use Caution Hi Summer, Just to make sure: are we talking about gmsh or the simnibs simulation GUI? The simulated electric field is always calculated in all tissues so you can visualize the field in both the gray and white matter in gmsh. The surfaces and volumes between v4 and v3 look a bit different now, for example the spinal cord is now fully white matter without a gray matter layer around it. In the simulation GUI the only brain surface you can visualize is the gray matter surface. Best, Oula On Thu, 2023-03-02 at 20:34 +0000, Frandsen, Summer Brianne wrote: > Hi, > > In previous SimNIBS versions (e.g. V 3.2.6), the default electric > field modeling simulations included both grey and white matter when > using the gui. However, the newest version appears to be use only > grey matter. It seems like there is a way to change this option (e.g. > including white matter) when scripting simulations, but I have been > unable to find an option that allows me to do in the gui. Is there a > way to do this in the gui? > > Thanks, > > Summer. Frandsen > > > > The information in this e-mail is intended only for the person to > whom it is addressed. If you believe this e-mail was sent to you in > error and the e-mail contains patient information, please contact the > Mass General Brigham Compliance HelpLine at > https://secure-web.cisco.com/1tS_WezwgoKpVHOsYs5udX7LV6ThVF8UnIsBSY4Yte9wbjsv-35ZzmL--UFMaFDsqbsnneQPHQJAs08ICtjPXU4t5b0RHSflEV271oIZLg7XQUdL2uyHgUiDMIyeA5Wme2C8OaR4eUfGm74JxhiS9oiyB3DI5Ujz1-UQ390Gxc8l0RMvof6u5YGGWIbWcwMZ4KcWCGAc8T1IJhkqBkw7WTuyXmsyLfS7SzSernkDC7KchSsp9e9zHwOH32y_lXO7bFk7PzEdwYMc233gceIL9zIDAjxIWCNKooGE9D8paLtUkAn1DHmlBFzAozxcUO79e/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline . > > Please note that this e-mail is not secure (encrypted). If you do > not wish to continue communication over unencrypted e-mail, please > notify the sender of this message immediately. Continuing to send or > respond to e-mail after receiving this message means you understand > and accept this risk and wish to continue to communicate over > unencrypted e-mail. > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://secure-web.cisco.com/1Mwi4oAKB2067fFkbaEJ3fhrzJKQDQrVgSXNK9STlqMnyBAi2L_meEk7y8CCdAj5u2hdEQKzxx03w9A1Zus9SDz97WSxDJz4W3cm55PeSt5_wFdxhnz7eOXeSKpX8e2pt_pdheNTMPh-LZP4s9RDbb7EDzljFPeg9v12LJ5z4sY9-zqMQ2dWPJVHtI3KzqJvgF9H_iw6N4vdnfZmLeISOoGZhBSbPAlA1gTOi84R-av18O0M3QEPqCRnLGWfJOAS3IpGPoiS2Sglu6B7dtOITlHT-uSi20uvrPwfg6Fkk45F5o1LplJmhUeUTpKA2m4Bl/https%3A%2F%2Fmailman.drcmr.dk%2Fmailman%2Flistinfo%2Fsimnibs-discuss The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oulap at drcmr.dk Fri Mar 3 14:33:05 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Fri, 03 Mar 2023 14:33:05 +0100 Subject: [Simnibs-discuss] E-field brain matter options In-Reply-To: References: Message-ID: <9a23168c7766afe2d3b35b976144175b9baa151f.camel@drcmr.dk> Hi Summer, Just to make sure: are we talking about gmsh or the simnibs simulation GUI? The simulated electric field is always calculated in all tissues so you can visualize the field in both the gray and white matter in gmsh. The surfaces and volumes between v4 and v3 look a bit different now, for example the spinal cord is now fully white matter without a gray matter layer around it. In the simulation GUI the only brain surface you can visualize is the gray matter surface. Best, Oula On Thu, 2023-03-02 at 20:34 +0000, Frandsen, Summer Brianne wrote: > Hi, > ? > In previous SimNIBS versions (e.g. V 3.2.6), the default electric > field modeling simulations included both grey and white matter when > using the gui. However, the newest version appears to be use only > grey matter. It seems like there is a way to change this option (e.g. > including white matter) when scripting simulations, but I have been > unable to find an option that allows me to do in the gui. Is there a > way to do this in the gui? > ? > Thanks, > ? > Summer. Frandsen > ? > ? > ? > The information in this e-mail is intended only for the person to > whom it is addressed.? If you believe this e-mail was sent to you in > error and the e-mail contains patient information, please contact the > Mass General Brigham Compliance HelpLine at > https://www.massgeneralbrigham.org/complianceline . > > Please note that this e-mail is not secure (encrypted).? If you do > not wish to continue communication over unencrypted e-mail, please > notify the sender of this message immediately.? Continuing to send or > respond to e-mail after receiving this message means you understand > and accept this risk and wish to continue to communicate over > unencrypted e-mail.? > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From oulap at drcmr.dk Fri Mar 3 15:24:20 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Fri, 03 Mar 2023 15:24:20 +0100 Subject: [Simnibs-discuss] Error when running ROI analysis In-Reply-To: References: Message-ID: Hi Silvana, Can try you downloading the example data (for version 4) from the website, running a simulation on ernie (using the options map_to_surf and map_to_fsavg), and then using the surface roi analysis script provided in the examples and seeing if that works? I haven't seen the error before, so it would be good to test if you can reproduce it on the example data. Thanks, Oula On Thu, 2023-03-02 at 14:46 +0100, Silvana Huertas wrote: > Hi,? > > I have been using SimNIBS for a while and I was doing ROI analysis > with the older version of SimNIBS, without problem. Now I'm using > SimNIBS 4.0 and I'm having issues when running a ROI analysis.? > > When I run the function subject_atlas, I get an error saying: > 'myComputer\AppData\Local\Temp\tp85edc3b8_954a_4a0f_b3cc_3328def26ca0 > is not a directory.' > I can't find anything about this error. I meshed my MRIs using > charm.? > Do you know what is this error? And how can I work it out? > > Kind regards,? > Silvana > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From oulap at drcmr.dk Fri Mar 3 15:44:59 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Fri, 03 Mar 2023 15:44:59 +0100 Subject: [Simnibs-discuss] Error ROI Analysis Using Surfaces In-Reply-To: <2824abf5.62b4.186a794f19a.Coremail.15567505275@163.com> References: <2824abf5.62b4.186a794f19a.Coremail.15567505275@163.com> Message-ID: Hi Will, If the annotation lives on the fsaverage surface (and is split between the left and right hemis), the mapping to the subject cortical surface should work. The subject_atlas function does not know the name 'DK68' however, so you should indeed change that in the code. As far as I know the fsaverage space has not changed between FS versions 6.0 and 7.3.2 so if you manage to map the annotation to the fsaverage surface it should work in simnibs. I can also have a look at the annotation file if you send it to me. Best, Oula On Fri, 2023-03-03 at 21:06 +0800, Will Shao wrote: > Dear all, > ? ?SimNIBS has really helped me a lot, I would like to thank all the > developers . I am a graduate student from China. I have a problem > when using SimNIBS. I really hope that all the developers can help > me. > When I use "ROI Analysis Using Surfaces", I want to use DK68 which is > not provided by SImNIBS for analysis, and then I added DK68.annot in > \fsaverage_atlase and added DK68 information in? subject_atlas, but > this problem occurred in my operation > ??This is very disturbing to me. I guess it may be I should rewrite a > paragraph in subject_atlas appropriately, or the DK68.annot I added > (segmented according to MNI152 in FreeSurfer) does not match the > original annotation file information of SimNIBS.( It means that it is > possible that the developer was split according to MNI305 using > FreeSurfer 6.0, while I was split according to MNI155 FreeSurfer > 7.3.2, and the information contained in the split may vary > greatly).Because I loaded the original annotation file of SimNIBS > into the segmented cerebral cortex, and the color information of the > brain area is all chaotic, as shown in the figure. > ? > ? ?I really hope that the developers can help me solve this problem. > I am very grateful for this. > > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From oulap at drcmr.dk Fri Mar 3 19:16:51 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Fri, 03 Mar 2023 19:16:51 +0100 Subject: [Simnibs-discuss] E-field brain matter options In-Reply-To: References: <9a23168c7766afe2d3b35b976144175b9baa151f.camel@drcmr.dk> Message-ID: <9b355d859ef9f5168baf4896ce1f2cab78455df1.camel@drcmr.dk> Hi Summer, Aah, I see. Yeah at the moment there is no option to specify the tissues in the GUI. If you want to hardcode this for your specific simnibs version you should edit line 193 inside the sim_struct.py file. You can find the file inside? /simnibs/simulation and you should change the default tissues used, see https://github.com/simnibs/simnibs/blob/master/simnibs/simulation/sim_struct.py#L193 Best, Oula On Fri, 2023-03-03 at 15:18 +0000, Frandsen, Summer Brianne wrote: > Hi Oula. > ? > Sorry, I should have clarified! I?m talking about the nifti files > that are output when using the simnibs simulation GUI. The only files > I can get output are the ones with gray matter tissue. > ? > Thanks, > ? > Summer > ? > From:Oula Puonti > Date: Friday, March 3, 2023 at 8:33 AM > To: Frandsen, Summer Brianne , > discuss at simnibs.org > Subject: Re: [Simnibs-discuss] E-field brain matter options > ??????? External Email - Use Caution??????? > > Hi Summer, > > Just to make sure: are we talking about gmsh or the simnibs > simulation > GUI? > > The simulated electric field is always calculated in all tissues so > you > can visualize the field in both the gray and white matter in gmsh. > The > surfaces and volumes between v4 and v3 look a bit different now, for > example the spinal cord is now fully white matter without a gray > matter > layer around it. > > In the simulation GUI the only brain surface you can visualize is the > gray matter surface. > > Best, > Oula > ? > > On Thu, 2023-03-02 at 20:34 +0000, Frandsen, Summer Brianne wrote: > > Hi, > > ? > > In previous SimNIBS versions (e.g. V 3.2.6), the default electric > > field modeling simulations included both grey and white matter when > > using the gui. However, the newest version appears to be use only > > grey matter. It seems like there is a way to change this option > > (e.g. > > including white matter) when scripting simulations, but I have been > > unable to find an option that allows me to do in the gui. Is there > > a > > way to do this in the gui? > > ? > > Thanks, > > ? > > Summer. Frandsen > > ? > > ? > > ? > > The information in this e-mail is intended only for the person to > > whom it is addressed.? If you believe this e-mail was sent to you > > in > > error and the e-mail contains patient information, please contact > > the > > Mass General Brigham Compliance HelpLine at > > https://secure-web.cisco.com/1tS_WezwgoKpVHOsYs5udX7LV6ThVF8UnIsBSY4Yte9wbjsv-35ZzmL--UFMaFDsqbsnneQPHQJAs08ICtjPXU4t5b0RHSflEV271oIZLg7XQUdL2uyHgUiDMIyeA5Wme2C8OaR4eUfGm74JxhiS9oiyB3DI5Ujz1-UQ390Gxc8l0RMvof6u5YGGWIbWcwMZ4KcWCGAc8T1IJhkqBkw7WTuyXmsyLfS7SzSernkDC7KchSsp9e9zHwOH32y_lXO7bFk7PzEdwYMc233gceIL9zIDAjxIWCNKooGE9D8paLtUkAn1DHmlBFzAozxcUO79e/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline > > . > > > > Please note that this e-mail is not secure (encrypted).? If you do > > not wish to continue communication over unencrypted e-mail, please > > notify the sender of this message immediately.? Continuing to send > > or > > respond to e-mail after receiving this message means you understand > > and accept this risk and wish to continue to communicate over > > unencrypted e-mail.? > > _______________________________________________ > > Simnibs-discuss mailing list > > Simnibs-discuss at drcmr.dk > > https://secure-web.cisco.com/1Mwi4oAKB2067fFkbaEJ3fhrzJKQDQrVgSXNK9STlqMnyBAi2L_meEk7y8CCdAj5u2hdEQKzxx03w9A1Zus9SDz97WSxDJz4W3cm55PeSt5_wFdxhnz7eOXeSKpX8e2pt_pdheNTMPh-LZP4s9RDbb7EDzljFPeg9v12LJ5z4sY9-zqMQ2dWPJVHtI3KzqJvgF9H_iw6N4vdnfZmLeISOoGZhBSbPAlA1gTOi84R-av18O0M3QEPqCRnLGWfJOAS3IpGPoiS2Sglu6B7dtOITlHT-uSi20uvrPwfg6Fkk45F5o1LplJmhUeUTpKA2m4Bl/https%3A%2F%2Fmailman.drcmr.dk%2Fmailman%2Flistinfo%2Fsimnibs-discuss > The information in this e-mail is intended only for the person to > whom it is addressed.? If you believe this e-mail was sent to you in > error and the e-mail contains patient information, please contact the > Mass General Brigham Compliance HelpLine at > https://www.massgeneralbrigham.org/complianceline . > > Please note that this e-mail is not secure (encrypted).? If you do > not wish to continue communication over unencrypted e-mail, please > notify the sender of this message immediately.? Continuing to send or > respond to e-mail after receiving this message means you understand > and accept this risk and wish to continue to communicate over > unencrypted e-mail.? From sfrandsen at bwh.harvard.edu Tue Mar 7 19:37:27 2023 From: sfrandsen at bwh.harvard.edu (Frandsen, Summer Brianne) Date: Tue, 7 Mar 2023 18:37:27 +0000 Subject: [Simnibs-discuss] E-field brain matter options In-Reply-To: <9b355d859ef9f5168baf4896ce1f2cab78455df1.camel@drcmr.dk> References: <9a23168c7766afe2d3b35b976144175b9baa151f.camel@drcmr.dk> <9b355d859ef9f5168baf4896ce1f2cab78455df1.camel@drcmr.dk> Message-ID: Ok, I will try that. Thank you so much for your help!! Summer From: Oula Puonti Date: Friday, March 3, 2023 at 1:19 PM To: Frandsen, Summer Brianne , discuss at simnibs.org Subject: Re: [Simnibs-discuss] E-field brain matter options External Email - Use Caution Hi Summer, Aah, I see. Yeah at the moment there is no option to specify the tissues in the GUI. If you want to hardcode this for your specific simnibs version you should edit line 193 inside the sim_struct.py file. You can find the file inside /simnibs/simulation and you should change the default tissues used, see https://secure-web.cisco.com/1LCPc7FEkoNfGimTxGj3_92cFiJfmIX7GDeoqM2rTORaTLrOLIFFfBEBf8C7AeKguZP_-L6TapgGGd1brWzOnpX16McHb0Ka6x-XyEeGqynQ22d9uDyK5z1-KAs2ZwUpDJML1fcRmc-pXHlwhnZEnM_PncuRRW-xUrVAhxk8AuVgxZSr6iIqtGq3X47g5PXPQt6PgzcP86StGVIVsOMfbLfOxp6DiWMs7VIDzbrY5EtaNGEKzgvq9EwR5BPnHiGUIYjgijQoO4oih_Wlu4igl0yUSuhxKH8YAUsKRic9ybucIyl1VwDvTC9reXc6VfmNz/https%3A%2F%2Fgithub.com%2Fsimnibs%2Fsimnibs%2Fblob%2Fmaster%2Fsimnibs%2Fsimulation%2Fsim_struct.py%23L193 Best, Oula On Fri, 2023-03-03 at 15:18 +0000, Frandsen, Summer Brianne wrote: > Hi Oula. > > Sorry, I should have clarified! I?m talking about the nifti files > that are output when using the simnibs simulation GUI. The only files > I can get output are the ones with gray matter tissue. > > Thanks, > > Summer > > From:Oula Puonti > Date: Friday, March 3, 2023 at 8:33 AM > To: Frandsen, Summer Brianne , > discuss at simnibs.org > Subject: Re: [Simnibs-discuss] E-field brain matter options > External Email - Use Caution > > Hi Summer, > > Just to make sure: are we talking about gmsh or the simnibs > simulation > GUI? > > The simulated electric field is always calculated in all tissues so > you > can visualize the field in both the gray and white matter in gmsh. > The > surfaces and volumes between v4 and v3 look a bit different now, for > example the spinal cord is now fully white matter without a gray > matter > layer around it. > > In the simulation GUI the only brain surface you can visualize is the > gray matter surface. > > Best, > Oula > > > On Thu, 2023-03-02 at 20:34 +0000, Frandsen, Summer Brianne wrote: > > Hi, > > > > In previous SimNIBS versions (e.g. V 3.2.6), the default electric > > field modeling simulations included both grey and white matter when > > using the gui. However, the newest version appears to be use only > > grey matter. It seems like there is a way to change this option > > (e.g. > > including white matter) when scripting simulations, but I have been > > unable to find an option that allows me to do in the gui. Is there > > a > > way to do this in the gui? > > > > Thanks, > > > > Summer. Frandsen > > > > > > > > The information in this e-mail is intended only for the person to > > whom it is addressed. If you believe this e-mail was sent to you > > in > > error and the e-mail contains patient information, please contact > > the > > Mass General Brigham Compliance HelpLine at > > https://secure-web.cisco.com/1tS_WezwgoKpVHOsYs5udX7LV6ThVF8UnIsBSY4Yte9wbjsv-35ZzmL--UFMaFDsqbsnneQPHQJAs08ICtjPXU4t5b0RHSflEV271oIZLg7XQUdL2uyHgUiDMIyeA5Wme2C8OaR4eUfGm74JxhiS9oiyB3DI5Ujz1-UQ390Gxc8l0RMvof6u5YGGWIbWcwMZ4KcWCGAc8T1IJhkqBkw7WTuyXmsyLfS7SzSernkDC7KchSsp9e9zHwOH32y_lXO7bFk7PzEdwYMc233gceIL9zIDAjxIWCNKooGE9D8paLtUkAn1DHmlBFzAozxcUO79e/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline > > . > > > > Please note that this e-mail is not secure (encrypted). If you do > > not wish to continue communication over unencrypted e-mail, please > > notify the sender of this message immediately. Continuing to send > > or > > respond to e-mail after receiving this message means you understand > > and accept this risk and wish to continue to communicate over > > unencrypted e-mail. > > _______________________________________________ > > Simnibs-discuss mailing list > > Simnibs-discuss at drcmr.dk > > https://secure-web.cisco.com/1Mwi4oAKB2067fFkbaEJ3fhrzJKQDQrVgSXNK9STlqMnyBAi2L_meEk7y8CCdAj5u2hdEQKzxx03w9A1Zus9SDz97WSxDJz4W3cm55PeSt5_wFdxhnz7eOXeSKpX8e2pt_pdheNTMPh-LZP4s9RDbb7EDzljFPeg9v12LJ5z4sY9-zqMQ2dWPJVHtI3KzqJvgF9H_iw6N4vdnfZmLeISOoGZhBSbPAlA1gTOi84R-av18O0M3QEPqCRnLGWfJOAS3IpGPoiS2Sglu6B7dtOITlHT-uSi20uvrPwfg6Fkk45F5o1LplJmhUeUTpKA2m4Bl/https%3A%2F%2Fmailman.drcmr.dk%2Fmailman%2Flistinfo%2Fsimnibs-discuss > The information in this e-mail is intended only for the person to > whom it is addressed. If you believe this e-mail was sent to you in > error and the e-mail contains patient information, please contact the > Mass General Brigham Compliance HelpLine at > https://secure-web.cisco.com/17XRb-4lWMyo35uMG5tNLBZpsWLpmNzn8KY6cJmi4DcSVYl48J_JA7xm44ARY2iWGqzlPbuBzqwwT6gvKl3z11eonJzgIOIbp2vIh6IpzdltVHdxNIPgTt95rfU4mvacqVcGPylcH7S9yNcLB59DTTlNqg_d7u7pEXXCdYNQpLmtTCcQN2ZdUDis3DBx0qpJ23W4gElNJRoYIyKGl5tanUt2jrX1IYBf50LUE0pTgguicKt_FhG8DRpAnBOnj27oP2QBiL5nER5Qiz-9qOP7snVBI5wD5iufISb81XUzP2KPWML30ps3f1H5_Mq-ET9Er/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline . > > Please note that this e-mail is not secure (encrypted). If you do > not wish to continue communication over unencrypted e-mail, please > notify the sender of this message immediately. Continuing to send or > respond to e-mail after receiving this message means you understand > and accept this risk and wish to continue to communicate over > unencrypted e-mail. The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From G.Lale at campus.lmu.de Wed Mar 8 13:39:08 2023 From: G.Lale at campus.lmu.de (=?utf-8?Q?G=C3=BClce_Lale?=) Date: Wed, 8 Mar 2023 13:39:08 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 Message-ID: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> Dear SimNIBS Team, I have downloaded the newest brainstorm version from March 1st (source + binary) and would like to create a FEM Mesh with SimNIBS 4.0. However, I receive the following error message: "SimNIBS 4.x is not installed or not added to the system path: the command "charm" could not be found.". Yet SimNIBS is correctly installed on linux and has been added to the system variables in the .bashrc file. Additionally, when I check system('charm') on the matlab command window it finds the correct charm.py file and when I type getenv('PATH') I get the correct system variables which include the path to SimNIBS 4.0.0.. I also get this error when I try to run ?system('charm --version?)? : ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39-x86_64-linux-gnu.so: undefined symbol: __gmpq_ad I already asked this to the Brainstorm team, and they told me that the Brainstorm should be working fine, but the problem might be with SimNIBS and its installation. I am also able to start and use SimNIBS regularly from the terminal and continue to be able to run charm for all my subjects. Therefore, I wanted to ask you why this problem could emerge? Thank you in advance for your time. Best, G?lce -------------- next part -------------- An HTML attachment was scrubbed... URL: From oulap at drcmr.dk Fri Mar 10 17:17:20 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Fri, 10 Mar 2023 17:17:20 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 In-Reply-To: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> References: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> Message-ID: <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> Hi G?lce, I'm guessing that the brainstorm issue is related to the linking issue with charm, i.e., that brainstorm complains because the charm command throws an error. Can you run a linker on the .so library that is giving problems? You can do: cd /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- packages/simnibs/mesh_tools/cgal/ and then call: ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so For my simnibs installation the output looks like this: linux-vdso.so.1 (0x00007ffedc7dc000) libmpfr.so.1 => /home/oulap/SimNIBS- 4.0/simnibs_env/lib/python3.9/site- packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.so. 1 (0x00007f4939e00000) libgmp.so.3 => /home/oulap/SimNIBS- 4.0/simnibs_env/lib/python3.9/site- packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so.3 (0x00007f4939a00000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f493a1d9000) libtbb.so.2 => /home/oulap/SimNIBS- 4.0/simnibs_env/lib/python3.9/site- packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so.2 (0x00007f4939600000) libtbbmalloc.so.2 => /home/oulap/SimNIBS- 4.0/simnibs_env/lib/python3.9/site- packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmallo c.so.2 (0x00007f4939200000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f493a1d2000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4938fc8000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f493a0ea000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f493a0ca000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f4938de1000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f493a336000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f493a0c5000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f493a0be000) I'm interested to see if your version links to the correct gmp library. Thanks, Oula On Wed, 2023-03-08 at 13:39 +0100, G?lce Lale wrote: > Dear SimNIBS Team, > I have downloaded the newest brainstorm version from March 1st > (source + binary) and would like to create a FEM Mesh with SimNIBS > 4.0. However, I receive the following error message: "SimNIBS 4.x is > not installed or not added to the system path: the command "charm" > could not be found.". > Yet SimNIBS is correctly installed on linux and has been added to the > system variables in the .bashrc file. Additionally, when I check > system('charm') on the matlab command window it finds the correct > charm.py file and when I type getenv('PATH') I get the correct system > variables which include the path to SimNIBS 4.0.0.. > I also get this error when I try to run ?system('charm --version?)? : > ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39-x86_64- > linux-gnu.so: undefined symbol: __gmpq_ad > I already asked this to the Brainstorm team, and they told me that > the Brainstorm should be working fine, but the problem might be with > SimNIBS and its installation. I am also able to start and use SimNIBS > regularly from the terminal and continue to be able to run charm for > all my subjects. > Therefore, I wanted to ask you why this problem could emerge? > Thank you in advance for your time. > Best, > G?lce > > > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From s.huertaspenen at gmail.com Mon Mar 13 15:46:14 2023 From: s.huertaspenen at gmail.com (Silvana Huertas) Date: Mon, 13 Mar 2023 15:46:14 +0100 Subject: [Simnibs-discuss] Get element data in Atlas Message-ID: Hi, I have been asking many questions later, so thank you for always answering, it helps me a lot :) I have been using the ROI code in your page to use an atlas and I see that this only gives me the node data (surface level). Is it possible, by any chance, to get the element data using an atlas? I would like to analyze the Electric field (x,y,z) in the primary motor cortices (I'm currently using the HCP_MMP1 atlas). Thank you for your help, Silvana Huertas -------------- next part -------------- An HTML attachment was scrubbed... URL: From oulap at drcmr.dk Tue Mar 14 14:19:34 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Tue, 14 Mar 2023 14:19:34 +0100 Subject: [Simnibs-discuss] Get element data in Atlas In-Reply-To: References: Message-ID: <5ca90de949417506fc0349cabc9f4fe278e216de.camel@drcmr.dk> Hi Silvana, It's possible yes, but you should use a volumetric atlas (or create a volumetric atlas from the surface one). There are a few options: 1) Interpolate the e-field values to volume space by ticking the options: "interpolate to nifti volume" and "transform to mni space" under simulation options in the GUI, or if you're using simulation scripts set s.map_to_vol = True and s.map_to_MNI = True (in python). When those options are used the e-field will be interpolated to the volume space (the same space as the MRI input) and also transformed to the MNI space. You can then analyze the e-field using any standard volumetric atlas in MNI space. Note that the niftis will be 4- dimensional (x,y,z and 3 e-field direction corresponding to the the vectors). It's not possible to analyze the normal and tangential components in volume space as that needs a surface. 2) Map a volumetric atlas to the subject space from MNI. You can use this function for the transformation: https://github.com/simnibs/simnibs/blob/master/simnibs/utils/transformations.py#L413 note that if it's a label atlas please set in order to 0. Once you've mapped your atlas from MNI space to the subject space you can then interpolate it onto the mesh using the nii2msh command, see here: https://simnibs.github.io/simnibs/build/html/documentation/command_line/nii2msh.html and then extract the e-field in those mesh elements where the data field values in the mesh match the atlas region you're interested in. 3) For a more approximate approach you can span a spherical roi around a center point, e.g., in the motor cortex, and then analyze the e-field values within that roi. See example here: https://simnibs.github.io/simnibs/build/html/tutorial/analysis.html Approaches 1) and 3) are easiest, but 3) is of course approximate. For option 1) you would only need to write the code for masking the volumetric e-field data with the atlas and then analyzing the results. It seems there is a volumetric version of the MMP atlas in MNI space: https://neurovault.org/collections/1549/ so you can either use the e-field values mapped to MNI space in option 1) and mask with the atlas or map the atlas to subject space using the warping code in option 2) and then mask the e-field values interpolated to the input nifti. Best, Oula On Mon, 2023-03-13 at 15:46 +0100, Silvana Huertas wrote: > Hi,? > > I have been asking many questions later, so thank you for always > answering, it helps me a lot :)? > > I have been using the?ROI?code in your page? to use an atlas and I > see that this only gives me the node?data?(surface level). Is it > possible, by any chance, to?get?the?element?data?using an atlas? I > would like to analyze the Electric field (x,y,z) in the primary motor > cortices (I'm currently using the HCP_MMP1 atlas).? > > Thank you for your help,? > > Silvana Huertas > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From G.Lale at campus.lmu.de Tue Mar 14 14:27:44 2023 From: G.Lale at campus.lmu.de (=?utf-8?Q?G=C3=BClce_Lale?=) Date: Tue, 14 Mar 2023 14:27:44 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 In-Reply-To: <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> References: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> Message-ID: <691482AF-2DD4-42E4-A7E6-8DC625FA779E@campus.lmu.de> Hi Oula, Thank you for your reply. I repeated the steps below. This was my outcome: ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007ffe67fb8000) libmpfr.so.1 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.so.1 (0x00007f8ece819000) libgmp.so.3 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so.3 (0x00007f8ece5be000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ece586000) libtbb.so.2 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so.2 (0x00007f8ece31f000) libtbbmalloc.so.2 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmalloc.so.2 (0x00007f8ece0c4000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8ece0a0000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8ecded3000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8ecdd8f000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8ecdd75000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ecdba0000) /lib64/ld-linux-x86-64.so.2 (0x00007f8eceb7b000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8ecdb9a000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8ecdb8e000) From what I can tell it is linking to the correct gmp library. I am very confused. Then, I created another version of the 4.0.0 where I installed a gmp package, which had not been present originally. (I am unsure whether this made a difference.) I ran the same command in the other folder named /sw/SImNIBS/4.0.0_daniela/ and got this: /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal$ ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007ffc4e505000) libmpfr.so.1 => /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.so.1 (0x00007f92b088b000) libgmp.so.3 => /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so.3 (0x00007f92b0630000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f92b05f8000) libtbb.so.2 => /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so.2 (0x00007f92b0391000) libtbbmalloc.so.2 => /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmalloc.so.2 (0x00007f92b0136000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f92b0112000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f92aff45000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92afe01000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f92afde7000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92afc12000) /lib64/ld-linux-x86-64.so.2 (0x00007f92b0bed000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f92afc0c000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f92afc00000) From what I gather the new 4.0.0_daniela option made no difference. (I may be wrong). Looking forward to your response. Thank you for your time and answers in advance. Best wishes, G?lce > On 10 Mar 2023, at 17:17, Oula Puonti wrote: > > Hi G?lce, > > I'm guessing that the brainstorm issue is related to the linking issue > with charm, i.e., that brainstorm complains because the charm command > throws an error. > > Can you run a linker on the .so library that is giving problems? You > can do: > > cd /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/ > > and then call: > > ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so > > For my simnibs installation the output looks like this: > > linux-vdso.so.1 (0x00007ffedc7dc000) > libmpfr.so.1 => /home/oulap/SimNIBS- > 4.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.so. > 1 (0x00007f4939e00000) > libgmp.so.3 => /home/oulap/SimNIBS- > 4.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so.3 > (0x00007f4939a00000) > libz.so.1 => /usr/lib/libz.so.1 (0x00007f493a1d9000) > libtbb.so.2 => /home/oulap/SimNIBS- > 4.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so.2 > (0x00007f4939600000) > libtbbmalloc.so.2 => /home/oulap/SimNIBS- > 4.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmallo > c.so.2 (0x00007f4939200000) > libpthread.so.0 => /usr/lib/libpthread.so.0 > (0x00007f493a1d2000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4938fc8000) > libm.so.6 => /usr/lib/libm.so.6 (0x00007f493a0ea000) > libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f493a0ca000) > libc.so.6 => /usr/lib/libc.so.6 (0x00007f4938de1000) > /usr/lib64/ld-linux-x86-64.so.2 (0x00007f493a336000) > libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f493a0c5000) > librt.so.1 => /usr/lib/librt.so.1 (0x00007f493a0be000) > > I'm interested to see if your version links to the correct gmp library. > > Thanks, > Oula > > > > On Wed, 2023-03-08 at 13:39 +0100, G?lce Lale wrote: >> Dear SimNIBS Team, >> I have downloaded the newest brainstorm version from March 1st >> (source + binary) and would like to create a FEM Mesh with SimNIBS >> 4.0. However, I receive the following error message: "SimNIBS 4.x is >> not installed or not added to the system path: the command "charm" >> could not be found.". >> Yet SimNIBS is correctly installed on linux and has been added to the >> system variables in the .bashrc file. Additionally, when I check >> system('charm') on the matlab command window it finds the correct >> charm.py file and when I type getenv('PATH') I get the correct system >> variables which include the path to SimNIBS 4.0.0.. >> I also get this error when I try to run ?system('charm --version?)? : >> ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39-x86_64- >> linux-gnu.so: undefined symbol: __gmpq_ad >> I already asked this to the Brainstorm team, and they told me that >> the Brainstorm should be working fine, but the problem might be with >> SimNIBS and its installation. I am also able to start and use SimNIBS >> regularly from the terminal and continue to be able to run charm for >> all my subjects. >> Therefore, I wanted to ask you why this problem could emerge? >> Thank you in advance for your time. >> Best, >> G?lce >> >> >> _______________________________________________ >> Simnibs-discuss mailing list >> Simnibs-discuss at drcmr.dk >> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oulap at drcmr.dk Wed Mar 15 17:10:25 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Wed, 15 Mar 2023 17:10:25 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 In-Reply-To: <691482AF-2DD4-42E4-A7E6-8DC625FA779E@campus.lmu.de> References: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> <691482AF-2DD4-42E4-A7E6-8DC625FA779E@campus.lmu.de> Message-ID: <7ae7d1915493ff4b5430e76795c2aa277e95b797.camel@drcmr.dk> Hi G?lce, Can you send the details of the linux setup you're running? One option would be to build simnibs for source, which would hopefully then work on your computer as it would be build specifically for that setup. It's not that difficult but you need to have gcc8 devtools available, see here for some instructions: https://stackoverflow.com/questions/53310625/how-to-install-gcc8-using-devtoolset-8-gcc Other than that you would need to have anaconda or miniconda available for creating the virtual python environment. If the linux you're running is not a very exotic one, I can also try to build an installer for it andd send it to you. We can try if that works first before you trying to build simnibs from source. Best, Oula On Tue, 2023-03-14 at 14:27 +0100, G?lce Lale wrote: > Hi Oula, > > Thank you for your reply. > > I repeated the steps below. This was my outcome: > > ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so > ?? ?linux-vdso.so.1 (0x00007ffe67fb8000) > ?? ?libmpfr.so.1 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s > o.1 (0x00007f8ece819000) > ?? ?libgmp.so.3 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so > .3 (0x00007f8ece5be000) > ?? ?libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ece586000) > ?? ?libtbb.so.2 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so > .2 (0x00007f8ece31f000) > ?? ?libtbbmalloc.so.2 => > /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal > loc.so.2 (0x00007f8ece0c4000) > ?? ?libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007f8ece0a0000) > ?? ?libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 > (0x00007f8ecded3000) > ?? ?libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8ecdd8f000) > ?? ?libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > (0x00007f8ecdd75000) > ?? ?libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ecdba0000) > ?? ?/lib64/ld-linux-x86-64.so.2 (0x00007f8eceb7b000) > ?? ?libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x00007f8ecdb9a000) > ?? ?librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 > (0x00007f8ecdb8e000) > > From what I can tell it is linking to the correct gmp library. I am > very confused. > > Then, I created another version of the 4.0.0 where I installed a gmp > package, which had not been present originally. (I am unsure whether > this made a difference.)? > > I ran the same command in the other folder named > /sw/SImNIBS/4.0.0_daniela/ and got this: > > /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal$ ldd create_mesh_surf.cpython-39- > x86_64-linux-gnu.so > ?? ?linux-vdso.so.1 (0x00007ffc4e505000) > ?? ?libmpfr.so.1 => > /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s > o.1 (0x00007f92b088b000) > ?? ?libgmp.so.3 => > /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so > .3 (0x00007f92b0630000) > ?? ?libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f92b05f8000) > ?? ?libtbb.so.2 => > /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so > .2 (0x00007f92b0391000) > ?? ?libtbbmalloc.so.2 => > /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal > loc.so.2 (0x00007f92b0136000) > ?? ?libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007f92b0112000) > ?? ?libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 > (0x00007f92aff45000) > ?? ?libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92afe01000) > ?? ?libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > (0x00007f92afde7000) > ?? ?libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92afc12000) > ?? ?/lib64/ld-linux-x86-64.so.2 (0x00007f92b0bed000) > ?? ?libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x00007f92afc0c000) > ?? ?librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 > (0x00007f92afc00000) > > From what I gather the new 4.0.0_daniela option made no difference. > (I may be wrong). > > Looking forward to your response. > Thank you for your time and answers in advance. > Best wishes, > G?lce > > > On 10 Mar 2023, at 17:17, Oula Puonti wrote: > > > > Hi G?lce, > > > > I'm guessing that the brainstorm issue is related to the linking > > issue > > with charm, i.e., that brainstorm complains because the charm > > command > > throws an error. > > > > Can you run a linker on the .so library that is giving problems? > > You > > can do: > > > > cd /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > > packages/simnibs/mesh_tools/cgal/ > > > > and then call: > > > > ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so > > > > For my simnibs installation the output looks like this: > > > > linux-vdso.so.1 (0x00007ffedc7dc000) > > libmpfr.so.1 => /home/oulap/SimNIBS- > > 4.0/simnibs_env/lib/python3.9/site- > > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr > > .so. > > 1 (0x00007f4939e00000) > > libgmp.so.3 => /home/oulap/SimNIBS- > > 4.0/simnibs_env/lib/python3.9/site- > > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp. > > so.3 > > (0x00007f4939a00000) > > libz.so.1 => /usr/lib/libz.so.1 (0x00007f493a1d9000) > > libtbb.so.2 => /home/oulap/SimNIBS- > > 4.0/simnibs_env/lib/python3.9/site- > > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb. > > so.2 > > (0x00007f4939600000) > > libtbbmalloc.so.2 => /home/oulap/SimNIBS- > > 4.0/simnibs_env/lib/python3.9/site- > > packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbm > > allo > > c.so.2 (0x00007f4939200000) > > libpthread.so.0 => /usr/lib/libpthread.so.0 > > (0x00007f493a1d2000) > > libstdc++.so.6 => /usr/lib/libstdc++.so.6 > > (0x00007f4938fc8000) > > libm.so.6 => /usr/lib/libm.so.6 (0x00007f493a0ea000) > > libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 > > (0x00007f493a0ca000) > > libc.so.6 => /usr/lib/libc.so.6 (0x00007f4938de1000) > > /usr/lib64/ld-linux-x86-64.so.2 (0x00007f493a336000) > > libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f493a0c5000) > > librt.so.1 => /usr/lib/librt.so.1 (0x00007f493a0be000) > > > > I'm interested to see if your version links to the correct gmp > > library. > > > > Thanks, > > Oula > > > > > > > > On Wed, 2023-03-08 at 13:39 +0100, G?lce Lale wrote: > > > Dear SimNIBS Team, > > > I have downloaded the newest brainstorm version from March 1st > > > (source + binary) and would like to create a FEM Mesh with > > > SimNIBS > > > 4.0. However, I receive the following error message: "SimNIBS 4.x > > > is > > > not installed or not added to the system path: the command > > > "charm" > > > could not be found.". > > > Yet SimNIBS is correctly installed on linux and has been added to > > > the > > > system variables in the .bashrc file. Additionally, when I check > > > system('charm') on the matlab command window it finds the correct > > > charm.py file and when I type getenv('PATH') I get the correct > > > system > > > variables which include the path to SimNIBS 4.0.0.. > > > I also get this error when I try to run ?system('charm -- > > > version?)? : > > > ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- > > > packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39- > > > x86_64- > > > linux-gnu.so: undefined symbol: __gmpq_ad > > > I already asked this to the Brainstorm team, and they told me > > > that > > > the Brainstorm should be working fine, but the problem might be > > > with > > > SimNIBS and its installation. I am also able to start and use > > > SimNIBS > > > regularly from the terminal and continue to be able to run charm > > > for > > > all my subjects. > > > Therefore, I wanted to ask you why this problem could emerge? > > > Thank you in advance for your time. > > > Best, > > > G?lce > > > > > > > > > _______________________________________________ > > > Simnibs-discuss mailing list > > > Simnibs-discuss at drcmr.dk > > > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss > > > From jesperdn at drcmr.dk Thu Mar 16 18:36:31 2023 From: jesperdn at drcmr.dk (Jesper Duemose Nielsen) Date: Thu, 16 Mar 2023 18:36:31 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 In-Reply-To: <7ae7d1915493ff4b5430e76795c2aa277e95b797.camel@drcmr.dk> References: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> <691482AF-2DD4-42E4-A7E6-8DC625FA779E@campus.lmu.de> <7ae7d1915493ff4b5430e76795c2aa277e95b797.camel@drcmr.dk> Message-ID: <4a8e7908-cd9d-afd7-ef2c-e31f375d46d0@drcmr.dk> Hi Gulce Allow me to weigh in. Someone from our department had the same issue you describe today; getting a linking error when calling charm from within MATLAB. It turns out that MATLAB includes some libraries itself (among these are gmp, tbb etc.) and when you execute programs from within MATLAB, these are prepended (or rather their paths) to LD_LIBRARY_PATH and hence are used by the program. You can verify if this is the case by comparing the output of running ldd on the .so file in the terminal (what I believe you showed in your previous email) and running ldd on the .so *from within MATLAB*, e.g., using `system` or `unix`. One solution is to *prepend* the path to the libraries included in SimNIBS to LD_LIBRARY_PATH like so ??? setenv(?LD_LIBRARY_PATH?, sprintf(?/path/to/simnibs/external/lib/linux:%s?, getenv(?LD_LIBRARY_PATH?))) Put this in your .m file before you call charm from MATLAB. Best, Jesper On 3/15/23 17:10, Oula Puonti wrote: > Hi G?lce, > > Can you send the details of the linux setup you're running? > > One option would be to build simnibs for source, which would hopefully > then work on your computer as it would be build specifically for that > setup. It's not that difficult but you need to have gcc8 devtools > available, see here for some instructions: > > https://stackoverflow.com/questions/53310625/how-to-install-gcc8-using-devtoolset-8-gcc > > Other than that you would need to have anaconda or miniconda available > for creating the virtual python environment. > > If the linux you're running is not a very exotic one, I can also try to > build an installer for it andd send it to you. We can try if that works > first before you trying to build simnibs from source. > > Best, > Oula > > > > On Tue, 2023-03-14 at 14:27 +0100, G?lce Lale wrote: >> Hi Oula, >> >> Thank you for your reply. >> >> I repeated the steps below. This was my outcome: >> >> ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so >> ?? ?linux-vdso.so.1 (0x00007ffe67fb8000) >> ?? ?libmpfr.so.1 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s >> o.1 (0x00007f8ece819000) >> ?? ?libgmp.so.3 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so >> .3 (0x00007f8ece5be000) >> ?? ?libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ece586000) >> ?? ?libtbb.so.2 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so >> .2 (0x00007f8ece31f000) >> ?? ?libtbbmalloc.so.2 => >> /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal >> loc.so.2 (0x00007f8ece0c4000) >> ?? ?libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 >> (0x00007f8ece0a0000) >> ?? ?libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 >> (0x00007f8ecded3000) >> ?? ?libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8ecdd8f000) >> ?? ?libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 >> (0x00007f8ecdd75000) >> ?? ?libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ecdba0000) >> ?? ?/lib64/ld-linux-x86-64.so.2 (0x00007f8eceb7b000) >> ?? ?libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 >> (0x00007f8ecdb9a000) >> ?? ?librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 >> (0x00007f8ecdb8e000) >> >> From what I can tell it is linking to the correct gmp library. I am >> very confused. >> >> Then, I created another version of the 4.0.0 where I installed a gmp >> package, which had not been present originally. (I am unsure whether >> this made a difference.) >> >> I ran the same command in the other folder named >> /sw/SImNIBS/4.0.0_daniela/ and got this: >> >> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal$ ldd create_mesh_surf.cpython-39- >> x86_64-linux-gnu.so >> ?? ?linux-vdso.so.1 (0x00007ffc4e505000) >> ?? ?libmpfr.so.1 => >> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s >> o.1 (0x00007f92b088b000) >> ?? ?libgmp.so.3 => >> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so >> .3 (0x00007f92b0630000) >> ?? ?libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f92b05f8000) >> ?? ?libtbb.so.2 => >> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so >> .2 (0x00007f92b0391000) >> ?? ?libtbbmalloc.so.2 => >> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal >> loc.so.2 (0x00007f92b0136000) >> ?? ?libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 >> (0x00007f92b0112000) >> ?? ?libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 >> (0x00007f92aff45000) >> ?? ?libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92afe01000) >> ?? ?libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 >> (0x00007f92afde7000) >> ?? ?libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92afc12000) >> ?? ?/lib64/ld-linux-x86-64.so.2 (0x00007f92b0bed000) >> ?? ?libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 >> (0x00007f92afc0c000) >> ?? ?librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 >> (0x00007f92afc00000) >> >> From what I gather the new 4.0.0_daniela option made no difference. >> (I may be wrong). >> >> Looking forward to your response. >> Thank you for your time and answers in advance. >> Best wishes, >> G?lce >> >>> On 10 Mar 2023, at 17:17, Oula Puonti wrote: >>> >>> Hi G?lce, >>> >>> I'm guessing that the brainstorm issue is related to the linking >>> issue >>> with charm, i.e., that brainstorm complains because the charm >>> command >>> throws an error. >>> >>> Can you run a linker on the .so library that is giving problems? >>> You >>> can do: >>> >>> cd /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/ >>> >>> and then call: >>> >>> ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so >>> >>> For my simnibs installation the output looks like this: >>> >>> linux-vdso.so.1 (0x00007ffedc7dc000) >>> libmpfr.so.1 => /home/oulap/SimNIBS- >>> 4.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr >>> .so. >>> 1 (0x00007f4939e00000) >>> libgmp.so.3 => /home/oulap/SimNIBS- >>> 4.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp. >>> so.3 >>> (0x00007f4939a00000) >>> libz.so.1 => /usr/lib/libz.so.1 (0x00007f493a1d9000) >>> libtbb.so.2 => /home/oulap/SimNIBS- >>> 4.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb. >>> so.2 >>> (0x00007f4939600000) >>> libtbbmalloc.so.2 => /home/oulap/SimNIBS- >>> 4.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbm >>> allo >>> c.so.2 (0x00007f4939200000) >>> libpthread.so.0 => /usr/lib/libpthread.so.0 >>> (0x00007f493a1d2000) >>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 >>> (0x00007f4938fc8000) >>> libm.so.6 => /usr/lib/libm.so.6 (0x00007f493a0ea000) >>> libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 >>> (0x00007f493a0ca000) >>> libc.so.6 => /usr/lib/libc.so.6 (0x00007f4938de1000) >>> /usr/lib64/ld-linux-x86-64.so.2 (0x00007f493a336000) >>> libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f493a0c5000) >>> librt.so.1 => /usr/lib/librt.so.1 (0x00007f493a0be000) >>> >>> I'm interested to see if your version links to the correct gmp >>> library. >>> >>> Thanks, >>> Oula >>> >>> >>> >>> On Wed, 2023-03-08 at 13:39 +0100, G?lce Lale wrote: >>>> Dear SimNIBS Team, >>>> I have downloaded the newest brainstorm version from March 1st >>>> (source + binary) and would like to create a FEM Mesh with >>>> SimNIBS >>>> 4.0. However, I receive the following error message: "SimNIBS 4.x >>>> is >>>> not installed or not added to the system path: the command >>>> "charm" >>>> could not be found.". >>>> Yet SimNIBS is correctly installed on linux and has been added to >>>> the >>>> system variables in the .bashrc file. Additionally, when I check >>>> system('charm') on the matlab command window it finds the correct >>>> charm.py file and when I type getenv('PATH') I get the correct >>>> system >>>> variables which include the path to SimNIBS 4.0.0.. >>>> I also get this error when I try to run ?system('charm -- >>>> version?)? : >>>> ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39- >>>> x86_64- >>>> linux-gnu.so: undefined symbol: __gmpq_ad >>>> I already asked this to the Brainstorm team, and they told me >>>> that >>>> the Brainstorm should be working fine, but the problem might be >>>> with >>>> SimNIBS and its installation. I am also able to start and use >>>> SimNIBS >>>> regularly from the terminal and continue to be able to run charm >>>> for >>>> all my subjects. >>>> Therefore, I wanted to ask you why this problem could emerge? >>>> Thank you in advance for your time. >>>> Best, >>>> G?lce >>>> >>>> >>>> _______________________________________________ >>>> Simnibs-discuss mailing list >>>> Simnibs-discuss at drcmr.dk >>>> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From caroline.herault38 at gmail.com Mon Mar 20 11:54:09 2023 From: caroline.herault38 at gmail.com (H Caroline) Date: Mon, 20 Mar 2023 11:54:09 +0100 Subject: [Simnibs-discuss] E normal in nifti format ? Message-ID: Dear SimNIBS Team, I am using SimNIBS 4.0 to simulate tDCS electric fields, and it works perfectly to get the magnitude of the field and convert it in a nifti format easily! However, I also need to explore the E normal component. I was wondering if there is a way to convert the "E normal" mesh overlays (whether it be the fsavg or the subject overlays) to a nifti file. I tried the "msh2nifti" command, but I get an error message saying that the .msh file (mySubject_scalar_fsavg.msh or mySubject_scalar_central.msh) does not have any volume element. Do you have any suggestion to avoid this problem and get a nifti file with the "E normal" values ? Thank you for your time and your help Best, Caroline *Research fellow at the Paris Brain Intitute, PICNIC team* Sans virus.www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.beumer at tue.nl Tue Mar 21 15:54:50 2023 From: s.beumer at tue.nl (Beumer, Steven) Date: Tue, 21 Mar 2023 14:54:50 +0000 Subject: [Simnibs-discuss] Difference in Electric field by optimization and simulation Message-ID: Dear SimNibs community, I was trying to verify the electric field obtained by an optimization with regular simulations. For a cortical target and 2 4*4cm patches, the resulting locations and currents were fed into a regular simulation and interpolated to the cortical surface. The obtained magnitude of the electric field differs by approximately a factor of two and I can?t seem to figure out the reason for that. In the figure below the optimization and simulation are shown with the Electric field plotted on the same scale. It might be a reasoning error somewhere, but if someone could help me with that, I would be grateful. Sincerely, Steven Beumer MSc [TUe-logo-descriptor-line-scarlet-rgb] PhD candidate at the Electrical Engineering faculty PS: For some reason, this issue doesn?t show up with small circular electrodes [cid:image001.png at 01D95C0B.E3EBD720] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 467822 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 11674 bytes Desc: image002.png URL: From axelt at drcmr.dk Thu Mar 23 13:11:07 2023 From: axelt at drcmr.dk (Axel Thielscher) Date: Thu, 23 Mar 2023 13:11:07 +0100 Subject: [Simnibs-discuss] Difference in Electric field by optimization and simulation In-Reply-To: References: Message-ID: <6f4e6726-6d34-aded-1104-2996a3beaa87@drcmr.dk> Hi Steven, when calculating the leadfields that form the input of the optimization algorithm, electrodes are added to the mesh at all positions defined by the EEG cap layout. For large electrodes, neighboring electrodes will start to overlap and create a continuous well-conductive layer covering major parts of the scalp. When simulating TDCS current flow in a head model modified like that, most of the currents will then just be shunted within the well-conductive "electrode layer" and not enter the head nor brain. In other words, leadfield-based optimization algorithms are designed to work with small electrodes. Best regards, Axel On 21-03-2023 15:54, Beumer, Steven wrote: > > Dear SimNibs community, > > I was trying to verify the electric field obtained by an optimization > with regular simulations. > > For a cortical target and 2 4*4cm patches, the resulting locations and > currents were fed into a regular simulation and interpolated to the > cortical surface. > > The obtained magnitude of the electric field differs by approximately > a factor of two and I can?t seem to figure out the reason for that. > > In the figure below the optimization and simulation are shown with the > Electric field plotted on the same scale. > > It might be a reasoning error somewhere, but if someone could help me > with that, I would be grateful. > > Sincerely, > > Steven Beumer MSc > > TUe-logo-descriptor-line-scarlet-rgb > > PhD candidate at the Electrical Engineering faculty > > PS: For some reason, this issue doesn?t show up with small circular > electrodes > > > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss -- Dr. Axel Thielscher Professor of Neurophysics and Neuroimaging Danish Research Center for Magnetic Resonance Copenhagen University Hospital Hvidovre DK-2650 Hvidovre, Denmark www.drcmr.dk & Department of Health Technology Technical University of Denmark DK-2800 Kgs. Lyngby http://www.healthtech.dtu.dk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 11674 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 467822 bytes Desc: not available URL: From G.Lale at campus.lmu.de Thu Mar 23 14:35:49 2023 From: G.Lale at campus.lmu.de (=?utf-8?Q?G=C3=BClce_Lale?=) Date: Thu, 23 Mar 2023 14:35:49 +0100 Subject: [Simnibs-discuss] Issues with making Brainstorm compatible with SimNIBS 4.0 In-Reply-To: <4a8e7908-cd9d-afd7-ef2c-e31f375d46d0@drcmr.dk> References: <27D6F0F0-74EC-49E3-9B2D-8965F40DDA3D@campus.lmu.de> <29e1eafe8cb70b07db99dcabfd01d45723ab5b5c.camel@drcmr.dk> <691482AF-2DD4-42E4-A7E6-8DC625FA779E@campus.lmu.de> <7ae7d1915493ff4b5430e76795c2aa277e95b797.camel@drcmr.dk> <4a8e7908-cd9d-afd7-ef2c-e31f375d46d0@drcmr.dk> Message-ID: <942BCFF9-8DC2-41D7-A202-8EE3EF55DC9B@campus.lmu.de> Hi Jesper, Thank you very much, this solution worked! I had to write this: setenv(?LD_LIBRARY_PATH?, sprintf(?/path/to/simnibs/external/lib/linux:%s?, getenv(?LD_LIBRARY_PATH?))) on the MATLAB command window. However, writing it down in a .m script and running it at the beginning before using Brainstorm also worked. Best wishes, G?lce > On 16 Mar 2023, at 18:36, Jesper Duemose Nielsen wrote: > > Hi Gulce > > Allow me to weigh in. Someone from our department had the same issue you describe today; getting a linking error when calling charm from within MATLAB. It turns out that MATLAB includes some libraries itself (among these are gmp, tbb etc.) and when you execute programs from within MATLAB, these are prepended (or rather their paths) to LD_LIBRARY_PATH and hence are used by the program. You can verify if this is the case by comparing the output of running ldd on the .so file in the terminal (what I believe you showed in your previous email) and running ldd on the .so *from within MATLAB*, e.g., using `system` or `unix`. > > One solution is to *prepend* the path to the libraries included in SimNIBS to LD_LIBRARY_PATH like so > > setenv(?LD_LIBRARY_PATH?, sprintf(?/path/to/simnibs/external/lib/linux:%s?, getenv(?LD_LIBRARY_PATH?))) > > Put this in your .m file before you call charm from MATLAB. > > Best, > > Jesper > > On 3/15/23 17:10, Oula Puonti wrote: >> Hi G?lce, >> >> Can you send the details of the linux setup you're running? >> >> One option would be to build simnibs for source, which would hopefully >> then work on your computer as it would be build specifically for that >> setup. It's not that difficult but you need to have gcc8 devtools >> available, see here for some instructions: >> >> https://stackoverflow.com/questions/53310625/how-to-install-gcc8-using-devtoolset-8-gcc >> >> Other than that you would need to have anaconda or miniconda available >> for creating the virtual python environment. >> >> If the linux you're running is not a very exotic one, I can also try to >> build an installer for it andd send it to you. We can try if that works >> first before you trying to build simnibs from source. >> >> Best, >> Oula >> >> >> >> On Tue, 2023-03-14 at 14:27 +0100, G?lce Lale wrote: >>> Hi Oula, >>> >>> Thank you for your reply. >>> >>> I repeated the steps below. This was my outcome: >>> >>> ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so >>> linux-vdso.so.1 (0x00007ffe67fb8000) >>> libmpfr.so.1 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s >>> o.1 (0x00007f8ece819000) >>> libgmp.so.3 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so >>> .3 (0x00007f8ece5be000) >>> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ece586000) >>> libtbb.so.2 => /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so >>> .2 (0x00007f8ece31f000) >>> libtbbmalloc.so.2 => >>> /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal >>> loc.so.2 (0x00007f8ece0c4000) >>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 >>> (0x00007f8ece0a0000) >>> libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 >>> (0x00007f8ecded3000) >>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8ecdd8f000) >>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 >>> (0x00007f8ecdd75000) >>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ecdba0000) >>> /lib64/ld-linux-x86-64.so.2 (0x00007f8eceb7b000) >>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 >>> (0x00007f8ecdb9a000) >>> librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 >>> (0x00007f8ecdb8e000) >>> >>> From what I can tell it is linking to the correct gmp library. I am >>> very confused. >>> >>> Then, I created another version of the 4.0.0 where I installed a gmp >>> package, which had not been present originally. (I am unsure whether >>> this made a difference.) >>> >>> I ran the same command in the other folder named >>> /sw/SImNIBS/4.0.0_daniela/ and got this: >>> >>> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal$ ldd create_mesh_surf.cpython-39- >>> x86_64-linux-gnu.so >>> linux-vdso.so.1 (0x00007ffc4e505000) >>> libmpfr.so.1 => >>> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr.s >>> o.1 (0x00007f92b088b000) >>> libgmp.so.3 => >>> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp.so >>> .3 (0x00007f92b0630000) >>> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f92b05f8000) >>> libtbb.so.2 => >>> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb.so >>> .2 (0x00007f92b0391000) >>> libtbbmalloc.so.2 => >>> /sw/SimNIBS/4.0.0_daniela/simnibs_env/lib/python3.9/site- >>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbmal >>> loc.so.2 (0x00007f92b0136000) >>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 >>> (0x00007f92b0112000) >>> libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 >>> (0x00007f92aff45000) >>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92afe01000) >>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 >>> (0x00007f92afde7000) >>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92afc12000) >>> /lib64/ld-linux-x86-64.so.2 (0x00007f92b0bed000) >>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 >>> (0x00007f92afc0c000) >>> librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 >>> (0x00007f92afc00000) >>> >>> From what I gather the new 4.0.0_daniela option made no difference. >>> (I may be wrong). >>> >>> Looking forward to your response. >>> Thank you for your time and answers in advance. >>> Best wishes, >>> G?lce >>> >>>> On 10 Mar 2023, at 17:17, Oula Puonti wrote: >>>> >>>> Hi G?lce, >>>> >>>> I'm guessing that the brainstorm issue is related to the linking >>>> issue >>>> with charm, i.e., that brainstorm complains because the charm >>>> command >>>> throws an error. >>>> >>>> Can you run a linker on the .so library that is giving problems? >>>> You >>>> can do: >>>> >>>> cd /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/ >>>> >>>> and then call: >>>> >>>> ldd create_mesh_surf.cpython-39-x86_64-linux-gnu.so >>>> >>>> For my simnibs installation the output looks like this: >>>> >>>> linux-vdso.so.1 (0x00007ffedc7dc000) >>>> libmpfr.so.1 => /home/oulap/SimNIBS- >>>> 4.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libmpfr >>>> .so. >>>> 1 (0x00007f4939e00000) >>>> libgmp.so.3 => /home/oulap/SimNIBS- >>>> 4.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libgmp. >>>> so.3 >>>> (0x00007f4939a00000) >>>> libz.so.1 => /usr/lib/libz.so.1 (0x00007f493a1d9000) >>>> libtbb.so.2 => /home/oulap/SimNIBS- >>>> 4.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbb. >>>> so.2 >>>> (0x00007f4939600000) >>>> libtbbmalloc.so.2 => /home/oulap/SimNIBS- >>>> 4.0/simnibs_env/lib/python3.9/site- >>>> packages/simnibs/mesh_tools/cgal/./../../external/lib/linux/libtbbm >>>> allo >>>> c.so.2 (0x00007f4939200000) >>>> libpthread.so.0 => /usr/lib/libpthread.so.0 >>>> (0x00007f493a1d2000) >>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 >>>> (0x00007f4938fc8000) >>>> libm.so.6 => /usr/lib/libm.so.6 (0x00007f493a0ea000) >>>> libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 >>>> (0x00007f493a0ca000) >>>> libc.so.6 => /usr/lib/libc.so.6 (0x00007f4938de1000) >>>> /usr/lib64/ld-linux-x86-64.so.2 (0x00007f493a336000) >>>> libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f493a0c5000) >>>> librt.so.1 => /usr/lib/librt.so.1 (0x00007f493a0be000) >>>> >>>> I'm interested to see if your version links to the correct gmp >>>> library. >>>> >>>> Thanks, >>>> Oula >>>> >>>> >>>> >>>> On Wed, 2023-03-08 at 13:39 +0100, G?lce Lale wrote: >>>>> Dear SimNIBS Team, >>>>> I have downloaded the newest brainstorm version from March 1st >>>>> (source + binary) and would like to create a FEM Mesh with >>>>> SimNIBS >>>>> 4.0. However, I receive the following error message: "SimNIBS 4.x >>>>> is >>>>> not installed or not added to the system path: the command >>>>> "charm" >>>>> could not be found.". >>>>> Yet SimNIBS is correctly installed on linux and has been added to >>>>> the >>>>> system variables in the .bashrc file. Additionally, when I check >>>>> system('charm') on the matlab command window it finds the correct >>>>> charm.py file and when I type getenv('PATH') I get the correct >>>>> system >>>>> variables which include the path to SimNIBS 4.0.0.. >>>>> I also get this error when I try to run ?system('charm -- >>>>> version?)? : >>>>> ImportError: /sw/SimNIBS/4.0.0/simnibs_env/lib/python3.9/site- >>>>> packages/simnibs/mesh_tools/cgal/create_mesh_surf.cpython-39- >>>>> x86_64- >>>>> linux-gnu.so: undefined symbol: __gmpq_ad >>>>> I already asked this to the Brainstorm team, and they told me >>>>> that >>>>> the Brainstorm should be working fine, but the problem might be >>>>> with >>>>> SimNIBS and its installation. I am also able to start and use >>>>> SimNIBS >>>>> regularly from the terminal and continue to be able to run charm >>>>> for >>>>> all my subjects. >>>>> Therefore, I wanted to ask you why this problem could emerge? >>>>> Thank you in advance for your time. >>>>> Best, >>>>> G?lce >>>>> >>>>> >>>>> _______________________________________________ >>>>> Simnibs-discuss mailing list >>>>> Simnibs-discuss at drcmr.dk >>>>> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss >> _______________________________________________ >> Simnibs-discuss mailing list >> Simnibs-discuss at drcmr.dk >> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From oulap at drcmr.dk Mon Mar 27 14:24:55 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Mon, 27 Mar 2023 08:24:55 -0400 Subject: [Simnibs-discuss] E normal in nifti format ? In-Reply-To: References: Message-ID: Hi Caroline, We do not directly support that in simnibs although it is technically possible. The end results would however be quite thin layer of voxels in the nifti volume and I'm not sure how useable/accurate that would be in terms of, say, a group analysis. Is there something specific you're trying to do for which you can't use surfaces? Best, Oula On Mon, 2023-03-20 at 11:54 +0100, H Caroline wrote: > Dear SimNIBS Team, > > I am using SimNIBS 4.0 to simulate tDCS electric fields, and it works > perfectly to get the magnitude of the field and convert it in a nifti > format easily! > > However, I also need to explore the E normal component. > I was wondering if there is a way to convert the "E normal" mesh > overlays (whether it be the fsavg or the subject overlays) to a nifti > file. > > I tried the "msh2nifti" command, but I get an error message saying > that the .msh file (mySubject_scalar_fsavg.msh or > mySubject_scalar_central.msh) does not have any volume element. > Do you have any suggestion to avoid this problem and get a nifti file > with the "E normal" values ? > > Thank you for your time and your help > > Best, > > Caroline > Research fellow at the Paris Brain Intitute, PICNIC team > > Sans virus.www.avast.com > > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From ramtin.mehraram at kuleuven.be Tue Mar 28 10:52:43 2023 From: ramtin.mehraram at kuleuven.be (Ramtin Mehraram) Date: Tue, 28 Mar 2023 08:52:43 +0000 Subject: [Simnibs-discuss] Does add_tissues_to_upsampled replace existing meshes? Message-ID: <954e886e93e74675a4d2730485563230@ICTS-S-EXMBX23.luna.kuleuven.be> Dear all, Does the function add_tissues_to_upsampled replace any existing meshes, if the surfaces are overlying? E.g., I want to delineate a certain cortical region; will that be removed from the existing "cortex" surface when assigned to the new tissue? Thank you, Ramtin [cid:image001.png at 01D96163.6BDA1050] Ramtin Mehraram, Ph.D. Postdoc at Experimental Oto-rhino-laryngology (ExpORL) Research Group. Department of Neurosciences KU Leuven Phone +32 16 37 92 78 Email ramtin.mehraram at kuleuven.be Herestraat 49 bus 721, B-3000 Leuven, Belgium [Title: LinkedIn - Description: image of LinkedIn icon][Title: Twitter - Description: image of Twitter icon] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 18078 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1437 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1413 bytes Desc: image003.png URL: From holidayzhangrehab at gmail.com Wed Mar 29 08:33:52 2023 From: holidayzhangrehab at gmail.com (Jack ZHANG) Date: Wed, 29 Mar 2023 14:33:52 +0800 Subject: [Simnibs-discuss] Coil orientation adjustment Message-ID: Hi SimNIBS developers and users, I'd like to ask a question regarding the definition of coil orientation during the TMS simulation. Clinically, a 45-degree angle is always applied during the stimulation of M1. When adding a stimulation target, e.g., C1 (-39.84,-62.80, 68.01), the reference coordinate is automatically set as (-39.84,-52.80, 68.01). Under this condition, the coil points anteriorly. Then if I set the reference coordinate on (-29.84, -52.80, 68.01), it seems the coil is pointing 45-degree in a P-to-A manner. I would like to confirm if this method is acceptable (in order to have a 45-angle manually), as it doesn't take the Z axis into consideration. In addition, when adjusting the Z coordinates, it does not change the tilting angle of the coil (it seems the coil is always placed perpendicular to the scalp), but it can produce different pointing directions. Thanks for your attention on this matter, Best regards, Jack -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at rogue-research.com Wed Mar 29 22:33:48 2023 From: alex at rogue-research.com (Alexandru Ciobanu) Date: Wed, 29 Mar 2023 16:33:48 -0400 Subject: [Simnibs-discuss] compact bone tissue effect on magnitudes Message-ID: Hi SimNIBS Team, We are running SimNIBS 4 simulations for TMS with `map_to_vol` option enabled, to obtain the `.nii.gz` file of the field. For a typical TMS coil position (simlar to FCz), we see that including the compact bone (7) tissue in the `tissues_in_niftis` result in the range of magnitude values increasing a lot, because there are a few voxels with high values. So if at the grey matter surface we get around 1-2 V/m maximum, at the areas around the orbital bones we see up to 10 V/m values. See attached image orbital_bones.png. It seems these very "hot" areas are around the orbital bones, far from coil location. Do you think this is a numerical artifact from the simulation (e.g. due to very thin bone) or something else? Maybe there are ways to filter such values that are both very far from the coil and very high? See the attached images showing the results for various selections of tissues: - tissues_2.png -- for grey matter only. - tissues_all.png -- for `all` tissues - tissues_all_except_7.png -- for `[1,2,3,4,5,6,8,9,10]` tissues, i.e. everything except compact bone tissue We reproduce this with our own segmentations, but also with the standard Ernie segmentation. See the included demo python script for easy reproduction of this effect. Just point it to the Ernie segmentation file: $ simnibs_python demo.py YOURPATH/m2m_ernie/ernie.msh and then examine the output `.nii.gz` file in `/tmp/result/subject_volumes`. sincerely, Alex Ciobanu -------------- next part -------------- A non-text attachment was scrubbed... Name: demo.py Type: text/x-python-script Size: 694 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: orbital_bones.png Type: image/png Size: 131310 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tissues_2.png Type: image/png Size: 123146 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tissues_all_except_7.png Type: image/png Size: 135329 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tissues_all.png Type: image/png Size: 123463 bytes Desc: not available URL: From oulap at drcmr.dk Wed Mar 29 19:40:21 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Wed, 29 Mar 2023 13:40:21 -0400 Subject: [Simnibs-discuss] Does add_tissues_to_upsampled replace existing meshes? In-Reply-To: <954e886e93e74675a4d2730485563230@ICTS-S-EXMBX23.luna.kuleuven.be> References: <954e886e93e74675a4d2730485563230@ICTS-S-EXMBX23.luna.kuleuven.be> Message-ID: <577bd7005e2467e3920cfeeb6cadfc268003a766.camel@drcmr.dk> Hi Ramtin, add_tissues_to_upsampled modifies the tissue_upsampled.nii.gz image (or writes a new one to disk), which can then be used to create new mesh with the added tissues. The tissues get replaced in the tissues_upsampled.nii.gz label file, which means the tissues will also be replaced in the resulting mesh. If you just want to use add_tissues_to_upsampled as a way to get a region-of-interest, for example a cortical area, into the mesh, you can do that and then assign that region the same conductivity as gray matter so that it appears as "cortex" in the simulations. You can also use cortical rois when post- processing the simulation results so you don't have to necessarily inlcude those in the mesh explicitly with add_tissues_to_upsampled. Best, Oulla On Tue, 2023-03-28 at 08:52 +0000, Ramtin Mehraram wrote: > Dear all, > ? > Does the function add_tissues_to_upsampledreplace any existing > meshes, if the surfaces are overlying? E.g., I want to delineate a > certain cortical region; will that be removed from the existing > ?cortex? surface when assigned to the new tissue? > ? > ? > Thank you, > Ramtin > ? > Ramtin Mehraram, Ph.D. > Postdoc at Experimental Oto-rhino-laryngology (ExpORL) Research > Group. > Department of Neurosciences > KU Leuven > ? > Phone+32 16 37 92 78 > Emailramtin.mehraram at kuleuven.be > Herestraat 49 bus 721, B-3000 Leuven, Belgium > ? > Title: LinkedIn - Description: image of LinkedIn iconTitle: Twitter - > Description: image of Twitter icon? > ? > > ? > ? > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From oulap at drcmr.dk Wed Mar 29 19:47:19 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Wed, 29 Mar 2023 13:47:19 -0400 Subject: [Simnibs-discuss] Coil orientation adjustment In-Reply-To: References: Message-ID: Hi Jack, Maybe the easiest way to do this over multiple subjects is to pick an EEG position on the scalp which is close to the 45 degree angle, for example C1 as the center and FCz as the direction. I noticed that there's not a dropdown menu for choosing the direction based on the EEG positions on the GUI, but you can do that when using scripting, see: https://simnibs.github.io/simnibs/build/html/tutorial/scripting.html Best, Oula On Wed, 2023-03-29 at 14:33 +0800, Jack ZHANG wrote: > Hi SimNIBS developers and users, > > I'd like to ask a question regarding the definition of coil > orientation during the TMS simulation. > > Clinically, a 45-degree angle is always applied during the > stimulation of M1. > > When adding a stimulation target, e.g., C1 (-39.84,-62.80, 68.01), > the reference coordinate is automatically set as? (-39.84,-52.80, > 68.01). Under this condition, the coil points anteriorly. > > Then if I set the reference coordinate on (-29.84, -52.80, 68.01), it > seems the coil is pointing 45-degree in a P-to-A manner.? > > I would like to confirm if this method is acceptable (in order to > have a 45-angle manually), as it doesn't take the Z axis into > consideration. In addition, when adjusting the Z coordinates, it does > not change the tilting angle of the coil (it seems the coil is always > placed perpendicular to the scalp), but it can produce different > pointing directions. > > Thanks for your attention on this matter, > Best regards, > Jack > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss From bronwyn.gavine at univ.ox.ac.uk Thu Mar 30 12:15:42 2023 From: bronwyn.gavine at univ.ox.ac.uk (Bronwyn Gavine) Date: Thu, 30 Mar 2023 10:15:42 +0000 Subject: [Simnibs-discuss] Any way to match T2 FOV instead of T1 for charm? Message-ID: Hello simnibs team, Thank you for all the hard work you put into this great tool! I have a dataset that includes T2 images with a large FOV (nose included) and T1 images with a tighter FOV. In a few subjects, the T1 FOV is missing a part of the frontal scalp. I attach an image to show the difference in FOV between the tissue labelling volume and T2. Is there any way to manually add in (rather than reclassify) extra tissue to the tissue_labeling_upsampled.nii.gz volume? Or any way to enlarge the T1 FOV to match the T2 FOV at the charm stage? Would be grateful for any pointers! Thanks very much. Warm regards, Bronwyn ??. Dr Bronwyn Gavine MBChB (UCT) MSc Neuroscience (Oxon) Doctoral Candidate - Nuffield Department of Clinical Neurosciences University of Oxford -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sub-12_FOV.png Type: image/png Size: 147491 bytes Desc: sub-12_FOV.png URL: From oulap at drcmr.dk Thu Mar 30 15:43:57 2023 From: oulap at drcmr.dk (Oula Puonti) Date: Thu, 30 Mar 2023 09:43:57 -0400 Subject: [Simnibs-discuss] Any way to match T2 FOV instead of T1 for charm? In-Reply-To: References: Message-ID: Hi Brownyn, charm resamples everything to the space of the first input image, so technically you could run the pipeline with the T2 as the first input at T1 as the second input. That would unfortunately flip your filenames (T1.nii.gz being the T2, etc.), so maybe a better option would be to run only the --registerT2 step first, i.e., charm --registerT2 and then grab the T1.nii.gz and T2_reg.nii.gz (which will now have wrong names) and then re-run charm with those scans (passing them in again in the expected order, i.e., T1 first and T2 second). There's one caveat though: doing the above is a bad idea if the resolution of your T2 is much lower than the resolution of your T1, because the T1 will get resampled to the space of the T2. If that's the case I would rather zero pad the T1 to extend the FOV. Best, Oula On Thu, 2023-03-30 at 10:15 +0000, Bronwyn Gavine wrote: > Hello simnibs team, > ? > Thank you for all the hard work you put into this great tool! > ? > I have a dataset that includes T2 images with a large FOV (nose > included) and T1 images with a tighter FOV. In a few subjects, the T1 > FOV is missing a part of the frontal scalp. I attach an image to show > the difference in FOV between the tissue labelling volume and T2. > Is there any way to manually add in (rather than reclassify) extra > tissue to the tissue_labeling_upsampled.nii.gz volume? Or any way to > enlarge the T1 FOV to match the T2 FOV at the charm stage? > ? > Would be grateful for any pointers! > ? > Thanks very much. > ? > Warm regards, > Bronwyn > ? > ??. > Dr Bronwyn Gavine > MBChB (UCT) MSc Neuroscience (Oxon) > Doctoral Candidate - Nuffield Department of Clinical Neurosciences > University of Oxford > ? > _______________________________________________ > Simnibs-discuss mailing list > Simnibs-discuss at drcmr.dk > https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss