Bases: object
Container class for managing I/O of halo & particle catalogs.
Methods Summary
download_all_default_catalogs() | If not already in cache, download default particle and halo catalogs from Yale website. |
find_nearest_snapshot_in_cache(catalog_type) | Identify the catalog in the cache directory with the closest redshift to the requested redshift. |
get_simulation_properties(simname) | Return a few characteristics of the input simulation. |
identify_relevant_catalogs([catalog_type, ...]) | Look in cache for any catalog that matches the inputs. |
load_catalog([dirname, filename, ...]) | Use the astropy fits reader to load the halo or particle catalog into memory. |
numptcl_to_string(numptcl) | Reduce the input number to a 3-character string used to encode the number of particles in the particle catalog filenames. |
retrieve_catalog_filenames_from_url(url[, ...]) | Get the full list of filenames available at the provided url. |
Methods Documentation
If not already in cache, download default particle and halo catalogs from Yale website.
Identify the catalog in the cache directory with the closest redshift to the requested redshift.
Returns: | filename : string
nearest_snapshot : float
|
---|
Return a few characteristics of the input simulation.
Parameters: | simname : string
|
---|---|
Returns: | Lbox : float
particle_mass : float
softening : float
|
Look in cache for any catalog that matches the inputs.
Parameters: | catalog_type : string
simname : string
halo_finder : string
|
---|---|
Returns: | relevant_catalogs : array
|
Use the astropy fits reader to load the halo or particle catalog into memory.
Parameters: | dirname : string
filename : string
download_yn : boolean, optional
url : string
|
---|---|
Returns: | catalog : object
|
Reduce the input number to a 3-character string used to encode the number of particles in the particle catalog filenames.
Parameters: | numptcl : float or int
|
---|---|
Returns: | output_string : string
|
Get the full list of filenames available at the provided url.
This method uses BeautifulSoup to query the provided url for the list of files stored there. Filenames of halo catalogs are expected to begin with ‘hlist’, or they will be ignored; filenames of merger trees are expected to begin with ‘tree’.
Parameters: | url : string
catalog_type : string
|
---|---|
Returns: | file_list : list
|