dendrograms/dendro-core — pull request #22 by ChrisBeaumont (2013-06-18 17:56:00+00:00)
Title: Basic analysis interface

This PR is only for discussion.

I've translated the discussion on https://github.com/dendrograms/dendro-core/wiki/Structure-analysis-API-proposal to a basic analysis module interface. What do we think about this approach? Very quickly:

1) It relies on the fact that `Structure` objects have a `indices` and `values` tag, which list the locations and data values at each point in a structure
2) It requires implementing a `dendrogram.__iter__` method, that iterates over structures in a dendrogram.

However, most of the code doesn't assume anything about the astrodendro API. For example, we could write other functions to collections of structures (for example, sub-sampling dendrogram structures between merger points), and this machinery would still apply.

The main question I have is: can you think of specific quantities that cannot easily be calculated given these current function signatures?