Skip to content
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Simulations & Solvers
  4. T-Neuro
  5. Populate Nerves/Fascicles with Axon Trajectories

Populate Nerves/Fascicles with Axon Trajectories

Scheduled Pinned Locked Moved T-Neuro
1 Posts 1 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AntoninoMCA Offline
    AntoninoMCA Offline
    AntoninoMC
    wrote on last edited by
    #1

    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
    folder=s4l.model.CreateGroup('Axon Trajectories')
    
    # Initialization
    points=[]; cnt=0
    
    while cnt<N:
    	# Creates Randomly Distributed Points in the cross section
    	x=2*R*(-0.5+np.random.rand()); 	
    	y=2*R*(-0.5+np.random.rand())
    	# only the axons within the cylinders are taken 
    	if (x*x+y*y<R*R):
                    pin=Vec3(x,y,-0.5*L); pend=Vec3(x,y,-0.5*L)
    		axon=s4l.model.CreatePolyLine([pin,pend])
    		axon.Name='Axon_'+str(cnt)
    		folder.Add(axon)
    		cnt+=1
    

    The code can be modified to permit arbitrary distributions of fibers within the fascicle entity.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Search