|
19 | 19 | "id": "1a3d4bff-443a-4cb9-9342-09f059bed6df", |
20 | 20 | "metadata": {}, |
21 | 21 | "source": [ |
22 | | - "# Run simulation for {params.day_obs} " |
| 22 | + "# Run simulation for {{ params.day_obs }}" |
23 | 23 | ] |
24 | 24 | }, |
25 | 25 | { |
|
191 | 191 | "#%load_ext memory_profiler" |
192 | 192 | ] |
193 | 193 | }, |
| 194 | + { |
| 195 | + "cell_type": "code", |
| 196 | + "execution_count": null, |
| 197 | + "id": "52639da3-457d-4bc2-8dd8-f0a06b59f526", |
| 198 | + "metadata": {}, |
| 199 | + "outputs": [], |
| 200 | + "source": [ |
| 201 | + "day_obs = int(day_obs)\n", |
| 202 | + "sim_nights = int(sim_nights)" |
| 203 | + ] |
| 204 | + }, |
194 | 205 | { |
195 | 206 | "cell_type": "code", |
196 | 207 | "execution_count": null, |
|
863 | 874 | "metadata": {}, |
864 | 875 | "outputs": [], |
865 | 876 | "source": [ |
866 | | - "# # schedview is noisy with warnings about things we don't need here \n", |
867 | | - "# # Make a spinny globe armillary sphere map of the simulated visits\n", |
868 | | - "# if sim_nights < 3:\n", |
869 | | - "# with warnings.catch_warnings(record=True) as w:\n", |
870 | | - "# warnings.simplefilter(\"always\") \n", |
| 877 | + "# schedview is noisy with warnings about things we don't need here \n", |
| 878 | + "# Make a spinny globe armillary sphere map of the simulated visits\n", |
| 879 | + "if sim_nights < 3:\n", |
| 880 | + " with warnings.catch_warnings(record=True) as w:\n", |
| 881 | + " warnings.simplefilter(\"always\") \n", |
871 | 882 | " \n", |
872 | | - "# from schedview.compute.visits import add_coords_tuple\n", |
873 | | - "# from schedview.plot.visitmap import create_visit_skymaps\n", |
874 | | - "# from schedview.collect.visits import NIGHT_STACKERS\n", |
875 | | - "# from schedview import DayObs\n", |
876 | | - "# import bokeh.io\n", |
877 | | - "# from bokeh.plotting import output_file\n", |
| 883 | + " from schedview.compute.visits import add_coords_tuple\n", |
| 884 | + " from schedview.plot.visitmap import create_visit_skymaps\n", |
| 885 | + " from schedview.collect.visits import NIGHT_STACKERS\n", |
| 886 | + " from schedview import DayObs\n", |
| 887 | + " import bokeh.io\n", |
| 888 | + " from bokeh.plotting import output_file\n", |
878 | 889 | "\n", |
879 | | - "# bokeh.io.output_notebook(hide_banner=True)\n", |
880 | | - "# timezone = \"Chile/Continental\"\n", |
| 890 | + " bokeh.io.output_notebook(hide_banner=True)\n", |
| 891 | + " timezone = \"Chile/Continental\"\n", |
881 | 892 | " \n", |
882 | | - "# oo = SchemaConverter().obs2opsim(observations).to_records()\n", |
883 | | - "# for stacker in NIGHT_STACKERS:\n", |
884 | | - "# oo = stacker.run(oo)\n", |
885 | | - "# od = pd.DataFrame(oo)\n", |
| 893 | + " oo = SchemaConverter().obs2opsim(observations).to_records()\n", |
| 894 | + " for stacker in NIGHT_STACKERS:\n", |
| 895 | + " oo = stacker.run(oo)\n", |
| 896 | + " od = pd.DataFrame(oo)\n", |
886 | 897 | " \n", |
887 | 898 | " \n", |
888 | | - "# print(f\"SIMULATION for {day_obs}\")\n", |
| 899 | + " print(f\"SIMULATION for {day_obs}\")\n", |
889 | 900 | " \n", |
890 | | - "# if len(od):\n", |
891 | | - "# od = add_coords_tuple(od)\n", |
892 | | - "# vmap, vmap_data = create_visit_skymaps(\n", |
893 | | - "# visits=od,\n", |
894 | | - "# night_date=DayObs.from_date(day_obs).date,\n", |
895 | | - "# timezone=timezone,\n", |
896 | | - "# observatory=observatory,\n", |
897 | | - "# )\n", |
898 | | - "# bokeh.io.show(vmap)\n", |
899 | | - "# # this would let you make a little stand-alone html map\n", |
900 | | - "# # output_file(\"sim_visit.html\")\n", |
901 | | - "# # bokeh.io.save(vmap)\n", |
902 | | - "# else:\n", |
903 | | - "# print(\"No visits\")" |
| 901 | + " if len(od):\n", |
| 902 | + " od = add_coords_tuple(od)\n", |
| 903 | + " vmap, vmap_data = create_visit_skymaps(\n", |
| 904 | + " visits=od,\n", |
| 905 | + " night_date=DayObs.from_date(day_obs).date,\n", |
| 906 | + " timezone=timezone,\n", |
| 907 | + " observatory=observatory,\n", |
| 908 | + " )\n", |
| 909 | + " bokeh.io.show(vmap)\n", |
| 910 | + " # this would let you make a little stand-alone html map\n", |
| 911 | + " # output_file(\"sim_visit.html\")\n", |
| 912 | + " # bokeh.io.save(vmap)\n", |
| 913 | + " else:\n", |
| 914 | + " print(\"No visits\")" |
904 | 915 | ] |
905 | 916 | }, |
906 | 917 | { |
|
0 commit comments