Dear all,
I am trying to figure out how intermediate criteria is handled by fetch_shortest_paths. I would like to specify a list of neurons and find only paths that contain those neurons, but not necessarily all of those neurons. Does anyone know how to do this?
Here is what I tried (using a Jupyter notebook, hemibrain:v1.2.1):
If I fetch paths using
fetch_shortest_paths(1734350788,707116522,min_weight=1,intermediate_criteria=NC(status="Traced"))
then I find 229 paths, the first is [
1734350788,5813021452,547552266,707116522]
If I instead use
intermediate_criteria=NC(bodyId=[
5813021452,547552266],status="Traced")
then it finds only one path. So far so good - it finds the only path that contains the intermediates.
I can also use
intermediate_criteria=NC(bodyId=[1796817841,
5813021452,547552266],status="Traced")
and still get only one path, which does not contain 1796817841 (in fact there are no paths found that contain this neuron in the first search). So I thought that having extra neurons in intermediate criteria would be ok and just ignored as long as the path only contained other neurons in intermediate_criteria.
But if I add one more unused neuron by using
intermediate_criteria=NC(bodyId=[1796817841,
5813021452,547552266,818983130],status="Traced")
then no paths are found. So having two unused neurons is a problem.
Any advice?