There is a mistake in the current construction of the transmission from the bandpasses, in the presence of bandpass shift.
In the current version we are doing:
nub = nu_ghz + params[bandpar] <--- freqs nu_ghz shifted by params['bandpass_shift'] sampled by cobaya
trans_norm = np.trapz(bp * _cmb2bb(nu_ghz), nu_ghz) <--- integral of the bandpass bp and the conversion factor from cmb to brightness temperature
trans = bp / trans_norm * _cmb2bb(nub) <--- trasmission normalized by the integral trans_norm
self.bandint_freqs.append([nub, trans])
so we should use the shifted frequency array nub both at the numerator and the denominator of trans
This way, we assume that the cmb component would always have trans = 1 (since the cmb component can come out of the integral and the numerator and denominator can simplify)
This is implicitly what we are already doing by summing the cmb theory spectra to the foreground spectra integrated in band:
cmbfg_dict[s, exp1, exp2] = Dls[s] + fg_dict[s, "all", exp1, exp2]
The current version works fine when bandpass_shifts = 0.
There is a mistake in the current construction of the transmission from the bandpasses, in the presence of bandpass shift. In the current version we are doing:
while we should do:
so we should use the shifted frequency array
nub
both at the numerator and the denominator oftrans
This way, we assume that the cmb component would always havetrans
= 1 (since the cmb component can come out of the integral and the numerator and denominator can simplify) This is implicitly what we are already doing by summing the cmb theory spectra to the foreground spectra integrated in band:cmbfg_dict[s, exp1, exp2] = Dls[s] + fg_dict[s, "all", exp1, exp2]
The current version works fine when
bandpass_shifts = 0
.