Skip to content
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

add synapse spike replay #55

Merged
merged 10 commits into from
Jul 25, 2023
Merged

add synapse spike replay #55

merged 10 commits into from
Jul 25, 2023

Conversation

anilbey
Copy link
Contributor

@anilbey anilbey commented Jul 18, 2023

Changes

  • _add_connection function is simplified before adding any change into the code
  • an important bug is identified and fixed, it was keeping _add_connections from accessing the correct node in a multi population setting
  • implements synapse_replay
  • update: fixed node resolution. source and target must be node_sets not node_populations

Missing feature [implemented]:

Node set resolution is missing.
node_sets can have aliases

"HipProjections": {
"population": "hippocampus_projections"
},

our synapse replay works with hippocampus_projections but it cannot realise HipProjections is the same.

Results:

Input

    "VPM_spikes": {
      "source": "HipProjections",
      "node_set": "most_central_10_SP_PC",
      "input_type": "spikes",
      "delay": 0.0,
      "duration": 300.0,
      "module": "synapse_replay",
      "spike_file": "tests/examples/sonata_unit_test_sims/synapse_replay/synapse_replay.dat"
      }

The results are from the added test_add_synapse_replay

BEFORE

before-synapse-replay

AFTER

after_synapse_replay

@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@9b541e0). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage        ?   79.82%           
=======================================
  Files           ?       72           
  Lines           ?     4906           
  Branches        ?        0           
=======================================
  Hits            ?     3916           
  Misses          ?      990           
  Partials        ?        0           

@anilbey anilbey changed the title [draft] add synapse spike replay add synapse spike replay Jul 21, 2023
@anilbey anilbey requested a review from wvangeit July 21, 2023 15:28
@anilbey anilbey changed the base branch from main to dev July 25, 2023 14:53
@anilbey anilbey merged commit e7a5e1b into dev Jul 25, 2023
7 checks passed
@anilbey anilbey deleted the spikereplay branch July 25, 2023 14:53
@markovg
Copy link
Contributor

markovg commented Jul 26, 2023

Thanks for implementing spike replay! This is very useful for us! One question: A great usecase is to "re-run" single cell simulations in the context of a former neurodamus circuit run. I recall the legacy bglibpy had essentially perfect agreement with neurodamus voltage traces. Is this currently the case with BluweCelluLab? We're trying it out now on our end, but can't seem to get it to work. I would seem like the OU process rng seeds are not the same ... Could you offer some insight as to this is a known issue or if its expected to work? Thanks!

@anilbey
Copy link
Contributor Author

anilbey commented Jul 27, 2023

Hi @markovg , happy to hear the spike replay feature will be useful for you and thanks for the feedback.

One question: A great usecase is to "re-run" single cell simulations in the context of a former neurodamus circuit run. I recall the legacy bglibpy had essentially perfect agreement with neurodamus voltage traces

Yes we are still aiming for having a consistent output with neurodamus. To this end, the CI check called "ci/gitlab/bbpgitlab.epfl.ch" is triggering the scientific tests on our internal cluster. Those are comparing the neurodamus runs with bluecellulab runs to ensure voltage traces agree.

There are currently 110 tests and all pass. Those include the 2 OU simulations below.

  • PASSED tests/test_ssim_gpfs.py::test_relative_ornstein_uhlenbeck
  • PASSED tests/test_ssim_gpfs.py::test_ornstein_uhlenbeck

We're trying it out now on our end, but can't seem to get it to work. I would seem like the OU process rng seeds are not the same.

It may be the case that our tests are not covering your use-case (which is a very useful feedback for us). I would like to ask a few questions to narrow down the possibilities.

  1. Are you using a SONATA simulation? If yes, is it a multi-node simulation or single-node? Can you replicate the issue on a single cell?
  2. One usual suspect is the NEURON legacy units. This issue has occurred in some previous OU simulation. Could you check if the modern or legacy units are used?
  3. What other features are you using besides OU? Does the issue still persist when you disable the other features but keep only a single OU stimulus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants