telegraphic / pygdsm

Python interface to Global Diffuse Sky Models (GDSM) for the radio sky between 10 MHz - 5 THz
MIT License
30 stars 7 forks source link

A bug for the 'include_cmb' option #17

Closed FurenDeng closed 9 months ago

FurenDeng commented 1 year ago

In GlobalSkyModel16, CMB temperature is subtracted multiple times

                output -=  K_CMB2MJysr(T, 1e9 * freq)

I think there missed a ifreq

telegraphic commented 9 months ago

Finally looking at this! Relevant code is here: https://github.com/telegraphic/pygdsm/blob/60ecc65dc85fcaee97a778dcf55776b10f3dc3ce/pygdsm/gsm16.py#L201

And I agree it should read

                output[ifreq] -=  K_CMB2MJysr(T, 1e9 * freq)