Functions
get_cartesian (comm, pos[, cosmo]) |
Convert sky coordinates to Cartesian coordinates and return the implied box size from the position bounds. |
Classes
AngularPairCount (first, edges[, second, ra, …]) |
Count (weighted) angular pairs of objects from a survey data catalog using the Corrfunc package. |
SurveyDataPairCount (mode, first, redges, cosmo) |
Count (weighted) pairs of objects from a survey data catalog using the Corrfunc package. |
SurveyPairCountBase (first, second[, …]) |
An abstract base class for pair count algorithms from surveys. |
nbodykit.algorithms.survey_paircount.
AngularPairCount
(first, edges, second=None, ra='RA', dec='DEC', weight='Weight', show_progress=True, **config)[source]¶Count (weighted) angular pairs of objects from a survey data catalog using the
Corrfunc
package.
This uses the:func:Corrfunc.mocks.DDtheta_mocks.DDtheta_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 the survey catalog be the right ascension and declination angular coordinates.
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 angular pair counts of a survey data catalog as a function of separation angle on the sky. |
save (output) |
Save result as a JSON file with name output |
run
()[source]¶Calculate the angular pair counts of a survey data catalog as a function of separation angle on the sky. This adds the following attribute:
result
¶BinnedStatistic
– a BinnedStatistic object holding the pair count results.
The coordinate grid is theta
, the angular separation bins.
It stores the following variables:
theta
: 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 valuesnbodykit.algorithms.survey_paircount.
SurveyDataPairCount
(mode, first, redges, cosmo, second=None, Nmu=5, ra='RA', dec='DEC', redshift='Redshift', weight='Weight', show_progress=True, **config)[source]¶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 |
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 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 valuesnbodykit.algorithms.survey_paircount.
SurveyPairCountBase
(first, second, show_progress=True)[source]¶An abstract base class for pair count algorithms from surveys. The input data is assumed to be of the form (ra, dec, redshift) for these algorithms.
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 |