ytree-project / ytree

A yt-based merger-tree code.
Other
15 stars 10 forks source link

merger trees not sorted by redshift? #148

Closed TobiBu closed 1 year ago

TobiBu commented 2 years ago

Hi,

I am loading an AHF merger tree and get weird results. When investigating the merger tree, the entire seem not to be sorted by redshift, see attached plot.

My suspicion is that in sin 108 of the ahi arbor.py fiel the sorting doesn't work. It is actually the regular expression in line 123. In my case the simulation numbering is 5 digits, e.g. 01024 and the regular expression will return 0102 missing the last digit. To my best knowledge this is because there is another . in the regex which is not necessary as the . is represented in the _prefix.

And in the function _get_file_index(self, f): every occurrence of self.filename should be simply the argument f.

tree

brittonsmith commented 2 years ago

Hi, thanks for finding this! Would you like to try submitting a pull request to fix this?

TobiBu commented 2 years ago

Sure, I will try to prepare a pull request in the next days.

Am 21.09.2022 um 13:45 schrieb Britton Smith @.***>:

 Hi, thanks for finding this! Would you like to try submitting a pull request to fix this?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

brittonsmith commented 2 years ago

@TobiBu, I realized the issue while working on this frontend and have pushed a fix to PR #149. Let me know how this works for you.

brittonsmith commented 1 year ago

@TobiBu, I think PR #149 fixes this, so I'm going to close this issue. Please feel free to update if it doesn't or you run into other problems. Thanks again for reporting this.