Skip to content

Commit 4900a61

Browse files
committed
plot map
1 parent 449dcbd commit 4900a61

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

index.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@
1111
await pyodide.loadPackage("micropip");
1212
const micropip = pyodide.pyimport("micropip");
1313
await micropip.install('dist/healpy-0.1.0-py3-none-any.whl');
14+
await micropip.install('matplotlib');
1415
pyodide.runPython(`
15-
import healpy
16-
print(healpy.__version__)
16+
import healpy as hp
17+
import matplotlib.pyplot as plt
18+
import matplotlib
19+
matplotlib.use("module://matplotlib.backends.html5_canvas_backend")
20+
m = hp.read_map(
21+
"test/data/wmap_band_iqumap_r9_7yr_W_v4_udgraded32_masked_smoothed10deg_fortran.fits"
22+
)
23+
hp.projview(m, coord=["G"], projection_type="mollweide")
24+
plt.show()
1725
`);
1826
}
1927
main();

0 commit comments

Comments
 (0)