Skip to content

Commit

Permalink
Merge pull request #67 from lsst-sqre/tickets/DM-35516
Browse files Browse the repository at this point in the history
[DM-35516] Enable clipping of the cutout stencil
  • Loading branch information
rra authored Jul 14, 2022
2 parents d086ac3 + 28ac1f9 commit b1051e9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
strategy:
matrix:
python:
- "3.9"
- "3.10"

steps:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Change log
##########

0.4.2 (2022-07-14)
==================

- Clip stencils at the edge of the image instead of raising an error in the backend.
Practical experience with the Portal and deeper thought about possible scientific use cases have shown this to be a more practical and user-friendly approach.
- Drop support for Python 3.9.
- Update dependencies.

0.4.1 (2022-06-01)
==================

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# are based on stack containers and install any required supporting code
# for the image cutout backend, Dramatiq, and the backend worker definition.

FROM lsstsqre/centos:7-stack-lsst_distrib-w_2022_12
FROM lsstsqre/centos:7-stack-lsst_distrib-w_2022_22

# Reset the user to root since we need to do system install tasks.
USER root
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ classifiers =
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Natural Language :: English
Operating System :: POSIX
Expand All @@ -29,7 +28,7 @@ include_package_data = True
package_dir =
= src
packages=find:
python_requires = >=3.9
python_requires = >=3.10
setup_requires =
setuptools_scm
# Use requirements/main.in for runtime dependencies instead of install_requires
Expand Down
4 changes: 2 additions & 2 deletions src/vocutouts/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ def cutout(
frame="icrs",
)
radius = Angle(stencil_dict["radius"] * u.degree)
stencil = SkyCircle.from_astropy(center, radius)
stencil = SkyCircle.from_astropy(center, radius, clip=True)
elif stencil_dict["type"] == "polygon":
ras = [v[0] for v in stencil_dict["vertices"]]
decs = [v[1] for v in stencil_dict["vertices"]]
vertices = SkyCoord(ras * u.degree, decs * u.degree, frame="icrs")
stencil = SkyPolygon.from_astropy(vertices)
stencil = SkyPolygon.from_astropy(vertices, clip=True)
else:
msg = f'Unknown stencil type {stencil_dict["type"]}'
logger.warning(msg)
Expand Down

0 comments on commit b1051e9

Please sign in to comment.