First time here? Checkout the FAQ!
x
0 votes
by (330 points)
Hi all,
I was digging around in the tissue_calibrate tuneCV forcepss stack of code the other day and noticed something confusing I wanted to ask about.
eventually these things call back to tissue_limcyc which sets up the calls to tuneCV. In that setup, tissue_limcyc sets stim params of:
'--stimS', 500,
 '--stimV',
Which based on tuneCV I interpret as "do a voltage clamp at 500 strength",
But then I noticed in the actual output logs the voltage clamp is at 0, not 500, because tuneCV calls tuning.CVtuning which, when --stimV is set, hard codes a 0 volt clamp:

if self.stimV:
            # we clamp for 5 ms to be sure to initiate, if possible at all
            stim = ['-stimulus[%d].duration'%(idx),   5.,
                    '-stimulus[%d].stimtype'%(idx),   9,
                    '-stimulus[%d].strength'%(idx),   0. ]

So I was wondering if this should be changed or left alone? I suspect that the voltage clamp at 0 is sufficient to stimulate in most cases, but it does mean that any val passed to --stimS for either tissue_calibrate or tuneCV will have no effect. Or am I misunderstanding something here?

2 Answers

0 votes
by (500 points)
Hey Jake,

I'm not an expert regarding ForCEPPS, but I will raise the question in the dev meeting next week if it has not been answered by then.

Best,

Tobias
0 votes
by (540 points)
Hi Jake,
yes, you're right, the stimulus strength '--stimS' is ignored if the voltage-clamp flag
‘--stimV’ is set in tuneCV. As you commented, a voltage clamp at 0mV is sufficient
to trigger stimulation for most of the ionic models. But there are models, as I
learned the hard way, where 0mV is not a good choice because somewhere in
the code of the ionic model a scaling operation is performed with the inverse
strength and you end up with a division by zero and NaNs in the output. I
temporarily fixed the issue by changing the strength in the tuneCV code to
0.1mV (or -0.1mV).

To make a long story short: Yes, the value of the “--stimS” argument should also
be used for voltage clamps in tuneCV and the stimulus strength should also be
provided to the user in the ForCEPSSs framework.

It's on my TODO list, but not at the top.

BW - Matthias.
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...