Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

LFP Calculator - #492

Merged
iomaganaris merged 38 commits into
masterfrom
sandbox/bdelmarm/lfp_rebase
Feb 25, 2021
Merged

iomaganaris merged 38 commits into
masterfrom
sandbox/bdelmarm/lfp_rebase

Conversation

@bdelmarm

@bdelmarm bdelmarm commented Feb 5, 2021 •

Copy link
Copy Markdown
Contributor

New LFP calculator class.

Allows for LineSource and PointSource approximations.

A unit test, testing the component, is available in /tests/unit/lfp.

Documentation below:
LFP.pdf

@bbpbuildbot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

2 similar comments
@bbpbuildbot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@bbpbuildbot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@bdelmarm
bdelmarm force-pushed the sandbox/bdelmarm/lfp_rebase branch from 389a932 to 64ae686 Compare February 8, 2021 13:43
@bbpbuildbot

Copy link
Copy Markdown
Collaborator

Build finished.

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #492 (06c1519) into master (5a93d9b) will increase coverage by 0.90%.
The diff coverage is 93.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
+ Coverage   55.96%   56.87%   +0.90%     
==========================================
  Files          95       97       +2     
  Lines        7835     7960     +125     
==========================================
+ Hits         4385     4527     +142     
+ Misses       3450     3433      -17     
Impacted Files Coverage Δ
coreneuron/io/lfp.hpp 90.66% <90.66%> (ø)
tests/unit/lfp/lfp.cpp 96.42% <96.42%> (ø)
coreneuron/utils/progressbar/progressbar.c 82.14% <0.00%> (-5.96%) ⬇️
coreneuron/io/mech_report.cpp 100.00% <0.00%> (ø)
coreneuron/io/nrn_setup.cpp 85.71% <0.00%> (+0.39%) ⬆️
coreneuron/network/netcvode.cpp 76.23% <0.00%> (+0.66%) ⬆️
coreneuron/mpi/nrnmpi.cpp 54.16% <0.00%> (+2.77%) ⬆️
coreneuron/mpi/mpispike.cpp 41.33% <0.00%> (+4.00%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a93d9b...06c1519. Read the comment docs.

@bdelmarm
bdelmarm requested a review from jorblancoa February 10, 2021 01:24

@castigli castigli left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bdelmarm , overall it looks good, I have some questions about some of the templates though.

Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated

@cattabiani cattabiani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Maybe we can generalize a little the code to take care of also non-3D points (just in case one day someone comes around and needs points in 2D)

Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread tests/unit/lfp/lfp.cpp
Comment thread tests/unit/lfp/lfp.cpp Outdated
Comment thread tests/unit/lfp/lfp.cpp Outdated
Comment thread tests/unit/lfp/lfp.cpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
iomaganaris and others added 3 commits February 10, 2021 17:40
- Created new pi global parameter which is read by NEURON globals.dat or
  directly NEURON in online mode
- Use this pi in lfp calculation and test
- Removed a deprecated boost test header file
Pass PI value from NEURON to CoreNEURON

@castigli castigli left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good do me, I am not approving just because there are a couple of points that others (@tristan0x @cattabiani ) should confirm that they are satisfied with.

@tristan0x tristan0x left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All symbols inside in coreneuron::lfputils are called either in lfp.cpp or in LFPCalculator::getFactor which is a private member function only called in the compilation unit lfp.cpp. So the user is not concerned by it and there is not benefits in term of performance to have them in the header. This is why I believe they should all be moved to the compilation unit.

I also made a comment regarding performance improvement in LFPCalculator::lfp member method.

Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
Comment thread coreneuron/io/lfp.cpp Outdated

@cattabiani cattabiani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just some ordering and the value of pi

Comment on lines 14 to 17
#include <stdint.h>

#include <boost/test/unit_test.hpp>
#include <boost/test/test_case_template.hpp>
#include <boost/mpl/list.hpp>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe lexicographic sort?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread tests/unit/lfp/lfp.cpp Outdated
Comment thread tests/unit/queueing/test_queueing.cpp Outdated
Comment thread coreneuron/io/lfp.hpp Outdated
@tristan0x

Copy link
Copy Markdown
Member

All symbols inside in coreneuron::lfputils are called either in lfp.cpp or in LFPCalculator::getFactor which is a private member function only called in the compilation unit lfp.cpp. So the user is not concerned by it and there is not benefits in term of performance to have them in the header. This is why I believe they should all be moved to the compilation unit.

Following discussion with @bdelmarm , these symbols need to be exposed to be unit-tested.

@tristan0x

Copy link
Copy Markdown
Member

I also made a comment regarding performance improvement in LFPCalculator::lfp member method.

adressed in f80818a

@cattabiani cattabiani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am lost about pi. It is still hard-coded. I thought we were going to get it from neuron...

Comment thread tests/unit/lfp/lfp.cpp

@cattabiani cattabiani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iomaganaris iomaganaris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One last small thing

Comment thread coreneuron/io/lfp.hpp Outdated
Co-authored-by: Ioannis Magkanaris <iomagkanaris@gmail.com>
@iomaganaris
iomaganaris merged commit b234502 into master Feb 25, 2021
@iomaganaris
iomaganaris deleted the sandbox/bdelmarm/lfp_rebase branch February 25, 2021 12:57
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
* New LFP calculator class
  - Allows for LineSource and PointSource approximations
* Read value of `pi` from NEURON in online or offline mode

Co-authored-by: Del Marmol Baudouin <bdelmarm@bbpv1.epfl.ch>
Co-authored-by: Pramod S Kumbhar <pramod.s.kumbhar@gmail.com>
Co-authored-by: Ioannis Magkanaris <iomagkanaris@gmail.com>
Co-authored-by: Tristan Carel <tristan.carel@epfl.ch>
Co-authored-by: Tristan Carel <tristan.carel@gmail.com>

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@b234502
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants