Skip to content

Draft: Multi-Frequency and `HPSpace` Plotting refactor

Lukas Platz requested to merge mf_plotting_refactor into NIFTy_8

Hi @pfrank @mtr @wmarg @veberle,

since I promised Margret to make the multifrequency plotting routine improvements created for the Fermi paper available for general usage, I took two days to refactor the multifrequency plotting routines of NIFTy.

Following the philosophy of "nifty.Plot() is only a rough helper, not supposed to be all-powerful", I extracted the multifrequency-to-RGB conversion into a separate class and polished its interfaces, such that people can use it in their own plotting routines.

As Philipp Arras and Vincent Eberle had created a helper to also support Hammer projections (alongside Mollweide) a while ago, I took the sphere-to-2d projection functionality out of nifty.Plot() into a separate function, that now supports both Mollweide and Hammer projection. It is now also usable in external plotting scripts.

I have added docstrings and a few tests for new functionality.

Also, I think I discoverd a bug in the multifrequency color mapping - a corresponding merge request into this branch follows in a second.

@mtr: As I belive you to be the original author of the mf to rgb mapping, could you maybe/please have a look if I made any stupid mistakes?

Merge request reports