Using roast_target with a set of specific electrodes

47 views
Skip to first unread message

martincar...@gmail.com

unread,
Sep 29, 2022, 10:43:55 AM9/29/22
to roast-users
Dear community,

I am a new user of the ROAST software (THANKS SO MUCH! IT'S AWESOME!) and I find myself in quite the predicament.

Currently, I have a 32 channel stimulator, and I want to know which current distribution configuration is the best for obtaining a focal stimulation at a specific point in the brain. That is, I want to use roast_target, but only using the 32 electrodes available in my equipment. All of the electrodes are part of the 1010 system, but I want the results to output the currents at those specific 32 electrodes and not the 74 available by default. Is there a way to do so?

Thanks a lot in advance, and very kind regards!

Yu (Andy) Huang

unread,
Oct 1, 2022, 11:12:37 AM10/1/22
to martincar...@gmail.com, roast-users
Hi, 

Thanks for your interest and compliment in roast. For your question, you have to select the 32 electrodes you need in the elec72.loc file and run roast with leadField as the recipe. Then you can do roast_target. You may need to adapt the code after editing the elec72.loc file as I'm not sure if the program will crash with a new .loc file.

Hope this helps.

--
You received this message because you are subscribed to the Google Groups "roast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to roast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/roast-users/c769f034-eb1a-4854-8975-5527c8fb5d49n%40googlegroups.com.


--
Yu (Andy) Huang, Ph.D.

martincar...@gmail.com

unread,
Oct 5, 2022, 10:04:34 AM10/5/22
to roast-users
Thanks a lot for your help!

I think I have modified everything needed for it to run! I'll share the .loc file I modified (please find attached in this email) and explain the parts of the code I changed for it to run! (I think it is easy enough):

roast:

line 416 -> fid = fopen('./elec72.loc'); C = textscan(fid,'%d %f %f %s'); fclose(fid);
Here you have to change the name of the .loc file for the one you created.

line 757 -> [~,indRef] = ismember('Iz',elecName);
You have to change here the reference electrode in the case the 'Iz' electrode is not included in your new subset of electrodes!


roast_target:

line 564 -> fid = fopen('./elec72.loc'); C = textscan(fid,'%d %f %f %s'); fclose(fid);
You put here the name of the new .loc file name you created.

line 631 -> mytopoplot(mon,'./elec72.loc','numcontour',0,'plotrad',0.9,'shading','flat','gridscale',1000,'whitebk','off','colormap',cm_mon);
Again, you have to change the .loc file name you created.


After doing these modifications, you have to run roast with the recipe 'leadField', and can run roast_target as you would normally do! For the 'elec32.loc' file attached in this mail, the electrode placement figure looks like this (running roast([], 'leadfield', 'simulationTag', 'MNI152leadFieldStarStim32')):
ElectrodePlacement_StarStim32.jpeg
And then running roast_target([], 'MNI152leadFieldStarStim32',[],'optType','wls-l1per', 'targetingTag', '32ElecDefault') provides the following results:

Electrodes used are:
Fp1 (-0.338 mA)
C3 (1.000 mA)
C4 (-0.086 mA)
P4 (-0.170 mA)
O1 (-0.180 mA)
F7 (-0.508 mA)
FC1 (0.314 mA)
FC2 (-0.457 mA)
CP1 (0.686 mA)
AF4 (-0.101 mA)
PO4 (-0.068 mA)
Oz (-0.093 mA)

StimulationConfiguration_Elec32Default.pngInjectedCurrent_ElectricField_Elec32Default.pngElectricFieldTarget_Elec32Default.png

Hope this was useful!!


Martín
elec32.loc

Yu (Andy) Huang

unread,
Oct 6, 2022, 9:52:48 AM10/6/22
to martincar...@gmail.com, roast-users
Hi Martin, thanks a lot for sharing all these details!
Reply all
Reply to author
Forward
0 new messages