decor = arbor.decor() # Set the default properties. decor.set_property(Vm=-55) # Override the defaults. decor.paint('"custom"', tempK=270) decor.paint('"soma"', Vm=-50) # Paint density mechanisms. decor.paint('"all"', 'pas') decor.paint('"custom"', 'hh') decor.paint('"dend"', mech('Ih', {'gbar': 0.001})) # Place stimuli and spike detectors. decor.place('"root"', arbor.iclamp(10, 1, current=2), "iclamp0") decor.place('"root"', arbor.iclamp(30, 1, current=2), "iclamp1") decor.place('"root"', arbor.iclamp(50, 1, current=2), "iclamp2") decor.place('"axon_terminal"', arbor.spike_detector(-10), "detector") # Set cv_policy soma_policy = arbor.cv_policy_single('"soma"') dflt_policy = arbor.cv_policy_max_extent(1.0) policy = dflt_policy | soma_policy decor.discretization(policy)
'axon': '(tag 2)', # axon has tag 2 in swc files. 'dend': '(tag 3)', # dendrites have tag 3 in swc files. 'root': '(root)', # the start of the soma in this morphology is at the root of the cell. 'stim_site': '(location 0 0.5)', # site for the stimulus, in the middle of branch 0. 'axon_end': '(restrict (terminal) (region "axon"))' } # end of the axon. labels = arbor.label_dict(defs) decor = arbor.decor() # Set initial membrane potential to -55 mV decor.set_property(Vm=-55) # Use Nernst to calculate reversal potential for calcium. decor.set_ion('ca', method=mech('nernst/x=ca')) #decor.set_ion('ca', method='nernst/x=ca') # hh mechanism on the soma and axon. decor.paint('"soma"', 'hh') decor.paint('"axon"', 'hh') # pas mechanism the dendrites. decor.paint('"dend"', 'pas') # Increase resistivity on dendrites. decor.paint('"dend"', rL=500) # Attach stimuli that inject 4 nA current for 1 ms, starting at 3 and 8 ms. decor.place('"root"', arbor.iclamp(10, 1, current=5), "iclamp0") decor.place('"stim_site"', arbor.iclamp(3, 1, current=0.5), "iclamp1") decor.place('"stim_site"', arbor.iclamp(10, 1, current=0.5), "iclamp2") decor.place('"stim_site"', arbor.iclamp(8, 1, current=4), "iclamp3") # Detect spikes at the soma with a voltage threshold of -10 mV. decor.place('"axon_end"', arbor.spike_detector(-10), "detector")