fscan is a function used for a single file opened with the ropen function (File.ropen is different).
If you are instead using the File class, then you'll want the scanvar method instead.
Search found 267 matches
- Wed Mar 25, 2020 3:10 pm
- Forum: Other questions
- Topic: Problem with fscan (SOLVED)
- Replies: 2
- Views: 6838
- Wed Mar 18, 2020 10:12 am
- Forum: Getting started
- Topic: Is Mersenne Twister RNG available in NEURON
- Replies: 2
- Views: 8872
Re: Is Mersenne Twister RNG available in NEURON
Random123 is a high-quality PRNG available from Python/HOC/NMODL in NEURON. It has the additional advantage of providing a large number of independent random streams parameterized by 3 numbers; this is extremely convenient for creating reproducible randomness that works in a parallel computing envi...
- Sun Mar 15, 2020 6:36 pm
- Forum: Other questions
- Topic: Action Potential propagation
- Replies: 3
- Views: 6233
Re: Action Potential propagation
1. Point models are fine. If you want biophysical kinetics, just use a section with nseg=1. If you want something more like an integrate-and-fire type cell, use one of the built-in types (e.g. IntFire, IntFire2, IntFire4), find one on ModelDB, or create your own with a MOD file of type ARTIFICIAL_CE...
- Sun Mar 15, 2020 11:32 am
- Forum: Modeling networks
- Topic: Incorporating a firing model to induce different stages of sleep
- Replies: 14
- Views: 20303
Re: Incorporating a firing model to induce different stages of sleep
Dereference a NEURON pointer using [0]. e.g.
This also works in C/C++; the way to think of it is that referring to an array is the same as referring to a block of memory.
Code: Select all
>>> from neuron import h
>>> h.t = 17
>>> print(h._ref_t[0])
17.0
- Sun Mar 15, 2020 11:28 am
- Forum: OS X
- Topic: NRNGUI not working from command line after switch to zsh
- Replies: 10
- Views: 24229
Re: NRNGUI not working from command line after switch to zsh
Zsh has two things that are roughly equivalent to .bashrc (and .bash_profile): .zshrc and .zshenv (both of these files go in your home folder; they may or may not already be there). .zshrc is only used by interactive shells, and .zshenv is used by all shells, interactive or not. Thus you probably wa...
- Tue Mar 03, 2020 1:53 pm
- Forum: Modeling networks
- Topic: Incorporating a firing model to induce different stages of sleep
- Replies: 14
- Views: 20303
Re: Incorporating a firing model to induce different stages of sleep
Without looking closely at this or directly answering your question, my immediate thought is to wonder if lm_callback gets a meaningful value of y? You can avoid doing callbacks at every time step (and thus have a faster simulation) by using a StateTransitionEvent to do an action whenever a variable...
- Tue Mar 03, 2020 11:27 am
- Forum: Modeling networks
- Topic: Incorporating a firing model to induce different stages of sleep
- Replies: 14
- Views: 20303
Re: Incorporating a firing model to induce different stages of sleep
For (1): That's a statement about the variable step solver and does not directly apply to using the fixed step solver. However: above the example, there's also a statement about the fixed step solver, which LinearMechanism forces to use a matrix solver by Kundert (because adding arbitrary equations...
- Tue Mar 03, 2020 8:34 am
- Forum: NEURON + Python
- Topic: Using vectors as arguments for pt3dadd
- Replies: 2
- Views: 5748
Re: Using vectors as arguments for pt3dadd
There are two ways to define 3D points. The more object-oriented way is to use sections, e.g. soma.pt3dadd(x, y, z, d) Unfortunately, that way requires numbers for the arguments. The older (and, apparently, more flexible in that it supports Vectors) way uses h and requires a sec= argument; in partic...
- Fri Feb 28, 2020 11:37 am
- Forum: Modeling networks
- Topic: Incorporating a firing model to induce different stages of sleep
- Replies: 14
- Views: 20303
Re: Incorporating a firing model to induce different stages of sleep
You can also do this using the LinearMechanism class. LinearMechanism solves vector ODEs of the form: c y' + gy = b In particular, let's consider the simple firing rate model: tau * y' + decay * y = f(I(t)) For this example, we suppose that I(t) and hence f(I(t)) are known in advance; this allows us...
- Fri Feb 28, 2020 10:50 am
- Forum: Reaction-diffusion in NEURON
- Topic: Multicomp model, ECS, pumps and strange concentrations
- Replies: 3
- Views: 9494
Re: Multicomp model, ECS, pumps and strange concentrations
Okay, so the fundamental situation is as follows: dend00 and dend11 both have the pump as defined by a mod file: dend00.insert('pump') ... dend11.insert('pump') This means that x and the pump dynamics must exist in both of these sections. cyt is defined only on dend00: cyt = rxd.Region(dend00, name=...
- Thu Feb 27, 2020 11:13 am
- Forum: Reaction-diffusion in NEURON
- Topic: Multicomp model, ECS, pumps and strange concentrations
- Replies: 3
- Views: 9494
Re: Multicomp model, ECS, pumps and strange concentrations
I made a quick attempt to reproduce this, but was unsuccessful (in the sense that no mass was created). Can you compare your version to mine and tell me how we differ? from neuron import h, rxd from neuron.units import mV, ms h.load_file('stdrun.hoc') soma = h.Section(name='soma') dend0 = h.Section(...
- Wed Feb 26, 2020 3:50 pm
- Forum: Parallel NEURON
- Topic: Is the CVode class implemented so that it scales well with many nodes?
- Replies: 2
- Views: 9374
Re: Is the CVode class implemented so that it scales well with many nodes?
CVode is an adaptive algorithm that chooses time steps to give results within a specified error tolerance . Thus it will use small timesteps when things are changing rapidly (e.g. synaptic input, during an action potential) and larger timesteps where they are not. To get the same accuracy out of fix...
- Wed Feb 26, 2020 9:46 am
- Forum: NEURON + Python
- Topic: Vector Values
- Replies: 2
- Views: 2225
Re: Vector Values
I suspect if you look at t, v, etc, you would find that they're lists of Vectors (or maybe but probably not strings), whereas the code you found on the NEURON site assumes them to be lists/vectors of floats. i.e. what is returned in t_, v_, etc is likely Vectors showing the full time course of the v...
- Wed Feb 19, 2020 5:13 pm
- Forum: UNIX/Linux
- Topic: How do I collect data for plots without IV
- Replies: 4
- Views: 17338
Re: How do I collect data for plots without IV
There's also a HOC version of the programmer's reference at: https://www.neuron.yale.edu/neuron/stat ... index.html
- Wed Feb 05, 2020 9:32 am
- Forum: Reaction-diffusion in NEURON
- Topic: length scales and SparseEfficiencyWarning
- Replies: 5
- Views: 11580
Re: length scales and SparseEfficiencyWarning
That's very weird because there's nothing wrong with h('{sw4=new PlotShape(0)}') by itself. There's no way there's a weird character in there, is there? (Non-breaking space, that sort of thing?) Otherwise, my guess is that something badly destabilized NEURON before you got that far. If you're willin...