Search found 50 matches

by rth
Fri Apr 26, 2024 12:05 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

I found a bug in my code. Here's my NET_RECEIVE function, which works without problems NET_RECEIVE (w) { LOCAL evt if (flag == 0) { : external event if (w > 0) { e_in = e_in + w } else { i_in = i_in - w } } if (flag == 2) { : compute next time step update() net_send(internal_dt, 2) evt = t + invl(e*...
by rth
Fri Apr 26, 2024 11:25 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

Here's an example My mod file NEURON { THREADSAFE ARTIFICIAL_CELL WilsonCowanStim_cmove RANGE internal_dt RANGE etau, itau RANGE eI12, eIscl RANGE iI12, iIscl RANGE wee, wei, wie, wii RANGE e, i RANGE e_inf, i_inf, e_in_tau, i_in_tau RANGE e_in, i_in :Generator BBCOREPOINTER donotuse RANGE ratescale...
by rth
Fri Apr 26, 2024 11:14 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

Here's how it looks. I use spikes from my multicompartment neurons to activate the WCS firing rate model. The plots below are: (1) on the very top are input spikes, (2) spikes under it are WCS spikes, (3) blue and orange curves are e and i firing rates of WCS model, and (4) the wcs.e_in variable is ...
by rth
Thu Apr 25, 2024 5:39 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

I have a bit of trouble with net_move, specifically when firing rates are high. It can miss events and then stops complitely. I would probably return to cspike counter. It generates lots of events, but somewhat more robust.

I'll try to make an example to show the problem.
by rth
Thu Apr 25, 2024 12:11 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

This will happen in the master branch of the repository
Should I compile locally? Will it be pushed to pip soon?
by rth
Thu Apr 25, 2024 11:49 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

What version of NEURON are you using The most fresh from pip. python Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from neuron import h >>> h.nrnversion() 'NEURON ...
by rth
Wed Apr 24, 2024 8:42 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

It behaves very strange, for example the code below works from numpy import * from neuron import h from matplotlib.pyplot import * wcs = h.WilsonCowanStim() wcs.ratescale = 200 wcs.e_inf = 1.5 rds = h.Random() rds.negexp(1) # set random # generator using negexp(1) - avg interval in NetStim sead = ra...
by rth
Wed Apr 24, 2024 8:21 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Re: Recording variables from ARTIFICIAL_CELL

Thank you, Ted, for your thoughts. The overall bulky construction is because the e-variable of the WC model controls the firing rate of the Poisson generator. Therefore, the rate needs to be updated, and a new time to the next spike needs to be recalculated. If the new time is 'sooner' than the prev...
by rth
Tue Apr 23, 2024 1:43 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 7147

Recording variables from ARTIFICIAL_CELL

I need to use the Wilson-Cowan Firing rate model as a counterpart to my multicompartment model. Borrowing some code from NetStim and ignoring that the e and i variables are inside the sigmoid function, I got something like this: NEURON { THREADSAFE ARTIFICIAL_CELL WilsonCowanStim RANGE internal_dt R...
by rth
Wed Jul 29, 2020 2:11 pm
Forum: Other questions
Topic: initialization of calcium concentration in a segment with attached point process
Replies: 5
Views: 14515

Re: initialization of calcium concentration in a segment with attached point process

Dear Ted, Thank you so much, for your very helpful comments and suggestions. I saw the problem with the INITIAL block in the CaDynamics_E2 module but somehow ignored it. We need to control cao, because, it seems extracellular calcium concentration drifts during the development period. I implemented ...
by rth
Mon Jul 27, 2020 1:59 am
Forum: Other questions
Topic: initialization of calcium concentration in a segment with attached point process
Replies: 5
Views: 14515

initialization of calcium concentration in a segment with attached point process

I have a model of a V1 pyramidal neuron, with simplified morphology. Somatic, basal and apical compartments have calcium channels and calcium dynamics. Zip archive with all mod files and test-model example can be downloaded here https://storage.r-a-r.org/index.php/s/jLCz6m4k3TXFgmK Only a few channe...
by rth
Sun Nov 24, 2019 10:54 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: where to declare cai and cao ?
Replies: 1
Views: 4111

where to declare cai and cao ?

Dear all, My question is somehow related to the Pascal's question https://www.neuron.yale.edu/phpBB/viewtopic.php?f=16&t=4084 because, it seems, I stumbled to a similar problems. I'm trying to play around with Iavarone's model, which uses the same old Destexhe's code https://senselab.med.yale.ed...
by rth
Tue Dec 11, 2018 11:53 am
Forum: Parallel NEURON
Topic: Strange NEURON behavior with multithreading
Replies: 0
Views: 19283

Strange NEURON behavior with multithreading

Dear NEURON developers, I have run into a very strange NEURON behavior, which I couldn't understand. It relates to the multithreading, but perhaps I did something stupid. I have a simple mod mechanisms UNITS { (mA) = (milliamp) (mV) = (millivolt) (mS) = (millisiemens) } NEURON { SUFFIX nak3dv02 NONS...
by rth
Thu Jul 13, 2017 1:43 am
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 16963

Re: Any simple way to identify parent segment of point porce

ramcdougal, I see your point.

Yes, you are right, it is tricky but may work. Actually very good idea. Of course, it is 'workaround', and it will be better to have a direct way inside NEURON+Python module, but it is nice to have a solution. Let me try :)
by rth
Thu Jul 13, 2017 1:31 am
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 16963

Re: Any simple way to identify parent segment of point porce

Very good point! Thank you!
But how will you use this list to setup point process? Maybe we can use float point position as segment #/nseg ? But this should link somehow to NEURON inner mechanism of position float point resolving.