The Python interface can be used to automatize the creations of axonal trajectories within nerves/fascicles to execute EM-Neuronal simulations.
For example, let's assume that the user wants to populate a cylindrical fascicle with R=1mm and L=100mm with N=100 axonal trajectories randomly distributed. In order to maintain the 'Model' panel clean, a 'Axonal Trajectories' folder is created as well.
The following code does the job:
import s4l_v1 as s4l
import numpy as np
from s4l_v1 import Vec3
# Parameters definition
R=1 # Radius (mm)
L=100 # Length of the cylinder (mm)
N=100 # Number of axons
## Creates a folder in the Model Panel
# Creates Randomly Distributed Points in the cross section
# only the axons within the cylinders are taken
The code can be modified to permit arbitrary distributions of fibers within the fascicle entity.