From 8f7a65cb802a76b1028c2f28d65552046784824d Mon Sep 17 00:00:00 2001 From: "york@stsci.edu" Date: Mon, 6 Nov 2023 15:28:12 -0500 Subject: [PATCH] PEP8 --- .../common_monitors/readnoise_monitor.py | 4 ++-- .../jwql/monitor_pages/monitor_readnoise_bokeh.py | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/jwql/instrument_monitors/common_monitors/readnoise_monitor.py b/jwql/instrument_monitors/common_monitors/readnoise_monitor.py index 60d889133..833db0fb7 100755 --- a/jwql/instrument_monitors/common_monitors/readnoise_monitor.py +++ b/jwql/instrument_monitors/common_monitors/readnoise_monitor.py @@ -413,7 +413,7 @@ def process(self, file_list): processed_file = file.replace("uncal", "refpix") if not os.path.isfile(processed_file): files_to_calibrate.append(file) - + # Run the files through the necessary pipeline steps outputs = run_parallel_pipeline(files_to_calibrate, "uncal", "refpix", self.instrument) @@ -422,7 +422,7 @@ def process(self, file_list): # Get relevant header information for this file self.get_metadata(filename) - + if filename in outputs: processed_file = outputs[filename] else: diff --git a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py index 1ece690f3..543dcac9a 100644 --- a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py +++ b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py @@ -35,6 +35,7 @@ OUTPUTS_DIR = get_config()['outputs'] + class ReadnoiseMonitorData(): """Class to hold bias data to be plotted @@ -116,7 +117,7 @@ def __init__(self, instrument, aperture): self.plot_readnoise_amplifers() self.plot_readnoise_difference_image() self.plot_readnoise_histogram() - + self.file_path = os.path.join(OUTPUT_DIR, "readnoise_monitor", "data", self.ins_ap) self.tab = Panel(child=column(row(*self.amp_plots), @@ -156,7 +157,7 @@ def plot_readnoise_amplifers(self): ("nints", "@nints"), ("ngroups", "@ngroups"), ("readnoise", "@readnoise")])) - + amp_plot.circle(x='expstarts', y='readnoise', source=source) amp_plot.xaxis.axis_label = 'Date' @@ -175,7 +176,7 @@ def plot_readnoise_difference_image(self): if len(self.db.query_results) != 0: diff_image_png = os.path.join(self.file_path, self.db.query_results[-1].readnoise_diff_image) self.diff_image_plot.image_url(url=[diff_image_png], x=0, y=0, w=2048, h=2048, anchor="bottom_left") - + self.diff_image_plot.xaxis.visible = False self.diff_image_plot.yaxis.visible = False self.diff_image_plot.xgrid.grid_line_color = None @@ -183,7 +184,6 @@ def plot_readnoise_difference_image(self): self.diff_image_plot.title.text_font_size = '22px' self.diff_image_plot.title.align = 'center' - def plot_readnoise_histogram(self): """Updates the readnoise histogram""" @@ -204,12 +204,9 @@ def plot_readnoise_histogram(self): y_range=(hist_yr_start, hist_yr_end), sizing_mode='scale_width') - source = ColumnDataSource(data=dict( - x=diff_image_bin_centers, - y=diff_image_n, - )) + source = ColumnDataSource(data=dict(x=diff_image_bin_centers, y=diff_image_n, )) - self.readnoise_histogram.add_tools(HoverTool(tooltips=[("Data (x, y)", "(@x, @y)"),])) + self.readnoise_histogram.add_tools(HoverTool(tooltips=[("Data (x, y)", "(@x, @y)"), ])) self.readnoise_histogram.circle(x='x', y='y', source=source)