dendrograms/astrodendro — pull request #111 by e-koch (2014-06-03 23:59:18+00:00)
Title: Pruning computed dendrograms.

Hi all,
I have the need to run large numbers of dendrograms, varying min_delta for each (Figure 4 in Burkhart et al. 2013; http://iopscience.iop.org/0004-637X/770/2/141/pdf/apj_770_2_141.pdf). It would be nice to be able prune out features without having to recompute the whole dendrogram each time.

I've attempted to code this up, re-using the end stages of the compute function. Right now, it prunes off leaves and merges features together. I'm running into issues with how to ensure merged features meet the pruning requirement, while keeping the tree connected. Can this be done without re-computing?

Here's a comparison of recomputing (top) to the output of post_pruning (bottom).

![hd22 13co recomputed](https://cloud.githubusercontent.com/assets/3255771/3168152/e13846b8-eb7a-11e3-9e77-4ee59dd51949.png)

![hd22 13co postpruned](https://cloud.githubusercontent.com/assets/3255771/3168155/f109181a-eb7a-11e3-8606-d2de550f2066.png)