def last_night_plot(self): """Dial plot displaying the weather downtime for the date preceding `self.date`. The weather downtime is displayed as a percentage relative to the night length. In addition its absolute value is displayed in minutes. Returns: -------- app.plot.plot.DialPlot Plot displaying the weather downtime for last night. """ weather_downtime = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='TimeLostToProblems') night_length = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='NightLength') weather_downtime_percentage = 100 * weather_downtime / night_length dial_color_func = good_mediocre_bad_color_func(good_limit=3, bad_limit=6) return DialPlot(values=[weather_downtime_percentage], label_values=[0, 3, 6] + [v for v in range(10, 101, 10)], dial_color_func=dial_color_func, display_values=[ '{:.1f}%'.format(weather_downtime_percentage), '{:d}m'.format(int(weather_downtime / 60)) ], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the operation efficiency for last night, i.e. for the date preceding `self.date`. Returns: -------- app.plot.plot.DialPlot Plot displaying the operation efficiency for last night. """ obs_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ObsTime') science_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ScienceTime') operation_efficiency = self._observation_efficiency( obs_time, science_time) dial_color_func = good_mediocre_bad_color_func(bad_limit=80, good_limit=90) return DialPlot( values=[operation_efficiency], label_values=range(0, 151, 10), dial_color_func=dial_color_func, display_values=['{:.1f}%'.format(operation_efficiency)], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the weather downtime for the date preceding `self.date`. The weather downtime is displayed as a percentage relative to the night length. In addition its absolute value is displayed in minutes. Returns: -------- app.plot.plot.DialPlot Plot displaying the weather downtime for last night. """ weather_downtime = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='TimeLostToProblems') night_length = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='NightLength') weather_downtime_percentage = 100 * weather_downtime / night_length dial_color_func = good_mediocre_bad_color_func(good_limit=3, bad_limit=6) return DialPlot(values=[weather_downtime_percentage], label_values=[0, 3, 6] + [v for v in range(10, 101, 10)], dial_color_func=dial_color_func, display_values=['{:.1f}%'.format(weather_downtime_percentage), '{:d}m'.format(int(weather_downtime / 60))], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the science time for the date preceding `self.date`. The science time is displayed as a percentage relative to the night length. In addition its absolute value is displayed in minutes. Returns: -------- app.plot.plot.DialPlot Plot displaying the science time for last night. """ science_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ScienceTime') night_length = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='NightLength') science_time_percentage = 100 * science_time / night_length dial_color_func = good_mediocre_bad_color_func(good_limit=47, bad_limit=37) return DialPlot( values=[science_time_percentage], label_values=[0, 10, 20, 30, 37, 47, 60, 70, 80, 90, 100], dial_color_func=dial_color_func, display_values=[ '{:.1f}%'.format(science_time_percentage), '{:d}m'.format(int(science_time / 60)) ], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the engineering time for the date preceding `self.date`. The engineering time is displayed as a percentage relative to the night length. In addition its absolute value is displayed in minutes. Returns: -------- app.plot.plot.DialPlot Plot displaying the engineering time for last night. """ engineering_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='EngineeringTime') night_length = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='NightLength') engineering_time_percentage = 100 * engineering_time / night_length dial_color_func = good_mediocre_bad_color_func(good_limit=13, bad_limit=18) return DialPlot(values=[engineering_time_percentage], label_values=[0, 5, 13, 18] + [v for v in range(30, 101, 10)], dial_color_func=dial_color_func, display_values=['{:.1f}%'.format(engineering_time_percentage), '{:d}m'.format(int(engineering_time / 60))], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the operation efficiency for last night.""" shutter_open_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ShutterOpenTime') science_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ScienceTime') shutter_open_efficiency = self._shutter_open_efficiency( shutter_open_time, science_time) return DialPlot( values=[shutter_open_efficiency], label_values=range(0, 151, 10), dial_color_func=neutral_color_func, display_values=[str(round(shutter_open_efficiency, 1)) + '%'])
def last_night_plot(self): """Dial plot displaying the operation efficiency for last night, i.e. for the date preceding `self.date`. Returns: -------- app.plot.plot.DialPlot Plot displaying the operation efficiency for last night. """ obs_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ObsTime') science_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ScienceTime') operation_efficiency = self._observation_efficiency(obs_time, science_time) dial_color_func = good_mediocre_bad_color_func(bad_limit=80, good_limit=90) return DialPlot(values=[operation_efficiency], label_values=range(0, 151, 10), dial_color_func=dial_color_func, display_values=['{:.1f}%'.format(operation_efficiency)], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the science time for the date preceding `self.date`. The science time is displayed as a percentage relative to the night length. In addition its absolute value is displayed in minutes. Returns: -------- app.plot.plot.DialPlot Plot displaying the science time for last night. """ science_time = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='ScienceTime') night_length = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='NightLength') science_time_percentage = 100 * science_time / night_length dial_color_func = good_mediocre_bad_color_func(good_limit=47, bad_limit=37) return DialPlot(values=[science_time_percentage], label_values=[0, 10, 20, 30, 37, 47, 60, 70, 80, 90, 100], dial_color_func=dial_color_func, display_values=['{:.1f}%'.format(science_time_percentage), '{:d}m'.format(int(science_time / 60))], **self.kwargs)
def last_night_plot(self): """Dial plot displaying the number of block visits for the date preceding `self.date`. Returns: -------- app.plot.plot.DialPlot Plot for last night's number of block visits. """ block_visits = value_last_night(df=self.df, date=self.date, date_column='Date', value_column='BlockCount') return DialPlot(values=[block_visits], label_values=range(0, 13), dial_color_func=lambda d: '#7f7f7f', display_values=[str(block_visits)], **self.kwargs)