clmm.clusterensemble module

@file clusterensemble.py The Cluster Ensemble class

class clmm.clusterensemble.ClusterEnsemble(unique_id, gc_list=None, **kwargs)[source]

Bases: object

Object that contains a list of GalaxyCluster objects

Variables:
  • unique_id (int or string) -- Unique identifier of the galaxy cluster ensemble

  • data (GCData) -- Table with galaxy clusters data (i. e. ids, profiles, redshifts).

  • id_dict (dict) -- Dictionary of indices given the cluster id

  • stacked_data (GCData, None) -- Stacked cluster profiles

  • cov (dict) --

    Dictionary with the covariances:

    • "tan_sc" : tangential component computed with sample covariance

    • "cross_sc" : cross component computed with sample covariance

    • "tan_jk" : tangential component computed with bootstrap

    • "cross_bs" : cross component computed with bootstrap

    • "tan_jk" : tangential component computed with jackknife

    • "cross_jk" : cross component computed with jackknife

add_individual_radial_profile(galaxycluster, profile_table, tan_component='gt', cross_component='gx', weights='W_l')[source]

Compute the individual shear profile from a single GalaxyCluster object and adds the averaged data in the data attribute.

Parameters:
  • galaxycluster (GalaxyCluster) -- GalaxyCluster object with cluster metadata and background galaxy data

  • profile_table (GCData) -- Table containing the radius grid points, the tangential, cross shear and weights profiles on that grid.

  • tan_component (string, optional) -- Name of the tangetial component binned column in the profile table. Default: 'gt'

  • cross_component (string, optional) -- Name of the cross component binned profile column in the profile table. Default: 'gx'

  • weights (str, None) -- Name of the weight binned column in the profile table.

compute_bootstrap_covariance(tan_component='gt', cross_component='gx', n_bootstrap=10)[source]

Compute the bootstrap covariance matrix, add boostrap covariance matrix for tangential and cross stacked profiles and updates .cov dict (tan_jk, cross_bs).

Parameters:
  • tan_component (string, optional) -- Name of the tangential component column in data. Default: 'gt'

  • cross_component (string, optional) -- Name of the cross component column in data. Default: 'gx'

  • n_bootstrap (int) -- number of bootstrap resamplings

compute_jackknife_covariance(tan_component='gt', cross_component='gx', n_side=16)[source]

Compute the jackknife covariance matrix, add boostrap covariance matrix for tangential and cross stacked profiles and updates .cov dict (tan_jk, cross_jk).

Uses healpix sky area sub-division : https://healpix.sourceforge.io

Parameters:
  • tan_component (string, optional) -- Name of the tangential component column in data. Default: 'gt'

  • cross_component (string, optional) -- Name of the cross component column in data. Default: 'gx'

  • n_side (int) -- healpix sky area division parameter (number of sky area : 12*n_side^2)

compute_sample_covariance(tan_component='gt', cross_component='gx')[source]

Compute Sample covariance matrix for cross and tangential and cross stacked profiles and updates .cov dict (tan_sc, cross_sc).

Parameters:
  • tan_component (string, optional) -- Name of the tangential component column in data. Default: 'gt'

  • cross_component (string, optional) -- Name of the cross component column in data. Default: 'gx'

classmethod load(filename, **kwargs)[source]

Loads GalaxyCluster object to filename using Pickle

make_individual_radial_profile(galaxycluster, bin_units, bins=10, error_model='ste', cosmo=None, tan_component_in='et', cross_component_in='ex', tan_component_out='gt', cross_component_out='gx', tan_component_in_err=None, cross_component_in_err=None, use_weights=True, weights_in='w_ls', weights_out='W_l')[source]

Compute the individual shear profile from a single GalaxyCluster object and adds the averaged data in the data attribute.

Parameters:
  • galaxycluster (GalaxyCluster) -- GalaxyCluster object with cluster metadata and background galaxy data

  • bin_units (str) -- Units to use for the radial bins of the shear profile Allowed Options = ["radians", "deg", "arcmin", "arcsec", "kpc", "Mpc"] (letter case independent)

  • bins (array_like or int, optional) -- User defined bins to use for the shear profile. If a list is provided, use that as the bin edges. If a integer is provided, create that many equally spaced bins between the minimum and maximum angular separations in bin_units. If nothing is provided, defaults to 10 equally spaced bins.

  • error_model (str, optional) --

    Statistical error model to use for y uncertainties. (letter case independent)

    • ste - Standard error [=std/sqrt(n) in unweighted computation] (Default).

    • std - Standard deviation.

  • cosmo (clmm.Comology, optional) -- CLMM Cosmology object

  • tan_component_in (string, optional) -- Name of the tangential component column in galcat to be binned. Default: 'et'

  • cross_component_in (string, optional) -- Name of the cross component column in galcat to be binned. Default: 'ex'

  • tan_component_out (string, optional) -- Name of the tangetial component binned column to be added in profile table. Default: 'gt'

  • cross_component_out (string, optional) -- Name of the cross component binned profile column to be added in profile table. Default: 'gx'

  • tan_component_in_err (string, None, optional) -- Name of the tangential component error column in galcat to be binned. Default: None

  • cross_component_in_err (string, None, optional) -- Name of the cross component error column in galcat to be binned. Default: None

  • weights_in (str, None) -- Name of the weight column in galcat to be considered in binning.

  • weights_out (str, None) -- Name of the weight column to be used in the added to the profile table.

make_stacked_radial_profile(tan_component='gt', cross_component='gx', weights='W_l')[source]

Computes stacked profile and mean separation distances and add it internally to stacked_data.

Parameters:
  • tan_component (string, optional) -- Name of the tangential component column in data. Default: 'gt'

  • cross_component (string, optional) -- Name of the cross component column in data. Default: 'gx'

  • weights (str) -- Name of the weights column in data.

save(filename, **kwargs)[source]

Saves GalaxyCluster object to filename using Pickle