-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from GasparCorrea/devel
Astrodendro as an algorithm
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |