Skip to content

Commit

Permalink
Merge pull request #1426 from spacetelescope/develop
Browse files Browse the repository at this point in the history
Test for v1.2.3
  • Loading branch information
mfixstsci authored Jan 10, 2024
2 parents 3c27420 + 143b3ad commit d7d6d06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pycodestyle:
ignore: # Errors and warnings to ignore
- E501 # Line too long
- E505
- W503 # Outdated and replaced by W504

only_mention_files_with_errors: True # If False, a separate status comment for each file is made.
descending_issues_order: False # If True, PEP8 issues in message will be displayed in descending order of line numbers in the file
3 changes: 3 additions & 0 deletions jwql/instrument_monitors/nircam_monitors/claw_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import datetime
import logging
import os
import warnings

from astropy.convolution import Gaussian2DKernel, convolve
from astropy.io import fits
Expand All @@ -44,6 +45,8 @@
from jwql.utils.utils import ensure_dir_exists, filesystem_path, get_config

matplotlib.use('Agg')
warnings.filterwarnings('ignore', message="nan_treatment='interpolate', however, NaN values detected post convolution*")
warnings.filterwarnings('ignore', message='Input data contains invalid values (NaNs or infs)*')


class ClawMonitor():
Expand Down
10 changes: 8 additions & 2 deletions jwql/website/apps/jwql/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,14 @@ def create_archived_proposals_context(inst):
proposal_obs_times = [observation.obsstart for observation in prop_entries]
thumb_obs_time.append(max(proposal_obs_times))

# Add category type to list based on proposal number
cat_types.append(proposals_by_category[int(proposal_num)])
try:
# Add category type to list based on proposal number
cat_types.append(proposals_by_category[int(proposal_num)])
except KeyError:
cat_types.append("MISSING")
logging.error(f"""Unable to populate proposals by category in MAST for proposal number {proposal_num}
Proposal number {proposal_num} will have 'MISSING' category type associated with it
""")

thumbnails_dict['proposals'] = proposal_nums
thumbnails_dict['thumbnail_paths'] = thumbnail_paths
Expand Down

0 comments on commit d7d6d06

Please sign in to comment.