Search found 6286 matches

by ted
Mon Jan 08, 2024 2:03 pm
Forum: Other questions
Topic: Implementing extracellular stimulation
Replies: 13
Views: 51949

Re: Extracellular stimulation and recording

Apologies for the double post, tried to edit and messed it up. OK, double post is now gone. BTW I'm an expert on messing up edits of posts. By "put in an electrode", I meant apply an extracellular stimulus. Got it. The reason for trying to get a different segment division of the model due...
by ted
Fri Jan 05, 2024 12:37 am
Forum: Other questions
Topic: Implementing extracellular stimulation
Replies: 13
Views: 51949

Re: Extracellular stimulation and recording

I am working on a code where I extract small compartments of a model cell and put in an electrode (could be an IClamp? unsure about it) in each of the compartment. What do you mean by "put in an electrode"? Are you trying to inject current into the model cell, or are you trying to apply a...
by ted
Sat Dec 16, 2023 1:29 am
Forum: The GUI
Topic: Programmatic GUI control (pressing buttons, etc.)
Replies: 3
Views: 15387

Re: Programmatic GUI control (pressing buttons, etc.)

NEURON's existing GUI is implemented with InterViews, which doesn't offer such functionality. There has been some work to develop a new GUI, but most development efforts have focussed on performance, taking advantage of new CPU architectures, code reorganization, and improving the development proces...
by ted
Fri Dec 15, 2023 12:25 pm
Forum: Modeling networks
Topic: How to record variables of SEClamp adding to a soma?
Replies: 1
Views: 14624

Re: How to record variables of SEClamp adding to a soma?

First, let me thank you for your interest in using NEURON in your work. It looks like you already have significant experience with MATLAB. Now the good news. While your code isn't a "textbook example of best usage of hoc," it _is_ running properly--including recording the time course of va...
by ted
Wed Dec 13, 2023 4:26 pm
Forum: Other questions
Topic: Re: Extracellular stimulation and recording
Replies: 1
Views: 10422

Re: Extracellular stimulation and recording

direct current model of transcutaneous electrical stimulation of the spinal cord. The volume conductor model was thought to be purely resistive, with multiple layers of tissues (skin, muscles, bones, etc.). COMSOL was used to simulate the electric field induced in the spinal cord. . . . how can I a...
by ted
Wed Dec 13, 2023 3:10 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 69247

Re: Conditional termination of simulation

how do I adapt the line nc.record(spikehappened)? I can specify the input arguments like using nc.record((spikehappened,(tsp, count, isi, previsi))), but how do I specify the outputs? Excellent question. I don't have an answer for it. If there is such an answer, maybe someone more knowledgable abou...
by ted
Tue Nov 28, 2023 2:43 pm
Forum: Other questions
Topic: Applying Sinusoidal Voltage to Membrane
Replies: 6
Views: 38106

Re: Applying Sinusoidal Voltage to Membrane

I am trying to force the extracellular potential to follow a particular time course. . . . I want to apply a sine pulse with a amplitude of 1 V. So the electrode-tissue interface is not a part of your conceptual model. Instead, it is assumed that it is possible to force extracellular potential to a...
by ted
Mon Nov 27, 2023 11:17 am
Forum: NEURON + Python
Topic: User defined function to set play vectors
Replies: 2
Views: 25081

Re: User defined function to set play vectors

Can anyone explain why these variables need to be available outside the scope of my function? "Can anyone"? Sure--and in particular, you. Create some variable x inside a function and assign it a value. Exit the function without passing the value of x to an external variable. Then try usin...
by ted
Mon Nov 20, 2023 1:23 pm
Forum: NEURON + Python
Topic: Issue with SaveState
Replies: 2
Views: 11833

Re: Issue with SaveState

Quoting from the documentation of SaveState, which you will find at nrn.readthedocs.io: Between a save and a restore, it is important not to create or delete sections, NetCon objects, or point processes. Do not change the number of segments, insert or delete mechanisms, or change the location of poi...
by ted
Mon Nov 20, 2023 1:07 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 69247

Re: Conditional termination of simulation

Well, "crude but effective" is still effective. An alternative is to explicitly pass all variables whose values are to be changed as arguments, and return them as results, like so: a = somevalue b = someothervalue c = yetanothervalue def foo(a, b, c): . . . statements that change a, b, and...
by ted
Wed Nov 15, 2023 11:43 pm
Forum: Other questions
Topic: Applying Sinusoidal Voltage to Membrane
Replies: 6
Views: 38106

Re: Applying Sinusoidal Voltage to Membrane

OK, three more questions, and then we can move on to specific suggestions for you. Are you assuming that the extracellular medium is purely resistive? Do you already have the time course of extracellular potential that you want to apply to the axon? Which programming language do you prefer to use in...
by ted
Tue Nov 14, 2023 3:50 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 69247

Re: Conditional termination of simulation

Good try. There is no need to write any NMODL code--everything can be done with hoc or Python or a combination of the two. Here's an example that assumes the existence of a section called soma with 100 um2 surface area and hh membrane properties. Omitted is the "from neuron import h, gui" ...
by ted
Tue Nov 14, 2023 11:36 am
Forum: Other questions
Topic: Applying Sinusoidal Voltage to Membrane
Replies: 6
Views: 38106

Re: Applying Sinusoidal Voltage to Membrane

First you need to decide exactly what you are trying to do. This "apply a sinusoidal voltage to vary the membrane potential over time" means you want to force membrane potential to follow a specific time course. That is best done with a voltage clamp--specifically, an instance of NEURON's ...
by ted
Fri Nov 10, 2023 12:48 pm
Forum: Modeling networks
Topic: neuronal response to magnetically induced electric fields
Replies: 4
Views: 26441

Re: neuronal response to magnetically induced electric fields

So changes to nrnivmodl since NEURON 7.8 have interfered with NEMO. Where did you find NEMO and what is the paper that presents this tool? I wonder if its developers would be interested in making it work under the latest version of NEURON, if that doesn't require too much of their effort.
by ted
Sun Nov 05, 2023 1:18 am
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 69247

Re: Conditional termination of simulation

Use events. Specifically, 1. use an FInitializeHandler to set the spike count to 0 at the start of the simulation 2. usethe NetCon class's record() method to call a function every time the cell spikes. This function should do the following: increase the spike count by 1 if spike count == 1 tnow = t ...