galsci / pysm

PySM 3: Sky emission simulations for Cosmic Microwave Background experiments
https://pysm3.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
36 stars 23 forks source link

changed bandpass_unit_conversion and add unit test #60

Closed NicolettaK closed 4 years ago

NicolettaK commented 4 years ago

This PR implements the modifications described in https://github.com/healpy/pysm/issues/59 to pysm3.utils.bandpass_unit_conversion.

Unit test is added, where a bandpass integrated CMB map in K_CMB unit is compared to the template CMB map.

zonca commented 4 years ago

thank you, I'll get to this next week

zonca commented 4 years ago

just noticed PySM 2 has nice tests for bandpass integration, I'll also import those here, so we have better coverage: https://github.com/bthorne93/PySM_public/blob/b3e23bb8f88182bf440b731a2bab7100a255af0d/pysm/test/test_common.py

zonca commented 4 years ago

@NicolettaK ok, I've improved the implementation to support tophat bandpasses and imported the tests from PySM 2, the integration agrees within 5% or 6% with the bandpass integration from Planck, see the unit test. I think it is reasonable.

can you please double-check before I merge?

zonca commented 4 years ago

@NicolettaK I have also added a comparison with PySM 2, the integration of the Planck bandpasses agrees to 0.02%, so I think this is safe to merge.

NicolettaK commented 4 years ago

Great!!! thanks @zonca