Fix input sky unit error - #549
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added a CI test for the verification of correct conversion when bandpass integrating. |
|
I noticed something which can be improved for tidiness. Currently, we assume the input cmb power spectrum used to generate the cmb map is always in uK_CMB (see here), and then we apply the scaling factor so that our base units are K_CMB. We then perform conversions from that on, and that is coherent with the default unit in here being K_CMB. For this reason, the following part of the cmb unit conversion code is never reached: litebird_sim/litebird_sim/input_sky.py Lines 109 to 118 in 7e16832 We should either delete this part, or relax the assumption that the input power spectrum is always in uK_CMB (and in that case add a parameter to SkyGenerator stating the unit of the input spectrum in case one is given). What do you think? I suppose we always use uK_CMB, so I don't know if the second option is relevant, but in that case we can just delete the code. |
This PR fixes #548
origin_unitin _get_cmb_unit_conversion() is by default K_CMB, but then when calling pysm3.bandpass_unit_conversion we do not specify that as the input unit, so it was using the default uK_RJ.Now it is working.
TODO before merging:(DONE)