Hashtables
Hashtables provide an easy way to load particles based on their spatial position. In fact, as described in the snapshot documentation, particles are ordered based on the halo/subhalo they belong,
rendering necessary to parse all files of a snapshots to locate particles within a specific volume. The hahtables circumvent this problem by mapping the position of each particle to a cell of a Cartesian grid and vice versa
(i.e. the mapping each Cartesian grid cell to a list of the files and indices within them where the particles are stored). This enables a very fast approximate selection of particles in a specific volume by loading all
particles in grid cells intersecting with the volume. NB: This implies that at least all particels in the volume will be loaded, but in virtually all cases more particle are effectively loaded. Nevertheless, this two-stage
selection process is typically much faster than parsing through all snapshot file chunks.
For the creation and parsing of the hashtable we rely on sparepo. At this link you will find more information and examples of its usage.
The hashtable files are located in the postprocessing/hashtables
subdirectory of each simulation directory.