smpy.utils.load_shear_data¶
- smpy.utils.load_shear_data(shear_cat_path, coord1_col, coord2_col, g1_col, g2_col, weight_col=None, hdu=0)[source]¶
Load shear catalog from FITS file.
Read shear catalog data from a FITS file and return as a pandas DataFrame with standardized column names for use in mass mapping operations.
- Parameters:
shear_cat_path (str) – Path to FITS catalog file.
coord1_col (str) – Name of first coordinate column (e.g., ‘ra’ or ‘x’).
coord2_col (str) – Name of second coordinate column (e.g., ‘dec’ or ‘y’).
g1_col (str) – Name of g1 shear component column.
g2_col (str) – Name of g2 shear component column.
weight_col (str, optional) – Name of weight column. If None, unit weights are assigned.
hdu (int, optional) – HDU number to read from FITS file.
- Returns:
shear_data – DataFrame with standardized column names: ‘coord1’, ‘coord2’, ‘g1’, ‘g2’, ‘weight’.
- Return type:
pandas.DataFrame
- Raises:
IndexError – If specified HDU is not found in the FITS file.
KeyError – If required columns are not found in the catalog.