Skip to content

Commit

Permalink
Merge branch 'master' into relax_scipy_pin
Browse files Browse the repository at this point in the history
  • Loading branch information
nden authored Nov 17, 2023
2 parents 7f33db3 + 5b63bda commit d1b41c6
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 802 deletions.
35 changes: 35 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
1.12.6 (unreleased)
===================

background
----------

- Ensure that WFSS background mask does not leave only
pixels with DO_NOT_USE flagged. [#8070]

documentation
-------------

- Remove the CRDS PUB notices througout the documentation [#8075]

extract_1d
----------

- Include zero values in dispersion direction check during
SOSS ATOCA algorithm [#8038]

general
-------

Expand All @@ -22,6 +39,11 @@ imprint
- Updated the logging to report which imprint image is being subtracted from the
science image. [#8041]

ramp_fitting
------------

- Moving some ramp fitting CI tests from JWST to STCAL. [#8060]

resample
--------

Expand All @@ -36,6 +58,19 @@ resample
results in modified values in the resampled images. New computations
significantly reduce photometric errors. [#7894]

- Improved compatibility with upcoming ``numpy 2.0`` that was affecting
decoding of context images and creation of masks. [#8059]

source_catalog
--------------

- Made meta data flexible for photutils changes. [#8066]

tweakreg
--------

- Improved how a image group name is determined. [#8012]


1.12.5 (2023-10-19)
===================
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

![STScI Logo](docs/_static/stsci_logo.png)

**JWST requires Python 3.9 or above and a C compiler for dependencies.**
### JWST requires a C compiler for dependencies, and is currently limited to Python 3.9, 3.10 or 3.11.

**Until Python 3.12 is supported, fresh conda environments will require setting the
python version to one of the three supported versions.**

**Linux and MacOS platforms are tested and supported. Windows is not currently supported.**

Expand Down Expand Up @@ -50,13 +53,13 @@ Remember that all conda operations must be done from within a bash/zsh shell.

You can install the latest released version via `pip`. From a bash/zsh shell:

conda create -n <env_name> python
conda create -n <env_name> python=3.11
conda activate <env_name>
pip install jwst

You can also install a specific version:

conda create -n <env_name> python
conda create -n <env_name> python=3.11
conda activate <env_name>
pip install jwst==1.9.4

Expand All @@ -65,7 +68,7 @@ You can also install a specific version:
You can install the latest development version (not as well tested) from the
Github master branch:

conda create -n <env_name> python
conda create -n <env_name> python=3.11
conda activate <env_name>
pip install git+https://github.com/spacetelescope/jwst

Expand Down Expand Up @@ -117,7 +120,7 @@ already installed with released versions of the `jwst` package.

As usual, the first two steps are to create and activate an environment:

conda create -n <env_name> python
conda create -n <env_name> python=3.11
conda activate <env_name>

To install your own copy of the code into that environment, you first need to
Expand Down
8 changes: 1 addition & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
:width: 400
:align: center

.. warning::

As of November 10, 2022, the process of deprecating the CRDS PUB Server will start.

For details, refer to the :ref:`pub-deprecation` page.

Welcome to the documentation for `jwst`. This package contains the Python
software suite for the James Webb Space Telescope (JWST) calibration pipeline,
which processes data from all JWST instruments by applying various corrections to
Expand Down Expand Up @@ -46,14 +40,14 @@ desk at `JWST Help Desk <https://jwsthelp.stsci.edu>`_.

jwst/user_documentation/introduction.rst
jwst/user_documentation/reference_files_crds.rst
jwst/user_documentation/pub_deprecation.rst
jwst/user_documentation/parameters.rst
jwst/user_documentation/running_pipeline_python.rst
jwst/user_documentation/running_pipeline_command_line.rst
jwst/user_documentation/available_pipelines.rst
jwst/user_documentation/input_output_file_conventions.rst
jwst/user_documentation/logging_configuration.rst
jwst/user_documentation/datamodels.rst
jwst/user_documentation/pub_deprecation.rst

.. toctree::
:maxdepth: 2
Expand Down
6 changes: 0 additions & 6 deletions docs/jwst/user_documentation/reference_files_crds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ The JWST pipeline uses version-controlled :ref:`reference files <crds_reference_
and set pipeline/step parameters, respectivley. These files both use the ASDF format,
and are managed by the Calibration References Data System (:ref:`CRDS <crds>`) system.

.. warning::

As of November 10, 2022, the process of deprecating the CRDS PUB Server will start.

For details, refer to the :ref:`pub-deprecation` page.

.. _crds_reference_files:

Reference Files
Expand Down
8 changes: 7 additions & 1 deletion jwst/background/background_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np

from stdatamodels.jwst import datamodels
from stdatamodels.jwst.datamodels.dqflags import pixel

from . import subtract_images
from ..assign_wcs.util import create_grism_bbox
Expand Down Expand Up @@ -295,7 +296,12 @@ def subtract_wfss_bkg(input_model, bkg_filename, wl_range_name, mmag_extract=Non
# i.e. in regions we can use as background.
if got_catalog:
bkg_mask = mask_from_source_cat(input_model, wl_range_name, mmag_extract)
if bkg_mask.sum() < 100:
# Ensure mask has 100 pixels and that those pixels correspond to valid
# pixels using model DQ array
if np.count_nonzero(input_model.dq[bkg_mask]
^ pixel['DO_NOT_USE']
& pixel['DO_NOT_USE']
) < 100:
log.warning("Not enough background pixels to work with.")
log.warning("Step will be SKIPPED.")
return None
Expand Down
2 changes: 1 addition & 1 deletion jwst/extract_1d/soss_extract/atoca_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def get_wv_map_bounds(wave_map, dispersion_axis=1):

# Compute the change in wavelength for valid cols
idx_valid = np.isfinite(wave_col)
idx_valid &= (wave_col > 0)
idx_valid &= (wave_col >= 0)
wv_col_valid = wave_col[idx_valid]
delta_wave = np.diff(wv_col_valid)

Expand Down
Loading

0 comments on commit d1b41c6

Please sign in to comment.