Skip to content

Commit ffaa1dc

Browse files
committed
Compare pre-night simulations with completed visits
1 parent 32f5dfc commit ffaa1dc

25 files changed

+516
-707
lines changed

notebooks/custom_plot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Seeing",
44
"settings": {
55
"kind": "scatter",
6-
"x": "start_date",
6+
"x": "start_timestamp",
77
"y": [
88
"seeingFwhmEff",
99
"seeingFwhm500",

notebooks/introduction.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
"The `visit` table is `pandas.DataFrame` with the following properties:\n",
487487
"\n",
488488
"- A unique index with the name `observationId` that increases monatonically with time.\n",
489-
"- A `start_date` column with a `dtype` of `datetime64[ns, UTC]`. This allows the `bokeh` and other tools to recognize the column as a date and time, and treat it accordingly.\n",
489+
"- A `start_timestamp` column with a `dtype` of `datetime64[ns, UTC]`. This allows the `bokeh` and other tools to recognize the column as a date and time, and treat it accordingly.\n",
490490
"- Columns as defined in the [FBS scheduler output schema](https://rubin-scheduler.lsst.io/fbs-output-schema.html). \n",
491491
"- Any number of additional columns, for example others from the FBS output schema, added by `maf` stackers, or from ConsDB.\n",
492492
"\n",
@@ -530,7 +530,7 @@
530530
" ],\n",
531531
")\n",
532532
"visits = pd.DataFrame(visits_recarray).set_index(\"observationId\")\n",
533-
"visits[\"start_date\"] = pd.to_datetime(\n",
533+
"visits[\"start_timestamp\"] = pd.to_datetime(\n",
534534
" visits.observationStartMJD + 2400000.5, origin=\"julian\", unit=\"D\", utc=True\n",
535535
")"
536536
]

notebooks/prenight.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,10 @@
680680
"cell_type": "raw",
681681
"id": "73ea70fc-3b1a-4ce5-86c0-89150442983a",
682682
"metadata": {
683-
"tags": []
683+
"tags": [],
684+
"vscode": {
685+
"languageId": "raw"
686+
}
684687
},
685688
"source": [
686689
"import pandas as pd\n",
@@ -691,7 +694,7 @@
691694
"schema_converter = SchemaConverter()\n",
692695
"visits = schema_converter.obs2opsim(observations)\n",
693696
"\n",
694-
"visits[\"start_date\"] = pd.to_datetime(\n",
697+
"visits[\"start_timestamp\"] = pd.to_datetime(\n",
695698
" visits[\"observationStartMJD\"] + 2400000.5, origin=\"julian\", unit=\"D\", utc=True\n",
696699
")"
697700
]
@@ -700,10 +703,13 @@
700703
"cell_type": "raw",
701704
"id": "8518be8b-6aa7-4bc6-ab24-017c691d6c79",
702705
"metadata": {
703-
"tags": []
706+
"tags": [],
707+
"vscode": {
708+
"languageId": "raw"
709+
}
704710
},
705711
"source": [
706-
"ex = hvplot.explorer(visits, kind=\"scatter\", x=\"start_date\", y=\"airmass\", by=[\"note\"])\n",
712+
"ex = hvplot.explorer(visits, kind=\"scatter\", x=\"start_timestamp\", y=\"airmass\", by=[\"note\"])\n",
707713
"ex"
708714
]
709715
},

notebooks/prenight_matplotlib_extension.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@
156156
"source": [
157157
"def create_cumm_az_plot(visits):\n",
158158
" fig, axes = plt.subplots(3, sharex=True, gridspec_kw={\"hspace\": 0})\n",
159-
" axes[0].plot(visits.start_date, visits.cummTelAz)\n",
159+
" axes[0].plot(visits.start_timestamp, visits.cummTelAz)\n",
160160
" axes[0].set_ylabel(\"Cumulative az rot.\")\n",
161-
" axes[1].plot(visits.start_date, visits.azimuth)\n",
161+
" axes[1].plot(visits.start_timestamp, visits.azimuth)\n",
162162
" axes[1].set_ylabel(\"Field Az\")\n",
163-
" axes[2].plot(visits.start_date, visits.slewTime)\n",
163+
" axes[2].plot(visits.start_timestamp, visits.slewTime)\n",
164164
" axes[2].set_ylabel(\"Slew time\")\n",
165165
" axes[2].xaxis.set_major_formatter(mpl.dates.DateFormatter(\"%H:%M\"))\n",
166166
" axes[2].set_xlabel(\"Time (UTC)\")\n",

notebooks/prenight_multielement_extension.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
" .groupby(note_block)\n",
196196
" .agg(\n",
197197
" {\n",
198-
" \"start_date\": \"min\",\n",
198+
" \"start_timestamp\": \"min\",\n",
199199
" \"note\": \"first\",\n",
200200
" \"observationId\": \"count\",\n",
201201
" \"visitTime\": \"sum\",\n",
@@ -212,7 +212,7 @@
212212
" \"observationId\": \"# visits\",\n",
213213
" \"visitTime\": \"duration (s)\",\n",
214214
" \"filter\": \"filters\",\n",
215-
" \"start_date\": \"start time (UTC)\",\n",
215+
" \"start_timestamp\": \"start time (UTC)\",\n",
216216
" \"airmass\": \"max airmass\",\n",
217217
" \"moonDistance\": \"min moon sep.\",\n",
218218
" \"sunAlt\": \"max sun alt\",\n",

0 commit comments

Comments
 (0)