def monthly_plot(self, months): """Bar plot displaying the number of block visits per momth. The number of block visits is shown for the `months` months leading to but excluding the month containing `self.date`. A month here refers start at noon of the first of the month. For example, May 2016 refers to the period from 1 May 2016, 12:00 to 1 June 2016, 12:00. Params: ------- months : int Number of months. Returns: -------- app.plot.plot.TimeBarPlot Plot of number of block visits as a function of the month. """ start_date, end_date = month_range(self.date, months) trend_func = functools.partial(month_running_average, ignore_missing_values=False) return monthly_bar_plot(df=self.df, start_date=start_date, end_date=end_date, date_column='Date', month_column='Month', y_column='BlockCount', y_range=Range1d(start=0, end=300), trend_func=trend_func, **self.kwargs)
def monthly_plot(self, months): """Bar plot displaying the operation efficiency per momth. The operation efficiency is shown for the `months` months leading to but excluding the month containing `self.date`. A month here refers start at noon of the first of the month. For example, May 2016 refers to the period from 1 May 2016, 12:00 to 1 June 2016, 12:00. Params: ------- months : int Number of months. Returns: -------- app.plot.plot.TimeBarPlot Plot of operation efficiency as a function of the month. """ start_date, end_date = month_range(self.date, months) trend_func = functools.partial(month_running_average, ignore_missing_values=False) def post_binning_func(df): df['OperationEfficiency'] = 100 * np.divide(df.ObsTime, df.ScienceTime) return monthly_bar_plot(df=self.df, start_date=start_date, end_date=end_date, date_column='Date', month_column='Month', y_column='OperationEfficiency', y_range=Range1d(start=0, end=120), trend_func=trend_func, post_binning_func=post_binning_func, **self.kwargs)
def monthly_plot(self, months): """Bar plot displaying the shutter open efficiency per momth. The operation efficiency is shown for the `months` months leading to but excluding the month containing `self.date`. A month here refers start at noon of the first of the month. For example, May 2016 refers to the period from 1 May 2016, 12:00 to 1 June 2016, 12:00. Params: ------- months : int Number of months. Returns: -------- app.plot.plot.TimeBarPlot Plot of shutter open efficiency as a function of the month. """ start_date, end_date = month_range(self.date, months) trend_func = functools.partial(month_running_average, ignore_missing_values=False) def post_binning_func(df): df['TimeLostToProblemsPercentage'] = 100 * np.divide( df.TimeLostToProblems, df.NightLength) df.TimeLostToProblems /= 3600 return monthly_bar_plot( df=self.df, start_date=start_date, end_date=end_date, date_column='Date', month_column='Month', y_column=['TimeLostToProblems', 'TimeLostToProblemsPercentage'], y_range=[Range1d(start=0, end=60), Range1d(start=0, end=20)], y_formatters=[ PrintfTickFormatter(format='%.0fh'), PrintfTickFormatter(format='%.0f%%') ], trend_func=trend_func, post_binning_func=post_binning_func, **self.kwargs)
def monthly_plot(self, months): """Bar plot displaying the shutter open efficiency per momth. The operation efficiency is shown for the `months` months leading to but excluding the month containing `self.date`. A month here refers start at noon of the first of the month. For example, May 2016 refers to the period from 1 May 2016, 12:00 to 1 June 2016, 12:00. Params: ------- months : int Number of months. Returns: -------- app.plot.plot.TimeBarPlot Plot of shutter open efficiency as a function of the month. """ start_date, end_date = month_range(self.date, months) trend_func = functools.partial(month_running_average, ignore_missing_values=False) def post_binning_func(df): df['TimeLostToProblemsPercentage'] = 100 * np.divide(df.TimeLostToProblems, df.NightLength) df.TimeLostToProblems /= 3600 return monthly_bar_plot(df=self.df, start_date=start_date, end_date=end_date, date_column='Date', month_column='Month', y_column=['TimeLostToProblems', 'TimeLostToProblemsPercentage'], y_range=[Range1d(start=0, end=60), Range1d(start=0, end=20)], y_formatters=[PrintfTickFormatter(format='%.0fh'), PrintfTickFormatter(format='%.0f%%')], trend_func=trend_func, post_binning_func=post_binning_func, **self.kwargs)
def monthly_plot(self, months): """Bar plot displaying the operation efficiency per momth. The operation efficiency is shown for the `months` months leading to but excluding the month containing `self.date`. A month here refers start at noon of the first of the month. For example, May 2016 refers to the period from 1 May 2016, 12:00 to 1 June 2016, 12:00. Params: ------- months : int Number of months. Returns: -------- app.plot.plot.TimeBarPlot Plot of operation efficiency as a function of the month. """ start_date, end_date = month_range(self.date, months) trend_func = functools.partial(month_running_average, ignore_missing_values=False) def post_binning_func(df): df['OperationEfficiency'] = 100 * np.divide( df.ObsTime, df.ScienceTime) return monthly_bar_plot(df=self.df, start_date=start_date, end_date=end_date, date_column='Date', month_column='Month', y_column='OperationEfficiency', y_range=Range1d(start=0, end=120), trend_func=trend_func, post_binning_func=post_binning_func, **self.kwargs)