dendrograms / astrodendro

Generate a dendrogram from a dataset
https://dendrograms.readthedocs.io/
Other
37 stars 38 forks source link

Allow manual seeding of leaves #8

Closed ChrisBeaumont closed 11 years ago

ChrisBeaumont commented 11 years ago

A feature I would find useful is the ability to pass a list of seed pixels to compute. The dendrogram would then be constructed in such a way that each leaf contains exactly one seed pixel. This would be helpful for, e.g., resolution studies.

astrofrog commented 11 years ago

Actually, this could be done e.g. by a custom function as suggested in #7

ChrisBeaumont commented 11 years ago

Reading #7 reminded me of this. Perhaps both can be addressed using callback functions

astrofrog commented 11 years ago

@ChrisBeaumont - yes, in fact what I was suggesting is that all one needs to do in the scenario of #7 and the implementation of #10 is pass a function that will only accept a leaf as independent if it contains one of a list of seed pixels. However, I do agree that it would be nice to make this a little easier to use that requiring the user to have to write a custom function. We could either:

ChrisBeaumont commented 11 years ago

I think #7 and #8 both have their uses, and they don't really interfere with each other. Your second suggestion seems like the best way to achieve what I was talking about, without complicating the __init__ or __compute__ signatures further.

astrofrog commented 11 years ago

Do we still want to go with the second option now we've said (in other issues) that re-computing is preferable for now to pruning?

ChrisBeaumont commented 11 years ago

Maybe not. Option 3 would be the simplest interface, since we want to use custom merger functions anyways. I think we should merge that code, and then make sure it's easy to use a custom merge test function to build a dendrogram with manually-specified seeds

ChrisBeaumont commented 11 years ago

Closed via #10