Source depth for vertices
See original GitHub issueDescribe 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:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
Fixed by #8534