{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Assemble WebSky background catalog with Dask\n" ], "id": "01fb53b775b0" }, { "cell_type": "code", "execution_count": 2, "id": "0ed31a46-d481-4958-af82-3889e2f6b80a", "metadata": { "tags": [] }, "outputs": [], "source": [ "import h5pickle as h5py\n", "import numpy as np\n", "import healpy as hp\n", "import matplotlib.pyplot as plt\n", "from tqdm import tqdm" ] }, { "cell_type": "code", "execution_count": 3, "id": "4d97b61d", "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `gemini` | `GOOGLE_API_KEY` | ✅ |
<xarray.DataArray 'flux' (power: 5, index: 281384121)>\n",
"dask.array<getitem, shape=(5, 281384121), dtype=float64, chunksize=(5, 999136), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * power (power) int64 4 3 2 1 0\n",
" * index (index) int64 0 1 2 3 4 ... 281756372 281756373 281756374 281756375<xarray.Dataset>\n",
"Dimensions: (power: 5, index: 281384121)\n",
"Coordinates:\n",
" * power (power) int64 4 3 2 1 0\n",
" * index (index) int64 0 1 2 3 ... 281756373 281756374 281756375\n",
"Data variables:\n",
" logpolycoefpolflux (index, power) float64 dask.array<chunksize=(999136, 5), meta=np.ndarray>\n",
" logpolycoefflux (index, power) float64 dask.array<chunksize=(999136, 5), meta=np.ndarray><xarray.DataArray 'flux_100' ()>\n",
"array(inf)<xarray.Dataset>\n",
"Dimensions: (power: 5, index: 281384121)\n",
"Coordinates:\n",
" * power (power) int64 4 3 2 1 0\n",
" * index (index) int64 0 1 2 3 ... 281756373 281756374 281756375\n",
" theta (index) float64 ...\n",
" phi (index) float64 ...\n",
"Data variables:\n",
" logpolycoefpolflux (index, power) float64 ...\n",
" logpolycoefflux (index, power) float64 ...\n",
"Attributes:\n",
" notes: Catalog of sources where the flux in Jy at any frequency is cal...