Search found 116 matches

by pascal
Thu Oct 03, 2024 11:34 pm
Forum: Anatomically detailed models
Topic: Determining distance from soma along apical dendrite
Replies: 7
Views: 50703

Re: Determining distance from soma along apical dendrite

Excellent, everything is working perfectly now. Thanks so much, Ted!
by pascal
Thu Oct 03, 2024 2:45 pm
Forum: Anatomically detailed models
Topic: Determining distance from soma along apical dendrite
Replies: 7
Views: 50703

Re: Determining distance from soma along apical dendrite

Thanks, Ted, this sounds like exactly the tool I need. However, I am still running into a very basic problem (exposing my ignorance related to using the NEURON GUI). I assume that to use this Shape Name tool, I need to have created an instance of the model cell in question. I tried to do this by ope...
by pascal
Fri Sep 27, 2024 6:36 pm
Forum: Anatomically detailed models
Topic: Determining distance from soma along apical dendrite
Replies: 7
Views: 50703

Re: Determining distance from soma along apical dendrite

Thanks, Ted, that is really helpful. Here's the Python code I wrote to implement your pseudocode: from neuron import h h.load_file('pyr.hoc') cell = h.CA1_PC_cAC_sig() target_dist = 250 #um for sec in cell.apical: #'apical' is a SectionList defined in pyr.hoc # use distance function to determine dis...
by pascal
Thu Sep 26, 2024 1:02 am
Forum: Anatomically detailed models
Topic: Determining distance from soma along apical dendrite
Replies: 7
Views: 50703

Determining distance from soma along apical dendrite

I am working with a pyramidal cell in a recently published study by Ponzi et. al. ( https://modeldb.science/267686?tab=2&file=scanzres/pyr.hoc ). It is my first time working with morphometric data (defined in this file: https://modeldb.science/267686?tab=2&file=scanzres/morphology/oh140807_A...
by pascal
Thu Aug 15, 2024 4:55 pm
Forum: NEURON + Python
Topic: Using a hoc cell template with Python
Replies: 3
Views: 20313

Re: Using a hoc cell template with Python

Thanks, Ted, I really appreciate the thorough explanation. That all makes perfect sense, and my simulation is now running without issue. Thanks again.
by pascal
Wed Aug 14, 2024 12:59 pm
Forum: NEURON + Python
Topic: Using a hoc cell template with Python
Replies: 3
Views: 20313

Using a hoc cell template with Python

I am trying to run a basic simulation using the cell defined in pyr.hoc from https://modeldb.science/267686?tab=2 . I would like to load the hoc file, then use Python to run the simulation. So far, I have the following code: from neuron import h h.load_file('pyr.hoc') cell = h.CA1_PC_cAC_sig() Iext ...
by pascal
Fri May 31, 2024 4:47 pm
Forum: MSWin
Topic: Python cannot import neuron library on Windows install
Replies: 9
Views: 83071

Re: Python cannot import neuron library on Windows install

I just had this issue crop up again as well. Good catch with the Python version number. Like you, with Python 3.12 I could not import neuron. But then I reverted to Python 3.9, and this solved the problem. Are you able to simply go back to an earlier Python version, at least until they update NEURON...
by pascal
Wed May 29, 2024 5:06 pm
Forum: Modeling networks
Topic: Incorporating STDP in a network
Replies: 1
Views: 28816

Re: Incorporating STDP in a network

I found the answer to my second question. In section 10.1.7.5 of The NEURON Book (describing the NET_RECEIVE block of a mod file), it states, "every event has an implicit argument called flag, the value of which is automatically 0 for an external event." It would still be very nice if some...
by pascal
Tue May 28, 2024 8:05 pm
Forum: Modeling networks
Topic: Incorporating STDP in a network
Replies: 1
Views: 28816

Incorporating STDP in a network

I am attempting to incorporate STDP in a network model, and I am starting with a two-neuron network in which I want to incorporate a very simple STDP model. Reading around, I see various references to a mod file for STDP written ages ago by Michael Hines (e.g., https://www.neuron.yale.edu/phpbb/view...
by pascal
Fri May 24, 2024 3:23 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 40299

Re: Recording variables from ARTIFICIAL_CELL

I am just starting out using artificial cells, so I found this post very helpful. In case anyone is interested, below is a very basic program that implements a version of Ted's pseudocode in Python. Note that I did not have to update intfire1.mod, as it appears to already have the code for calculati...
by pascal
Wed Dec 13, 2023 5:15 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 144906

Re: Conditional termination of simulation

Thanks, Ted, that makes sense that this would be useful for the purposes of a GUI. Maybe Robert can help with the other question...
by pascal
Thu Dec 07, 2023 7:31 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 144906

Re: Conditional termination of simulation

I decided I couldn't live with myself if I didn't try to implement the more acceptable approach you suggested (passing all variables as arguments, and then returning them). However, I'm running into some trouble with syntax. I can change spikehappened to the following: def spikehappened(tsp, count, ...
by pascal
Tue Dec 05, 2023 4:09 pm
Forum: NEURON + Python
Topic: Issue with SaveState
Replies: 2
Views: 45902

Re: Issue with SaveState

Okay, I guess I'll just be more careful in using SaveState. And this actually cleared up my other question, too. Thanks, Ted!
by pascal
Fri Nov 17, 2023 7:42 pm
Forum: NEURON + Python
Topic: Issue with SaveState
Replies: 2
Views: 45902

Issue with SaveState

I am having a few issues using h.SaveState(). First, I've found that switching the order of recording vector statements results in the program crashing when trying to restore. Here is my code (which the BallandStick class from https://neuron.yale.edu/neuron/docs/ball-and-stick-model-part-1 ), which ...
by pascal
Fri Nov 17, 2023 7:32 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 144906

Re: Conditional termination of simulation

Thanks, Ted, that worked like a charm! I hadn't thought to use global variables, and that is a perfectly acceptable solution for my purposes. Appreciate the help.