Search found 45 matches

by ziemek
Fri Sep 15, 2023 7:05 am
Forum: NEURON hacks
Topic: Different Axial Resistance for different ions
Replies: 1
Views: 8575

Different Axial Resistance for different ions

Hey! Is it possible to somehow define different axial resistances (Ra) for different ions? I want to use it for simplified diffusion of calcium restricted by ER (and I don't want to use RxD), so I would like to have default Ra for all ions and Ra_ca2+ for calcium ions. I think we are dealing with no...
by ziemek
Tue Feb 01, 2022 8:36 am
Forum: The GUI
Topic: Shape plot update from Python
Replies: 4
Views: 8927

Re: Shape plot update from Python

If anybody has the same problem I will update this solution with the additional code you need to add before h.fast_flush_list.append(ps):

Code: Select all

h.load_file('stdrun.hoc')
otherwise you will have an error:

Code: Select all

AttributeError: 'hoc.HocObject' object has no attribute 'fast_flush_list'
by ziemek
Sat Jul 18, 2020 4:01 pm
Forum: NetPyNE
Topic: Reinforcement Learning with NetPyNE: a closed-loop with external stimulation
Replies: 1
Views: 12823

Reinforcement Learning with NetPyNE: a closed-loop with external stimulation

Hi there, After a great tutorial of NetPyNE done by Salvador Dura I wanted to extend my question from the chat :) I would like to make a simulation where I will stimulate a network in a closed-loop with external stimulation similar to Reinforcement Learning paradigm. So let's say I have: The network...
by ziemek
Sat Jul 18, 2020 3:34 pm
Forum: The GUI
Topic: Does the usage of the Shape may affect mV readouts?
Replies: 5
Views: 8474

Re: Does the usage of the Shape may affect mV readouts?

Sorry Ted, I tried to prepare the code for you and make sure that there is no interference from the core I wrote, but then I switched to a different task, and left it for later, but I will prepare the code next week and let you know.
by ziemek
Tue Jul 14, 2020 1:00 pm
Forum: Suggestions and Feedback
Topic: Wrong behavior of h.parent_connection()
Replies: 1
Views: 12543

Wrong behavior of h.parent_connection()

The function h.parent_connection() has wrong description and behavior: child.connect(parent(0.7), 0.0) h.parent_connection(child) # returns 0.0 child.parentseg().x # returns 0.7 Reference description of h.parent_connection() indeed points to the y value, however from the description you may expect t...
by ziemek
Sat Jul 11, 2020 6:13 am
Forum: NEURON + Python
Topic: Best practice to run hundreds of simulations / remove all objects between runs
Replies: 6
Views: 3556

Re: Best practice to run hundreds of simulations / remove all objects between runs

Thanks, that's an interesting comment. The problem arises with the Python object management and garbage collector. With simple objects, the removal is almost on demand, that's why you may see this scenario works well: class Experiment: def __init__(self): self.cell = Cell(name="cell") self...
by ziemek
Fri Jul 10, 2020 4:23 am
Forum: NEURON + Python
Topic: Best practice to run hundreds of simulations / remove all objects between runs
Replies: 6
Views: 3556

Re: Best practice to run hundreds of simulations / remove all objects between runs

Thanks, I will check the thread you mentioned. According to your own response from the last year (the first response to this thread): https://www.neuron.yale.edu/phpBB/viewtopic.php?f=2&t=1484&p=17633&hilit=delete_section#p17633 delete_section doesn't work in regular Python usage: You mu...
by ziemek
Thu Jul 09, 2020 3:34 pm
Forum: NEURON + Python
Topic: Best practice to run hundreds of simulations / remove all objects between runs
Replies: 6
Views: 3556

Re: Best practice to run hundreds of simulations / remove all objects between runs

It doesn't work for me. I created a custom object-oriented framework to manage NEURON's Python wrapper. So I have objects such as Cell, Simulation or Record. In a simplistic view, what I done looks like this: class Environment: def run(self): cell = Cell(name="cell") cell.add_sec(name=&quo...
by ziemek
Thu Jul 09, 2020 9:16 am
Forum: NEURON + Python
Topic: Best practice to run hundreds of simulations / remove all objects between runs
Replies: 6
Views: 3556

Best practice to run hundreds of simulations / remove all objects between runs

Hi there, I'm using Python wrapper. Before each run I would like to setup a fresh environment, so I want to remove all objects (sections, iclamps, netstims, point processes). Is there any way to do that? As indicated in the reference the function h.nrninit() is not helpful, so I see 3 ways: 1. Run e...
by ziemek
Fri Jul 03, 2020 9:47 am
Forum: The GUI
Topic: Does the usage of the Shape may affect mV readouts?
Replies: 5
Views: 8474

Re: Does the usage of the Shape may affect mV readouts?

Dear Ted, I checked once more the code and I discovered that I use cvode(True), which means that there is a variable timestep. My current readouts for the same model but different compartment are: constant timestep with shape: ms: 50.00000000000341 mV: -8.280244904579009 no shape: ms: 50.00000000000...
by ziemek
Mon Jun 29, 2020 6:29 am
Forum: The GUI
Topic: Does the usage of the Shape may affect mV readouts?
Replies: 5
Views: 8474

Does the usage of the Shape may affect mV readouts?

Hi there! I use a model of Combe et al. 2018: https://doi.org/10.1523/JNEUROSCI.0449-18.2018 https://senselab.med.yale.edu/modeldb/ShowModel?model=244416 When I removed all tmpo2 variable usage from cell_setup.hoc: link to the file: https://senselab.med.yale.edu/modeldb/ShowModel?model=244416&fi...
by ziemek
Fri Jan 31, 2020 6:15 am
Forum: NEURON + Python
Topic: For loop over section's segments in Python and HOC returns different values
Replies: 4
Views: 3298

Re: For loop over section's segments in Python and HOC returns different values

Thanks for the fast and detailed answer! However I work with Hay et al. 2011 model. In one file, they call distribute_channels() function: https://senselab.med.yale.edu/modeldb/showModel.cshtml?model=180373&file=/ShaiEtAl2015/models/L5PCbiophys5.hoc#tabs-2 $o1.distribute_channels("apic"...
by ziemek
Fri Jan 31, 2020 5:14 am
Forum: NEURON + Python
Topic: For loop over section's segments in Python and HOC returns different values
Replies: 4
Views: 3298

For loop over section's segments in Python and HOC returns different values

Hi! When I iterate over segments in a section using Python: [x for x in sec] I got the following values: [0.166667, 0.5, 0.833333] However if I iterate over the same section in HOC: for(x) {print x} I got: [0, 0.166667, 0.5, 0.833333, 1] So as you can see - the beginning and the end (0 and 1) are al...
by ziemek
Fri Jan 24, 2020 5:37 am
Forum: Parallel NEURON
Topic: multiple signals to a single POINT_PROCESS and thread safety of a POINTER.
Replies: 1
Views: 6765

multiple signals to a single POINT_PROCESS and thread safety of a POINTER.

Hi! I have a STDP-like POINT_PROCESS which I want to modulate with additional Dopamine stimulation (another POINT_PROCESS). I created a dummy da.mod POINT_PROCESS which only receives weight which is read by the STDP-like POINT_PROCESS (through POINTER). Then the weight on the dummy da.mod is zero-ou...
by ziemek
Wed Jan 08, 2020 7:26 pm
Forum: Modeling networks
Topic: Simulation with external feedback
Replies: 1
Views: 7496

Simulation with external feedback

I want to perform multiple runs for the same simulation. Between runs I want to give new stimulations to my neurons, but do not reset the simulation - the network (and its state) must remain the same. The motivation for this comes from the artificial neural network field (ANN). Just like for ANN you...