BinnedCorr2Config

class lsst.analysis.tools.actions.vector.BinnedCorr2Config(*args, **kw)

Bases: Config

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 BinnedCorr2 in treecorr, which is the base class for all two-point correlation function calculations. The default values set for the fields are identical to the default values set in v4.2 of treecorr. The parameters that are excluded in this class are ‘verbose’, ‘log_file’, ‘output_dots’, ‘rng’ and ‘pairwise’ (deprecated). For details about these options, see the documentation for treecorr: https://rmjarvis.github.io/TreeCorr/_build/html/correlation2.html

A separate config class is used instead of constructing a 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 in CalcRhoStatistics class. It only supports some of the fields that are relevant for rho-statistics calculations.

Attributes Summary

bin_size

The width of the bins in log(separation).

bin_slop

How much slop to allow in the placement of pairs in the bins.

bin_type

What type of binning should be used? (str, default 'Log')

max_sep

The maximum separation in units of sep_units, if relevant.

metric

Which metric to use for distance measurements.

min_sep

The minimum separation in units of sep_units, if relevant.

nbins

How many bins to use.

num_bootstrap

How many bootstrap samples to use for the 'bootstrap' and 'marked_bootstrap' var methods.

precision

The precision to use for the output values.

sep_units

The units to use for the separation values, given as a string.

var_method

Which method to use for estimating the variance (str, default 'shot')

Methods Summary

validate()

Validate the Config, raising an exception if invalid.

Attributes Documentation

bin_size

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. (float, default None)

bin_slop

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. 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. (float, default None)

bin_type

What type of binning should be used? (str, default 'Log')

Allowed values:

'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)

'None'

Field is optional

max_sep

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. (float, default None)

metric

Which metric to use for distance measurements. For details, see https://rmjarvis.github.io/TreeCorr/_build/html/metric.html (str, default 'Euclidean')

Allowed values:

'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.

'None'

Field is optional

min_sep

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. (float, default None)

nbins

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. (int, default None)

num_bootstrap

How many bootstrap samples to use for the ‘bootstrap’ and ‘marked_bootstrap’ var methods. (int, default 500)

precision

The precision to use for the output values. This specifies how many digits to write. (int, default 4)

sep_units

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. (str, default 'radian')

Allowed values:

'arcsec'

arcsec

'arcmin'

arcmin

'degree'

degree

'hour'

hour

'radian'

radian

'None'

Field is optional

var_method

Which method to use for estimating the variance (str, default 'shot')

Allowed values:

'shot'

shot

'jackknife'

jackknife

'sample'

sample

'bootstrap'

bootstrap

'marked_bootstrap'

marked_bootstrap

'None'

Field is optional

Methods Documentation

validate()

Validate the Config, raising an exception if invalid.

Raises:
lsst.pex.config.FieldValidationError

Raised if verification fails.

Notes

The base class implementation performs type checks on all fields by calling their validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.