Astroua / SCIMES

Spectral Clustering for Interstellar Molecular Emission Segmentation
http://scimes.readthedocs.org/
GNU General Public License v2.0
16 stars 10 forks source link

Minor bug fixes #2

Closed keflavich closed 9 years ago

keflavich commented 10 years ago

@dcolombo I've fixed a few issues with imports here. I think you were doing %run -i orion2scimes.py after having run from pylab import *; that's not generally true so I've fixed that stuff up.

I'm still running into one issue:

Traceback (most recent call last):
  File "/Users/adam/work/scimes/scimes/orion2scimes.py", line 266, in <module>
    showdendro(d, gmcs.clusters)
  File "/Users/adam/work/scimes/scimes/orion2scimes.py", line 52, in showdendro
    p.plot_tree(ax, structure=cores_idx[i], color=cols[i], lw=3)
  File "/Users/adam/repos/astrodendro/astrodendro/plot.py", line 103, in plot_tree
    lines = self.get_lines(structures=structure, **kwargs)
  File "/Users/adam/repos/astrodendro/astrodendro/plot.py", line 193, in get_lines
    if type(structures[0]) is int:
TypeError: 'int' object has no attribute '__getitem__'

> /Users/adam/repos/astrodendro/astrodendro/plot.py(193)get_lines()
    192             if subtree:
--> 193                 if type(structures[0]) is int:
    194                     structure = self.dendrogram[structures[0]]

which could be a genuine bug in astrodendro or it could be that we're passing the wrong things to the plotter

low-sky commented 10 years ago

:+1: to me It looks like a good beginning of a cleanup

dcolombo commented 10 years ago

Thanks for this Adam!

About the bug, I am using the 0.1.0 version of astrodendro and I am not getting the error... Checking on the dendrogram plotting, on the astrodendro website, it seems that the plotting procedure is called in the right way...

keflavich commented 10 years ago

I think you don't have the latest dev version of astrodendro - there was a bug introduced, so I submitted this fix: https://github.com/dendrograms/astrodendro/pull/133