Hi Andy,
Thanks for your response!
I commented those lines out and they resolved the specific error that was in my post, but unfortunately does not fix the general issue of the electrodes for the manually entered localization not showing up.
I believe the larger issue has to do with the assignment of the “coords_mm” and “trajectory” variables at the top of the ea_showelectrode function.
When using lead group, the “coords_mm” and “trajectory” fields of the “elstruct” input variable are empty for the subject with the manually entered localization.
However, when using lead dbs to do the visualization, these fields are populated (seemingly automatically by lead dbs since I originally only entered the head and tail information for the subject) and thus the variable assignment works. In addition, it seems a final necessary piece is the “name” field, which is present again when running using lead dbs but not when using lead group.
If I run the lead group visualization while in debugging mode for the ea_showelectrode function, and then manually assign in the coords_mm, trajectory, and name fields of elstruct saved from using lead dbs visualization, I am able to get the lead group visualization to run successfully.
I believe solving this discrepancy is perhaps the key issue?
Thanks!
Joey