ytree-project / ytree

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

Return generators for arbor slicing and select_halos #104

Closed brittonsmith closed 3 years ago

brittonsmith commented 3 years ago

PR Summary

This converts arbor slicing (i.e., a[:] syntax) from returning arrays of TreeNodes to returning a generator of TreeNodes and does the same thing for the select_halos function.

The select_halos function will now also begin returning matching halos as soon as they are found instead of return an array of halos at the end. This allows the user to begin working on them right away. The progress bar will also continually update to report the number of matches found. The select_from keyword is now deprecated in favor of using a detector to figure out which selector is to be used.

PR Checklist