diff --git a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py index ed7090399..8d0660b7b 100644 --- a/jwql/instrument_monitors/nircam_monitors/claw_monitor.py +++ b/jwql/instrument_monitors/nircam_monitors/claw_monitor.py @@ -154,13 +154,13 @@ def make_background_plots(self, plot_type='bkg'): if int(fltr[1:4]) < 250: # i.e. SW detectors_to_run = ['NRCA2', 'NRCA4', 'NRCB3', 'NRCB1', 'NRCA1', 'NRCA3', 'NRCB4', 'NRCB2'] # in on-sky order, don't change order grid = plt.GridSpec(2, 4, hspace=.4, wspace=.4, width_ratios=[1, 1, 1, 1]) - fig = plt.figure(figsize=(40, 20)) + fig = plt.figure(figsize=(45, 20)) fig.suptitle(fltr, fontsize=70) frack_masked_thresh = 0.075 else: # i.e. LW detectors_to_run = ['NRCALONG', 'NRCBLONG'] grid = plt.GridSpec(1, 2, hspace=.2, wspace=.4, width_ratios=[1, 1]) - fig = plt.figure(figsize=(20, 10)) + fig = plt.figure(figsize=(25, 10)) fig.suptitle(fltr, fontsize=70, y=1.05) frack_masked_thresh = 0.15 for i, det in enumerate(detectors_to_run): @@ -178,6 +178,7 @@ def make_background_plots(self, plot_type='bkg'): if plot_type == 'bkg': plot_data = df['median'].values if plot_type == 'bkg_rms': + df = df[df['stddev'] != 0] # older data has no accurate stddev measures plot_data = df['stddev'].values if plot_type == 'model': plot_data = df['median'].values / df['total_bkg'].values @@ -185,7 +186,7 @@ def make_background_plots(self, plot_type='bkg'): # Plot the background data over time ax = fig.add_subplot(grid[i]) - ax.scatter(plot_expstarts, plot_data, alpha=0.5) + ax.scatter(plot_expstarts, plot_data, alpha=0.3) # Match scaling in all plots to the first detector with data. if len(df) > 0: diff --git a/jwql/website/apps/jwql/monitor_views.py b/jwql/website/apps/jwql/monitor_views.py index 0b1050fb5..872d6b8a4 100644 --- a/jwql/website/apps/jwql/monitor_views.py +++ b/jwql/website/apps/jwql/monitor_views.py @@ -71,9 +71,8 @@ def background_monitor(request): template = "background_monitor.html" # Get the background trending filters to display - #server_name = get_config()['outputs'].split("outputs/", 1)[1] # todo uncomment - # output_dir_bkg = static(os.path.join("outputs", server_name, "claw_monitor", "backgrounds")) # todo uncomment - output_dir_bkg = os.path.join('/static/miri1/outputs', "claw_monitor", "backgrounds") # todo remove line + server_name = get_config()['outputs'].split("outputs/", 1)[1] + output_dir_bkg = static(os.path.join("outputs", server_name, "claw_monitor", "backgrounds")) fltrs = ['F070W', 'F090W', 'F115W', 'F150W', 'F200W', 'F277W', 'F356W', 'F444W'] bkg_plots = [os.path.join(output_dir_bkg, '{}_backgrounds.png'.format(fltr)) for fltr in fltrs] bkg_rms_plots = [os.path.join(output_dir_bkg, '{}_backgrounds_rms.png'.format(fltr)) for fltr in fltrs] diff --git a/jwql/website/apps/jwql/templates/background_monitor.html b/jwql/website/apps/jwql/templates/background_monitor.html index a1640e2cf..5a01a0918 100644 --- a/jwql/website/apps/jwql/templates/background_monitor.html +++ b/jwql/website/apps/jwql/templates/background_monitor.html @@ -17,53 +17,60 @@