sp_validation.cosmo_val.pure_eb¶
Pure E/B-mode decomposition diagnostic.
Provides PureEBMixin, which computes and plots the pure E/B-mode
correlation functions (xi+/xi- pure-mode decomposition) for catalog versions.
- class PureEBMixin[source]¶
Bases:
object- calculate_pure_eb(version, min_sep=None, max_sep=None, nbins=None, min_sep_int=0.08, max_sep_int=300, nbins_int=1000, npatch=None, compute_tomography=False, cov_path_int=None)[source]¶
Calculate the pure E/B modes for the given catalog version.
ξ± is measured on the fine integration grid only, as the version’s sealed part (
calculate_2pcf_version()), so a blinded catalogue’s modes are concealed. The reporting binning (the instance’s treecorr_config unless overridden) enters as bin edges, snapped onto the fine edges, into whichpure_eb_operator()averages the modes.- Parameters:
version (str) – The catalog version to compute the pure E/B modes for.
min_sep (float, float, int, optional) – Reporting binning. Default to the values in self.treecorr_config.
max_sep (float, float, int, optional) – Reporting binning. Default to the values in self.treecorr_config.
nbins (float, float, int, optional) – Reporting binning. Default to the values in self.treecorr_config.
min_sep_int (float, float, int, optional) – Integration binning (default: 0.08-300 arcmin, 1000 bins). It must extend beyond the reporting range on both sides.
max_sep_int (float, float, int, optional) – Integration binning (default: 0.08-300 arcmin, 1000 bins). It must extend beyond the reporting range on both sides.
nbins_int (float, float, int, optional) – Integration binning (default: 0.08-300 arcmin, 1000 bins). It must extend beyond the reporting range on both sides.
npatch (int, optional) – Jackknife patch count. Defaults to self.npatch.
compute_tomography (bool, optional) – Whether to compute the pure E/B modes for every tomographic bin pair instead of the non-tomographic pair. Defaults to False.
cov_path_int (str, optional) – Analytic ξ± covariance on the integration grid. Without it the covariance is the jackknife the integration-grid part carries. One file holds one pair’s covariance, so it cannot be combined with
compute_tomography.
- Returns:
Mapping of
"tomo_bin_{b1}_tomo_bin_{b2}"(the single key"tomo_bin_all_tomo_bin_all"without tomography) to the results ofcalculate_pure_eb_correlation(): the six pure-mode arrays, their covariancecovand itsnpatchrecord (Nonefor an analytic covariance), the reporting grid and the integration-grid ξ±.- Return type:
- plot_pure_eb(versions=None, output_dir=None, fiducial_xip_scale_cut=None, fiducial_xim_scale_cut=None, min_sep=None, max_sep=None, nbins=None, min_sep_int=0.08, max_sep_int=300, nbins_int=1000, npatch=None, compute_tomography=False, cov_path_int=None, results=None)[source]¶
Generate comprehensive pure E/B mode analysis plots.
Creates four types of plots for each version and bin pair: 1. Integration vs Reporting comparison 2. E/B/Ambiguous correlation functions 3. 2D PTE heatmaps 4. Covariance matrix visualization
- Parameters:
versions (list, optional) – List of catalog versions to process. Uses self.versions if None.
output_dir (str, optional) – Output directory for plots. Uses configured output path if None.
fiducial_xip_scale_cut (tuple, optional) – (min_scale, max_scale) for xi+ fiducial analysis, shown as gray regions
fiducial_xim_scale_cut (tuple, optional) – (min_scale, max_scale) for xi- fiducial analysis, shown as gray regions
min_sep (float, float, int, optional) – Binning parameters for reporting scale. Uses treecorr_config if None.
max_sep (float, float, int, optional) – Binning parameters for reporting scale. Uses treecorr_config if None.
nbins (float, float, int, optional) – Binning parameters for reporting scale. Uses treecorr_config if None.
min_sep_int (float, float, int) – Binning parameters for integration scale (default: 0.08-300 arcmin, 1000 bins)
max_sep_int (float, float, int) – Binning parameters for integration scale (default: 0.08-300 arcmin, 1000 bins)
nbins_int (float, float, int) – Binning parameters for integration scale (default: 0.08-300 arcmin, 1000 bins)
npatch (int, optional) – Number of patches for jackknife covariance. Uses self.npatch if None.
compute_tomography (bool, optional) – Whether to compute and plot every tomographic bin pair instead of the non-tomographic pair. Defaults to False.
cov_path_int (str, optional) – Analytic ξ± covariance on the integration grid; the jackknife is used without it.
results (dict or list, optional) – Precalculated
calculate_pure_eb()results ({bin_key: result}) to avoid recomputation: a single such dict for one version, or a list of them for multiple versions. If None (default), results will be calculated using calculate_pure_eb.
Notes
This function orchestrates the full E/B mode analysis workflow:
Uses instance configuration as defaults for unspecified parameters
Uses the analytic covariance when cov_path_int is given, the jackknife otherwise
Generates standardized output file naming based on all analysis parameters
Delegates individual plot generation to specialized functions in b_modes module