Functions
scotts_bin_width (data, comm) |
Return the optimal histogram bin width using Scott’s rule, |
Classes
RedshiftHistogram (source, fsky, cosmo[, …]) |
Compute the mean number density as a function of redshift \(n(z)\) from an input CatalogSource of particles. |
nbodykit.algorithms.zhist.
RedshiftHistogram
(source, fsky, cosmo, bins=None, redshift='Redshift', weight=None)[source]¶Compute the mean number density as a function of redshift \(n(z)\) from an input CatalogSource of particles.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the results.
Note
The units of the number density are \((\mathrm{Mpc}/h)^{-3}\)
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a saved RedshiftHistogram result. |
run () |
Run the algorithm, which computes the histogram. |
save (output) |
Save the RedshiftHistogram result to disk. |
load
(output, comm=None)[source]¶Load a saved RedshiftHistogram result.
The result has been saved to disk with RedshiftHistogram.save()
.
run
()[source]¶Run the algorithm, which computes the histogram. This function does not return anything, but adds the following attributes to the class:
Note
All ranks store the same result attributes.
bin_edges
¶array_like – the edges of the redshift bins
bin_centers
¶array_like – the center values of each redshift bin
dV
¶array_like – the volume of each redshift shell in units of \((\mathrm{Mpc}/h)^3\)
nbar
¶array_like – the values of the redshift histogram, normalized to number density (in units of \((\mathrm{Mpc}/h)^{-3}\))
nbodykit.algorithms.zhist.
scotts_bin_width
(data, comm)[source]¶Return the optimal histogram bin width using Scott’s rule, defined as:
Note
This is a collective operation
Parameters: |
|
---|---|
Returns: |
|