Search found 33 matches

by ajpc6d
Wed Jun 05, 2024 7:42 pm
Forum: NEURON + Python
Topic: Using CVode with Short Pulse Stimuli
Replies: 0
Views: 100

Using CVode with Short Pulse Stimuli

I have a question related to my last post . From implementing different solvers, I learned that CVode().use_daspk() chooses its own time step sizes. (Right?) This is fine for stimuli in the normal physiological time range. When I try to stimulate the cell with pulses shorter than this, I get the NEU...
by ajpc6d
Tue Jun 04, 2024 8:22 pm
Forum: NEURON + Python
Topic: Setting and Confirming NEURON's Solver
Replies: 3
Views: 285

Re: Setting and Confirming NEURON's Solver

Update 4: I believe I've solved this. For anyone else facing the same problem, I recommend the following procedure: from neuron import h cvode = h.CVode() # let's say we want to activate the DASPK solver cvode.active(True) cvode.use_daspk(True) cvode.use_mxb(1) # I think this is optional, in that NE...
by ajpc6d
Tue Jun 04, 2024 7:18 pm
Forum: NEURON + Python
Topic: Setting and Confirming NEURON's Solver
Replies: 3
Views: 285

Re: Setting and Confirming NEURON's Solver

Update 3: Based on documentation here , I think (part of) the correct command order is: h.CVode().active(True) h.CVode().use_daspk(True) # or whatever solver you want.. This appears to produce (negligible) differences in simulation output with constant time step methods, suggesting the solver has no...
by ajpc6d
Wed May 29, 2024 12:22 pm
Forum: NEURON + Python
Topic: Setting and Confirming NEURON's Solver
Replies: 3
Views: 285

Re: Setting and Confirming NEURON's Solver

Update: I ran a percent error calculation comparing the results of all the solver settings in the post above. For all conditions except Crank-Nicholson, the error between any two solver settings is 0%. I interpret this to mean I have failed to actually change the solver, since I would expect at leas...
by ajpc6d
Fri May 24, 2024 12:11 pm
Forum: NEURON + Python
Topic: Setting and Confirming NEURON's Solver
Replies: 3
Views: 285

Setting and Confirming NEURON's Solver

I'm trying to compare the results of different solvers offered in NEURON. My strategy goes something like this: moi_switch = 1 match moi_switch: case 0: h.CVode().use_daspk() self.cell.integration_method = 'SUNDIALS - DASPK' case 1: h.secondorder = 2 self.cell.integration_method = 'Crank-Nicholson' ...
by ajpc6d
Fri Apr 12, 2024 12:47 pm
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1567

Re: NetStim causes SaveState crash

I think I need help understanding the relationship of h.run(), h.continuerun(), and h.tstop. Below is a snippet of your code containing calls for all three. def erun(): # prepdatastores() h.tstop = EPOCHDUR h.tstop_changed() myinit() # model-specific initialization for ii in range(NUM): h.continueru...
by ajpc6d
Mon Apr 08, 2024 4:23 pm
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1567

Re: NetStim causes SaveState crash

I've avoided hoc as much as I could thus far, so let me check that I understand what's happening between the .py and .ses files. pyrig.ses recreates the h.IClamp() instance (which can also be created in Python), the RunControl window, and the h.Graph() object. pysyndrive.ses creates the h.NetStim() ...
by ajpc6d
Fri Apr 05, 2024 11:00 am
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1567

Re: NetStim causes SaveState crash

I haven't yet been able to resolve this issue
by ajpc6d
Fri Mar 22, 2024 7:11 pm
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1567

NetStim causes SaveState crash

The code below is meant to run a simulation in small chunks (basically useless for the toy script here, but useful to control RAM consumption for very large datasets). The h.ExpSyn() / h.NetStim() / h.NetCon() trio causes NEURON to deliver the error message NEURON: ExpSyn[0] :Event arrived out of or...
by ajpc6d
Thu Mar 21, 2024 6:33 pm
Forum: Other questions
Topic: Results Don't Converge with Decreasing Time Step
Replies: 3
Views: 811

Re: Results Don't Converge with Decreasing Time Step

zip up just enough code to reproduce what you describe Will do, I thought it may have more to do with NEURON than any specific code chunk. If you're really concerned about numerical accuracy, use secondorder and a dt of 0.001 ms, or use adaptive integration (but make sure that the various states' e...
by ajpc6d
Mon Mar 18, 2024 12:58 pm
Forum: Other questions
Topic: Results Don't Converge with Decreasing Time Step
Replies: 3
Views: 811

Results Don't Converge with Decreasing Time Step

Why would NEURON give different results when I vary the time step outside the stimulus period? Below, I contextualize this question in the abstract, but I can provide a code example if necessary. My situation: I have an extremely short-duration E-field pulse I'm applying to a neuron model to assess ...
by ajpc6d
Tue Oct 24, 2023 2:22 pm
Forum: Other questions
Topic: CTNG Support
Replies: 0
Views: 31341

CTNG Support

The CTNG Python tool to convert .swc data to watertight 3D models (introduced in 2013 here: https://www.sciencedirect.com/science/article/abs/pii/S0165027013003221) appears not to have been updated in some time. On my machine, I seem to be required to roll a few packages back to much earlier version...
by ajpc6d
Thu Aug 17, 2023 10:06 am
Forum: NEURON + Python
Topic: Play Stimulus Vectors Sequentially During Run-time
Replies: 2
Views: 16962

Re: Play Stimulus Vectors Sequentially During Run-time

Done - thanks so much
by ajpc6d
Tue Aug 15, 2023 3:28 pm
Forum: NEURON + Python
Topic: Play Stimulus Vectors Sequentially During Run-time
Replies: 2
Views: 16962

Play Stimulus Vectors Sequentially During Run-time

This code is a proof-of-principle experiment in playing a vector into a point process/distributed mechanism during run-time. (Reason: for extremely complex stimuli, the entire stimulus cannot be contained in memory at once. To circumvent this limitation, the stimulus will be calculated in chunks pas...
by ajpc6d
Fri Aug 11, 2023 10:26 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Stimulus Activation/Deactivation in NMODL
Replies: 3
Views: 17404

Re: Stimulus Activation/Deactivation in NMODL

From https://nrn.readthedocs.io/en/latest/python/modelspec/programmatic/network/netcon.html#NetCon , I see The target must be a POINT_PROCESS or ARTIFICIAL_CELL that defines a NET_RECEIVE procedure. From the NMODL reference book*, I see An onset event, generated by the system when the connecting Net...