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

Added elliptical mask and a function to obtain GIDs inside masked area #664

Merged
merged 21 commits into from Mar 17, 2017

Conversation

Projects
None yet
4 participants
@stinebuu
Contributor

stinebuu commented Feb 27, 2017

This work is done in preparation for a connectivity app that is being developed.

The PR contains

  • Elliptical mask in 2D
  • A function to obtain all the GIDs inside a masked area.
@heplesser

@stinebuu This is a good start, but see my suggestions in the code. Could you also add tests (in Python) for the ellipse mask and the selection function?

Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/sli/topology-interface.sli
Show outdated Hide outdated topology/topologymodule.cpp
@@ -381,6 +383,8 @@ TopologyModule::init( SLIInterpreter* i )
// Register mask types
register_mask< BallMask< 2 > >();
register_mask< BallMask< 3 > >();
register_mask< EllipseMask< 2 > >();
register_mask< EllipseMask< 3 > >();

This comment has been minimized.

@heplesser

heplesser Mar 2, 2017

Contributor

Until EllipseMask supports 3D, the 3D variant should not be registered.

@heplesser

heplesser Mar 2, 2017

Contributor

Until EllipseMask supports 3D, the 3D variant should not be registered.

Show outdated Hide outdated topology/topologymodule.cpp
Show outdated Hide outdated topology/topologymodule.cpp

stinebuu added some commits Mar 8, 2017

Made several changes.
Added tests for SelectNodesByMask and the elliptical mask. Changed name
of 'x_side' and 'y_side' to 'major_axis' and 'minor_axis' in elliptical
mask. Made it possible to have a tilted ellipse mask. Added possibility
of ellipsoidal mask. Made sure we can plot ellipse mask with
PlotTargets.
Axis values now represent whole axis, not just
semi-axis, introduced create_bbox() and polar_angle_ (not yet
implemented) and changed some variable names.
@heplesser

Some more comments.

Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask_impl.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask_impl.h
Show outdated Hide outdated topology/mask_impl.h
Show outdated Hide outdated topology/pynest/hl_api.py
Show outdated Hide outdated topology/mask.h
@heplesser

Just a little bit left.

Show outdated Hide outdated topology/mask.h
Show outdated Hide outdated topology/mask_impl.h
Show outdated Hide outdated topology/mask.h
@jhnnsnk

Thanks a lot for this work. I added some comments directly in the code, mainly on documentation and typos.

Show outdated Hide outdated topology/pynest/tests/test_connection_with_elliptical_mask.py
def test_CreateEllipticalMask2D(self):
"""Creates simple elliptical mask"""
mask_dict = {'major_axis': 6.0, 'minor_axis': 3.0}
mask = topo.CreateMask('elliptical', mask_dict)

This comment has been minimized.

@jhnnsnk

jhnnsnk Mar 15, 2017

Contributor

Please add the new masktype 'elliptical' to the parameter descriptions in the docstring of CreateMask.

@jhnnsnk

jhnnsnk Mar 15, 2017

Contributor

Please add the new masktype 'elliptical' to the parameter descriptions in the docstring of CreateMask.

This comment has been minimized.

@stinebuu

stinebuu Mar 16, 2017

Contributor

Done! :)

@stinebuu

stinebuu Mar 16, 2017

Contributor

Done! :)

Show outdated Hide outdated topology/pynest/hl_api.py
Show outdated Hide outdated topology/pynest/hl_api.py
Show outdated Hide outdated topology/pynest/tests/test_selection_function_and_elliptical_mask.py
Show outdated Hide outdated topology/pynest/tests/test_selection_function_and_elliptical_mask.py
@jhnnsnk

It looks good to me now, thanks!

@heplesser heplesser merged commit 72040a5 into nest:master Mar 17, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hakonsbm hakonsbm deleted the hakonsbm:app_branch branch Mar 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment