The s2 package can represent any arbitrary function defined on the sphere. Both real space map and harmonic space spherical harmonic representations are supported. Basic sky representations have been extended to simulate full sky noise distributions and Gaussian cosmic microwave background realisations. Support for the representation and convolution of beams is also provided. The code requires HEALPix (ascl:1107.018) and CFITSIO (ascl:1010.001).
https://ui.adsabs.harvard.edu/abs/2007ITSP...55..520M and please reference the download site: http://www.jasonmcewen.org/codes.html