-
Notifications
You must be signed in to change notification settings - Fork 339
Description
Hi,
I've been looking into the way CLASS computes the spectrum of CMB spectral distortions, and I have noticed something odd in the file external/distortions/generate_PCA_files.py. In lines 203-205, the script defines the branching ratios J_g, J_mu and J_y by multiplying f_g, f_mu and f_y by the corresponding factors, in agreement with the notation in 1306.5751. However, those J_g, J_mu and J_y variables are never actually used in the script after being defined. When the script saves the branching ratios to a file (Lines 243-246), it instead saves f_g, f_mu and f_y. Indeed, if one looks at a branching ratios text file that is generated with this script, such as PIXIE_branching_ratios.dat, one can see in line 4 (z=1e3) that the J's don't add up to 1 and J_y = 0.25, whereas one would expect J_y = 1 from fig. 1 in 1306.5751 or fig. 1 in 1910.04619. However, when CLASS uses the branching ratios file in distortions.c, it does divide by 4 or multiply by 1.401 to get g, y and mu (Lines 928-930), as if expecting the file to contain J_g, J_mu and J_y, in agreement with eq. 6 in 1306.5751.
Due to all that, I believe that there is a bug in the way CLASS handles spectral distortions. I think the file should save the J_g, J_mu and J_y variables (instead of f_g, f_mu and f_y) when saving the branching ratios. I am not sure if this only affects the notation in the code or if it also affects the resulting physical spectral distortions. From the way distortions.c reads the branching ratios file, I would say the physical results might be affected. Please take look into this and see if you agree with my findings.
Thanks a lot for your help and for maintaining CLASS.
Best regards,
Héctor Sanchis Pérez