dendrograms / astrodendro

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

Fix example to follow latest analysis API #71

Closed astrofrog closed 11 years ago

astrofrog commented 11 years ago

Since the analysis properties are now quantities, we need to take their values. This makes me think that it might be nice to have it that one can transform a structure to a patch (ellipse) easily, e.g. PPStatistic.to_mpl_ellipse or something similar. @ChrisBeaumont - what do you think?

astrofrog commented 11 years ago

Actually I'm curious why Matplotlib doesn't accept the quantities as they are. I also need to make sure that all the analysis code is compatible with Astropy 0.2.

ChrisBeaumont commented 11 years ago

+1 on to_mpl_ellipse -- the code is ugly enough to hide behind a method

astrofrog commented 11 years ago

Ok, will work on that!

astrofrog commented 11 years ago

@ChrisBeaumont - I've now implemented to_mpl_ellipse - does this seem ok to you?

ChrisBeaumont commented 11 years ago

This looks good.

Can you explain the benefit of the abc module? Is it just that it catches unimplemented methods earlier?

astrofrog commented 11 years ago

@ChrisBeaumont - yes, the issue is that I didn't want to repeat the to_mpl_ellipse method, but it relies on things that only get implemented in sub-classes, it's a way to make sure (a) that you can't use the base class directly, and (b) that the methods get implemented in sub-classes.

ChrisBeaumont commented 11 years ago

Thanks. This looks good to me