|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "id": "fc2ad8f9-90c0-4b72-9cb5-b9b29eac8678", |
| 6 | + "metadata": {}, |
| 7 | + "source": [ |
| 8 | + "# WET-003: Donut Vignetting Test\n", |
| 9 | + "\n", |
| 10 | + "Owner: **Bryce Kalmbach** <br>\n", |
| 11 | + "Last Verified to Run: **2025-02-28** <br>\n", |
| 12 | + "Software Version:\n", |
| 13 | + " - `ts_wep`: **14.0.0** \n", |
| 14 | + " - `lsst_distrib`: **w_2025_09**" |
| 15 | + ] |
| 16 | + }, |
| 17 | + { |
| 18 | + "cell_type": "code", |
| 19 | + "execution_count": null, |
| 20 | + "id": "a5e0fbcf", |
| 21 | + "metadata": { |
| 22 | + "execution": { |
| 23 | + "iopub.execute_input": "2025-03-07T00:30:50.009860Z", |
| 24 | + "iopub.status.busy": "2025-03-07T00:30:50.009562Z", |
| 25 | + "iopub.status.idle": "2025-03-07T00:30:50.011732Z", |
| 26 | + "shell.execute_reply": "2025-03-07T00:30:50.011451Z", |
| 27 | + "shell.execute_reply.started": "2025-03-07T00:30:50.009846Z" |
| 28 | + } |
| 29 | + }, |
| 30 | + "outputs": [], |
| 31 | + "source": [ |
| 32 | + "# Times Square Parameters\n", |
| 33 | + "collection_name = 'u/brycek/aosBaseline_tie'\n", |
| 34 | + "detector = 4" |
| 35 | + ] |
| 36 | + }, |
| 37 | + { |
| 38 | + "cell_type": "code", |
| 39 | + "execution_count": null, |
| 40 | + "id": "1dc7ca3a-b9f6-484c-9670-8534617bac0b", |
| 41 | + "metadata": { |
| 42 | + "execution": { |
| 43 | + "iopub.execute_input": "2025-03-07T00:30:52.700602Z", |
| 44 | + "iopub.status.busy": "2025-03-07T00:30:52.700211Z", |
| 45 | + "iopub.status.idle": "2025-03-07T00:30:52.703168Z", |
| 46 | + "shell.execute_reply": "2025-03-07T00:30:52.702860Z", |
| 47 | + "shell.execute_reply.started": "2025-03-07T00:30:52.700586Z" |
| 48 | + } |
| 49 | + }, |
| 50 | + "outputs": [], |
| 51 | + "source": [ |
| 52 | + "import numpy as np\n", |
| 53 | + "from matplotlib import pyplot as plt\n", |
| 54 | + "from lsst.daf.butler import Butler\n", |
| 55 | + "%matplotlib inline" |
| 56 | + ] |
| 57 | + }, |
| 58 | + { |
| 59 | + "cell_type": "code", |
| 60 | + "execution_count": null, |
| 61 | + "id": "a5dde02a-da5c-45b6-9a53-4945cfc5d82b", |
| 62 | + "metadata": { |
| 63 | + "execution": { |
| 64 | + "iopub.execute_input": "2025-03-07T00:30:52.929083Z", |
| 65 | + "iopub.status.busy": "2025-03-07T00:30:52.928715Z", |
| 66 | + "iopub.status.idle": "2025-03-07T00:30:53.063086Z", |
| 67 | + "shell.execute_reply": "2025-03-07T00:30:53.062606Z", |
| 68 | + "shell.execute_reply.started": "2025-03-07T00:30:52.929070Z" |
| 69 | + } |
| 70 | + }, |
| 71 | + "outputs": [], |
| 72 | + "source": [ |
| 73 | + "butler = Butler('/repo/main')" |
| 74 | + ] |
| 75 | + }, |
| 76 | + { |
| 77 | + "cell_type": "markdown", |
| 78 | + "id": "3857a4e3-ac08-45de-8b5f-2f5683d7e4fd", |
| 79 | + "metadata": {}, |
| 80 | + "source": [ |
| 81 | + "## TIE" |
| 82 | + ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "cell_type": "code", |
| 86 | + "execution_count": null, |
| 87 | + "id": "0596b008-4095-4e84-85df-ea38f4d8d83d", |
| 88 | + "metadata": { |
| 89 | + "execution": { |
| 90 | + "iopub.execute_input": "2025-03-07T00:30:59.316088Z", |
| 91 | + "iopub.status.busy": "2025-03-07T00:30:59.315602Z", |
| 92 | + "iopub.status.idle": "2025-03-07T00:30:59.655039Z", |
| 93 | + "shell.execute_reply": "2025-03-07T00:30:59.654604Z", |
| 94 | + "shell.execute_reply.started": "2025-03-07T00:30:59.316072Z" |
| 95 | + } |
| 96 | + }, |
| 97 | + "outputs": [], |
| 98 | + "source": [ |
| 99 | + "aos_visit_tables_raw = butler.query_datasets('aggregateAOSVisitTableRaw', collections=collection_name)" |
| 100 | + ] |
| 101 | + }, |
| 102 | + { |
| 103 | + "cell_type": "code", |
| 104 | + "execution_count": null, |
| 105 | + "id": "a19ec612-0491-426e-8c39-dc28ec8e8982", |
| 106 | + "metadata": { |
| 107 | + "execution": { |
| 108 | + "iopub.execute_input": "2025-03-07T00:30:59.655857Z", |
| 109 | + "iopub.status.busy": "2025-03-07T00:30:59.655723Z", |
| 110 | + "iopub.status.idle": "2025-03-07T00:31:00.505425Z", |
| 111 | + "shell.execute_reply": "2025-03-07T00:31:00.505018Z", |
| 112 | + "shell.execute_reply.started": "2025-03-07T00:30:59.655844Z" |
| 113 | + } |
| 114 | + }, |
| 115 | + "outputs": [], |
| 116 | + "source": [ |
| 117 | + "well_sampled_data_ids = []\n", |
| 118 | + "for raw_table_ref in aos_visit_tables_raw[:50]:\n", |
| 119 | + " raw_table = butler.get(raw_table_ref)\n", |
| 120 | + " names, counts = np.unique(raw_table['detector'], return_counts=True)\n", |
| 121 | + " if np.min(counts) >= 10:\n", |
| 122 | + " well_sampled_data_ids.append(raw_table_ref.dataId)" |
| 123 | + ] |
| 124 | + }, |
| 125 | + { |
| 126 | + "cell_type": "code", |
| 127 | + "execution_count": null, |
| 128 | + "id": "a79250c7-9a6d-41be-a254-be10f07f40fc", |
| 129 | + "metadata": { |
| 130 | + "execution": { |
| 131 | + "iopub.execute_input": "2025-03-07T00:31:00.506232Z", |
| 132 | + "iopub.status.busy": "2025-03-07T00:31:00.506101Z", |
| 133 | + "iopub.status.idle": "2025-03-07T00:31:00.508887Z", |
| 134 | + "shell.execute_reply": "2025-03-07T00:31:00.508575Z", |
| 135 | + "shell.execute_reply.started": "2025-03-07T00:31:00.506220Z" |
| 136 | + } |
| 137 | + }, |
| 138 | + "outputs": [], |
| 139 | + "source": [ |
| 140 | + "len(well_sampled_data_ids)" |
| 141 | + ] |
| 142 | + }, |
| 143 | + { |
| 144 | + "cell_type": "code", |
| 145 | + "execution_count": null, |
| 146 | + "id": "e49e5a5a-fbf8-43ba-8a76-7cea0cad3b13", |
| 147 | + "metadata": { |
| 148 | + "execution": { |
| 149 | + "iopub.execute_input": "2025-03-07T00:31:00.509388Z", |
| 150 | + "iopub.status.busy": "2025-03-07T00:31:00.509266Z", |
| 151 | + "iopub.status.idle": "2025-03-07T00:31:00.582154Z", |
| 152 | + "shell.execute_reply": "2025-03-07T00:31:00.581796Z", |
| 153 | + "shell.execute_reply.started": "2025-03-07T00:31:00.509376Z" |
| 154 | + } |
| 155 | + }, |
| 156 | + "outputs": [], |
| 157 | + "source": [ |
| 158 | + "raw_table = butler.get('aggregateAOSVisitTableRaw', dataId=well_sampled_data_ids[0], collections=collection_name)" |
| 159 | + ] |
| 160 | + }, |
| 161 | + { |
| 162 | + "cell_type": "code", |
| 163 | + "execution_count": null, |
| 164 | + "id": "414287bd-a086-4fe0-a472-0124ca8a6119", |
| 165 | + "metadata": { |
| 166 | + "execution": { |
| 167 | + "iopub.execute_input": "2025-03-07T00:31:00.787562Z", |
| 168 | + "iopub.status.busy": "2025-03-07T00:31:00.787287Z", |
| 169 | + "iopub.status.idle": "2025-03-07T00:31:00.793072Z", |
| 170 | + "shell.execute_reply": "2025-03-07T00:31:00.792738Z", |
| 171 | + "shell.execute_reply.started": "2025-03-07T00:31:00.787546Z" |
| 172 | + } |
| 173 | + }, |
| 174 | + "outputs": [], |
| 175 | + "source": [ |
| 176 | + "raw_table[:3]" |
| 177 | + ] |
| 178 | + }, |
| 179 | + { |
| 180 | + "cell_type": "code", |
| 181 | + "execution_count": null, |
| 182 | + "id": "bd4130e1-c6b7-4a0c-b546-3dfd8e086eb0", |
| 183 | + "metadata": { |
| 184 | + "execution": { |
| 185 | + "iopub.execute_input": "2025-03-07T00:31:01.390181Z", |
| 186 | + "iopub.status.busy": "2025-03-07T00:31:01.389731Z", |
| 187 | + "iopub.status.idle": "2025-03-07T00:31:01.479010Z", |
| 188 | + "shell.execute_reply": "2025-03-07T00:31:01.478651Z", |
| 189 | + "shell.execute_reply.started": "2025-03-07T00:31:01.390164Z" |
| 190 | + } |
| 191 | + }, |
| 192 | + "outputs": [], |
| 193 | + "source": [ |
| 194 | + "plt.scatter(raw_table['thx_CCS_intra'], raw_table['thy_CCS_intra'], c=raw_table['zk_CCS'][:,5])" |
| 195 | + ] |
| 196 | + }, |
| 197 | + { |
| 198 | + "cell_type": "code", |
| 199 | + "execution_count": null, |
| 200 | + "id": "02714b61-cb35-4ab7-aa40-65aacb6c24f3", |
| 201 | + "metadata": { |
| 202 | + "execution": { |
| 203 | + "iopub.execute_input": "2025-03-07T00:36:10.085238Z", |
| 204 | + "iopub.status.busy": "2025-03-07T00:36:10.084914Z", |
| 205 | + "iopub.status.idle": "2025-03-07T00:36:12.938393Z", |
| 206 | + "shell.execute_reply": "2025-03-07T00:36:12.937945Z", |
| 207 | + "shell.execute_reply.started": "2025-03-07T00:36:10.085221Z" |
| 208 | + } |
| 209 | + }, |
| 210 | + "outputs": [], |
| 211 | + "source": [ |
| 212 | + "dataId = {**well_sampled_data_ids[0].to_simple().dataId, \"detector\": detector}\n", |
| 213 | + "dataId['exposure'] = dataId['visit']\n", |
| 214 | + "plt.imshow(butler.get('postISRCCD', dataId=dataId, collections=collection_name).image.array, vmax=2000)" |
| 215 | + ] |
| 216 | + }, |
| 217 | + { |
| 218 | + "cell_type": "code", |
| 219 | + "execution_count": null, |
| 220 | + "id": "d24c3ef5-c34b-4190-9db3-9a8c64259138", |
| 221 | + "metadata": {}, |
| 222 | + "outputs": [], |
| 223 | + "source": [] |
| 224 | + } |
| 225 | + ], |
| 226 | + "metadata": { |
| 227 | + "kernelspec": { |
| 228 | + "display_name": "LSST", |
| 229 | + "language": "python", |
| 230 | + "name": "lsst" |
| 231 | + }, |
| 232 | + "language_info": { |
| 233 | + "codemirror_mode": { |
| 234 | + "name": "ipython", |
| 235 | + "version": 3 |
| 236 | + }, |
| 237 | + "file_extension": ".py", |
| 238 | + "mimetype": "text/x-python", |
| 239 | + "name": "python", |
| 240 | + "nbconvert_exporter": "python", |
| 241 | + "pygments_lexer": "ipython3", |
| 242 | + "version": "3.12.9" |
| 243 | + } |
| 244 | + }, |
| 245 | + "nbformat": 4, |
| 246 | + "nbformat_minor": 5 |
| 247 | +} |
0 commit comments