nbodykit.algorithms.paircount.
PairCountBase
(mode, source1, source2, redges, Nmu)[source]¶Bases: object
Base class for pair counting algorithms, either for a simulation box or survey data
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a result has been saved to disk with save() . |
save (output) |
Save result as a JSON file with name output |
nbodykit.algorithms.paircount.
SimulationBoxPairCount
(mode, source1, redges, BoxSize=None, periodic=True, source2=None, Nmu=5, los='z', weight='Weight', **config)[source]¶Bases: nbodykit.algorithms.paircount.PairCountBase
Count (weighted) pairs of objects in a simulation box using the
Corrfunc
package.
This uses the Corrfunc.theory.DD.DD()
and
Corrfunc.theory.DDsmu.DDsmu()
functions to count pairs.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the
results.
Note
The algorithm expects the positions of particles in a simulation box to
be the Cartesian x
, y
, and z
vectors. To compute
pair counts on survey data, using right ascension, declination, and
redshift, see SurveyDataPairCount
.
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a result has been saved to disk with save() . |
run () |
Calculate the 3D pair-counts in a simulation box as a function of separation r or separation and angle to line-of-sight (r , mu ). |
save (output) |
Save result as a JSON file with name output |
logger
= <logging.Logger object>¶run
()[source]¶Calculate the 3D pair-counts in a simulation box as a function
of separation r
or separation and angle to line-of-sight
(r
, mu
). This adds the following attributes to the class:
result
¶BinnedStatistic
– a BinnedStatistic object holding the pair count and correlation
function results. The coordinate grid is either r
or
r
and mu
. It stores the following variables:
r
: the mean separation value in the binxi
: the mean correlation function value in the bin, computed as
\(DD/RR - 1\), where \(RR\) is the number of random pairs
in the binnpairs
: the number of pairs in the binweightavg
: the average weight value in the bin; each pair
contributes the product of the individual weight valuessave
(output)¶Save result as a JSON file with name output
nbodykit.algorithms.paircount.
SurveyDataPairCount
(mode, source1, redges, cosmo, source2=None, Nmu=5, ra='RA', dec='DEC', redshift='Redshift', weight='Weight', **config)[source]¶Bases: nbodykit.algorithms.paircount.PairCountBase
Count (weighted) pairs of objects from a survey data catalog using the
Corrfunc
package.
This uses the:func:Corrfunc.mocks.DDsmu_mocks.DDsmu_mocks function to count pairs.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the
results.
Note
The algorithm expects the positions of particles from a survey catalog
be the sky coordinates, right ascension and declination, and redshift.
To compute pair counts in a simulation box, using the Cartesian
coordinate vectors, see SimulationBoxPairCount
.
Warning
The right ascension and declination columns should be specified in degrees.
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a result has been saved to disk with save() . |
run () |
Calculate the 3D pair-counts of a survey data catalog as a function of separation r or separation and angle to line-of-sight (r , mu ). |
save (output) |
Save result as a JSON file with name output |
logger
= <logging.Logger object>¶run
()[source]¶Calculate the 3D pair-counts of a survey data catalog as a function
of separation r
or separation and angle to line-of-sight
(r
, mu
). This adds the following attribute:
result
¶BinnedStatistic
– a BinnedStatistic object holding the pair count and correlation
function results. The coordinate grid is either r
or
r
and mu
. It stores the following variables:
r
: the mean separation value in the binnpairs
: the number of pairs in the binweightavg
: the average weight value in the bin; each pair
contributes the product of the individual weight valuessave
(output)¶Save result as a JSON file with name output