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. Python API
  4. Specifying diameter during axon discretization

Specifying diameter during axon discretization

Scheduled Pinned Locked Moved Python API
2 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.
  • L Offline
    L Offline
    LJ
    wrote on last edited by LJ
    #1

    Hi,

    I am trying to create axons with varying diameters. Below is the script I am using. Regardless of what Diameter I set, the actual model produced has a diameter of 20µm. Does anyone know how to fix that?

    Axon_name='axon'
    Diameter=10
    axon = model.AllEntities()[Axon_name]
    neuron_settings=model.MotorMrgNeuronProperties
    neuron_settings.AxonDiameter=Diameter
    discretized_axon = model.CreateAxonNeuron(axon, neuron_settings())
    discretized_axon.Name = Axon_name +'_neuron'
    

    Thanks!

    L 1 Reply Last reply
    0
    • L LJ

      Hi,

      I am trying to create axons with varying diameters. Below is the script I am using. Regardless of what Diameter I set, the actual model produced has a diameter of 20µm. Does anyone know how to fix that?

      Axon_name='axon'
      Diameter=10
      axon = model.AllEntities()[Axon_name]
      neuron_settings=model.MotorMrgNeuronProperties
      neuron_settings.AxonDiameter=Diameter
      discretized_axon = model.CreateAxonNeuron(axon, neuron_settings())
      discretized_axon.Name = Axon_name +'_neuron'
      

      Thanks!

      L Offline
      L Offline
      LJ
      wrote on last edited by
      #2

      I have managed to solve this. The function below seems to work

      def DiscretizeAxonModel(Axon_name, Diameter, type,folder):
          axon_entity = model.AllEntities()[Axon_name]
      
          if type=='motor':
              model_properties=model.MotorMrgNeuronProperties()
          elif type=='sensory':
              model_properties=model.SensoryMrgNeuronProperties()
          else:
              model_properties=model.MotorNeuronProperties()
          
          model_properties.AxonDiameter=Diameter
          discretized_axon = model.CreateAxonNeuron(axon_entity,model_properties)
          discretized_axon.Name = Axon_name +'_neuron'
          folder.Add(discretized_axon)
      
      1 Reply Last reply
      1

      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