question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source depth for vertices

See original GitHub issue

Describe the new feature or enhancement

I would like to compute a metric of “source depth” for vertices in source space. This could be the Euclidean distance of a vertex to the nearest sensor/electrode or the nearest BEM surface.

Describe your proposed implementation

I’ve got something like this in mind (for source_space.py):

def vertex_depth(src, reference, mode='dist'):
    """Compute depth of vertices in source space.

    Parameters
    ----------
    src : instance of Source Space
        The vertices for which depth to be computed.
    reference : measurement info or BEM surfaces
        The locations with respect to which depth shall be computed.
    mode : 'dist'
        The distance metric to be computed.

    Returns
    -------
    vertex_depth: array, shape (n_vertices)
        The distance of each vertex with respect to the reference locations.
    """

Describe possible alternatives

Additional comments

I would need some advice getting relevant sensor and BEM locations with the appropriate transformations.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
olafhaukcommented, Nov 13, 2020

Thanks @wmvanvliet. I’ll use your example and add you as co-author if that’s ok. I’ll start with distances to sensors, BEM surfaces can be included later.

0reactions
larsonercommented, Jan 7, 2021

Fixed by #8534

Read more comments on GitHub >

github_iconTop Results From Across the Web

Depth-first search - Wikipedia
Depth -first search (DFS) is an algorithm for traversing or searching tree or graph data ... use depth-first search to linearly order the...
Read more >
DepthFirstSearch (Algorithms 4/e)
The DepthFirstSearch class represents a data type for determining the vertices connected to a given source vertex s in an undirected graph.
Read more >
Depth First Search or DFS for a Graph - GeeksforGeeks
Depth-first search is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node ...
Read more >
Hierarchy Depth in Directed Networks - PMC - NCBI
The rooted depth is a value defined for each vertex in a network, and is the distance of that vertex from a root...
Read more >
Depth-First Search | CodeAhoy
Problem: Given a source vertex s, follow a path to maximal depth and then backtrack to follow any remaining paths available from preceeding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found