Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Feb 1, 2024
1 parent d7bf52b commit 22ebade
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 55 deletions.
42 changes: 21 additions & 21 deletions notebooks/Example_2_Submitting_a_ToO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{
"data": {
"text/plain": [
"WinterRaDecToO(ra_deg=249.1311789, dec_deg=47.858962, use_field_grid=True, filters=['Y', 'J'], target_priority=50.0, t_exp=960.0, n_exp=1, n_dither=8, dither_distance=30.0, start_time_mjd=60341.89621123527, end_time_mjd=60342.88621123949, max_airmass=2.0)"
"WinterRaDecToO(ra_deg=249.1311789, dec_deg=47.858962, use_field_grid=True, filters=['Y', 'J'], target_priority=50.0, t_exp=960.0, n_exp=1, n_dither=8, dither_distance=30.0, start_time_mjd=60341.97954473166, end_time_mjd=60342.9695447362, max_airmass=2.0)"
]
},
"execution_count": 6,
Expand All @@ -89,7 +89,7 @@
{
"data": {
"text/plain": [
"WinterRaDecToO(ra_deg=249.1311789, dec_deg=47.858962, use_field_grid=True, filters=['Hs'], target_priority=50.0, t_exp=960.0, n_exp=1, n_dither=15, dither_distance=30.0, start_time_mjd=60341.89621123527, end_time_mjd=60342.88621123949, max_airmass=2.0)"
"WinterRaDecToO(ra_deg=249.1311789, dec_deg=47.858962, use_field_grid=True, filters=['Hs'], target_priority=50.0, t_exp=960.0, n_exp=1, n_dither=15, dither_distance=30.0, start_time_mjd=60341.97954473166, end_time_mjd=60342.9695447362, max_airmass=2.0)"
]
},
"execution_count": 7,
Expand Down Expand Up @@ -192,8 +192,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -211,8 +211,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -230,8 +230,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>15</td>\n",
Expand All @@ -249,9 +249,9 @@
"2 249.0 48.0 5327 Hs 960.0 50.0 Stein 202XA000 \n",
"\n",
" progID validStart validStop observed maxAirmass ditherNumber \\\n",
"0 1 60341.896211 60342.886211 False 2.0 8 \n",
"1 1 60341.896211 60342.886211 False 2.0 8 \n",
"2 1 60341.896211 60342.886211 False 2.0 15 \n",
"0 1 60341.979545 60342.969545 False 2.0 8 \n",
"1 1 60341.979545 60342.969545 False 2.0 8 \n",
"2 1 60341.979545 60342.969545 False 2.0 15 \n",
"\n",
" ditherStepSize obsHistID \n",
"0 30.0 0 \n",
Expand Down Expand Up @@ -320,7 +320,7 @@
{
"data": {
"text/plain": [
"\"Request passed validation! Triggering was set to True. Schedule name is 'timed_requests_02_01_2024_13_1706822173' .\""
"\"Request passed validation! Triggering was set to True. Schedule name is 'request_202XA000_02_01_2024_15_16_14' .\""
]
},
"execution_count": 13,
Expand Down Expand Up @@ -395,8 +395,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -414,8 +414,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -433,8 +433,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>False</td>\n",
" <td>2.0</td>\n",
" <td>15</td>\n",
Expand All @@ -452,9 +452,9 @@
"2 249.0 48.0 5327 Hs 960.0 50.0 Stein 202XA000 \n",
"\n",
" progID validStart validStop observed maxAirmass ditherNumber \\\n",
"0 1 60341.896211 60342.886211 False 2.0 8 \n",
"1 1 60341.896211 60342.886211 False 2.0 8 \n",
"2 1 60341.896211 60342.886211 False 2.0 15 \n",
"0 1 60341.979545 60342.969545 False 2.0 8 \n",
"1 1 60341.979545 60342.969545 False 2.0 8 \n",
"2 1 60341.979545 60342.969545 False 2.0 15 \n",
"\n",
" ditherStepSize obsHistID \n",
"0 30.0 0 \n",
Expand Down
58 changes: 24 additions & 34 deletions notebooks/Example_3_Interacting_with_Observatory_Queue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,25 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <th>0</th>\n",
" <td>202XA000</td>\n",
" <td>0.0</td>\n",
" <td>timed_requests_02_01_2024_13_1706822173</td>\n",
" <td>request_202XA000_02_01_2024_15_16_14</td>\n",
" <td>3</td>\n",
" <td>0.8</td>\n",
" <td>2024-02-01 21:30:32.651</td>\n",
" <td>2024-02-02 21:16:08.651</td>\n",
" <td>2024-02-01 23:30:32.665</td>\n",
" <td>2024-02-02 23:16:08.665</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" prog_name observed_frac too_schedule_name \\\n",
"1 202XA000 0.0 timed_requests_02_01_2024_13_1706822173 \n",
"\n",
" n_entries total_time_hours window_start \\\n",
"1 3 0.8 2024-02-01 21:30:32.651 \n",
" prog_name observed_frac too_schedule_name n_entries \\\n",
"0 202XA000 0.0 request_202XA000_02_01_2024_15_16_14 3 \n",
"\n",
" window_end \n",
"1 2024-02-02 21:16:08.651 "
" total_time_hours window_start window_end \n",
"0 0.8 2024-02-01 23:30:32.665 2024-02-02 23:16:08.665 "
]
},
"execution_count": 7,
Expand Down Expand Up @@ -185,7 +182,7 @@
"metadata": {},
"outputs": [],
"source": [
"schedule_name = \"timed_requests_02_01_2024_13_1706822173\""
"schedule_name = \"request_202XA000_02_01_2024_15_16_14\""
]
},
{
Expand All @@ -197,7 +194,7 @@
{
"data": {
"text/plain": [
"'Returning details of schedule timed_requests_02_01_2024_13_1706822173'"
"'Returning details of schedule request_202XA000_02_01_2024_15_16_14'"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -270,8 +267,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>0</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -289,8 +286,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>0</td>\n",
" <td>2.0</td>\n",
" <td>8</td>\n",
Expand All @@ -308,8 +305,8 @@
" <td>Stein</td>\n",
" <td>202XA000</td>\n",
" <td>1</td>\n",
" <td>60341.896211</td>\n",
" <td>60342.886211</td>\n",
" <td>60341.979545</td>\n",
" <td>60342.969545</td>\n",
" <td>0</td>\n",
" <td>2.0</td>\n",
" <td>15</td>\n",
Expand All @@ -327,9 +324,9 @@
"2 249.0 48.0 5327 Hs 960.0 50.0 Stein 202XA000 \n",
"\n",
" progID validStart validStop observed maxAirmass ditherNumber \\\n",
"0 1 60341.896211 60342.886211 0 2.0 8 \n",
"1 1 60341.896211 60342.886211 0 2.0 8 \n",
"2 1 60341.896211 60342.886211 0 2.0 15 \n",
"0 1 60341.979545 60342.969545 0 2.0 8 \n",
"1 1 60341.979545 60342.969545 0 2.0 8 \n",
"2 1 60341.979545 60342.969545 0 2.0 15 \n",
"\n",
" ditherStepSize obsHistID \n",
"0 30.0 0 \n",
Expand Down Expand Up @@ -376,7 +373,7 @@
{
"data": {
"text/plain": [
"'Deleted timed_requests_02_01_2024_13_1706822173'"
"'Deleted request_202XA000_02_01_2024_15_16_14'"
]
},
"execution_count": 11,
Expand Down Expand Up @@ -410,7 +407,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Returning schedule summary for 202XA000\n"
"No active schedules found for 202XA000\n"
]
},
{
Expand All @@ -434,13 +431,6 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>prog_name</th>\n",
" <th>observed_frac</th>\n",
" <th>too_schedule_name</th>\n",
" <th>n_entries</th>\n",
" <th>total_time_hours</th>\n",
" <th>window_start</th>\n",
" <th>window_end</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
Expand All @@ -450,7 +440,7 @@
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [prog_name, observed_frac, too_schedule_name, n_entries, total_time_hours, window_start, window_end]\n",
"Columns: []\n",
"Index: []"
]
},
Expand All @@ -470,13 +460,13 @@
"id": "15c58dd6",
"metadata": {},
"source": [
"Fortunately the request has been removed, and there's nothing left in the queue!"
"Fortunately the request has been removed, and the queue is empty!"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "191b6669",
"id": "13e087c7",
"metadata": {},
"outputs": [],
"source": []
Expand Down

0 comments on commit 22ebade

Please sign in to comment.