nbodykit.algorithms.pair_counters.corrfunc.base¶
Functions
|
Classes
|
A class used internally to hold the array-like result of a pair counting algorithm from |
|
A base class to represent an MPI-enabled |
Exceptions
- class nbodykit.algorithms.pair_counters.corrfunc.base.CorrfuncResult(data)[source]¶
A class used internally to hold the array-like result of a pair counting algorithm from
Corrfunc.This class is useful for reducing pair count results in parallel while accounting for columns that are pair-weighted.
- Parameters
data (numpy.ndarray) – the numpy structured array result from
Corrfunc- Attributes
- dtype
- shape
Methods
reshape
- class nbodykit.algorithms.pair_counters.corrfunc.base.MPICorrfuncCallable(callable, comm, show_progress=True)[source]¶
A base class to represent an MPI-enabled
Corrfunccallable.This class adds the following functionality to the Corrfunc code:
If
show_progressisTrue, execute the function in chunks, logging to screen the progress along the way. This is useful for potentially long running pair counting jobs.When calling the function, capture stdout/stderr and C-level output and if an error occurs, raise an exception with all generated output for the user.
The relevant subclasses of this class are in
mocksandtheory.- Attributes
- binning_dims
Methods
__call__(loads, kwargs[, callback])Calls
callablein iterations, optionally callingcallbackbefore each iteration.- __call__(loads, kwargs, callback=None)[source]¶
Calls
callablein iterations, optionally callingcallbackbefore each iteration.This allows the
Corrfuncfunctioncallableto be called in chunks, giving the user a progress report after each iteration.- Parameters
loads (list of int) – the list of loads for every rank; this corresponds to the number of particles in the in
Aif we are correlatingAxBkwargs (dict) – the dictionary of arguments to pass to
funccallback (callable, optional) – a callable takings
kwargsas its first argument and a slice object as its second argument; this will be called first during each iteration
- Returns
result – the total binned pair counting result
- Return type