Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
york-stsci committed Nov 6, 2023
1 parent fd08a85 commit 8f7a65c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions jwql/instrument_monitors/common_monitors/readnoise_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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:
Expand Down
15 changes: 6 additions & 9 deletions jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

OUTPUTS_DIR = get_config()['outputs']


class ReadnoiseMonitorData():
"""Class to hold bias data to be plotted
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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'
Expand All @@ -175,15 +176,14 @@ 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
self.diff_image_plot.ygrid.grid_line_color = None
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"""

Expand All @@ -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)

Expand Down

0 comments on commit 8f7a65c

Please sign in to comment.