Commit 995921b
committed
refactor: drop sip_tpv dependency, rely on astropy for TPV WCS
Closes #713.
The only functional use of sip_tpv in shapepipe was
`split_exp.create_hdus` calling `stp.pv_to_sip(h)` to rewrite each
per-CCD header's TPV distortion keywords as SIP before saving. Modern
astropy (>=5) parses TPV natively via WCSLIB, as do SExtractor, PSFEx,
and every other downstream WCS consumer in the pipeline, so the
keyword-level conversion was no longer buying us anything.
Removing the conversion lets us drop sip_tpv entirely — an unmaintained
2017 package whose v1.1 imports `pkg_resources` at module load and is
incompatible with setuptools>=81 (the underlying cause of the
ModuleNotFoundError in #713; PR #714's setuptools<81 pin is a symptom
workaround).
Changes:
- split_exp: remove sip_tpv import + pv_to_sip call; drop the now-dead
`transf_coord` plumbing through `process` / `create_hdus`; update
module docstring accordingly.
- Remove sip_tpv from `depends=[...]` in split_exp_runner,
python_example_runner, and find_exposures_runner (the last was a
spurious declaration — find_exposures_package never imported it).
- Drop sip_tpv from environment.yml, environment-dev.yml, Dockerfile,
install_shapepipe, docs/source/dependencies.md, and the orphan
shupe:12 BibTeX entry.
- New: `src/shapepipe/tests/test_split_exp.py` — three unittests that
build a synthetic multi-CCD FITS with TPV distortion, run
SplitExposures, and verify (1) per-CCD header WCS matches the source
for several pixel samples, (2) the saved headers .npy round-trips
pixel→world→pixel, (3) flag output uses int16.
`scripts/jupyter/wcs.ipynb` still imports sip_tpv; it's an exploratory
notebook last touched ~2.5 years ago and left alone.1 parent 8b59e95 commit 995921b
12 files changed
Lines changed: 169 additions & 40 deletions
File tree
- docs/source
- src/shapepipe
- modules
- split_exp_package
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | 739 | | |
756 | 740 | | |
757 | 741 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
71 | 67 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 68 | + | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
| |||
82 | 76 | | |
83 | 77 | | |
84 | 78 | | |
85 | | - | |
86 | | - | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
| |||
101 | 93 | | |
102 | 94 | | |
103 | 95 | | |
104 | | - | |
105 | 96 | | |
106 | | - | |
107 | | - | |
108 | 97 | | |
109 | 98 | | |
110 | 99 | | |
| |||
0 commit comments