Created
September 10, 2025 02:45
-
-
Save zonca/919dd4c843ecc6952ee3b724be4ca64b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "id": "0", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-09T20:13:54.098777Z", | |
| "iopub.status.busy": "2025-05-09T20:13:54.098566Z", | |
| "iopub.status.idle": "2025-05-09T20:13:54.956048Z", | |
| "shell.execute_reply": "2025-05-09T20:13:54.955653Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.86666, | |
| "end_time": "2025-05-09T20:13:54.957209", | |
| "exception": false, | |
| "start_time": "2025-05-09T20:13:54.090549", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "import h5py\n", | |
| "import numpy as np\n", | |
| "import healpy as hp\n", | |
| "import matplotlib.pyplot as plt" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 2, | |
| "id": "1", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-09T20:13:54.966406Z", | |
| "iopub.status.busy": "2025-05-09T20:13:54.966130Z", | |
| "iopub.status.idle": "2025-05-09T20:13:54.968505Z", | |
| "shell.execute_reply": "2025-05-09T20:13:54.968180Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.007639, | |
| "end_time": "2025-05-09T20:13:54.969286", | |
| "exception": false, | |
| "start_time": "2025-05-09T20:13:54.961647", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "freqs = [\n", | |
| " \"18.7\",\n", | |
| " \"24.5\",\n", | |
| " \"44.0\",\n", | |
| " \"70.0\",\n", | |
| " \"100.0\",\n", | |
| " \"143.0\",\n", | |
| " \"217.0\",\n", | |
| " \"353.0\",\n", | |
| " \"545.0\",\n", | |
| " \"643.0\",\n", | |
| " \"729.0\",\n", | |
| " \"857.0\",\n", | |
| " \"906.0\",\n", | |
| "]" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 3, | |
| "id": "1f5117fe", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "\u001b[0m\u001b[01;34mmatched_catalogs_2\u001b[0m/\n", | |
| "websky_high_flux_catalog_1mJy_2025.09.03.h5\n", | |
| "websky_high_flux_catalog_1mJy_2025.09.09.h5\n", | |
| "websky_high_flux_catalog_1mJy.h5\n", | |
| "websky_high_flux_catalog_1mJy_modified.h5\n", | |
| "websky_high_flux_catalog_1mJy_opposite_ordering.h5\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "ls data/" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 4, | |
| "id": "40", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:51.608747Z", | |
| "iopub.status.busy": "2025-05-10T06:54:51.608436Z", | |
| "iopub.status.idle": "2025-05-10T06:54:51.610505Z", | |
| "shell.execute_reply": "2025-05-10T06:54:51.610173Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.00921, | |
| "end_time": "2025-05-10T06:54:51.611170", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:51.601960", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "output_filename = \"data/websky_high_flux_catalog_1mJy_2025.09.09.h5\"" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 5, | |
| "id": "41", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:51.623979Z", | |
| "iopub.status.busy": "2025-05-10T06:54:51.623777Z", | |
| "iopub.status.idle": "2025-05-10T06:54:51.826063Z", | |
| "shell.execute_reply": "2025-05-10T06:54:51.825513Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.209888, | |
| "end_time": "2025-05-10T06:54:51.827142", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:51.617254", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "-rw-rw-r-- 1 azonca azonca 38727071 Sep 9 19:29 data/websky_high_flux_catalog_1mJy_2025.09.09.h5\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "!ls -l $output_filename" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 6, | |
| "id": "45", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:52.072241Z", | |
| "iopub.status.busy": "2025-05-10T06:54:52.071862Z", | |
| "iopub.status.idle": "2025-05-10T06:54:52.266156Z", | |
| "shell.execute_reply": "2025-05-10T06:54:52.265584Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.202905, | |
| "end_time": "2025-05-10T06:54:52.267250", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:52.064345", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "-rw-rw-r-- 1 azonca azonca 37M Sep 9 19:29 data/websky_high_flux_catalog_1mJy_2025.09.09.h5\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "%ls -lah $output_filename" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 7, | |
| "id": "46", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:52.280706Z", | |
| "iopub.status.busy": "2025-05-10T06:54:52.280448Z", | |
| "iopub.status.idle": "2025-05-10T06:54:52.282876Z", | |
| "shell.execute_reply": "2025-05-10T06:54:52.282534Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.010053, | |
| "end_time": "2025-05-10T06:54:52.283599", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:52.273546", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "import xarray" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 8, | |
| "id": "47", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:52.297240Z", | |
| "iopub.status.busy": "2025-05-10T06:54:52.296926Z", | |
| "iopub.status.idle": "2025-05-10T06:54:52.355855Z", | |
| "shell.execute_reply": "2025-05-10T06:54:52.355535Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.067074, | |
| "end_time": "2025-05-10T06:54:52.357351", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:52.290277", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "new_catalog = xarray.open_dataset(output_filename)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 9, | |
| "id": "3905d3c1", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
| "<defs>\n", | |
| "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
| "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "</symbol>\n", | |
| "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
| "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "</symbol>\n", | |
| "</defs>\n", | |
| "</svg>\n", | |
| "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
| " *\n", | |
| " */\n", | |
| "\n", | |
| ":root {\n", | |
| " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
| " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
| " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
| " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
| " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
| " --xr-background-color: var(--jp-layout-color0, white);\n", | |
| " --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
| " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
| "}\n", | |
| "\n", | |
| "html[theme=dark],\n", | |
| "html[data-theme=dark],\n", | |
| "body[data-theme=dark],\n", | |
| "body.vscode-dark {\n", | |
| " --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
| " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
| " --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
| " --xr-border-color: #1F1F1F;\n", | |
| " --xr-disabled-color: #515151;\n", | |
| " --xr-background-color: #111111;\n", | |
| " --xr-background-color-row-even: #111111;\n", | |
| " --xr-background-color-row-odd: #313131;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-wrap {\n", | |
| " display: block !important;\n", | |
| " min-width: 300px;\n", | |
| " max-width: 700px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-text-repr-fallback {\n", | |
| " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header {\n", | |
| " padding-top: 6px;\n", | |
| " padding-bottom: 6px;\n", | |
| " margin-bottom: 4px;\n", | |
| " border-bottom: solid 1px var(--xr-border-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header > div,\n", | |
| ".xr-header > ul {\n", | |
| " display: inline;\n", | |
| " margin-top: 0;\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type,\n", | |
| ".xr-array-name {\n", | |
| " margin-left: 2px;\n", | |
| " margin-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-sections {\n", | |
| " padding-left: 0 !important;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input {\n", | |
| " display: inline-block;\n", | |
| " opacity: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input + label {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label {\n", | |
| " cursor: pointer;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:focus + label {\n", | |
| " border: 2px solid var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label:hover {\n", | |
| " color: var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary {\n", | |
| " grid-column: 1;\n", | |
| " color: var(--xr-font-color2);\n", | |
| " font-weight: 500;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary > span {\n", | |
| " display: inline-block;\n", | |
| " padding-left: 0.5em;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in + label:before {\n", | |
| " display: inline-block;\n", | |
| " content: '►';\n", | |
| " font-size: 11px;\n", | |
| " width: 15px;\n", | |
| " text-align: center;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label:before {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label:before {\n", | |
| " content: '▼';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label > span {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary,\n", | |
| ".xr-section-inline-details {\n", | |
| " padding-top: 4px;\n", | |
| " padding-bottom: 4px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-inline-details {\n", | |
| " grid-column: 2 / -1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-details {\n", | |
| " display: none;\n", | |
| " grid-column: 1 / -1;\n", | |
| " margin-bottom: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap {\n", | |
| " grid-column: 1 / -1;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 20px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap > label {\n", | |
| " grid-column: 1;\n", | |
| " vertical-align: top;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-preview {\n", | |
| " color: var(--xr-font-color3);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-preview,\n", | |
| ".xr-array-data {\n", | |
| " padding: 0 5px !important;\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-data,\n", | |
| ".xr-array-in:checked ~ .xr-array-preview {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-in:checked ~ .xr-array-data,\n", | |
| ".xr-array-preview {\n", | |
| " display: inline-block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list {\n", | |
| " display: inline-block !important;\n", | |
| " list-style: none;\n", | |
| " padding: 0 !important;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li {\n", | |
| " display: inline-block;\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:before {\n", | |
| " content: '(';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:after {\n", | |
| " content: ')';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li:not(:last-child):after {\n", | |
| " content: ',';\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-has-index {\n", | |
| " font-weight: bold;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list,\n", | |
| ".xr-var-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > div,\n", | |
| ".xr-var-item label,\n", | |
| ".xr-var-item > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-even);\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > .xr-var-name:hover span {\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list > li:nth-child(odd) > div,\n", | |
| ".xr-var-list > li:nth-child(odd) > label,\n", | |
| ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-odd);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name {\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dims {\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dtype {\n", | |
| " grid-column: 3;\n", | |
| " text-align: right;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-preview {\n", | |
| " grid-column: 4;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-index-preview {\n", | |
| " grid-column: 2 / 5;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name,\n", | |
| ".xr-var-dims,\n", | |
| ".xr-var-dtype,\n", | |
| ".xr-preview,\n", | |
| ".xr-attrs dt {\n", | |
| " white-space: nowrap;\n", | |
| " overflow: hidden;\n", | |
| " text-overflow: ellipsis;\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name:hover,\n", | |
| ".xr-var-dims:hover,\n", | |
| ".xr-var-dtype:hover,\n", | |
| ".xr-attrs dt:hover {\n", | |
| " overflow: visible;\n", | |
| " width: auto;\n", | |
| " z-index: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " display: none;\n", | |
| " background-color: var(--xr-background-color) !important;\n", | |
| " padding-bottom: 5px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
| ".xr-var-data-in:checked ~ .xr-var-data,\n", | |
| ".xr-index-data-in:checked ~ .xr-index-data {\n", | |
| " display: block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > table {\n", | |
| " float: right;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name span,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-name div,\n", | |
| ".xr-index-data,\n", | |
| ".xr-attrs {\n", | |
| " padding-left: 25px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs,\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " grid-column: 1 / -1;\n", | |
| "}\n", | |
| "\n", | |
| "dl.xr-attrs {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 125px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt,\n", | |
| ".xr-attrs dd {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " float: left;\n", | |
| " padding-right: 10px;\n", | |
| " width: auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt {\n", | |
| " font-weight: normal;\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt:hover span {\n", | |
| " display: inline-block;\n", | |
| " background: var(--xr-background-color);\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dd {\n", | |
| " grid-column: 2;\n", | |
| " white-space: pre-wrap;\n", | |
| " word-break: break-all;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-icon-database,\n", | |
| ".xr-icon-file-text2,\n", | |
| ".xr-no-icon {\n", | |
| " display: inline-block;\n", | |
| " vertical-align: middle;\n", | |
| " width: 1em;\n", | |
| " height: 1.5em !important;\n", | |
| " stroke-width: 0;\n", | |
| " stroke: currentColor;\n", | |
| " fill: currentColor;\n", | |
| "}\n", | |
| "</style><pre class='xr-text-repr-fallback'><xarray.Dataset> Size: 39MB\n", | |
| "Dimensions: (power: 5, index: 372255)\n", | |
| "Coordinates:\n", | |
| " * index (index) int64 3MB 27897657 242175600 ... 261805066\n", | |
| " theta (index) float64 3MB ...\n", | |
| " phi (index) float64 3MB ...\n", | |
| " * power (power) int64 40B 4 3 2 1 0\n", | |
| "Data variables:\n", | |
| " logpolycoefflux (power, index) float64 15MB ...\n", | |
| " logpolycoefpolflux (power, index) float64 15MB ...\n", | |
| "Attributes:\n", | |
| " description: Websky sources with flux > 1.0 mJy at 100.0 GHz...\n", | |
| " reference_frequency_GHz: 100.0\n", | |
| " flux_cutoff_mJy: 1.0\n", | |
| " polynomial_degree: 4\n", | |
| " sorted_by: polyval(logpolycoefflux, log(ref_freq)) with co...\n", | |
| " ref_frame: Galactic\n", | |
| " generated_utc: 2025-09-10T02:29:49.847856+00:00\n", | |
| " git_commit: 75b8a5ab38bb5a11e8362aedabb2cbbb18aa5a09\n", | |
| " command: websky_sources_high_flux_catalog_out_1mJy.py --...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-aff4f75f-1f90-44fe-aa32-f74470b63528' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-aff4f75f-1f90-44fe-aa32-f74470b63528' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>power</span>: 5</li><li><span class='xr-has-index'>index</span>: 372255</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-1f3fcd0c-fedc-4c5a-b49c-f3b665c2fa91' class='xr-section-summary-in' type='checkbox' checked><label for='section-1f3fcd0c-fedc-4c5a-b49c-f3b665c2fa91' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>index</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>27897657 242175600 ... 261805066</div><input id='attrs-9d21dcaa-584d-4aa2-b6b3-0942a922a3bf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d21dcaa-584d-4aa2-b6b3-0942a922a3bf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f6cff250-527a-49f8-b299-8102b8dac84b' class='xr-var-data-in' type='checkbox'><label for='data-f6cff250-527a-49f8-b299-8102b8dac84b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 27897657, 242175600, 270516228, ..., 252790650, 232442743, 261805066])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>theta</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-a078891c-e08a-41b3-8d8d-74562f935478' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a078891c-e08a-41b3-8d8d-74562f935478' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c367b442-b884-4c8f-b37b-e666f197f49e' class='xr-var-data-in' type='checkbox'><label for='data-c367b442-b884-4c8f-b37b-e666f197f49e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>rad</dd><dt><span>reference_frame :</span></dt><dd>Galactic</dd></dl></div><div class='xr-var-data'><pre>[372255 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>phi</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-9f4fcee4-90d0-4660-ac5f-2d8bf9b26595' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9f4fcee4-90d0-4660-ac5f-2d8bf9b26595' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e4910c27-0cb3-45bd-b9cc-d086fafb8be0' class='xr-var-data-in' type='checkbox'><label for='data-e4910c27-0cb3-45bd-b9cc-d086fafb8be0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>rad</dd><dt><span>reference_frame :</span></dt><dd>Galactic</dd></dl></div><div class='xr-var-data'><pre>[372255 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>power</span></div><div class='xr-var-dims'>(power)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>4 3 2 1 0</div><input id='attrs-50e7e93d-0797-4c46-9496-9b38aafb589f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-50e7e93d-0797-4c46-9496-9b38aafb589f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6336f155-e3ea-46a5-a4df-01b92a4e914a' class='xr-var-data-in' type='checkbox'><label for='data-6336f155-e3ea-46a5-a4df-01b92a4e914a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([4, 3, 2, 1, 0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bd54cd95-a642-4ae1-9baa-ed5f48a898d3' class='xr-section-summary-in' type='checkbox' checked><label for='section-bd54cd95-a642-4ae1-9baa-ed5f48a898d3' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>logpolycoefflux</span></div><div class='xr-var-dims'>(power, index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-d4cb9351-7a7c-4513-a73f-5c39de555ca5' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d4cb9351-7a7c-4513-a73f-5c39de555ca5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2081f81d-8b93-449c-8813-f844f0c1ca96' class='xr-var-data-in' type='checkbox'><label for='data-2081f81d-8b93-449c-8813-f844f0c1ca96' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>Jy</dd><dt><span>coeff_orientation :</span></dt><dd>power_first_highest_degree_first</dd></dl></div><div class='xr-var-data'><pre>[1861275 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>logpolycoefpolflux</span></div><div class='xr-var-dims'>(power, index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-3e89c725-1936-44e2-9bd7-e8dda5ddd6d3' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3e89c725-1936-44e2-9bd7-e8dda5ddd6d3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9ad2002b-350c-43f4-b870-daded9d85ae3' class='xr-var-data-in' type='checkbox'><label for='data-9ad2002b-350c-43f4-b870-daded9d85ae3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>Jy</dd><dt><span>coeff_orientation :</span></dt><dd>power_first_highest_degree_first</dd></dl></div><div class='xr-var-data'><pre>[1861275 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f77255c5-7c29-42a1-95b9-ed4c274d669e' class='xr-section-summary-in' type='checkbox' ><label for='section-f77255c5-7c29-42a1-95b9-ed4c274d669e' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>index</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-3a52ff1a-6cd2-4bcb-ba48-6e85864a1071' class='xr-index-data-in' type='checkbox'/><label for='index-3a52ff1a-6cd2-4bcb-ba48-6e85864a1071' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 27897657, 242175600, 270516228, 276407774, 256213631, 281544643,\n", | |
| " 259533227, 251679008, 263719520, 252717495,\n", | |
| " ...\n", | |
| " 266510903, 262899438, 86057443, 273942018, 242580347, 114669465,\n", | |
| " 280536021, 252790650, 232442743, 261805066],\n", | |
| " dtype='int64', name='index', length=372255))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>power</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-2d49a409-f818-44f3-b747-6b5e448701e6' class='xr-index-data-in' type='checkbox'/><label for='index-2d49a409-f818-44f3-b747-6b5e448701e6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([4, 3, 2, 1, 0], dtype='int64', name='power'))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d8d3b42c-2622-4451-aa07-4a6ecac7a00f' class='xr-section-summary-in' type='checkbox' checked><label for='section-d8d3b42c-2622-4451-aa07-4a6ecac7a00f' class='xr-section-summary' >Attributes: <span>(9)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>Websky sources with flux > 1.0 mJy at 100.0 GHz. Polynomial degree 4 fit in log(frequency) for flux (and polarized flux if available). Frequencies in GHz. Ordered by descending fitted flux at reference frequency (polynomial evaluated at ref freq). 'index' gives original catalog index before selection/sorting. NOTE: Coefficient arrays are stored transposed relative to PySM 3.4.1 and 3.4.2 (which used (index,power)). Now dims are (power,index) with highest degree first, enabling direct numpy.polyval(coeffs, log_freq) without any transpose step.</dd><dt><span>reference_frequency_GHz :</span></dt><dd>100.0</dd><dt><span>flux_cutoff_mJy :</span></dt><dd>1.0</dd><dt><span>polynomial_degree :</span></dt><dd>4</dd><dt><span>sorted_by :</span></dt><dd>polyval(logpolycoefflux, log(ref_freq)) with coeff dims (power,index)</dd><dt><span>ref_frame :</span></dt><dd>Galactic</dd><dt><span>generated_utc :</span></dt><dd>2025-09-10T02:29:49.847856+00:00</dd><dt><span>git_commit :</span></dt><dd>75b8a5ab38bb5a11e8362aedabb2cbbb18aa5a09</dd><dt><span>command :</span></dt><dd>websky_sources_high_flux_catalog_out_1mJy.py --input-pattern 'data/matched_catalogs_2/catalog_{freq:.1f}.h5' --frequencies 18.7 24.5 44.0 70.0 100.0 143.0 217.0 353.0 545.0 643.0 729.0 857.0 906.0 --cutoff-mjy 1.0 --ref-freq 100.0 --degree 4 --progress-every 500</dd></dl></div></li></ul></div></div>" | |
| ], | |
| "text/plain": [ | |
| "<xarray.Dataset> Size: 39MB\n", | |
| "Dimensions: (power: 5, index: 372255)\n", | |
| "Coordinates:\n", | |
| " * index (index) int64 3MB 27897657 242175600 ... 261805066\n", | |
| " theta (index) float64 3MB ...\n", | |
| " phi (index) float64 3MB ...\n", | |
| " * power (power) int64 40B 4 3 2 1 0\n", | |
| "Data variables:\n", | |
| " logpolycoefflux (power, index) float64 15MB ...\n", | |
| " logpolycoefpolflux (power, index) float64 15MB ...\n", | |
| "Attributes:\n", | |
| " description: Websky sources with flux > 1.0 mJy at 100.0 GHz...\n", | |
| " reference_frequency_GHz: 100.0\n", | |
| " flux_cutoff_mJy: 1.0\n", | |
| " polynomial_degree: 4\n", | |
| " sorted_by: polyval(logpolycoefflux, log(ref_freq)) with co...\n", | |
| " ref_frame: Galactic\n", | |
| " generated_utc: 2025-09-10T02:29:49.847856+00:00\n", | |
| " git_commit: 75b8a5ab38bb5a11e8362aedabb2cbbb18aa5a09\n", | |
| " command: websky_sources_high_flux_catalog_out_1mJy.py --..." | |
| ] | |
| }, | |
| "execution_count": 9, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "new_catalog" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 10, | |
| "id": "48", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:52.372335Z", | |
| "iopub.status.busy": "2025-05-10T06:54:52.371893Z", | |
| "iopub.status.idle": "2025-05-10T06:54:52.380558Z", | |
| "shell.execute_reply": "2025-05-10T06:54:52.380256Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.017189, | |
| "end_time": "2025-05-10T06:54:52.381272", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:52.364083", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "<HDF5 dataset \"logpolycoefflux\": shape (5, 372255), type \"<f8\">" | |
| ] | |
| }, | |
| "execution_count": 10, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "import h5py\n", | |
| "f = h5py.File(output_filename, 'r')\n", | |
| "f[\"logpolycoefflux\"]" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 11, | |
| "id": "49", | |
| "metadata": { | |
| "execution": { | |
| "iopub.execute_input": "2025-05-10T06:54:52.395368Z", | |
| "iopub.status.busy": "2025-05-10T06:54:52.395177Z", | |
| "iopub.status.idle": "2025-05-10T06:54:52.398423Z", | |
| "shell.execute_reply": "2025-05-10T06:54:52.398106Z" | |
| }, | |
| "papermill": { | |
| "duration": 0.011417, | |
| "end_time": "2025-05-10T06:54:52.399410", | |
| "exception": false, | |
| "start_time": "2025-05-10T06:54:52.387993", | |
| "status": "completed" | |
| }, | |
| "tags": [] | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "b'Jy'" | |
| ] | |
| }, | |
| "execution_count": 11, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "f[\"logpolycoefflux\"].attrs[\"units\"]" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "id": "6d2ff2bb", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "'/mnt/home/azonca'" | |
| ] | |
| }, | |
| "execution_count": 12, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "from pathlib import Path\n", | |
| "\n", | |
| "home_folder = str(Path.home())\n", | |
| "home_folder" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 13, | |
| "id": "85fa5dd5", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "old_catalog= xarray.open_dataset(home_folder + \"/s/pysm-data/websky/0.4/radio_catalog/websky_high_flux_catalog_1mJy.h5\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 14, | |
| "id": "77e3103a", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
| "<defs>\n", | |
| "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
| "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "</symbol>\n", | |
| "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
| "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "</symbol>\n", | |
| "</defs>\n", | |
| "</svg>\n", | |
| "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
| " *\n", | |
| " */\n", | |
| "\n", | |
| ":root {\n", | |
| " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
| " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
| " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
| " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
| " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
| " --xr-background-color: var(--jp-layout-color0, white);\n", | |
| " --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
| " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
| "}\n", | |
| "\n", | |
| "html[theme=dark],\n", | |
| "html[data-theme=dark],\n", | |
| "body[data-theme=dark],\n", | |
| "body.vscode-dark {\n", | |
| " --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
| " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
| " --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
| " --xr-border-color: #1F1F1F;\n", | |
| " --xr-disabled-color: #515151;\n", | |
| " --xr-background-color: #111111;\n", | |
| " --xr-background-color-row-even: #111111;\n", | |
| " --xr-background-color-row-odd: #313131;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-wrap {\n", | |
| " display: block !important;\n", | |
| " min-width: 300px;\n", | |
| " max-width: 700px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-text-repr-fallback {\n", | |
| " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header {\n", | |
| " padding-top: 6px;\n", | |
| " padding-bottom: 6px;\n", | |
| " margin-bottom: 4px;\n", | |
| " border-bottom: solid 1px var(--xr-border-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header > div,\n", | |
| ".xr-header > ul {\n", | |
| " display: inline;\n", | |
| " margin-top: 0;\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type,\n", | |
| ".xr-array-name {\n", | |
| " margin-left: 2px;\n", | |
| " margin-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-sections {\n", | |
| " padding-left: 0 !important;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input {\n", | |
| " display: inline-block;\n", | |
| " opacity: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input + label {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label {\n", | |
| " cursor: pointer;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:focus + label {\n", | |
| " border: 2px solid var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label:hover {\n", | |
| " color: var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary {\n", | |
| " grid-column: 1;\n", | |
| " color: var(--xr-font-color2);\n", | |
| " font-weight: 500;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary > span {\n", | |
| " display: inline-block;\n", | |
| " padding-left: 0.5em;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in + label:before {\n", | |
| " display: inline-block;\n", | |
| " content: '►';\n", | |
| " font-size: 11px;\n", | |
| " width: 15px;\n", | |
| " text-align: center;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label:before {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label:before {\n", | |
| " content: '▼';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label > span {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary,\n", | |
| ".xr-section-inline-details {\n", | |
| " padding-top: 4px;\n", | |
| " padding-bottom: 4px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-inline-details {\n", | |
| " grid-column: 2 / -1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-details {\n", | |
| " display: none;\n", | |
| " grid-column: 1 / -1;\n", | |
| " margin-bottom: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap {\n", | |
| " grid-column: 1 / -1;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 20px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap > label {\n", | |
| " grid-column: 1;\n", | |
| " vertical-align: top;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-preview {\n", | |
| " color: var(--xr-font-color3);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-preview,\n", | |
| ".xr-array-data {\n", | |
| " padding: 0 5px !important;\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-data,\n", | |
| ".xr-array-in:checked ~ .xr-array-preview {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-in:checked ~ .xr-array-data,\n", | |
| ".xr-array-preview {\n", | |
| " display: inline-block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list {\n", | |
| " display: inline-block !important;\n", | |
| " list-style: none;\n", | |
| " padding: 0 !important;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li {\n", | |
| " display: inline-block;\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:before {\n", | |
| " content: '(';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:after {\n", | |
| " content: ')';\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li:not(:last-child):after {\n", | |
| " content: ',';\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-has-index {\n", | |
| " font-weight: bold;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list,\n", | |
| ".xr-var-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > div,\n", | |
| ".xr-var-item label,\n", | |
| ".xr-var-item > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-even);\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > .xr-var-name:hover span {\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list > li:nth-child(odd) > div,\n", | |
| ".xr-var-list > li:nth-child(odd) > label,\n", | |
| ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-odd);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name {\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dims {\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dtype {\n", | |
| " grid-column: 3;\n", | |
| " text-align: right;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-preview {\n", | |
| " grid-column: 4;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-index-preview {\n", | |
| " grid-column: 2 / 5;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name,\n", | |
| ".xr-var-dims,\n", | |
| ".xr-var-dtype,\n", | |
| ".xr-preview,\n", | |
| ".xr-attrs dt {\n", | |
| " white-space: nowrap;\n", | |
| " overflow: hidden;\n", | |
| " text-overflow: ellipsis;\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name:hover,\n", | |
| ".xr-var-dims:hover,\n", | |
| ".xr-var-dtype:hover,\n", | |
| ".xr-attrs dt:hover {\n", | |
| " overflow: visible;\n", | |
| " width: auto;\n", | |
| " z-index: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " display: none;\n", | |
| " background-color: var(--xr-background-color) !important;\n", | |
| " padding-bottom: 5px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
| ".xr-var-data-in:checked ~ .xr-var-data,\n", | |
| ".xr-index-data-in:checked ~ .xr-index-data {\n", | |
| " display: block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > table {\n", | |
| " float: right;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name span,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-name div,\n", | |
| ".xr-index-data,\n", | |
| ".xr-attrs {\n", | |
| " padding-left: 25px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs,\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " grid-column: 1 / -1;\n", | |
| "}\n", | |
| "\n", | |
| "dl.xr-attrs {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 125px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt,\n", | |
| ".xr-attrs dd {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " float: left;\n", | |
| " padding-right: 10px;\n", | |
| " width: auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt {\n", | |
| " font-weight: normal;\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt:hover span {\n", | |
| " display: inline-block;\n", | |
| " background: var(--xr-background-color);\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dd {\n", | |
| " grid-column: 2;\n", | |
| " white-space: pre-wrap;\n", | |
| " word-break: break-all;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-icon-database,\n", | |
| ".xr-icon-file-text2,\n", | |
| ".xr-no-icon {\n", | |
| " display: inline-block;\n", | |
| " vertical-align: middle;\n", | |
| " width: 1em;\n", | |
| " height: 1.5em !important;\n", | |
| " stroke-width: 0;\n", | |
| " stroke: currentColor;\n", | |
| " fill: currentColor;\n", | |
| "}\n", | |
| "</style><pre class='xr-text-repr-fallback'><xarray.Dataset> Size: 39MB\n", | |
| "Dimensions: (index: 372255, power: 5)\n", | |
| "Coordinates:\n", | |
| " * index (index) int64 3MB 27897657 242175600 ... 166742332\n", | |
| " * power (power) int64 40B 4 3 2 1 0\n", | |
| " theta (index) float64 3MB ...\n", | |
| " phi (index) float64 3MB ...\n", | |
| "Data variables:\n", | |
| " logpolycoefflux (index, power) float64 15MB ...\n", | |
| " logpolycoefpolflux (index, power) float64 15MB ...\n", | |
| "Attributes:\n", | |
| " description: Websky catalog of sources with flux > 1 mJy at 100 GHz, fit...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-32b53a9e-d53c-45d8-9f9a-f08a41f45818' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-32b53a9e-d53c-45d8-9f9a-f08a41f45818' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>index</span>: 372255</li><li><span class='xr-has-index'>power</span>: 5</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-c0cb95b1-7899-4b97-8704-b98c94221526' class='xr-section-summary-in' type='checkbox' checked><label for='section-c0cb95b1-7899-4b97-8704-b98c94221526' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>index</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>27897657 242175600 ... 166742332</div><input id='attrs-64cbf715-3c67-493f-b598-443d80e7f40b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-64cbf715-3c67-493f-b598-443d80e7f40b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-07bbe0a1-167f-4882-a6eb-7f9f20cd29df' class='xr-var-data-in' type='checkbox'><label for='data-07bbe0a1-167f-4882-a6eb-7f9f20cd29df' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 27897657, 242175600, 270516228, ..., 246732122, 263347056, 166742332])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>power</span></div><div class='xr-var-dims'>(power)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>4 3 2 1 0</div><input id='attrs-d0fa207f-3114-4dd1-8b18-bdf488de0d5f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d0fa207f-3114-4dd1-8b18-bdf488de0d5f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c7dbb15e-28d2-457d-9410-46b863186ddc' class='xr-var-data-in' type='checkbox'><label for='data-c7dbb15e-28d2-457d-9410-46b863186ddc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([4, 3, 2, 1, 0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>theta</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-ee7625cc-6bd6-46b4-a387-418d6f8e6a27' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ee7625cc-6bd6-46b4-a387-418d6f8e6a27' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f37c1f9e-6080-4344-bb03-6433a422f76f' class='xr-var-data-in' type='checkbox'><label for='data-f37c1f9e-6080-4344-bb03-6433a422f76f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>rad</dd><dt><span>reference_frame :</span></dt><dd>Galactic</dd></dl></div><div class='xr-var-data'><pre>[372255 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>phi</span></div><div class='xr-var-dims'>(index)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-9c3de089-42b0-4ce1-96cd-9f3a2f1135d0' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9c3de089-42b0-4ce1-96cd-9f3a2f1135d0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-498f4743-a0ab-45be-86ec-8e8d3476f76f' class='xr-var-data-in' type='checkbox'><label for='data-498f4743-a0ab-45be-86ec-8e8d3476f76f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>rad</dd><dt><span>reference_frame :</span></dt><dd>Galactic</dd></dl></div><div class='xr-var-data'><pre>[372255 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6bd9956d-1983-4d46-8b46-67c886cf58ee' class='xr-section-summary-in' type='checkbox' checked><label for='section-6bd9956d-1983-4d46-8b46-67c886cf58ee' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>logpolycoefflux</span></div><div class='xr-var-dims'>(index, power)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-0616f050-4c61-4ccf-a9c6-bdfec7514a92' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0616f050-4c61-4ccf-a9c6-bdfec7514a92' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3b8d9cce-b099-40b2-b1d4-41ef200ab20d' class='xr-var-data-in' type='checkbox'><label for='data-3b8d9cce-b099-40b2-b1d4-41ef200ab20d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>Jy</dd></dl></div><div class='xr-var-data'><pre>[1861275 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>logpolycoefpolflux</span></div><div class='xr-var-dims'>(index, power)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-7232e88f-a892-451a-aec0-78023241b0fc' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7232e88f-a892-451a-aec0-78023241b0fc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5dc7a737-ee7c-4eef-b50d-cd68431e6c01' class='xr-var-data-in' type='checkbox'><label for='data-5dc7a737-ee7c-4eef-b50d-cd68431e6c01' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>Jy</dd></dl></div><div class='xr-var-data'><pre>[1861275 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-58cb383c-e68e-490b-ae1a-db008223c957' class='xr-section-summary-in' type='checkbox' ><label for='section-58cb383c-e68e-490b-ae1a-db008223c957' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>index</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-64fcc436-540e-4377-aa2a-64aa9e24c3c3' class='xr-index-data-in' type='checkbox'/><label for='index-64fcc436-540e-4377-aa2a-64aa9e24c3c3' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 27897657, 242175600, 270516228, 276407774, 256213631, 281544643,\n", | |
| " 263719520, 259533227, 251679008, 252717495,\n", | |
| " ...\n", | |
| " 238190295, 145826702, 108046020, 232265270, 174768449, 256408684,\n", | |
| " 236382968, 246732122, 263347056, 166742332],\n", | |
| " dtype='int64', name='index', length=372255))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>power</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-4ff82e57-d59d-462e-a912-add38932cbe8' class='xr-index-data-in' type='checkbox'/><label for='index-4ff82e57-d59d-462e-a912-add38932cbe8' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([4, 3, 2, 1, 0], dtype='int64', name='power'))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a82c6613-f319-4d76-9bf2-db5852750b71' class='xr-section-summary-in' type='checkbox' checked><label for='section-a82c6613-f319-4d76-9bf2-db5852750b71' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>Websky catalog of sources with flux > 1 mJy at 100 GHz, fitted with a 4th order polynomial in log frequency. Galactic reference frame. Sorted by flux at 100 GHz (descending). The 'index' coordinate gives the original index in the Websky catalog.</dd></dl></div></li></ul></div></div>" | |
| ], | |
| "text/plain": [ | |
| "<xarray.Dataset> Size: 39MB\n", | |
| "Dimensions: (index: 372255, power: 5)\n", | |
| "Coordinates:\n", | |
| " * index (index) int64 3MB 27897657 242175600 ... 166742332\n", | |
| " * power (power) int64 40B 4 3 2 1 0\n", | |
| " theta (index) float64 3MB ...\n", | |
| " phi (index) float64 3MB ...\n", | |
| "Data variables:\n", | |
| " logpolycoefflux (index, power) float64 15MB ...\n", | |
| " logpolycoefpolflux (index, power) float64 15MB ...\n", | |
| "Attributes:\n", | |
| " description: Websky catalog of sources with flux > 1 mJy at 100 GHz, fit..." | |
| ] | |
| }, | |
| "execution_count": 14, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "old_catalog" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 15, | |
| "id": "606c20ce", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Indices match: True\n", | |
| "Number of indices in new_catalog: 372255\n", | |
| "Number of indices in old_catalog: 372255\n", | |
| "Indices only in new_catalog: 0\n", | |
| "Indices only in old_catalog: 0\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "# Compare the index values of new_catalog and old_catalog, ignoring order\n", | |
| "new_indices = set(new_catalog.index.values)\n", | |
| "old_indices = set(old_catalog.index.values)\n", | |
| "\n", | |
| "print(\"Indices match:\", new_indices == old_indices)\n", | |
| "print(\"Number of indices in new_catalog:\", len(new_indices))\n", | |
| "print(\"Number of indices in old_catalog:\", len(old_indices))\n", | |
| "print(\"Indices only in new_catalog:\", len(new_indices - old_indices))\n", | |
| "print(\"Indices only in old_catalog:\", len(old_indices - new_indices))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "3c9f110f", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 27, | |
| "id": "7530924e", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "logpolycoefflux arrays are equal for all indices: True\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "import numpy as np\n", | |
| "\n", | |
| "# Ensure both catalogs are aligned by index\n", | |
| "new_sorted = new_catalog.sortby(\"index\")\n", | |
| "old_sorted = old_catalog.sortby(\"index\")\n", | |
| "# Compare logpolycoefflux values for all indices\n", | |
| "coeff_equal = np.allclose(\n", | |
| " new_sorted.logpolycoefflux.values.T,\n", | |
| " old_sorted.logpolycoefflux.values,\n", | |
| " rtol=1e-4,\n", | |
| " atol=1e-9,\n", | |
| " equal_nan=True,\n", | |
| ")\n", | |
| "\n", | |
| "print(\"logpolycoefflux arrays are equal for all indices:\", coeff_equal)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "a616770f", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "@webio": { | |
| "lastCommId": null, | |
| "lastKernelId": null | |
| }, | |
| "kernelspec": { | |
| "display_name": "cmb", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "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.12.7" | |
| }, | |
| "papermill": { | |
| "default_parameters": {}, | |
| "duration": 38459.845197, | |
| "end_time": "2025-05-10T06:54:52.825666", | |
| "environment_variables": {}, | |
| "exception": null, | |
| "input_path": "websky_sources_high_flux_catalog_out_1mJy.ipynb", | |
| "output_path": "websky_sources_high_flux_catalog_out_1mJy_executed.ipynb", | |
| "parameters": {}, | |
| "start_time": "2025-05-09T20:13:52.980469", | |
| "version": "2.4.0" | |
| }, | |
| "widgets": { | |
| "application/vnd.jupyter.widget-state+json": { | |
| "state": { | |
| "024a79333ddd48959fe4fc82f5627d59": { | |
| "model_module": "@jupyter-widgets/base", | |
| "model_module_version": "2.0.0", | |
| "model_name": "LayoutModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/base", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "LayoutModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "LayoutView", | |
| "align_content": null, | |
| "align_items": null, | |
| "align_self": null, | |
| "border_bottom": null, | |
| "border_left": null, | |
| "border_right": null, | |
| "border_top": null, | |
| "bottom": null, | |
| "display": null, | |
| "flex": null, | |
| "flex_flow": null, | |
| "grid_area": null, | |
| "grid_auto_columns": null, | |
| "grid_auto_flow": null, | |
| "grid_auto_rows": null, | |
| "grid_column": null, | |
| "grid_gap": null, | |
| "grid_row": null, | |
| "grid_template_areas": null, | |
| "grid_template_columns": null, | |
| "grid_template_rows": null, | |
| "height": null, | |
| "justify_content": null, | |
| "justify_items": null, | |
| "left": null, | |
| "margin": null, | |
| "max_height": null, | |
| "max_width": null, | |
| "min_height": null, | |
| "min_width": null, | |
| "object_fit": null, | |
| "object_position": null, | |
| "order": null, | |
| "overflow": null, | |
| "padding": null, | |
| "right": null, | |
| "top": null, | |
| "visibility": null, | |
| "width": null | |
| } | |
| }, | |
| "1b6594c2c7f845358d3bd5ac817abd4d": { | |
| "model_module": "@jupyter-widgets/base", | |
| "model_module_version": "2.0.0", | |
| "model_name": "LayoutModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/base", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "LayoutModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "LayoutView", | |
| "align_content": null, | |
| "align_items": null, | |
| "align_self": null, | |
| "border_bottom": null, | |
| "border_left": null, | |
| "border_right": null, | |
| "border_top": null, | |
| "bottom": null, | |
| "display": null, | |
| "flex": null, | |
| "flex_flow": null, | |
| "grid_area": null, | |
| "grid_auto_columns": null, | |
| "grid_auto_flow": null, | |
| "grid_auto_rows": null, | |
| "grid_column": null, | |
| "grid_gap": null, | |
| "grid_row": null, | |
| "grid_template_areas": null, | |
| "grid_template_columns": null, | |
| "grid_template_rows": null, | |
| "height": null, | |
| "justify_content": null, | |
| "justify_items": null, | |
| "left": null, | |
| "margin": null, | |
| "max_height": null, | |
| "max_width": null, | |
| "min_height": null, | |
| "min_width": null, | |
| "object_fit": null, | |
| "object_position": null, | |
| "order": null, | |
| "overflow": null, | |
| "padding": null, | |
| "right": null, | |
| "top": null, | |
| "visibility": null, | |
| "width": null | |
| } | |
| }, | |
| "25a43f23d4f149739a86cf794e2c8a9e": { | |
| "model_module": "@jupyter-widgets/base", | |
| "model_module_version": "2.0.0", | |
| "model_name": "LayoutModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/base", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "LayoutModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "LayoutView", | |
| "align_content": null, | |
| "align_items": null, | |
| "align_self": null, | |
| "border_bottom": null, | |
| "border_left": null, | |
| "border_right": null, | |
| "border_top": null, | |
| "bottom": null, | |
| "display": null, | |
| "flex": null, | |
| "flex_flow": null, | |
| "grid_area": null, | |
| "grid_auto_columns": null, | |
| "grid_auto_flow": null, | |
| "grid_auto_rows": null, | |
| "grid_column": null, | |
| "grid_gap": null, | |
| "grid_row": null, | |
| "grid_template_areas": null, | |
| "grid_template_columns": null, | |
| "grid_template_rows": null, | |
| "height": null, | |
| "justify_content": null, | |
| "justify_items": null, | |
| "left": null, | |
| "margin": null, | |
| "max_height": null, | |
| "max_width": null, | |
| "min_height": null, | |
| "min_width": null, | |
| "object_fit": null, | |
| "object_position": null, | |
| "order": null, | |
| "overflow": null, | |
| "padding": null, | |
| "right": null, | |
| "top": null, | |
| "visibility": null, | |
| "width": null | |
| } | |
| }, | |
| "36e00a207366459d87503933104e4fd1": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "HTMLStyleModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "HTMLStyleModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "StyleView", | |
| "background": null, | |
| "description_width": "", | |
| "font_size": null, | |
| "text_color": null | |
| } | |
| }, | |
| "587a2b21163345d98256a3bbabf9cbc4": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "HBoxModel", | |
| "state": { | |
| "_dom_classes": [], | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "HBoxModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/controls", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "HBoxView", | |
| "box_style": "", | |
| "children": [ | |
| "IPY_MODEL_7cdb145ece0546bf80aa53de2617b85c", | |
| "IPY_MODEL_d3d2801e63974a329912a5df25ad81c4", | |
| "IPY_MODEL_ebfa5a5254364cabb47d81713c2fb534" | |
| ], | |
| "layout": "IPY_MODEL_1b6594c2c7f845358d3bd5ac817abd4d", | |
| "tabbable": null, | |
| "tooltip": null | |
| } | |
| }, | |
| "78864cdd59544a60ae646f3a684b2d10": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "HTMLStyleModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "HTMLStyleModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "StyleView", | |
| "background": null, | |
| "description_width": "", | |
| "font_size": null, | |
| "text_color": null | |
| } | |
| }, | |
| "7cdb145ece0546bf80aa53de2617b85c": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "HTMLModel", | |
| "state": { | |
| "_dom_classes": [], | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "HTMLModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/controls", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "HTMLView", | |
| "description": "", | |
| "description_allow_html": false, | |
| "layout": "IPY_MODEL_c8840cb740604294aeef1cf16126019e", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_36e00a207366459d87503933104e4fd1", | |
| "tabbable": null, | |
| "tooltip": null, | |
| "value": "Fitting sources: 100%" | |
| } | |
| }, | |
| "979bfa501f37430fbb08638694a5d4a6": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "ProgressStyleModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "ProgressStyleModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "StyleView", | |
| "bar_color": null, | |
| "description_width": "" | |
| } | |
| }, | |
| "c8840cb740604294aeef1cf16126019e": { | |
| "model_module": "@jupyter-widgets/base", | |
| "model_module_version": "2.0.0", | |
| "model_name": "LayoutModel", | |
| "state": { | |
| "_model_module": "@jupyter-widgets/base", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "LayoutModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/base", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "LayoutView", | |
| "align_content": null, | |
| "align_items": null, | |
| "align_self": null, | |
| "border_bottom": null, | |
| "border_left": null, | |
| "border_right": null, | |
| "border_top": null, | |
| "bottom": null, | |
| "display": null, | |
| "flex": null, | |
| "flex_flow": null, | |
| "grid_area": null, | |
| "grid_auto_columns": null, | |
| "grid_auto_flow": null, | |
| "grid_auto_rows": null, | |
| "grid_column": null, | |
| "grid_gap": null, | |
| "grid_row": null, | |
| "grid_template_areas": null, | |
| "grid_template_columns": null, | |
| "grid_template_rows": null, | |
| "height": null, | |
| "justify_content": null, | |
| "justify_items": null, | |
| "left": null, | |
| "margin": null, | |
| "max_height": null, | |
| "max_width": null, | |
| "min_height": null, | |
| "min_width": null, | |
| "object_fit": null, | |
| "object_position": null, | |
| "order": null, | |
| "overflow": null, | |
| "padding": null, | |
| "right": null, | |
| "top": null, | |
| "visibility": null, | |
| "width": null | |
| } | |
| }, | |
| "d3d2801e63974a329912a5df25ad81c4": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "FloatProgressModel", | |
| "state": { | |
| "_dom_classes": [], | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "FloatProgressModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/controls", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "ProgressView", | |
| "bar_style": "success", | |
| "description": "", | |
| "description_allow_html": false, | |
| "layout": "IPY_MODEL_25a43f23d4f149739a86cf794e2c8a9e", | |
| "max": 372255, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_979bfa501f37430fbb08638694a5d4a6", | |
| "tabbable": null, | |
| "tooltip": null, | |
| "value": 372255 | |
| } | |
| }, | |
| "ebfa5a5254364cabb47d81713c2fb534": { | |
| "model_module": "@jupyter-widgets/controls", | |
| "model_module_version": "2.0.0", | |
| "model_name": "HTMLModel", | |
| "state": { | |
| "_dom_classes": [], | |
| "_model_module": "@jupyter-widgets/controls", | |
| "_model_module_version": "2.0.0", | |
| "_model_name": "HTMLModel", | |
| "_view_count": null, | |
| "_view_module": "@jupyter-widgets/controls", | |
| "_view_module_version": "2.0.0", | |
| "_view_name": "HTMLView", | |
| "description": "", | |
| "description_allow_html": false, | |
| "layout": "IPY_MODEL_024a79333ddd48959fe4fc82f5627d59", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_78864cdd59544a60ae646f3a684b2d10", | |
| "tabbable": null, | |
| "tooltip": null, | |
| "value": " 372255/372255 [10:35:28<00:00, 9.75it/s, ETA: 0h 0m]" | |
| } | |
| } | |
| }, | |
| "version_major": 2, | |
| "version_minor": 0 | |
| } | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment