sweverett / Balrog-GalSim

Modules for GalSim that will be useful for DES images in conjunction with Balrog.
MIT License
5 stars 5 forks source link

Mcal catalogs are not correctly dereddened #87

Closed sweverett closed 4 years ago

sweverett commented 4 years ago

The Balrog matched MOF & SOF catalogs are correctly providing dereddened flux/mag quantities but the h5 mcal catalogs are not. There is a flux calibration part of the usual convert_mcal_to_h5() function in Troxel’s y3_matched_cat/make.py file that we were not able to do as we don’t have the necessary DESDM-provided chromatic calibration corrections that we decided wasn’t worth the effort given our timeline:

for band in ['r','i','z']:
    corr = 10**(-0.4*(f2['catalog/gold/delta_mag_chrom_'+band][:]+f2['catalog/gold/delta_mag_y4_'+band][:]-f2['catalog/gold/a_sed_sfd98_'+band][:]))[s]

However, the dereddening is contained in this line. We don't need to apply the fully chromatic correction but still need to apply an approximation elsewhere - perhaps saving the dereddening factors used in add_deredden_cols.py to the matched catalogs and appending these to the detection catalog where they can be used by mcal stacking.