https://github.com/zonca/icocmb
Project HEALPix maps to a Truncated Icosahedron (Soccer-ball!)
https://github.com/zonca/icocmb
Last synced: 3 months ago
JSON representation
Project HEALPix maps to a Truncated Icosahedron (Soccer-ball!)
- Host: GitHub
- URL: https://github.com/zonca/icocmb
- Owner: zonca
- License: gpl-2.0
- Created: 2013-09-20T16:40:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-20T16:54:45.000Z (over 11 years ago)
- Last Synced: 2025-01-13T10:30:20.130Z (5 months ago)
- Language: Python
- Homepage: http://figshare.com/articles/Planck_maps_projected_on_a_Truncated_Icosahedron/799823
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
icocmb: Project HEALPix maps to a Truncated Icosahedron
=======================================================Requirements
------------* `matplotlib` (tested only 1.3.0)
* `healpy`, needs this patch to be applied to `projaxes.py`:```python
diff --git a/healpy/projaxes.py b/healpy/projaxes.py
index 354fd99..9818de9 100644
--- a/healpy/projaxes.py
+++ b/healpy/projaxes.py
@@ -317,6 +317,8 @@ class SphericalProjAxes(axes.Axes):
vec = R.dir2vec(theta,phi,lonlat=lonlat)
vec = (R.Rotator(rot=rot,coord=coord,eulertype='Y')).I(vec)
x,y = self.proj.vec2xy(vec,direct=kwds.pop('direct',False))
+ if kwds.pop("return_projected_points", False):
+ return x, y
s = self.scatter(x, y, *args, **kwds)
if save_input_data:
if not hasattr(self, '_scatter_data'):
```or get the `icocmb` branch from the `healpy` repository:
https://github.com/healpy/healpy/tree/icocmb
How to run
----------It is important always to use the non-interactive `matplotlib` backend,
so better not run inside `ipython --pylab`.Steps:
* the script first creates a grid of all the hexagons and pentagons
* reads the `HEALPix` Planck map (you can modify to read other maps)
* makes gnomviews of all the pentagons and rescales them to fit in the figure
* makes gnomviews of all the hexagons and rescales them to fit in the figure
* saves as pdfIt is a quite hacky script (sorry), I could not find a way to compute automatically
the scale factor, so I estimated it by eye, it should be good enough even
for printing at high resolution, but it might be different on other
platforms/matplotlib versions.Output
------All Planck frequency maps created with this script:
http://figshare.com/articles/Planck_maps_projected_on_a_Truncated_Icosahedron/799823