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

Fix d6 model #43

Closed xgarrido closed 4 years ago

xgarrido commented 4 years ago

Testing d6 model (Vansyngel 2016 arXiv:1611.02577) with the current presets configuration was not working. Two things were broken:

1) The initialization step was not passing some data members to the base class. Initialization of d6 model is fixed by https://github.com/healpy/pysm/commit/240b570cfafbfe6e1e8869ee82ffb04bc4102953. Some older data member (pixel_indices, for instance or MPI comm) have also been removed.

2) The emission computation was done for a list of frequencies and then returning an emission per frequency, I, Q, U and number of pixels. Commit https://github.com/healpy/pysm/commit/e5e5274e9b063b35a6f7ceb57835236116a65cc8 should address this, keeping the original code as much as possible (so, there might be room for optimization, numba for instance). The point is to integrate other frequencies at the end of d6 emission computation.

zonca commented 4 years ago

thanks! could you also contribute a unit test?

xgarrido commented 4 years ago

Ok do I create another PR in https://github.com/healpy/pysm-data/tree/master/pysm_2_test_data or I put fits files somewhere and you will push them into pysm-data repository ?

zonca commented 4 years ago

the first, thanks!

On Thu, Mar 12, 2020 at 12:29 PM Xavier Garrido notifications@github.com wrote:

Ok do I create another PR in https://github.com/healpy/pysm-data/tree/master/pysm_2_test_data or I put fits files somewhere and you will push them into pysm-data repository ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/healpy/pysm/pull/43#issuecomment-598374840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC5Q4VOZIRBLI3OR2HNXXLRHEZ2DANCNFSM4LGPLJWQ .

xgarrido commented 4 years ago

Done. I have used the same cryptic name for test data files but I see that for d7 model, you use a different pattern. I leave you change the name as you wish. Note that the computation at 353 GHz is buggy and so I skip the check for this frequency (btw it's working at 352 or 354 GHz...)