yaw.config.BackendConfig#
- class yaw.config.BackendConfig(thread_num: int | None = None, crosspatch: bool = True, rbin_slop: float = 0.01)[source]#
Bases:
BaseConfigConfiguration of backends used for correlation measurements.
- Parameters:
thread_num (
int, optional) – Number of threads to use for parallel processing.crosspatch (
bool, optional) – Whether to count pairs across patch boundaries (scipybackend only).rbin_slop (
int, optional) – TreeCorrrbin_slopparameter (treecorrbackend only).
Methods
__init__([thread_num, crosspatch, rbin_slop])create(**kwargs)Create a new configuration object.
from_dict(the_dict, **kwargs)Create a class instance from a dictionary representation of the minimally required data.
get_threads([max])Get the number of threads for parallel processing.
modify([thread_num, crosspatch, rbin_slop])Create a copy of the current configuration with updated parameter values.
to_dict()Serialise the class instance to a dictionary containing a minimal set of required data.
Attributes
Whether to count pairs across patch boundaries (
scipybackend only).TreeCorr
rbin_slopparameter (treecorrbackend only).Number of threads to use for parallel processing.
- classmethod create(**kwargs: Any) T#
Create a new configuration object.
By default this is an alias for
__init__(). Configuration classes that are hierarchical (i.e. contain configuration objects as attributes) implement this method to provide a single constructer for its own and its subclasses parameters.
- crosspatch: bool = True#
Whether to count pairs across patch boundaries (
scipybackend only).
- classmethod from_dict(the_dict: dict[str, Any], **kwargs: dict[str, Any]) T#
Create a class instance from a dictionary representation of the minimally required data.
- Parameters:
the_dict (
dict) – Dictionary containing the data.**kwargs – Additional data needed to construct the class instance.
- get_threads(max=None) int[source]#
Get the number of threads for parallel processing.
The value is capped at an optional maximum value.
- Parameters:
max (
int, optional) – Maximum number to return.- Returns:
int
- modify(thread_num: int | None = NotSet, crosspatch: bool = NotSet, rbin_slop: float = NotSet) BackendConfig[source]#
Create a copy of the current configuration with updated parameter values.
The method arguments are identical to
create(). Values that should not be modified are by default represented by the special valueNotSet.
- rbin_slop: float = 0.01#
TreeCorr
rbin_slopparameter (treecorrbackend only).
- thread_num: int | None = None#
Number of threads to use for parallel processing.
- to_dict() dict[str, Any]#
Serialise the class instance to a dictionary containing a minimal set of required data.
- Returns:
dict