Instructions for Working with Alternative Particle Data

This section of the documentation describes how to put your collection of particles into a standard form and optionally store the particle data in your cache. The Storing a UserSuppliedPtclCatalog in cache section below describes how to cache your particles for convenient future use. If you do not want to use the Halotools cache system, instead refer to the Using your particle catalog without the cache section.

This tutorial is intended to be read together with the docstring of the UserSuppliedPtclCatalog class. Please refer to the docstring as you follow the explanation below.

Basic usage of the UserSuppliedPtclCatalog class

In order to put your particle catalog into a standard form recognized by Halotools, the only thing you need to do is instantiate the UserSuppliedPtclCatalog class by passing your data and metadata to the constructor. Once you have an instance of UserSuppliedPtclCatalog, the particle data is bound to the ptcl_table attribute of the instance in the form of an Astropy Table; see the UserSuppliedPtclCatalog instance. The docstring of UserSuppliedPtclCatalog gives a detailed description of the arguments required by the constructor.

Storing a UserSuppliedPtclCatalog in cache

All instances of the UserSuppliedPtclCatalog class have a add_ptclcat_to_cache method that can be used to store your catalog for convenient future use. If you call this method and no exceptions are raised, from then on you will be able to use this collection of dark matter particles together with the associated CachedHaloCatalog. The docstring of the UserSuppliedPtclCatalog class provides an explicit worked example of how to use your particle data together with the CachedHaloCatalog class.

Using your particle catalog without the cache

None of the functionality of Halotools requires you to use the caching system. The constructor of the UserSuppliedHaloCatalog class accepts a user_supplied_ptclcat argument. This argument accepts an instance of the UserSuppliedPtclCatalog class, allowing you to completely bypass the Halotools cache system. The docstring of the UserSuppliedHaloCatalog class provides an explicit worked example for this feature.