Bases: object
Class used to build mock realizations of any HOD-style model defined in halo_occupation module.
Instances of this class represent a mock galaxy distribution whose properties depend on the style of HOD model passed to the constructor, and on the parameter values of the model.
To create a mock, first instantiate the class. This will load the halo catalog into memory (and DM particles, if using), bind the catalog data to the mock object, initialize a few empty arrays, and create any necessary lookup tables that can be pre-computed. Then run the populate method to assign galaxies to the halos.
Parameters: | simulation_data : optional
halo_occupation_model : optional
threshold : optional
seed : float, optional
create_galaxies_table : boolean, optional
|
---|
Notes
Currently supported models are Zheng07_HOD_Model, Satcen_Correlation_Polynomial_HOD_Model, Polynomial_Assembias_HOD_Model, and vdB03_Quenching_Model.
Methods Summary
assign_satellite_positions(Nsat, center, ...) | Use pre-tabulated cumulative_NFW_PDF to draw random satellite positions. |
galaxies_table_bundle() | Create an astropy Table object and bind it to the mock object. |
num_cen_monte_carlo(primary_halo_property, ...) | Returns Monte Carlo-generated array of 0 or 1 specifying whether there is a central in the halo. |
num_sat_monte_carlo(primary_halo_property, ...) | Returns Monte Carlo-generated array of integers specifying the number of satellites in the halo. |
populate([isSetup]) | Assign positions to mock galaxies. |
quenched_monte_carlo(primary_halo_property, ...) | Returns Monte Carlo-generated array of 0 or 1 specifying whether the galaxy is quenched. |
Methods Documentation
Use pre-tabulated cumulative_NFW_PDF to draw random satellite positions.
Parameters: | Nsat : Number of satellites in the host system whose positions are being assigned. center : array_like position of the halo hosting the satellite system whose positions are being assigned. r_vir : array_like Virial radius of the halo hosting the satellite system whose positions are being assigned. r_of_M :
counter : int
|
---|
Notes
API is going to change, so that function actually returns values, rather than privately over-writing object attributes.
Create an astropy Table object and bind it to the mock object.
Returns Monte Carlo-generated array of 0 or 1 specifying whether there is a central in the halo.
Parameters: | logM : float or array hod_model :
|
---|---|
Returns: | num_ncen_array : int or array |
Returns Monte Carlo-generated array of integers specifying the number of satellites in the halo.
Parameters: | logM : float or array hod_model : HOD_Model object defined in halo_occupation module. |
---|---|
Returns: | num_nsat_array : int or array
|
Assign positions to mock galaxies. Returns coordinates, halo mass, isSat (boolean array with True for satellites) If isSetup is True, don’t call _allocate_memory first (useful for future MCMC applications).
Returns Monte Carlo-generated array of 0 or 1 specifying whether the galaxy is quenched. Parameters ———- logM : array_like
Returns: | quenched_array : int or array
|
---|