Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
01e8473
wcslib: QSC forward was wrong within 0.008 deg of face 4's centre
timj Oct 28, 2026
1affc5b
wcslib: HPX forward and reverse fixes from upstream (4.3, 4.7, 4.20)
timj Oct 28, 2026
29c00ad
wcslib: ZPN rejects far-side points for a degree-2 polynomial, as ups…
timj Oct 28, 2026
903116b
wcslib: PCO forward near the equator without cancellation (upstream 4…
timj Oct 28, 2026
e194a5c
wcslib: COP at the poles as upstream (4.22)
timj Oct 28, 2026
d56b0a3
wcslib: parenthesise D2R, R2D and SQRT2INV (upstream 8.7)
timj Oct 28, 2026
3062dca
WcsMap: accept native coordinates within wcslib's tolerance at the li…
timj Oct 28, 2026
289bbee
Update ERFA to 2.0.1 (SOFA 20231011)
timj Oct 28, 2026
48c7c3c
SpecMap: convert palPvobs's velocity with the au it was computed in
timj Oct 28, 2026
38e0bfc
SlaMap: FK4/FK5 conversions through ERFA
timj Oct 28, 2026
5352e93
wcslib: HPX forward puts the phi = 180 meridian on its own facet (ups…
timj Oct 28, 2026
b3a110c
Regenerate fixtures for the wcslib, ERFA and PAL updates
timj Oct 28, 2026
1fd84a7
testwcsmap: allow for libm differences in two exact checks
timj Oct 28, 2026
62a29c0
SpecMap: astSpecAdd copies only the arguments the caller supplies
timj Oct 28, 2026
54bb1b5
wcslib: HPX reverse takes y within 1e-12 degrees of the pole as the pole
timj Oct 28, 2026
03ea265
erfa2ast.h: rename eraZr to astEraZr, not astEranZr
timj Oct 28, 2026
cdc015f
PAL: remove the routines AST does not call
timj Oct 28, 2026
5e550ba
PAL: update headers and documentation to PAL 0.9.10
timj Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -355,23 +355,15 @@ STAR_PAL_FILES = \
pal/palAmpqk.c \
pal/palCaldj.c \
pal/palDat.c \
pal/palDe2h.c \
pal/palDeuler.c \
pal/palDh2e.c \
pal/palDjcal.c \
pal/palDmat.c \
pal/palDrange.c \
pal/palDs2tp.c \
pal/palDtp2s.c \
pal/palDtps2c.c \
pal/palDtt.c \
pal/palEcmat.c \
pal/palEqgal.c \
pal/palEtrms.c \
pal/palEvp.c \
pal/palFk45z.c \
pal/palFk524.c \
pal/palFk54z.c \
pal/palGaleq.c \
pal/palGalsup.c \
pal/palMappa.c \
Expand All @@ -391,8 +383,9 @@ STAR_PAL_FILES = \
pal/palmac.h

ERFA_FILES = \
erfa/00READ.ME \
erfa/erfa.h \
erfa/erfadatextra.h \
erfa/erfaextra.h \
erfa/erfam.h \
erfa/a2af.c \
erfa/a2tf.c \
Expand Down Expand Up @@ -441,6 +434,7 @@ ERFA_FILES = \
erfa/epv00.c \
erfa/eqeq94.c \
erfa/era00.c \
erfa/erfadatextra.c \
erfa/fad03.c \
erfa/fae03.c \
erfa/faf03.c \
Expand All @@ -455,7 +449,10 @@ ERFA_FILES = \
erfa/fasa03.c \
erfa/faur03.c \
erfa/fave03.c \
erfa/fk45z.c \
erfa/fk524.c \
erfa/fk52h.c \
erfa/fk54z.c \
erfa/fk5hip.c \
erfa/fk5hz.c \
erfa/fw2m.c \
Expand Down
13 changes: 12 additions & 1 deletion PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ depending on Starlink libraries (EMS, CHR, PSX). The goal is to:

**New C-only regression tests (no Fortran original):**
- testslamap — SlaMap transform with an undefined (AST__BAD) conversion
argument must return AST__BAD outputs rather than NaN.
argument must return AST__BAD outputs rather than NaN; FK45Z and FK54Z agree
with ERFA's eraFk45z and eraFk54z, including FK54Z away from B1950.
- testspecmap — astSpecAdd reads only the arguments the caller supplies:
TPF2HL's six documented arguments in a six-element array, which
AddressSanitizer checks.
- testimmutable — every Mapping class with a publicly settable attribute must
allow the change while its reference count is one and report AST__IMMUT once
it has been cloned, as SUN/210 requires, for both setting and clearing. Also
Expand All @@ -97,6 +101,13 @@ depending on Starlink libraries (EMS, CHR, PSX). The goal is to:
unavailable on Darwin, and every test here suppresses leak reports because
AST's memory system caches freed blocks. Running this test under
`ASAN_OPTIONS=detect_leaks=1` on Linux is the manual check.
- testwcsmap — WcsMap projections at the points where AST's wcslib fork has
differed from upstream wcslib 8.10: QSC near a face centre, HPX poles, facet
edges and non-default H and K, the ZPN far side for a degree-2 polynomial,
PCO near the equator, COP at the poles, MER near the pole (the D2R macro's
parentheses), and native coordinates a little past a limit, which wcslib's
per-projection tolerance accepts. Wanted values are upstream's output for the
same projection and parameters.

**Optional manual stress test:**
- testhuge_c
Expand Down
35 changes: 35 additions & 0 deletions ast.news
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@ Main Changes in this Version
blank string, and a SkyFrame axis reports its Unit value unchanged.
Code that recorded the old NormUnit values will see different results.

- Fixes from upstream wcslib (up to version 8.10) have been applied to the
projection code used by WcsMap: QSC near the centre of face 4, HPX with
non-default H or K, at the poles and on facet edges, ZPN far-side points
for a quadratic polynomial, PCO within 1e-4 degrees of the equator, and
COP at the poles. The D2R and R2D constants are now parenthesised, which
changes the last bit of many projected values; close to a pole the
difference can be magnified (about 1.5e-6 degrees for MER one micro-degree
from the pole).

- A WcsMap now accepts a native longitude or latitude that a reverse
projection returns slightly beyond the edge of the valid range, by up to
the tolerance used by wcslib for that projection (1e-13 to 1e-11 degrees),
and sets it to the edge. Previously such points, which arise from rounding
on the -180 degree meridian of projections such as PAR, MOL and PCO and at
the antipode of zenithal projections such as ARC, were returned as bad.
Likewise the HPX reverse projection takes a point within 1e-12 degrees of
the pole as the pole, which previously returned bad for some values of H
and K.

- The ERFA library included in AST has been updated to version 2.0.1
(SOFA 20231011).

- Conversions from FK5 to FK4 at a Besselian epoch other than B1950 now
apply the fictitious FK4 proper motion as the original SLALIB routine did,
by way of ERFA's eraFk54z, rather than linearly in RA and Dec. The results
change little except for positions that the fictitious motion (at most
5 milli-arcseconds a year) carries close to a celestial pole, where the
linear step was wrong by up to the size of the motion itself: 28
milli-arcseconds at B1980 and 0.3 arcseconds at B2050.

Bug fixes
---------

Expand All @@ -43,6 +73,11 @@ Bug fixes
- Allocation failures while normalising a units string are now reported as
errors rather than crashing the library.

- astSpecAdd no longer reads one element past the end of the supplied
argument array for the conversions to and from heliocentric frequency
(USF2HL, TPF2HL, GEF2HL, BYF2HL, LKF2HL, LDF2HL, LGF2HL, GLF2HL and their
inverses).

Build system changes
--------------------

Expand Down
2 changes: 2 additions & 0 deletions ast_tester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ ast_add_test(testtable_c SOURCES testtable.c)
ast_add_test(teststcschan_c SOURCES teststcschan.c)
ast_add_test(testregions_c SOURCES testregions.c)

ast_add_test(testwcsmap_c SOURCES testwcsmap.c)
ast_add_test(testxphmap_c SOURCES testxphmap.c)
ast_add_test(testregionmasking_c SOURCES testregionmasking.c)
ast_add_test(testrebinseq_c SOURCES testrebinseq.c)
Expand All @@ -387,6 +388,7 @@ ast_add_test(testfitschanerrors_c SOURCES testfitschanerrors.c)

# --- New C-only regression tests (no Fortran original) ---
ast_add_test(testslamap)
ast_add_test(testspecmap)

# --- wcsconverter: regression-diff harness ported from wcsconverter.f ---
add_executable(wcsconverter wcsconverter.c)
Expand Down
5 changes: 5 additions & 0 deletions ast_tester/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ C_TESTS = \
testtrangrid_c \
testunitnorm \
testunitnormmap_c \
testwcsmap_c \
testxmlchan_c \
testxphmap_c \
testzoommap_c
Expand Down Expand Up @@ -297,6 +298,10 @@ testxmlchan_c_SOURCES = testxmlchan.c
testxmlchan_c_CFLAGS = $(AM_CFLAGS)
testxmlchan_c_LDADD = $(CTEST_LDADD)

testwcsmap_c_SOURCES = testwcsmap.c
testwcsmap_c_CFLAGS = $(AM_CFLAGS)
testwcsmap_c_LDADD = $(CTEST_LDADD)

testxphmap_c_SOURCES = testxphmap.c
testxphmap_c_CFLAGS = $(AM_CFLAGS)
testxphmap_c_LDADD = $(CTEST_LDADD)
Expand Down
Loading
Loading