Skip to content

Commit

Permalink
plot map
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed Jul 18, 2024
1 parent 449dcbd commit 4900a61
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@
await pyodide.loadPackage("micropip");
const micropip = pyodide.pyimport("micropip");
await micropip.install('dist/healpy-0.1.0-py3-none-any.whl');
await micropip.install('matplotlib');
pyodide.runPython(`
import healpy
print(healpy.__version__)
import healpy as hp
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use("module://matplotlib.backends.html5_canvas_backend")
m = hp.read_map(
"test/data/wmap_band_iqumap_r9_7yr_W_v4_udgraded32_masked_smoothed10deg_fortran.fits"
)
hp.projview(m, coord=["G"], projection_type="mollweide")
plt.show()
`);
}
main();
Expand Down

0 comments on commit 4900a61

Please sign in to comment.