Skip to content

Commit

Permalink
Merge branch 'trygvels/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed May 5, 2022
2 parents 1323f74 + e07c9a9 commit 2c314ca
Show file tree
Hide file tree
Showing 9 changed files with 2,341 additions and 118 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Unreleased

* Fixed double application of `margins` in visualization functions when using subplot syntax and implemented `margins` parameter for `mollview`, `orthview`, and `azeqview` when subplot syntax is not used <https://github.com/healpy/healpy/pull/757>
* Fixed `reuse_axes=True` for `cartview` and `gnomview` <https://github.com/healpy/healpy/pull/755>
* New features in `projview`: subplots, remove monopole-dipole, labels, tickmarks, graticule, Planck and WMAP colormaps <https://github.com/healpy/healpy/pull/752>

Release 1.15.2 24 January 2022, included in HEALPix 3.8.1

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
recursive-include healpy/data *.fits
recursive-include healpy/data *_cmap.dat
recursive-include healpy/test/data *
exclude healpy/test/data/ipython*
exclude cfitsio/*pdf cfitsio/*ps cfitsio/*doc cfitsio/*tex
Expand Down
103 changes: 100 additions & 3 deletions doc/newvisufunc_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
" ylabel=\"latitude\",\n",
" cb_orientation=\"vertical\",\n",
" projection_type=\"mollweide\",\n",
");"
")"
]
},
{
Expand Down Expand Up @@ -616,7 +616,8 @@
" rot=rotAngles,\n",
" fontsize={\"xtick_label\": 20},\n",
" phi_convention=\"symmetrical\",\n",
");"
")\n",
"plt.show()"
]
},
{
Expand All @@ -636,9 +637,105 @@
"print(latitude.shape)\n",
"print(grid_map.shape)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# This example shows two Planck colormaps.\n",
"# The planck_log-colormap is used in combination with\n",
"# symlog2 for optimal viewing of frequency maps.\n",
"#\n",
"# Additional displayed features:\n",
"# Subfigures (Work the same way as mollview)\n",
"# Serif font\n",
"# Show tickmarkers\n",
"# tick direction keyword\n",
"# dipole/monopole subtraction\n",
"\n",
"m_scaled = m*3000\n",
"projview(\n",
" m_scaled,\n",
" title=\"Planck colormap\",\n",
" cmap=\"planck\",\n",
" rlabel=r\"A$_{\\mathsf{ex. 1}}$\",\n",
" llabel=r\"$Q$\",\n",
" unit=r\"$\\mu$K\",\n",
" fontname=\"serif\",\n",
" width=10,\n",
" show_tickmarkers=True,\n",
" cbar_ticks=[-300, 0, 300],\n",
" cb_orientation=\"vertical\",\n",
" sub=121,\n",
" override_plot_properties={\"cbar_tick_direction\": \"in\"},\n",
");\n",
"projview(\n",
" m_scaled,\n",
" title=\"Planck logarithmic colormap\",\n",
" cmap=\"planck_log\",\n",
" norm=\"symlog2\",\n",
" rlabel=r\"A$_{\\mathrm{ex. 3}}$\",\n",
" llabel=r\"$I$\",\n",
" unit=r\"$\\mu$K\",\n",
" min=-1e3,\n",
" max=1e7,\n",
" cb_orientation=\"vertical\",\n",
" sub=122,\n",
");\n",
"plt.tight_layout();\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# This code shows some of the features listed above,\n",
"# in addition to the WMAP colormap.\n",
"projview(\n",
" m_scaled,\n",
" title=\"symlog normalization\",\n",
" cmap=\"planck\",\n",
" norm=\"symlog\",\n",
" rlabel=r\"A$_{\\mathsf{ex. 2}}$\",\n",
" llabel=r\"$Q$\",\n",
" unit=r\"$\\mu$K\",\n",
" cbar_ticks=[-3000, -30, 0, 30, 3000],\n",
" remove_mono=True,\n",
" show_tickmarkers=True,\n",
" sub=121,\n",
" override_plot_properties={\"cbar_tick_direction\": \"in\"},\n",
" norm_dict={\"linscale\": 0.5},\n",
");\n",
"\n",
"projview(\n",
" m_scaled,\n",
" title=\"WMAP colormap\",\n",
" cmap=\"wmap\",\n",
" rlabel=r\"A$_{\\mathrm{ex. 4}}$\",\n",
" llabel=r\"$I$\",\n",
" unit=r\"$\\mu$K\",\n",
" fontname=\"serif\",\n",
" min=-100,\n",
" max=100,\n",
" sub=122,\n",
");\n",
"plt.tight_layout();"
]
}
],
"metadata": {
"interpreter": {
"hash": "32233c9ad1b8cc06596fadf6fc9dfa9ff57bec18038c8f5f96d77bc014166f96"
},
"kernelspec": {
"display_name": "Python 3.8.10 ('local')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand All @@ -649,7 +746,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
"version": "3.8.11"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
Loading

0 comments on commit 2c314ca

Please sign in to comment.