lsst.meas.algorithms g1581cd22ba+09d2bac32a
Loading...
Searching...
No Matches
lsst.meas.algorithms.treecorrUtils.TreecorrConfig Class Reference
Inheritance diagram for lsst.meas.algorithms.treecorrUtils.TreecorrConfig:

Public Member Functions

 validate (self)
 

Static Public Attributes

 nbins
 
 bin_size
 
 min_sep
 
 max_sep
 
 sep_units
 
 bin_slop
 
 precision
 
 metric
 
 bin_type
 
 var_method
 
 npatch
 
 num_bootstrap
 
 rng_seed
 

Detailed Description

A Config class that holds some of the parameters supported by treecorr.

The fields in this class correspond to the parameters that can be passed to
any calls to `treecorr` methods, including catalog creation and two-point
correlation function calculations. The default values set for the fields
are identical to the default values set in v4.3 of `treecorr`.

A separate config class is used instead
of constructing a `~lsst.pex.config.DictField` so that mixed types can be
supported and the config can be validated at the beginning of the
execution.

Notes
-----
This is intended to be used with correlations of PSF residuals. It only supports
some of the fields that are relevant for rho-statistics calculations and the likes
of it.

Definition at line 26 of file treecorrUtils.py.

Member Function Documentation

◆ validate()

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.validate ( self)

Definition at line 211 of file treecorrUtils.py.

Member Data Documentation

◆ bin_size

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.bin_size
static
Initial value:
= Field[float](
doc=(
"The width of the bins in log(separation). "
"Exactly three of nbins, bin_size, min_sep, max_sep are required. "
"If bin_size is not given, it will be calculated from the values "
"of the other three."
),
optional=True,
)

Definition at line 60 of file treecorrUtils.py.

◆ bin_slop

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.bin_slop
static
Initial value:
= Field[float](
doc=(
"How much slop to allow in the placement of pairs in the bins. "
"If bin_slop = 1, then the bin into which a particular pair is "
"placed may be incorrect by at most 1.0 bin widths. "
r"If None, use a bin_slop that gives a maximum error of 10% on "
"any bin, which has been found to yield good results for most "
"applications."
),
default=None,
optional=True,
)

Definition at line 103 of file treecorrUtils.py.

◆ bin_type

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.bin_type
static
Initial value:
= ChoiceField[str](
doc="What type of binning should be used?",
default="Log",
optional=True,
allowed={
"Log": (
"Logarithmic binning in the distance. The bin steps will "
"be uniform in log(r) from log(min_sep) .. log(max_sep)."
),
"Linear": (
"Linear binning in the distance. The bin steps will be "
"uniform in r from min_sep .. max_sep."
),
"TwoD": (
"2-dimensional binning from x = (-max_sep .. max_sep) "
"and y = (-max_sep .. max_sep). The bin steps will be "
"uniform in both x and y. (i.e. linear in x,y)"
),
},
)

Definition at line 153 of file treecorrUtils.py.

◆ max_sep

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.max_sep
static
Initial value:
= Field[float](
doc=(
"The maximum separation in units of sep_units, if relevant. "
"Exactly three of nbins, bin_size, min_sep, max_sep are required. "
"If max_sep is not given, it will be calculated from the values "
"of the other three."
),
optional=True,
)

Definition at line 80 of file treecorrUtils.py.

◆ metric

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.metric
static
Initial value:
= ChoiceField[str](
doc=(
"Which metric to use for distance measurements. For details, see "
"https://rmjarvis.github.io/TreeCorr/_build/html/metric.html"
),
default="Euclidean",
optional=True,
allowed={
"Euclidean": "straight-line Euclidean distance between two points",
"FisherRperp": (
"the perpendicular component of the distance, "
"following the definitions in "
"Fisher et al, 1994 (MNRAS, 267, 927)"
),
"OldRperp": (
"the perpendicular component of the distance using the "
"definition of Rperp from TreeCorr v3.x."
),
"Rlens": (
"Distance from the first object (taken to be a lens) to "
"the line connecting Earth and the second object "
"(taken to be a lensed source)."
),
"Arc": "the true great circle distance for spherical coordinates.",
"Periodic": "Like ``Euclidean``, but with periodic boundaries.",
},
)

Definition at line 125 of file treecorrUtils.py.

◆ min_sep

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.min_sep
static
Initial value:
= Field[float](
doc=(
"The minimum separation in units of sep_units, if relevant. "
"Exactly three of nbins, bin_size, min_sep, max_sep are required. "
"If min_sep is not given, it will be calculated from the values "
"of the other three."
),
optional=True,
)

Definition at line 70 of file treecorrUtils.py.

◆ nbins

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.nbins
static
Initial value:
= Field[int](
doc=(
"How many bins to use. "
"(Exactly three of nbins, bin_size, min_sep, max_sep "
"are required. If nbins is not given, it will be "
"calculated from the values of the other three, "
"rounding up to the next highest integer. "
"In this case, bin_size will be readjusted to account "
"for this rounding up."
),
optional=True,
check=lambda x: x > 0,
)

Definition at line 46 of file treecorrUtils.py.

◆ npatch

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.npatch
static
Initial value:
= Field[int](
doc="How many patches to split the catalog into for the purpose of "
"jackknife variance or other options that involve running via "
"patches (boostrap, marked_boostrap etc.)",
default=1,
optional=True,
)

Definition at line 190 of file treecorrUtils.py.

◆ num_bootstrap

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.num_bootstrap
static
Initial value:
= Field[int](
doc=(
"How many bootstrap samples to use for the 'bootstrap' and 'marked_bootstrap' var methods."
),
default=500,
optional=True,
)

Definition at line 198 of file treecorrUtils.py.

◆ precision

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.precision
static
Initial value:
= Field[int](
doc=(
"The precision to use for the output values. This specifies how many digits to write."
),
default=4,
optional=True,
check=lambda x: x > 0,
)

Definition at line 116 of file treecorrUtils.py.

◆ rng_seed

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.rng_seed
static
Initial value:
= Field[int](
doc="Value to seed the treecorr random number generator with. Used to generate patches.",
default=13579,
)

Definition at line 206 of file treecorrUtils.py.

◆ sep_units

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.sep_units
static
Initial value:
= ChoiceField[str](
doc=(
"The units to use for the separation values, given as a string. "
"This includes both min_sep and max_sep above, as well as the "
"units of the output distance values."
),
default=None,
optional=True,
allowed={
units: units for units in ["arcsec", "arcmin", "degree", "hour", "radian"]
},
)

Definition at line 90 of file treecorrUtils.py.

◆ var_method

lsst.meas.algorithms.treecorrUtils.TreecorrConfig.var_method
static
Initial value:
= ChoiceField[str](
doc="Which method to use for estimating the variance",
default="shot",
optional=True,
allowed={
method: method
for method in [
"shot",
"jackknife",
"sample",
"bootstrap",
"marked_bootstrap",
]
},
)

Definition at line 174 of file treecorrUtils.py.


The documentation for this class was generated from the following file: