-
Notifications
You must be signed in to change notification settings - Fork 22
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
Morphology recentering for SONATA circuits. #229
Conversation
Added Circuit::getAttribute to retrieve custom node attributes from SONATA circuits.
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.
Looks fine. Is it possible to unit test this?
brain/circuit.cpp
Outdated
size_t numRecentered = 0; | ||
size_t numOriginal = 0; | ||
}; | ||
using Loading = std::unordered_map<std::string, MorphologyUse>; |
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.
Why use a type alias?
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.
In the beginning I thought I was going to use this type more than once.
I'm trying to provide a test (despite it's quite annoying), but I won't be able to test all combinations. To me this is the type of code that is better to review thoroughly rather than rely on tests and coverage. The tests need to be white box to guarantee coverage and given the amount of combinations 100% coverage doesn't guarantee very much. |
5d10241
to
7883dfe
Compare
Done. I also fixed a couple of bugs I found out while doing it and testing with the sample circuit I have |
The dataset names used for rotation angles had a typo. The indexing used to access node properties from the model types CSV was wrong (it was mixing gids and node types ids). Fixed typo in rotation angle attribute names.
Retest this please |
auto transforms = circuit.getTransforms({0, 2}); | ||
morphologies = | ||
circuit.loadMorphologies({0, 2}, brain::Circuit::Coordinates::global); | ||
BOOST_CHECK_EQUAL(morphologies[0]->getSoma().getCentroid(), |
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.
Are all transforms identity in the test case?
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.
No, how do you reach that conclusion?
Added Circuit::getAttribute to retrieve custom node attributes
from SONATA circuits.