hpmcm.shear_data module
- class hpmcm.shear_data.ShearData(shear_table, stats_table, shear, cat_type, tract, snr_cut=7.5)[source]
Bases:
objectCollection of shear related data for a single catalog
Attritubes
- shear: float
Applied shear
- cat_type: str
Catalog type
- tract: int
Tract
- n_objects: int
Number of objects in catalog
- n_in_cell: int
Nubmer of objects in the central region of cell
- n_used: int
Number of objects passing snr cut and in central region of cell
- n_good: int
Number of fully matched objects
- n_bad: int
Number on non-fully matched objects
- n_all: int
Number of fully and non-fully matched objects
- effic: float
Efficiency to fully match objects
- efficErr: float
Error on efficiency to fully match objects
- hists: ShearHistograms
Histograms of shear data
- stats: ShearStats
Summary statistics
- makePlots(*, use_central=True)[source]
Make the standard plots
- Return type:
dict[str,Figure]- Parameters:
use_central (bool)
- Parameters:
shear_table (pandas.DataFrame)
stats_table (pandas.DataFrame)
shear (float)
cat_type (str)
tract (int)
snr_cut (float)
- class hpmcm.shear_data.ShearHistogramStats(weights, bin_centers)[source]
Bases:
objectSimple class to store stats about a histogram
- Parameters:
weights (np.ndarray)
bin_centers (np.ndarray)
- w
Sum of weights
- Type:
float
- mean
Histogram mean
- Type:
float
- std
Histogram standard deviation
- Type:
float
- error
Error on histogram mean
- Type:
float
- inv_var
Inverse Variance
- Type:
float
- class hpmcm.shear_data.ShearHistograms(good, bad, cat_type)[source]
Bases:
objectSimple class to store histogram relating to shear calibration
{type} is the matching type, one of “good”, “bad”, “all”
{i}, {j} are the components of the shear: 1, 2
- Parameters:
good (pandas.DataFrame)
bad (pandas.DataFrame)
cat_type (str)
- bin_edges
Bin edges for all histograms
- Type:
np.ndarray
- bin_centers
Bin centers for all histograms
- Type:
np.ndarray
- central
Slice to select central region of histogram
- Type:
slice
- central_edges
Slice to select edges for central region of histogram
- Type:
slice
- good_delta_g_{i}_{j}
Histogram of g_{i}_{j}p - g_{i}_{j}m for all well-matched objects
- Type:
np.ndarray
- {type}_g_{i}_{cat}
Histogram of all g_{i} value of all objects of {type} in {cat}
- Type:
np.ndarray
- plotMetaDetect(hist1p, hist1m, hist2p, hist2m, stats_g_1=None, stats_g_2=None, shear=0.01, title='', *, use_central=True)[source]
Plot hist1p - hist1m and hist2p - hist2m for all objects of a particular type
- Return type:
Figure- Parameters:
hist1p (ndarray)
hist1m (ndarray)
hist2p (ndarray)
hist2m (ndarray)
stats_g_1 (ShearHistogramStats | None)
stats_g_2 (ShearHistogramStats | None)
shear (float)
title (str)
use_central (bool)
- plotMetaDetectAll(stats_g_1=None, stats_g_2=None, shear=0.01, *, use_central=True)[source]
Plot hist1p - hist1m and hist2p - hist2m for all objects
- Return type:
Figure- Parameters:
stats_g_1 (ShearHistogramStats | None)
stats_g_2 (ShearHistogramStats | None)
shear (float)
use_central (bool)
- plotMetaDetectBad(stats_g_1=None, stats_g_2=None, shear=0.01, *, use_central=True)[source]
Plot hist1p - hist1m and hist2p - hist2m for non-fully matched objects
- Return type:
Figure- Parameters:
stats_g_1 (ShearHistogramStats | None)
stats_g_2 (ShearHistogramStats | None)
shear (float)
use_central (bool)
- plotMetaDetectGood(stats_g_1=None, stats_g_2=None, shear=0.01, *, use_central=True)[source]
Plot hist1p - hist1m and hist2p - hist2m for all fully matched objects
- Return type:
Figure- Parameters:
stats_g_1 (ShearHistogramStats | None)
stats_g_2 (ShearHistogramStats | None)
shear (float)
use_central (bool)
- plotMetacalib(stats_g_1=None, stats_g_2=None, shear=0.01, *, use_central=True)[source]
Plot delta_g_1_1 and delta_g_2_2 for fully matched objects
- Return type:
Figure- Parameters:
stats_g_1 (ShearHistogramStats | None)
stats_g_2 (ShearHistogramStats | None)
shear (float)
use_central (bool)
- class hpmcm.shear_data.ShearProfileHistogramStats(hist_2d)[source]
Bases:
objectSimple class to store stats about a 2d histogram
- Parameters:
hist_2d (tuple[np.ndarray, np.ndarray, np.ndarray])
- w
Sum of weights
- Type:
np.array
- mean
Histogram mean
- Type:
np.array
- std
Histogram standard deviation
- Type:
np.array
- error
Error on histogram mean
- Type:
np.array
- inv_var
Inverse Variance
- Type:
np.array
- class hpmcm.shear_data.ShearStats(hists)[source]
Bases:
objectSimple class to store shear statisitics
{type} is the matching type, one of “good”, “bad”, “all”
{i}, {j} are the components of the shear: 1, 2
- Parameters:
hists (ShearHistograms)
- delta_g_{i}_{i}
Stats for g_{i}_{j}p - g_{i}_{j}m for fully matched objects
- Type:
- {type}_g_{i}_{j}
Stats for g_{i}_{j} for objects of {type}
- Type: