Skip to content

Commit

Permalink
Merge branch 'tickets/DM-43416'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Apr 30, 2024
2 parents 5a732f1 + 73c3081 commit 9c22b29
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion doc/lsst.afw.cameraGeom/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Contributing
============

``lsst.afw.cameraGeom`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.cameraGeom-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.coord/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contributing
============

``lsst.afw.coord`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

Python API reference
====================
Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.detection/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Contributing
============

``lsst.afw.detection`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.detection-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.display/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contributing
============

``lsst.afw.display`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.display-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.fits/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contributing
============

``lsst.afw.fits`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.fits-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.formatters/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contributing
============

``lsst.afw.formatters`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.formatters-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.geom/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Contributing
============

``lsst.afw.geom`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.geom-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.image/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Contributing
============

``lsst.afw.image`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
2 changes: 1 addition & 1 deletion doc/lsst.afw.math/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Contributing
============

``lsst.afw.math`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. If there are topics related to developing this module (rather than using it), link to this from a toctree placed here.
Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.multiband/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Contributing
============

``lsst.afw.multiband`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
2 changes: 1 addition & 1 deletion doc/lsst.afw.table/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Contributing
============

``lsst.afw.table`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. _lsst.afw.table-pyapi:

Expand Down
2 changes: 1 addition & 1 deletion doc/lsst.afw.typehandling/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Contributing
============

``lsst.afw.typehandling`` is developed at https://github.com/lsst/afw.
You can find Jira issues for this module under the `afw <https://jira.lsstcorp.org/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.
You can find Jira issues for this module under the `afw <https://rubinobs.atlassian.net/issues/?jql=project%20%3D%20DM%20AND%20component%20%3D%20afw>`_ component.

.. If there are topics related to developing this module (rather than using it), link to this from a toctree placed here.
Expand Down
7 changes: 5 additions & 2 deletions python/lsst/afw/image/exposure/exposureUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ def bbox_contains_sky_coords(bbox, wcs, ra, dec, padding=10):

radec_contained = poly.contains(_ra, _dec)

x_in, y_in = wcs.skyToPixelArray(_ra, _dec, degrees=False)
contained = np.zeros_like(radec_contained, dtype=bool)

x_in, y_in = wcs.skyToPixelArray(_ra[radec_contained], _dec[radec_contained], degrees=False)
xy_contained = bbox.contains(x_in, y_in)

return radec_contained & xy_contained
# contained[not radec_contained] is already false
contained[radec_contained] = xy_contained
return contained
7 changes: 5 additions & 2 deletions tests/test_exposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,11 @@ def testContainsSkyCoords(self):
ra = np.concatenate(([300.0], ra, [180.]))
dec = np.concatenate(([50.0], dec, [50.0]))

contains = self.exposureMiWcs.containsSkyCoords(ra*units.degree,
dec*units.degree)
# Bad NaN handling appears as a warning, not an error
with warnings.catch_warnings():
warnings.simplefilter("error", category=RuntimeWarning)
contains = self.exposureMiWcs.containsSkyCoords(ra*units.degree,
dec*units.degree)
compare = np.ones(len(contains), dtype=bool)
compare[0] = False
compare[-1] = False
Expand Down

0 comments on commit 9c22b29

Please sign in to comment.