Different MAF healpix projections/coordinates

Tags: #<Tag:0x00007f7f7035b5a0> #<Tag:0x00007f7f7035b2f8>

(Will Dawson) #1

I was looking through the MAF tutorials and from @yoachim’s linked introductory talk slides it is noted that HealpixSlicer can be set to use different coordinate systems. However, it wasn’t clear to me from the healpixSlicer() doc string how this should be implemented.

Before I started digging in the code I thought I would see if anyone in the community knows offhand how to easily enable different projections/coordinates in the healpixSlicer() function.

(Lynne Jones) #2

Are you referring to different coordinate systems as in slide 29 at https://github.com/LSST-nonproject/sims_maf_contrib/blob/master/workshops/UK_2015/Cambridge_MAFIntro.pdf? (i.e. instead of RA/Dec use ecliptic or alt/az coordinates?)
If so, you can do that by simply changing the ‘latCol’ and ‘lonCol’ to be the names of the columns you want to use to slice on, when you instantiate the HealpixSlicer. (see docstring or https://github.com/lsst/sims_maf/blob/master/python/lsst/sims/maf/slicers/healpixSlicer.py)

If you want to then change the orientation for the plot, you can change the ‘rot’ value in the plotting dictionary. (see how it’s used in the plot generation @ https://github.com/lsst/sims_maf/blob/master/python/lsst/sims/maf/plots/spatialPlotters.py).


slicer = slicers.HealpixSlicer(nside=64, latCol='zenithDistance', lonCol='azimuth', useCache=False) metric = metrics.CountMetric('expMJD', metricName='NVisits Alt/Az') plotDict = {'rot': (0, 90, 0)} plotFunc = plots.HealpixSkyMap() bundle = metricBundles.MetricBundle(metric, slicer, '', plotDict=plotDict, plotFuncs=[plotFunc])

(Peter Yoachim) #3

Here’s a quick notebook that runs through most of the ways one might want to fiddle with the display, showing changing resolution, switching on/off dithering, going to galactic coords (and then dithering), using the healpy display functions, etc.

(Will Dawson) #4

@ljones thank you for the clarification and @yoachim thank you for adding the notebook to the tutorials. This is just what I needed.

(Will Dawson) #5

Just a heads up. I was able to run all of the notebook except for the LambertSkyMap chunk. I created an issue, and will try to figure it out.