Skip to content

Commit

Permalink
remove redundant airmass vs. time plot in prenight
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Dec 8, 2023
1 parent 36e7ead commit 85e543a
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions schedview/app/prenight/prenight.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ class Prenight(param.Parameterized):
shown_tabs = param.ListSelector(
default=[
"Azimuth and altitude",
"Airmass vs. time",
"Sky maps",
"Table of visits",
"Reward plots",
],
objects=[
"Azimuth and altitude",
"Airmass vs. time",
"Sky maps",
"Table of visits",
"Reward plots",
Expand Down Expand Up @@ -247,7 +245,6 @@ def _update_shown_tabs_options(self):

new_objects = [
"Azimuth and altitude",
"Airmass vs. time",
"Sky maps",
"Table of visits",
"Reward plots",
Expand Down Expand Up @@ -440,41 +437,6 @@ def _update_scheduler(self):
self._scheduler = rubin_scheduler.scheduler.example.example_scheduler(nside=self._nside)
self.logger.info("Finished loading example scheduler.")

@param.depends(
"_visits_cds",
"_almanac_events",
)
def airmass_vs_time(self):
"""Create a plot of airmass vs. time.
Returns
-------
fig : `bokeh.plotting.Figure`
The bokeh figure.
"""
if self._visits is None:
return "No visits loaded"

if self._almanac_events is None:
return "Almanac events not computed yet."

self.logger.info("Starting to update airmass vs. time plot")

fig = bokeh.plotting.figure(
title="Airmass",
x_axis_label="Time (UTC)",
y_axis_label="Airmass",
frame_height=512,
width_policy="max",
tools="pan,wheel_zoom,box_zoom,box_select,save,reset,help",
)

fig = schedview.plot.nightly.plot_airmass_vs_time(
visits=self._visits_cds, figure=fig, almanac_events=self._almanac_events
)
self.logger.info("Finished updating airmass vs. time plot")
return fig

@param.depends(
"_visits_cds",
"_almanac_events",
Expand Down Expand Up @@ -755,15 +717,13 @@ def initialize_tab_contents(self):
pn.param.ParamMethod(self.alt_vs_time, loading_indicator=True),
pn.param.ParamMethod(self.horizon_map, loading_indicator=True),
),
"Airmass vs. time": pn.param.ParamMethod(self.airmass_vs_time, loading_indicator=True),
"Sky maps": pn.param.ParamMethod(self.visit_skymaps, loading_indicator=True),
"Table of visits": pn.param.ParamMethod(self.visit_table, loading_indicator=True),
"Reward plots": pn.Column(
pn.param.ParamMethod(self.reward_params, loading_indicator=True),
pn.param.ParamMethod(self.reward_plot, loading_indicator=True),
pn.param.ParamMethod(self.infeasible_plot, loading_indicator=True),
),
"Visit explorer": pn.param.ParamMethod(self.visit_explorer, loading_indicator=True),
}
self.logger.info("Finished creating initial dict of tab contents.")
return tab_contents
Expand Down Expand Up @@ -1045,7 +1005,6 @@ def parse_prenight_args():
nargs="+",
default=[
"Azimuth and altitude",
"Airmass vs. time",
"Sky maps",
"Table of visits",
"Reward plots",
Expand Down

0 comments on commit 85e543a

Please sign in to comment.