Résumé
The StarDICE experiment seeks to establish a metrology chain linking laboratory standards to astrophysical fluxes, targeting 1 mmag accuracy in the $\textit{griz}$ bands. Reaching this precision requires mitigating variable atmospheric effects, especially gray extinction from clouds, which remains a major challenge. To address this challenge, we present a novel method for correcting photometric data using simultaneous radiometric measurements from an infrared thermal camera. The gray extinction correction model is fitted on an image-by-image basis as a function of thermal radiance excess and difference between synthetic and instrumental fluxes of calibration stars. This approach stands out by avoiding any assumptions about spatial structure and leveraging a forward model combining in situ environmental monitoring, radiative transfer simulations and use of Gaia Data Release 3 star catalogs. We demonstrate the method using data collected from a dedicated experimental remote observation system, built to conduct repeated observations of two fields over several nights in varying atmosphere conditions. We show that applying the correction model to each source in the test sample results in a reduction of residuals between corrected and reference magnitudes. It delivers extinction correction maps for individual images with a resolution of 2 arcmin and an accuracy of $\sim$0.01 mag. This leads to a significant improvement in accuracy per image, with the mean absolute error decreasing from 0.64 to 0.11 mag for the most gray extinguished exposures. The temporal variations in extinction for non-ideal photometric sequences can be reduced to 0.025 mag per source, which is promising for its application in StarDICE.