Comments (7)
Actually, this could be done e.g. by a custom function as suggested in #7
from astrodendro.
Reading #7 reminded me of this. Perhaps both can be addressed using callback functions
from astrodendro.
@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:
-
add a hard-coded initialization option when creating the dendrograms for the list of seed pixels
-
add a method that will prune a tree after the fact based on 'seed' pixels
-
add a helper function that could be passed to #10 and which just takes the list of seed pixels, e.g.:
from astrodendro.helpers import seed_leaves
d = Dendrogram.compute(image, merge_test_function=seed_leaves(x, y, v))
from astrodendro.
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.
from astrodendro.
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?
from astrodendro.
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
from astrodendro.
Closed via #10
from astrodendro.
Related Issues (20)
- domain name expired HOT 1
- Astrometry not loading in ds9 and glueviz
- RecursionError in Dendrogram.load_from
- replace progressbar with tqdm or astropy progressbar HOT 2
- Constraining min_npix for an intensity or column density image and per cm^-2 units not supported
- How can I delete leave structures that don't meet a criteria iteratively? HOT 2
- getting mass in pp-catalog from flux
- Wrong statistics in images with periodic boundaries
- min_delta fails on "flat-topped" leaves with no parent structure HOT 1
- updates to hdf5 break code HOT 2
- Update infrastructure and CI HOT 2
- can't limit the length of the branch HOT 2
- Importing "Iterable" needs updating for Python > 3.9 HOT 1
- using x_cen and y_cen in structure_at HOT 3
- Consider enabling doctestplus for docs
- PyPI version (0.2.0) has unhandled package conflicts with Numpy >= 1.20 HOT 1
- Interactive viewer not compatible with Matplotlib >= 3.7
- pp_catalog fails with ValueError related to astropy (5.3.1) units HOT 2
- Av units and WCS display
- Viewer crashes when interacting with it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astrodendro.