I was trying to convert the Sentinel-2 1C product to radiance and came across two links first (https://gis.stackexchange.com/questions/285996/convert-sentinel-2-1c-product-from-reflectance-to-radiance) once says
radiance = ((pixelValueBandX * cos(incidenceAngle) * solarIrradianceBandX) / (pi * d2)) / 10000 where d2 is 1.0/U
Where as second (https://github.com/umwilm/SEN2COR/blob/96a00464bef15404a224b2262accd0802a338ff9/sen2cor/L2A_Tables.py#L1937) one says
rad = rho * cos(radians(sza)) * Es * sc / (pi * d2) where: d2 = 1.0 / U scale: 1 / (0.001 * 1000) = 1 (default)
So, I have few questions amongst the two which one is correct. I don't see any scaling factor in the first one. Moreover, does the incidence angle here denotes the value of Mean_Sun_Angle.ZENITH_ANGLE from file MTD_TL.xml?
Also, Let's say i do atmospheric correction using SEN2COR or DOS. I would get the BOA reflectance, right? So, then how do i convert it to a BOA radiance?