Add facility to patch trees where halos (esp subhalos) get 'lost' by halo finder #192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A common problem, especially when dealing with subhalos, is that on some steps even the best halo finder will 'lose' the halo. This completely messes up the merger tree, as things stand.
I am adding here a tool that can start to address this issue. For instance I have tried it with
Halo685_AHF.db
(@Martin-Rey @gandhalij) and, bearing in mind how simple it is, it does seem to help a little bit.The first step is to remove suspect links (e.g. where the major progenitor of a subhalo is identified as the parent halo, because the subhalo was temporarily lost):
tangos --db-filename Halo685_AHF.db prune-trees
Having done this, you can then try to find sensible links for cases where no progenitor has been identified
tangos --db-filename Halo685_AHF.db patch-trees --include-only 'NStar()>100' 'NDM()>100' 'contamination_fraction<0.01'
Parameters to play with here:
--relative-match
currentlyNStar()
andNDM()
, meaning the changes in these quantities are checked--max-for-match
currently 0.1, meaning a 10% change in these key quantities are allowed to qualify for a match--max-position-offset
currently 100, meaning a 100kpc comoving offset allowed to qualify for a match--max-timesteps
currently 6, meaning how many steps back in time a possible progenitor is soughtFeedback would be much appreciated...