forked from healpy/healpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build: | ||
jupyter lite build --config=jupyter_lite_config.json --contents visualize_map.ipynb | ||
|
||
serve: | ||
jupyter lite serve --config=jupyter_lite_config.json --contents visualize_map.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"PipliteAddon": { | ||
"piplite_urls": [ | ||
"https://healpy.github.io/pyhealpy/dist/healpy-0.1.0-py3-none-any.whl" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"metadata": { | ||
"kernelspec": { | ||
"name": "python", | ||
"display_name": "Python (Pyodide)", | ||
"language": "python" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "python", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8" | ||
} | ||
}, | ||
"nbformat_minor": 4, | ||
"nbformat": 4, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": "# Visualize data in the browser with JupyterLite\n\n## Temporary fix to install healpy\n\nWill should be able to bundle this with JupyterLite", | ||
"metadata": {} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "%pip install matplotlib https://healpy.github.io/pyhealpy/dist/healpy-0.1.0-py3-none-any.whl", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "import healpy as hp", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": "# Map loaded in the environment", | ||
"metadata": {} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "%ls", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "from glob import glob\nmap_filename = glob(\"*.fits\")[0]", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "print(map_filename)", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "m = hp.read_map(map_filename)", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": "## Mollview projection\n\n", | ||
"metadata": {} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "hp.projview(m, coord=[\"G\"], projection_type=\"mollweide\");", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
} | ||
] | ||
} |