Skip to content

Commit

Permalink
Merge pull request #30 from GasparCorrea/devel
Browse files Browse the repository at this point in the history
Astrodendro as an algorithm
  • Loading branch information
maray committed Nov 25, 2016
2 parents 606d61c + ba2db49 commit 2551081
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions acalib/algorithms/astrodendro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import acalib
from .algorithm import Algorithm
from astrodendro import Dendrogram

class Astrodendro(Algorithm):

def default_params(self):
pass

def run(self,data):
self.dendrogram = Dendrogram.compute(data, **self.config)
return self.dendrogram

def trunk(self):
return self.dendrogram.trunk

def neighbours(self, idx):
return self.dendrogram.neighbours(idx)

def leaves(self):
return self.dendrogram.leaves()

def structure_at(self, indices):
return self.dendrogram.structure_at(indices)

def all_structures(self):
return self.dendrogram.all_structures()

def plotter(self):
return self.dendrogram.plotter()

def show(self):
self.dendrogram.viewer().show()
return

def index_map(self):
return self.dendrogram.index_map

0 comments on commit 2551081

Please sign in to comment.