add function to read multiple particle files
lgarrison opened this issue · comments
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)