-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements Friends of Friends Sampling function #460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good @atorchylo thanks for implementing this. Sorry it took me a while to get back to you. Please find some suggestions below
One more thing @atorchylo could you try reducing the link length even further and produce some examples to see if you only get very dramatic blends. Thanks! |
Hey @ismael-mendoza. I implemented your suggestions and also produced some examples of extreme blends. Code does seem to work as desired! Below are examples of galaxies blends with min number of 3 and link distance of 1. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #460 +/- ##
==========================================
- Coverage 62.53% 61.15% -1.38%
==========================================
Files 19 19
Lines 1508 1555 +47
==========================================
+ Hits 943 951 +8
- Misses 565 604 +39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Closes #16
Using
fast3tree
python package, I implemented the friends of friends sampling function. The algorithm works by precomputing groups for the given table, and then randomly sampling a group according tomin_number
andmax_number
requirements. The user has to providelink_distance
to the algorithm, which determines the grouping of the galaxies. If the group exceeds the stamp size, the function raises an error. Here is the example code to quickly test:Sampled galaxies look like this: