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

Prepare extracellular potential demo for LFPy (Python) #1036

Closed
halfflat opened this issue May 14, 2020 · 16 comments · Fixed by #1652
Closed

Prepare extracellular potential demo for LFPy (Python) #1036

halfflat opened this issue May 14, 2020 · 16 comments · Fixed by #1652
Assignees
Labels
co-sim Related to co-simulation work / SGA3 T5.5 enhancement python

Comments

@halfflat
Copy link
Contributor

Arbor may be able to be well utilized as a back-end for LFPy. As a first step, we will make a simple demo in Python that computes the potential at a fixed set of electrode sites from a single morphologically detailed neuron.

Model NEURON python code: pure_neuron_example.py.txt

Once #1034 is merged, we'll need to:

  • expose trans membrane current probes and sample data in Python interface, together with metadata;
  • use the single-cell Python API to model and run a neuron such as in the example code;
  • and in anticipation of running multiple neurons, we will need to implement exact sample timing.
@halfflat halfflat self-assigned this May 14, 2020
@halfflat halfflat added the co-sim Related to co-simulation work / SGA3 T5.5 label May 14, 2020
@halfflat
Copy link
Contributor Author

We may also need to enrich the morphology interface (in Python and/or C++) for facilitating geometry queries.

@halfflat
Copy link
Contributor Author

Exact sampling provided by #1046

@halfflat
Copy link
Contributor Author

halfflat commented Jun 4, 2020

I will split this into two tasks: C++ version and a Python version. The latter will require a Python interface for the cell-wide trans membrane current probes.

@halfflat halfflat changed the title Prepare extracellular potential demo for LFPy Prepare extracellular potential demo for LFPy (Python) Jun 4, 2020
@halfflat
Copy link
Contributor Author

The other piece of Python infrastructure required to produce a Python LFP demo with LFPykit is #1225, which is pending review.

@halfflat
Copy link
Contributor Author

Last remaining component is #1262 for correct transmembrane accounting. Turns out #1225 wasn't the last prerequisite after all!
Task then will be to convert existing LFP demo to an LFPkit-based implementation.

@espenhgn
Copy link
Collaborator

espenhgn commented Jun 8, 2021

I've made a basic LFPykit + .swc file example available here: https://github.com/LFPy/LFPykit/blob/master/examples/Example_Arbor_swc.ipynb (via LFPy/LFPykit#129).

It's not particularly elegant though.

@halfflat
Copy link
Contributor Author

halfflat commented Jun 9, 2021

I've made a basic LFPykit + .swc file example available here: https://github.com/LFPy/LFPykit/blob/master/examples/Example_Arbor_swc.ipynb (via LFPy/LFPykit#129).

Thanks, I'll take a look!

@brenthuisman
Copy link
Contributor

@espenhgn Would you mind if we include the example in the notebook in the Arbor-repo? Probably we would make some small modifications.

@brenthuisman brenthuisman self-assigned this Sep 8, 2021
@espenhgn
Copy link
Collaborator

espenhgn commented Sep 8, 2021

@espenhgn Would you mind if we include the example in the notebook in the Arbor-repo? Probably we would make some small modifications.

No objections :)
I'll probably seize the opportunity to patch any improvements into the original example notebook then.

@brenthuisman
Copy link
Contributor

OK, thanks!

@espenhgn
Copy link
Collaborator

espenhgn commented Sep 9, 2021

Shall I add the example in a PR to Arbor perhaps?

@brenthuisman
Copy link
Contributor

By all means :) Although we've though of having notebooks in the repo, so far we have stuck to good old Python scripts, which also also straightforward to hook up to our testing. (All examples are run and checked for failure, which is not the most comprehensive testing procedure but it's a start.) So, if you want to post the notebook, we'd need to add something to test notebooks (nb-convert I think) to our pipeline. I can also take care of the scriptification in the PR if that's too much fiddling for you.

@espenhgn
Copy link
Collaborator

espenhgn commented Sep 9, 2021

I can of course just export the existing notebook as a regular Python file as is (and clean it up a bit) and add that to the PR for now.

@brenthuisman
Copy link
Contributor

Let's do that, we can think about how to integrate notebooks in our testing at a later point (I assume you'll keep this example as a notebook around)

@espenhgn
Copy link
Collaborator

espenhgn commented Sep 9, 2021

Yes, the existing LFPykit examples will remain notebooks. I like Github's ability to render them.

@espenhgn
Copy link
Collaborator

espenhgn commented Sep 9, 2021

Ok, I've open the PR. I did not check it with the current master as I encountered some issue with the cmake configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co-sim Related to co-simulation work / SGA3 T5.5 enhancement python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants