Skip to content

Commit

Permalink
Merge pull request #111 from spacetelescope/v1.35.1
Browse files Browse the repository at this point in the history
V1.35.1
  • Loading branch information
scfleming authored Aug 4, 2023
2 parents b6e4dcb + 4124d78 commit dbf35bd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
9 changes: 8 additions & 1 deletion History.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
Change Log for SPEC_PLOTS
=========================

v1.35.0 - 2023 Jul. 31
v1.35.1 - 2023 Aug. 4
-----------------
* Added support for flux uncertainties being in FLUX_ERROR column
instead of ERROR column for JWST x1d FITS files.
* Fixed readability of y-axis tick labels by adjusting font size,
angle, and padding.

v1.35.0 - 2023 Jul. 31
-----------------
* Added required config file for ReadTheDocs.
* Updated package dependencies to newer versions.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
setup(name="spec_plots",
version=__version__,
description="Create preview plots of HST or JWST spectra.",
classifiers=["Programming Language :: Python :: 3.9"],
classifiers=["Programming Language :: Python :: 3"],
url="https://github.com/spacetelescope/spec_plots",
author="Scott W. Fleming",
author_email="[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions spec_plots.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: spec-plots
Version: 1.35.0
Version: 1.35.1
Summary: Create preview plots of HST or JWST spectra.
Home-page: https://github.com/spacetelescope/spec_plots
Author: Scott W. Fleming
Author-email: [email protected]
License: MIT
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3
2 changes: 1 addition & 1 deletion spec_plots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

from __future__ import absolute_import

__version__ = '1.35.0'
__version__ = '1.35.1'
6 changes: 4 additions & 2 deletions spec_plots/utils/specutils_jwst/plotspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def plotspec(jwst_spectrum, output_type, output_file, flux_scale_factor,
# Only use two tick labels (min and max wavelengths) for
# thumbnails, because there isn't enough space otherwise.
if not is_bigplot:
rc('font', size=10)
this_plotarea.tick_params(labelsize=6., labelrotation=45.,
axis='y', pad=0.)
minwl = numpy.nanmin(all_wls)
maxwl = numpy.nanmax(all_wls)
this_plotarea.set_xticks([minwl, maxwl])
Expand Down Expand Up @@ -275,7 +276,8 @@ def plotspec(jwst_spectrum, output_type, output_file, flux_scale_factor,
# Configure the plot units, text size, and other markings based
# on whether this is a large or thumbnail-sized plot.
if not is_bigplot:
rc('font', size=10)
this_plotarea.tick_params(labelsize=6., labelrotation=45.,
axis='y', pad=0.)
minwl = numpy.nanmin(all_wls)
maxwl = numpy.nanmax(all_wls)
this_plotarea.set_xticks([minwl, maxwl])
Expand Down
10 changes: 7 additions & 3 deletions spec_plots/utils/specutils_jwst/readspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ def readspec(input_file):
try:
fluxerr_table = jwst_tabledata.field("ERROR")
except KeyError:
print("*** MAKE_JWST_SPEC_PREVIEWS ERROR: ERROR column not found"
" in first extension's binary table.")
exit(1)
try:
fluxerr_table = jwst_tabledata.field("FLUX_ERROR")
except KeyError:
print("*** MAKE_JWST_SPEC_PREVIEWS ERROR: neither ERROR "
"nor FLUX_ERROR column found in first "
"extension's binary table.")
exit(1)

try:
dq_table = jwst_tabledata.field("DQ")
Expand Down

0 comments on commit dbf35bd

Please sign in to comment.