You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The different resting membrane potentials in the apical_tuft and soma of the L5 pyramidal cells cause a non-zero dipole at rest. Additionally, the compartments are not initialized at their resting membrane potentials, which causes an initial "drift" in the dipole.
This baseline correction will not work for new models.
I understand we don't want to add a baseline correction to each simulation based on a buy-in interval, as this would add a lot of time and compute to each simulation.
As a current work-around, I have run my new model for 5 seconds (could do 10) without any inputs, stored the L2 and L5 dipoles and time vector in a .json file, which is then subtracted during a baseline correction.
def _baseline_renormalize_ca(self):
"""Baseline correction based on calcium model without drives"""
hnn_core_root = op.dirname(hnn_core.__file__)
# load the baseline dipole
with open(op.join(hnn_core_root, 'param', 'bsl_dipole_ca.json'), 'r') as f:
bsl_dpl = json.load(f)
# subtract baseline dipole from the current dipole
for i,t in enumerate(self.times):
bsl_idx = np.argmin(np.abs(bsl_dpl['times'] - t))
self.data['L2'][i] -= bsl_dpl['L2'][bsl_idx]
self.data['L5'][i] -= bsl_dpl['L5'][bsl_idx]
self.data['agg'] = self.data['L2'] + self.data['L5']
I have further added an option to simulate_dipole to select a baseline correction method, which defaults to jones (the original correction)
The different resting membrane potentials in the apical_tuft and soma of the L5 pyramidal cells cause a non-zero dipole at rest. Additionally, the compartments are not initialized at their resting membrane potentials, which causes an initial "drift" in the dipole.
The baseline correction is hard-coded in
dipole.py
https://github.com/jonescompneurolab/hnn-core/blob/master/hnn_core/dipole.py#L611This baseline correction will not work for new models.
I understand we don't want to add a baseline correction to each simulation based on a buy-in interval, as this would add a lot of time and compute to each simulation.
As a current work-around, I have run my new model for 5 seconds (could do 10) without any inputs, stored the L2 and L5 dipoles and time vector in a .json file, which is then subtracted during a baseline correction.
I have further added an option to
simulate_dipole
to select a baseline correction method, which defaults tojones
(the original correction)Again, this is just a work-around that works for my current purposes, and I'm happy to discuss ideas for a more permanent solution.
The text was updated successfully, but these errors were encountered: