Search found 84 matches

by pascal
Fri Mar 27, 2020 10:41 pm
Forum: Modeling networks
Topic: Minimal parallel ring network
Replies: 2
Views: 22

Re: Minimal parallel ring network

Never mind, I found my stupid mistake: I forgot to connect the dendrite to the soma. I was tempted to take this post down to save the embarrassment, but I figured I'd leave it up for posterity (since I couldn't find the code for this Python parallelized ring network anywhere online). Here's the work...
by pascal
Fri Mar 27, 2020 6:14 pm
Forum: Modeling networks
Topic: Minimal parallel ring network
Replies: 2
Views: 22

Minimal parallel ring network

I'm trying to implement the code for a minimal parallel ring network, from the 2019 NEURON Course (I could not find the code anywhere online, so I adapted it from the course book). When I run the program (in serial, for now), for some reason the code to stimulate the 0th cell has no effect. When I p...
by pascal
Sun Mar 15, 2020 7:03 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

Perfect, thanks Robert. I see that your solution is exactly what I used before in the LinearMechanism implementation, but I thought it worked then only because I was passing a vector as the argument (i.e., I didn't realize that was the general way to dereference a pointer). Thanks again, and here's ...
by pascal
Wed Mar 11, 2020 4:27 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

I decided to try to implement the program I last posted using mod files, rather than LinearMechanism. I almost have it, except for an issue with the callback function similar to what I encountered a few posts ago. When I define the runtime_callback (to be used by extra_scatter_gather), I want to sen...
by pascal
Wed Mar 04, 2020 12:53 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

Ah, got it. The solution is to pass the vector 'y' to gnabar_callback, then access the 0th element within the function itself. The way I was doing it before, I was essentially just passing a constant value to gnabar_callback. Here's the updated code: from neuron import h from neuron.units import ms ...
by pascal
Tue Mar 03, 2020 1:32 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

Okay, thanks for the replies. I understand better what's going on with LinearMechanism now. I took the toy model from a few replies ago, and I'm trying to tweak it by adding an HH soma and having a dialogue between it and the firing rate model. I added a callback to LinearMechanism that gives the FR...
by pascal
Mon Mar 02, 2020 12:50 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

The LinearMechanism class looks very appealing, but I want to make sure I thoroughly understand it. A few questions: 1. I noticed in the documentation for LinearMechanism, there is the following warning: "Does not work with the CVODE integrator but does work with the differential-algebraic solver ID...
by pascal
Fri Feb 28, 2020 4:04 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Re: Incorporating a firing model to induce different stages of sleep

Thank you both very much! That will certainly get me started.
by pascal
Thu Feb 27, 2020 7:33 pm
Forum: Modeling networks
Topic: Incorporating a firing model to induce different stages of sleep
Replies: 13
Views: 213

Incorporating a firing model to induce different stages of sleep

I am developing a thalamocortical network model of sleep. Currently, various cortical ionic conductances (e.g. potassium currents) are altered by a "hand of God" that sets them to different values to induce different stages of sleep. I would like to develop the model so that the ionic conductances a...
by pascal
Thu Dec 05, 2019 1:03 am
Forum: Other questions
Topic: Computing LFP with use_fast_imem and extra_scatter_gather
Replies: 1
Views: 356

Re: Computing LFP with use_fast_imem and extra_scatter_gather

Never mind, I figured out the problem...I only printed out the LFP trace to three decimal places, and apparently the signal was so small that it required greater precision to see the fluctuations. Everything is working as it should.
by pascal
Wed Dec 04, 2019 2:51 pm
Forum: Other questions
Topic: Computing LFP with use_fast_imem and extra_scatter_gather
Replies: 1
Views: 356

Computing LFP with use_fast_imem and extra_scatter_gather

I have successfully implemented computation of the LFP in a previous network model using cvode.use_fast_imem and cvode.extra_scatter_gather (see https://www.neuron.yale.edu/phpbb/viewtopic.php?f=8&t=3656&p=15713&hilit=use_fast_imem+1#p15713 ) I am trying to use this same approach in a new network mo...
by pascal
Fri Oct 11, 2019 7:34 pm
Forum: Parallel NEURON
Topic: MPI simulation hangs
Replies: 1
Views: 892

Re: MPI simulation hangs

Upon further investigation, this appears to be an installation problem. I ran the exact same code on a different computer, and it had no issues running in parallel, completing the simulation perfectly (and giving identical results to a serial simulation). Both computers were running Windows 10, and ...
by pascal
Fri Oct 11, 2019 6:09 pm
Forum: Parallel NEURON
Topic: MPI simulation hangs
Replies: 1
Views: 892

MPI simulation hangs

I have a network simulation that runs just fine in serial, and it used to also work in parallel until I re-organized the code a bit (placing different classes in different files, and wrapping the code to actually run the simulation in its own function). The simulation periodically dumps data to file...
by pascal
Fri Jul 12, 2019 12:23 pm
Forum: NEURON + Python
Topic: Using FInitializeHandler to set initial voltages for a subset of cells
Replies: 2
Views: 800

Re: Using FInitializeHandler to set initial voltages for a subset of cells

Oh silly me, I need to use

pc.gid2cell(re_gid).soma.v=-61

Thanks Ted!
by pascal
Thu Jul 11, 2019 7:24 pm
Forum: NEURON + Python
Topic: Using FInitializeHandler to set initial voltages for a subset of cells
Replies: 2
Views: 800

Using FInitializeHandler to set initial voltages for a subset of cells

I am running a simulation in which I want all cells to be initialized to -68 mV, except for a subset of cells (RE cells), which I want to start at -61 mV. I've tried this code (where 'pc' is a ParallelContext object): def set_RE_voltages(): for re_gid in net.re_gidList: pc.gid2cell(re_gid).v=-61 if(...