Skip to content

Commit

Permalink
PEP8 and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bhilbert4 committed Feb 29, 2024
1 parent 6dfcbff commit b8352d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
3 changes: 1 addition & 2 deletions jwql/website/apps/jwql/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,4 @@ def get_unique_values_per_column(model_name, column_name):
values = []
for row in query_set:
values.append(row[column_name])
return values

return values
28 changes: 6 additions & 22 deletions jwql/website/apps/jwql/monitor_pages/monitor_dark_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ def retrieve_data(self, aperture, get_pixtable_for_detector=False):
for bad_type in bad_pixel_types:
bad_filters = {'detector__iexact': self.detector, 'type': bad_type}

# In this case, record is a dictionary. e.g {'type': 'dead',
# 'detector': 'NRCA1',
# 'mean_dark_image_file': 'nircam_nrca1_full_59607.0_to_59865.91846797105_mean_slope_image.fits',
# 'obs_end_time': datetime.datetime(2022, 8, 3, 1, 33)}
# Note that this function is currently never called with get_pixtable_for_detector = True
# 'record' below is a dictionary. e.g {'type': 'dead',
# 'detector': 'NRCA1',
# 'mean_dark_image_file': 'nircam_nrca1_full_59607.0_to_59865.91846797105_mean_slope_image.fits',
# 'obs_end_time': datetime.datetime(2022, 8, 3, 1, 33)}
record = self.pixel_table.objects.values('type', 'detector', 'mean_dark_image_file', 'obs_end_time').filter(**bad_filters).order_by("-obs_end_time").first()
self.pixel_data.append(record)
###### IS SELF.PIXEL_DATA USED ANYWHERE????


class DarkMonitorPlots():
Expand Down Expand Up @@ -558,22 +558,6 @@ def get_latest_histogram_data(self):
self.hist_data[self.db.stats_data[idx_int].amplifier] = (self.db.stats_data[idx_int].hist_dark_values,
self.db.stats_data[idx_int].hist_amplitudes)





else:
pass
delme_entry_dates = self._entry_dates
#raise ValueError








def get_trending_data(self):
"""Organize data for the trending plot. Here we need all the data for
the aperture. Keep amplifier-specific data separated.
Expand Down Expand Up @@ -698,7 +682,7 @@ def create_plot(self):
error_upper=error_upper,
time=self.obstime[use_amp]
)
)
)
self.plot = figure(title=f'{self.aperture}: Mean +/- 1-sigma Dark Rate', tools='pan,box_zoom,reset,wheel_zoom,save',
background_fill_color="#fafafa")

Expand Down

0 comments on commit b8352d9

Please sign in to comment.