I'm testing the astrodendro code to see how it works on p-p-v data. It looks like it's working well and I'm able to extract the leaves and maps without issues. But when I checking out how the nodes branched out (the trunks in this code repo), it looks like I only get a network of twos? Is this correct behaviour? Here's a code snippet to show what I'm doing.
from astrodendro import Dendrogram
d = Dendrogram(ppv_data)
trunk = d.trunk[0]
def walk(trunk, nodes=[]):
import astrodendro.components as comp
for item in trunk.items:
if type(item) is comp.Branch:
print(item.items)
nodes.append(len(item.items))
walk(item)
else:
pass
return nodes
res = walk(trunk)
print(len(res))