drizzle 1.15.0__tar.gz → 1.15.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of drizzle might be problematic. Click here for more details.
- drizzle-1.15.2/.github/dependabot.yml +11 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.github/workflows/build.yml +1 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.github/workflows/ci.yml +1 -2
- {drizzle-1.15.0 → drizzle-1.15.2}/CHANGES.rst +13 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/PKG-INFO +3 -3
- {drizzle-1.15.0 → drizzle-1.15.2}/README.rst +1 -1
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/conf.py +0 -1
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/test_drizzle.py +154 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/test_overlap_calc.py +1 -1
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/PKG-INFO +3 -3
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/SOURCES.txt +1 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/pyproject.toml +6 -4
- {drizzle-1.15.0 → drizzle-1.15.2}/setup.py +2 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzleapi.c +1 -1
- {drizzle-1.15.0 → drizzle-1.15.2}/tox.ini +1 -1
- {drizzle-1.15.0 → drizzle-1.15.2}/.coveragerc +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.flake8 +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.github/CODEOWNERS +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.gitignore +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/.readthedocs.yaml +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/CODE_OF_CONDUCT.md +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/LICENSE.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/MANIFEST.in +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/Makefile +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/_templates/autosummary/base.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/_templates/autosummary/class.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/_templates/autosummary/module.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/drizzle/api.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/drizzle/index.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/drizzle/user.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/index.rst +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/make.bat +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/docs/rtd_environment.yaml +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/__init__.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/calc_pixmap.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/doblot.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/dodrizzle.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/drizzle.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/__init__.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/test_cdrizzle.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/test_file_io.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/tests/test_pixmap.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle/util.py +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/dependency_links.txt +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/not-zip-safe +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/requires.txt +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/drizzle.egg-info/top_level.txt +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/setup.cfg +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzleblot.c +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzleblot.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzlebox.c +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzlebox.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzlemap.c +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzlemap.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzleutil.c +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/cdrizzleutil.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/driz_portability.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/tests/drizzletest.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/tests/fct.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/tests/pandokia_fct.h +0 -0
- {drizzle-1.15.0 → drizzle-1.15.2}/src/tests/utest_cdrizzle.c +0 -0
|
@@ -23,7 +23,6 @@ jobs:
|
|
|
23
23
|
- linux: check-style
|
|
24
24
|
- linux: check-security
|
|
25
25
|
|
|
26
|
-
- linux: py39-xdist
|
|
27
26
|
- linux: py310-xdist
|
|
28
27
|
- linux: py311-xdist
|
|
29
28
|
- macos: py312-xdist
|
|
@@ -44,7 +43,7 @@ jobs:
|
|
|
44
43
|
with:
|
|
45
44
|
fetch-depth: 0
|
|
46
45
|
- name: Set up Python
|
|
47
|
-
uses: actions/setup-python@
|
|
46
|
+
uses: actions/setup-python@v5
|
|
48
47
|
with:
|
|
49
48
|
python-version: '3.12'
|
|
50
49
|
- name: Install and build
|
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
Release Notes
|
|
5
5
|
=============
|
|
6
6
|
|
|
7
|
+
1.15.2 (2025-06-17)
|
|
8
|
+
===================
|
|
9
|
+
|
|
10
|
+
- build wheels with Numpy 2.0 release candidate [#149]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
1.15.1 (2024-03-05)
|
|
14
|
+
===================
|
|
15
|
+
|
|
16
|
+
- Fixed the warning type for the "gaussian", "lanczos2", and "lanczos3" kernels
|
|
17
|
+
(``DeprecationWarning`` to ``Warning``). [#141]
|
|
18
|
+
|
|
19
|
+
|
|
7
20
|
1.15.0 (2024-02-16)
|
|
8
21
|
===================
|
|
9
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: drizzle
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.2
|
|
4
4
|
Summary: A package for combining dithered images into a single image
|
|
5
5
|
Author-email: STScI <help@stsci.edu>
|
|
6
6
|
License: Copyright (C) 2011,2014 Association of Universities for Research in
|
|
@@ -39,7 +39,7 @@ Project-URL: Homepage, https://github.com/spacetelescope/drizzle
|
|
|
39
39
|
Project-URL: Bug Tracker, https://github.com/spacetelescope/drizzle/issues
|
|
40
40
|
Project-URL: Documentation, http://spacetelescope.github.io/drizzle/
|
|
41
41
|
Project-URL: Source Code, https://github.com/spacetelescope/drizzle
|
|
42
|
-
Requires-Python: >=3.
|
|
42
|
+
Requires-Python: >=3.10
|
|
43
43
|
Description-Content-Type: text/x-rst
|
|
44
44
|
License-File: LICENSE.rst
|
|
45
45
|
Requires-Dist: numpy
|
|
@@ -91,7 +91,7 @@ the new GWCS code.
|
|
|
91
91
|
Requirements
|
|
92
92
|
------------
|
|
93
93
|
|
|
94
|
-
- Python 3.
|
|
94
|
+
- Python 3.10 or later
|
|
95
95
|
|
|
96
96
|
- Numpy
|
|
97
97
|
|
|
@@ -642,3 +642,157 @@ def test_context_planes():
|
|
|
642
642
|
|
|
643
643
|
driz.add_image(image, inwcs)
|
|
644
644
|
assert driz.outcon.shape == (2, 10, 10)
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
@pytest.mark.parametrize(
|
|
648
|
+
'kernel',
|
|
649
|
+
[
|
|
650
|
+
'square',
|
|
651
|
+
'point',
|
|
652
|
+
'turbo',
|
|
653
|
+
pytest.param(
|
|
654
|
+
'lanczos2',
|
|
655
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
656
|
+
),
|
|
657
|
+
pytest.param(
|
|
658
|
+
'lanczos3',
|
|
659
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
660
|
+
),
|
|
661
|
+
pytest.param(
|
|
662
|
+
'gaussian',
|
|
663
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
664
|
+
),
|
|
665
|
+
],
|
|
666
|
+
)
|
|
667
|
+
def test_flux_conservation_nondistorted(kernel):
|
|
668
|
+
n = 200
|
|
669
|
+
in_shape = (n, n)
|
|
670
|
+
|
|
671
|
+
# input coordinate grid:
|
|
672
|
+
y, x = np.indices(in_shape, dtype=np.float64)
|
|
673
|
+
|
|
674
|
+
# simulate a gaussian "star":
|
|
675
|
+
fwhm = 2.9
|
|
676
|
+
x0 = 50.0
|
|
677
|
+
y0 = 68.0
|
|
678
|
+
sig = fwhm / (2.0 * np.sqrt(2.0 * np.log(2.0 * fwhm)))
|
|
679
|
+
sig2 = sig * sig
|
|
680
|
+
star = np.exp(-0.5 / sig2 * ((x.astype(np.float32) - x0)**2 + (y.astype(np.float32) - y0)**2))
|
|
681
|
+
in_sci = (star / np.sum(star)).astype(np.float32) # normalize to 1
|
|
682
|
+
in_wht = np.ones(in_shape, dtype=np.float32)
|
|
683
|
+
|
|
684
|
+
# linear shift:
|
|
685
|
+
xp = x + 0.5
|
|
686
|
+
yp = y + 0.2
|
|
687
|
+
|
|
688
|
+
pixmap = np.dstack([xp, yp])
|
|
689
|
+
|
|
690
|
+
out_shape = (int(yp.max()) + 1, int(xp.max()) + 1)
|
|
691
|
+
# make sure distorion is not moving flux out of the image towards negative
|
|
692
|
+
# coordinates (just because of the simple way of how we account for output
|
|
693
|
+
# image size)
|
|
694
|
+
assert np.min(xp) > -0.5 and np.min(yp) > -0.5
|
|
695
|
+
|
|
696
|
+
out_sci = np.zeros(out_shape, dtype=np.float32)
|
|
697
|
+
out_ctx = np.zeros(out_shape, dtype=np.int32)
|
|
698
|
+
out_wht = np.zeros(out_shape, dtype=np.float32)
|
|
699
|
+
|
|
700
|
+
cdrizzle.tdriz(
|
|
701
|
+
in_sci,
|
|
702
|
+
in_wht,
|
|
703
|
+
pixmap,
|
|
704
|
+
out_sci,
|
|
705
|
+
out_wht,
|
|
706
|
+
out_ctx,
|
|
707
|
+
pixfrac=1.0,
|
|
708
|
+
scale=1.0,
|
|
709
|
+
kernel=kernel,
|
|
710
|
+
in_units="cps",
|
|
711
|
+
expscale=1.0,
|
|
712
|
+
wtscale=1.0,
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
assert np.allclose(
|
|
716
|
+
np.sum(out_sci * out_wht),
|
|
717
|
+
np.sum(in_sci),
|
|
718
|
+
atol=0.0,
|
|
719
|
+
rtol=0.0001,
|
|
720
|
+
)
|
|
721
|
+
|
|
722
|
+
@pytest.mark.parametrize(
|
|
723
|
+
'kernel',
|
|
724
|
+
[
|
|
725
|
+
'square',
|
|
726
|
+
'point',
|
|
727
|
+
'turbo',
|
|
728
|
+
pytest.param(
|
|
729
|
+
'lanczos2',
|
|
730
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
731
|
+
),
|
|
732
|
+
pytest.param(
|
|
733
|
+
'lanczos3',
|
|
734
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
735
|
+
),
|
|
736
|
+
pytest.param(
|
|
737
|
+
'gaussian',
|
|
738
|
+
marks=pytest.mark.xfail(reason='Not a flux-conserving kernel'),
|
|
739
|
+
),
|
|
740
|
+
],
|
|
741
|
+
)
|
|
742
|
+
def test_flux_conservation_distorted(kernel):
|
|
743
|
+
n = 200
|
|
744
|
+
in_shape = (n, n)
|
|
745
|
+
|
|
746
|
+
# input coordinate grid:
|
|
747
|
+
y, x = np.indices(in_shape, dtype=np.float64)
|
|
748
|
+
|
|
749
|
+
# simulate a gaussian "star":
|
|
750
|
+
fwhm = 2.9
|
|
751
|
+
x0 = 50.0
|
|
752
|
+
y0 = 68.0
|
|
753
|
+
sig = fwhm / (2.0 * np.sqrt(2.0 * np.log(2.0 * fwhm)))
|
|
754
|
+
sig2 = sig * sig
|
|
755
|
+
star = np.exp(-0.5 / sig2 * ((x.astype(np.float32) - x0)**2 + (y.astype(np.float32) - y0)**2))
|
|
756
|
+
in_sci = (star / np.sum(star)).astype(np.float32) # normalize to 1
|
|
757
|
+
in_wht = np.ones(in_shape, dtype=np.float32)
|
|
758
|
+
|
|
759
|
+
# linear shift:
|
|
760
|
+
xp = x + 0.5
|
|
761
|
+
yp = y + 0.2
|
|
762
|
+
# add distortion:
|
|
763
|
+
xp += 1e-4 * x**2 + 1e-5 * x * y
|
|
764
|
+
yp += 1e-3 * y**2 - 2e-5 * x * y
|
|
765
|
+
|
|
766
|
+
pixmap = np.dstack([xp, yp])
|
|
767
|
+
|
|
768
|
+
out_shape = (int(yp.max()) + 1, int(xp.max()) + 1)
|
|
769
|
+
# make sure distorion is not moving (pixels with) flux out of the image
|
|
770
|
+
# towards negative coordinates (just because of the simple way of how we
|
|
771
|
+
# account for output image size):
|
|
772
|
+
assert np.min(xp) > -0.5 and np.min(yp) > -0.5
|
|
773
|
+
|
|
774
|
+
out_sci = np.zeros(out_shape, dtype=np.float32)
|
|
775
|
+
out_ctx = np.zeros(out_shape, dtype=np.int32)
|
|
776
|
+
out_wht = np.zeros(out_shape, dtype=np.float32)
|
|
777
|
+
|
|
778
|
+
cdrizzle.tdriz(
|
|
779
|
+
in_sci,
|
|
780
|
+
in_wht,
|
|
781
|
+
pixmap,
|
|
782
|
+
out_sci,
|
|
783
|
+
out_wht,
|
|
784
|
+
out_ctx,
|
|
785
|
+
pixfrac=1.0,
|
|
786
|
+
scale=1.0,
|
|
787
|
+
kernel=kernel,
|
|
788
|
+
in_units="cps",
|
|
789
|
+
expscale=1.0,
|
|
790
|
+
wtscale=1.0,
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
assert np.allclose(
|
|
794
|
+
np.sum(out_sci * out_wht),
|
|
795
|
+
np.sum(in_sci),
|
|
796
|
+
atol=0.0,
|
|
797
|
+
rtol=0.0001,
|
|
798
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: drizzle
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.2
|
|
4
4
|
Summary: A package for combining dithered images into a single image
|
|
5
5
|
Author-email: STScI <help@stsci.edu>
|
|
6
6
|
License: Copyright (C) 2011,2014 Association of Universities for Research in
|
|
@@ -39,7 +39,7 @@ Project-URL: Homepage, https://github.com/spacetelescope/drizzle
|
|
|
39
39
|
Project-URL: Bug Tracker, https://github.com/spacetelescope/drizzle/issues
|
|
40
40
|
Project-URL: Documentation, http://spacetelescope.github.io/drizzle/
|
|
41
41
|
Project-URL: Source Code, https://github.com/spacetelescope/drizzle
|
|
42
|
-
Requires-Python: >=3.
|
|
42
|
+
Requires-Python: >=3.10
|
|
43
43
|
Description-Content-Type: text/x-rst
|
|
44
44
|
License-File: LICENSE.rst
|
|
45
45
|
Requires-Dist: numpy
|
|
@@ -91,7 +91,7 @@ the new GWCS code.
|
|
|
91
91
|
Requirements
|
|
92
92
|
------------
|
|
93
93
|
|
|
94
|
-
- Python 3.
|
|
94
|
+
- Python 3.10 or later
|
|
95
95
|
|
|
96
96
|
- Numpy
|
|
97
97
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "drizzle"
|
|
3
3
|
description = "A package for combining dithered images into a single image"
|
|
4
|
-
requires-python = ">=3.
|
|
4
|
+
requires-python = ">=3.10"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "STScI", email = "help@stsci.edu" },
|
|
7
7
|
]
|
|
@@ -43,7 +43,7 @@ docs = [
|
|
|
43
43
|
requires = [
|
|
44
44
|
"setuptools>=61.2",
|
|
45
45
|
"setuptools_scm[toml]>=3.4",
|
|
46
|
-
"numpy>=
|
|
46
|
+
"numpy>=2.0.0rc2",
|
|
47
47
|
]
|
|
48
48
|
build-backend = "setuptools.build_meta"
|
|
49
49
|
|
|
@@ -65,14 +65,16 @@ norecursedirs = [
|
|
|
65
65
|
|
|
66
66
|
[tool.ruff]
|
|
67
67
|
line-length = 100
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = [
|
|
69
71
|
"F",
|
|
70
72
|
"W",
|
|
71
73
|
"E",
|
|
72
74
|
"C4",
|
|
73
75
|
"COM",
|
|
74
76
|
]
|
|
75
|
-
|
|
77
|
+
exclude = [
|
|
76
78
|
"docs",
|
|
77
79
|
".eggs",
|
|
78
80
|
".tox",
|
|
@@ -32,6 +32,8 @@ def get_extensions():
|
|
|
32
32
|
cfg['define_macros'].append(('__STDC__', 1))
|
|
33
33
|
cfg['define_macros'].append(('_CRT_SECURE_NO_WARNINGS', None))
|
|
34
34
|
|
|
35
|
+
# importing these extension modules is tested in `.github/workflows/build.yml`;
|
|
36
|
+
# when adding new modules here, make sure to add them to the `test_command` entry there
|
|
35
37
|
return [Extension(str('drizzle.cdrizzle'), sources, **cfg)]
|
|
36
38
|
|
|
37
39
|
|
|
@@ -196,7 +196,7 @@ tdriz(PyObject *obj UNUSED_PARAM, PyObject *args, PyObject *keywords)
|
|
|
196
196
|
kernel_str) < 1) {
|
|
197
197
|
strcpy(warn_msg, "Selected kernel is not a flux-conserving kernel.");
|
|
198
198
|
}
|
|
199
|
-
PyErr_WarnEx(
|
|
199
|
+
PyErr_WarnEx(PyExc_Warning, warn_msg, 1);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
if (pfract <= 0.001){
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|