Extract node locations from discretized fibers based on first spike location in NEURON titration results
-
I'd like to be able to find the actual location of a node section from within a discretized fiber, that way I could calculate distances from the location of first spike to the location of stimulation. Does anyone know how to do this with Python? Is there some attribute of discretized nerve entity that contains what nodes are contained and their locations within the model? Alternatively, could you extract or convert sensors locations into points?
-
In answer to my own question, I found the way:
Extract the Titration Evaluator via the Titration Sensor, and check the 'Visualize spikes' option in the Settings field for the Titration Evaluator. Click refresh; this will create a folder of point entities in the modelling window with all the nodes of first spike location. The locations of these point can be access using ent.Position in Python or Jupyter, which can then be used to calculate distances to other points.
I will note for the SIM4LIFE team, I could not find any examples or documentation for this method, nor is the 'Visualize spikes' setting exposed in the API. Please consider adding this in a future update, as I believe it to be a powerful and useful method. It would also be helpful if these nodes are named distinctly, such that they correspond to the Neuron fibers that they refer to. This would mean that you don't end up with a significant number of entities all named 'node[0]'. Thanks!