halocat.tpcf¶
tpcf
¶
Halo–halo two-point correlation function in periodic boxes (pycorr).
measure_xi_hh
¶
measure_xi_hh(data: dict, box_size: float, mass_bins: list[tuple[float, float]], r_edges: ndarray, mass_key: str = 'Mtot') -> dict
Compute halo–halo ξ(r) for every auto and cross mass-bin pair.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, ndarray]
|
Halo catalogue with positions |
required |
box_size
|
float
|
Periodic box side length (Mpc/h). |
required |
mass_bins
|
list of tuple of float
|
Finite-width log10(M / [Msun/h]) bins |
required |
r_edges
|
ndarray
|
Shape |
required |
mass_key
|
str
|
Mass column name in |
'Mtot'
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
dict
|
Per-pair entries keyed by
Plus a top-level |
Notes
r is always the arithmetic mean of r_edges — never
pycorr.sepavg, which returns NaN for empty bins and varies
between realisations and would break sub-grid stacking.
Source code in halocat/tpcf.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
write_xi_hh
¶
Write the dict produced by :func:measure_xi_hh to an HDF5 file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xi_dict
|
dict
|
Output of :func: |
required |
outpath
|
str
|
Destination path. Parent directories are created if needed. |
required |
attrs
|
dict
|
Extra top-level HDF5 file attributes (e.g. |
None
|