-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BBPBGLIB-1059] Integrate Oren's gap junction compensation procedure into neurodamus #195
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Logfiles from GitLab pipeline #230322 (:white_check_mark:) have been uploaded here! Status and direct links: |
tests/scientific/test_simulation.py
Outdated
"load_g_pas_file": "/gpfs/bbp.cscs.ch/project/proj55/amsalem/gap_junctions/circ19_11_2019_gjs_19_20_20/rm_correction/Circ_mc2_Rt_Remove_ch_all_Det_stoch_True_Dis_holding_False_Correc_type_impedance_tool_Cm0p01_Num_iter_10/num_0/g_pas_passive.hdf5", # noqa | ||
"manual_MEComboInfo_file": "/gpfs/bbp.cscs.ch/project/proj55/amsalem/gap_junctions/circ19_11_2019_gjs_19_20_20_new_holding/find_holding_current/vc_ampFile/Circ_mc2_Rt_Remove_ch_none_Det_stoch_True_Dis_holding_False_gjc0p2_Change_mecomb_False_manual_MEComboInfoFile_False_Load_g_pas_True_Correc_iter_loadlast/num_0/holding_per_gid.hdf5" # noqa | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WeinaJi : Just a comment: at a minimum, we should move this to proj12?
In general, as we want to move the CI out of gitlab / BB5 very soon, it would be good to have tests that are not dependent on BB5/GitLab. Because very soon, we need to work on removing gitlab dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was my comment also, would be nice to avoid depending on bb5 for the tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes sure, for this test I will create small, local and dummy calibration files to read as I am not test the final results.
General comment: |
Hi @WeinaJi I think it looks good, but is there a way to test it? |
Very cool, a bit off-topic, but there is also the code that generates the GJs and use them. I'll try to get it on github and we can refer to it. |
Thinking about the time left, I am inclined to merge them in |
Hello @orena1 , can you access our
The config file
An example from my test config file Also cc @PolinaL |
That will be great. Please let me know if you would like to push something in this repo. I can give you the write permission. In fact, I have another version of your script which includes these commented code:
Is it still needed? I can't find the script |
import logging | ||
import numpy as np | ||
import pickle | ||
from neurodamus.core import MPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from neurodamus.core import MPI | |
from .core import MPI |
|
||
|
||
def _update_gpas(node_manager, filename, gjc, correction_iteration_load): | ||
import h5py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: maybe we would better import h5py at module level. It is not really optional, right?
def _update_gpas(node_manager, filename, gjc, correction_iteration_load): | ||
import h5py | ||
processed_cells = 0 | ||
g_pas_file = h5py.File(filename, 'r') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick:
maybe there should be some error handling here? (same below)
try:
g_pas_file = h5py.File(filename, 'r')
except IOError as e:
raise ConfigurationError(f"Error opening....: {e}")
Context
Integrate Oren's compensation script for gap junction synapses into the neurodamus main flow. Uses are expected to use predefined parameters in the SONATA simulation config files to configure the correction steps and values. In this PR, those parameters are stored in the experimental "beta_features" section of the SONATA config files. The corresponding formal SONATA parameters are to be determined in the SONATA specifications, the libsonata parser, and the future PR in neurodamus.
Scope
At the
finalize
step forGapJunctionManager
, if users set the rightgapjunction_target_population
, the user corrections defined in the new filegj_user_functions.py
will be triggered. This file is implemented based on Oren's script which was used for Elisabetta's publication (/gpfs/bbp.cscs.ch/project/proj55/software/gap_junctions/pylibs/manager_python.py
). It provides these corrections to be enabled by users via the SONATA simulation config file:"determanisitc_stoch"
"gjc"
"remove_channels"
g_pas
to fit thegjc
with values set by the calibration file given in the simulation config file"load_g_pas_file"
"manual_MEComboInfo_file"
"vc_amp"
and meanwhile save the SEClamp DataThose SONATA parameters are chosen based on the setting in Elisabetta's publication
/gpfs/bbp.cscs.ch/project/proj55/iavarone/releases/simulations/spontaneous_evoked/CorrectCTFiberAll_Backgroundwith_afferents_MLNoise25_CTNoise4/MLStim4/MLNoise0/CTNoise0/settings.p
for which corrections 1,2,4,5 were used.Testing
New test
test_v5_gap_junction_corrections
intest/scientific/test_simulation.py
Review