{ "cells": [ { "cell_type": "markdown", "id": "a71a5685-da14-4e91-9a0b-e1cbb9b99bd8", "metadata": {}, "source": [ "# Welcome\n", ":::{admonition} Learn more about PyHC\n", ":class: seealso\n", "Back to the [PyHC homepage](https://heliopython.org/).\n", "\n", "Check the [list of projects at PyHC](https://heliopython.org/projects/).\n", ":::" ] }, { "attachments": {}, "cell_type": "markdown", "id": "d1303bc0", "metadata": {}, "source": [ "## Python in Heliophysics Community Gallery\n", "\n", "A collection of examples and tutorials for using Python for Heliophysics. New examples can be added by following the contribution guide in the [README](https://github.com/sapols/pyhc-jbook-experiment/blob/main/README.md).\n", "\n", "<div class=\"grid-parent\" style=\"display: grid; grid-gap: 20px; grid-template-columns: repeat(auto-fill, 186px); justify-items: center; align-items: baseline;\">\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"planet_locations.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"../_static/img/planet_locations_7_0.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">Planet Positions in the Solar System</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"units_demo.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"https://upload.wikimedia.org/wikipedia/commons/5/5a/Logo_of_the_Astropy_Project.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">Quantities, Units, and Constants</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"pyspedas_demo.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"https://raw.githubusercontent.com/sapols/pyhc-jbook-experiment/9d7cae9f161bc26f3eadbdf97787ec8cf9e8811a/src/img/pyspedas-logo.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">pySPEDAS Demo</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"coordinates_demo.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"https://raw.githubusercontent.com/heliophysicsPy/Logo/main/png/PyHC%20logo%20250x250.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">Astropy Coordinates and SunPy Demo</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"coordinate_systems.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"https://raw.githubusercontent.com/heliophysicsPy/Logo/main/png/PyHC%20logo%20250x250.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">Transforming Coordinates Between SpacePy, Astropy, and Sunpy</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"retrieve_compress.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"https://raw.githubusercontent.com/heliophysicsPy/Logo/main/png/PyHC%20logo%20250x250.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">Downloading and Compressing a FITS file using SunPy, aiapy, and Astropy</p></div></a>\n", " </div>\n", " <div style=\"height: 300px; width: 175px;\">\n", " <a class=\"reference internal\" href=\"pytplot_demo.html\"><div onmouseover=\"this.style.boxShadow='rgba(0, 0, 0, 0.24) 0px 3px 8px';\" \n", " onmouseout=\"this.style.boxShadow='none';\" style=\"height: 300px;\"><img src=\"../_static/img/pytplot_demo_17_0.png\" style=\"width: 100%; margin: auto; padding: 20px;\"></img><p style=\"text-align: center; padding: 10px;\">PyTplot Demo</p></div></a>\n", " </div>\n", "</div>" ] }, { "cell_type": "markdown", "id": "c716f2c1", "metadata": {}, "source": [ "### Links to project-specific galleries: \n", " - [SunPy](http://docs.sunpy.org/en/stable/generated/gallery/index.html) \n", " - [Astropy](http://learn.astropy.org)\n", " - [aiapy](https://aiapy.readthedocs.io/en/stable/)\n", " - [SpacePy](https://spacepy.github.io/)" ] }, { "cell_type": "markdown", "id": "e265ffef", "metadata": {}, "source": [ "### Environment\n", "We built a Python virtual environment capable of importing every published PyHC package without dependency conflicts, and we intended to use that environment for this gallery. However, the resulting Docker image is too large for Binder to handle. So instead, we made our own [`pyhc-gallery`](https://hub.docker.com/r/spolson/pyhc-gallery) image and pushed it to Docker Hub. We encourage interested readers to try it out.\n", "\n", "But for now, these pages are generated using a minimal set of packages needed to run the examples:" ] }, { "cell_type": "code", "execution_count": null, "id": "e3a32df4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Python implementation: CPython\n", "Python version : 3.10.8\n", "IPython version : 8.7.0\n", "\n", "aiapy : 0.6.4\n", "astropy : 5.0.4\n", "bokeh : 2.4.3\n", "cartopy : 0.20.3\n", "cdflib : 0.3.20\n", "gfortran : not installed\n", "hapiclient : 0.2.5\n", "hapiplot : 0.2.1\n", "matplotlib : 3.5.3\n", "netcdf4 : not installed\n", "numpy : 1.23.4\n", "pandas : 1.3.5\n", "plasmapy : 0.7.0\n", "pyspedas : 1.2.10\n", "pytplot-mpl-temp: not installed\n", "scipy : 1.8.1\n", "spacepy : 0.2.3\n", "sunpy : 3.1.8\n", "xarray : 0.20.2\n", "\n" ] } ], "source": [ "%load_ext watermark\n", "%watermark -ivp aiapy,astropy,matplotlib,numpy,pyspedas,pytplot,spacepy,sunpy" ] } ], "metadata": { "kernelspec": { "display_name": "pyhc", "language": "python", "name": "pyhc" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" } }, "nbformat": 4, "nbformat_minor": 5 }