Last modification: 8 Apr 2014
In this example a map generated with healpy is transfored by the galactic magnetic lens. .
import healpy from parsec import MagneticLens import pylab as pl #load lens magneticLens = MagneticLens('/path/to/lens.cfg') magneticLens.normalizeLens() #generate some pattern l = [1,1,0,0] v = abs(healpy.synfast(l, nside=64)) v /= sum(v) healpy.mollview(map=v, sub=211, title='Unlensed image') rigidity = 5 # Eev magneticLens.transformModelVector(v, rigidity) healpy.mollview(map=v, sub=212, title='Lensed image') pl.show()