Open algebrato opened 3 years ago
Thank you for the suggestion! This function is used to derive the thermal loading, not extinction from scattering. To that end, neither wet or total opacity is exactly right. I'll make a note to consider if there is a better way to derive it.
Hi @keskitalo! Thank you for your time. I made two different plots with AM (https://www.cfa.harvard.edu/~spaine/am/) and with TOAST with the python binding: atm_absorption_coefficient_vec
.
Orange line = AM results from tenerife sky (e^(-\tau))
Blue line = TOAST results using a weather file that I made out of the ERA-5 reanalysis data
absorb=atm_absorption_coefficient_vec(2390, temperature_air, pressure, pwv, 36, 50, 100)
e^(\tau)= -1*abosrb+1
This second plot was made using double opacity = ss.getTotalOpacity().get();
in toast/src/libtoast/src/toast_atm_utils.cpp
and the results are quite similar. The transmittance made with TOAST is low because I have built the CDF function with ERA-5 and (for Tenerife, it's a small island, a little biased by the water vapor that came from the ocean due to the spatial resolution limit of the reanalysis data).
Since the loading in the pipeline_tools
are build with my_abs*air_temperature
, maybe this estimation could be under-estimated (in particular for low frequencies channels)
https://github.com/hpc4cmb/toast/blob/618b26c371baabd8a7898eff037cab3f58d23078/src/libtoast/src/toast_atm_utils.cpp#L102
Dear maintainers, this line sounds weird. Why do you return only the wet opacity? For high frequencies (~150GHz) could be work, but for low frequencies (10-50 GHz), the contribution of the dry air scattering and the O_2 could not be negligible.
May I suggest to change this line with
double opacity = ss.getTotalOpacity().get();
, and the same for the vector function