Skip to content
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

add function to read multiple particle files #81

Open
lgarrison opened this issue Apr 10, 2023 · 0 comments
Open

add function to read multiple particle files #81

lgarrison opened this issue Apr 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@lgarrison
Copy link
Member

Currently, we expose a function to read a single particle file (read_abacus.read_asdf()). We should add a higher-level function that can read multiple files into a single table.

Basically, we want a smarter version of this snippet:

from pathlib import Path
from abacusnbody.data import read_abacus
import astropy.table
allp = []
for fn in Path('AbacusSummit_small_c000_ph3000/halos/z1.100/').glob(*_rv_*/*.asdf'):
    allp += [read_abacus.read_asdf(fn, load=['pos'])]
allp = astropy.table.vstack(allp)
@lgarrison lgarrison added the enhancement New feature or request label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant