ZP / ContributionsAstropy reproject · PR #630 ↗

Contribution lab / Coordinate round trips

A pixel needs
a way back.

Two neighboring image pixels map forward. One cannot return. Follow their coordinates, then compare the old check with the proposed correction.

Paused · ready to play
0:00 / 0:36
Output grid → source image → return checkTwo-pixel regression

Loading the 3D view. The coordinate readout and result grid work without it.

Depth separates coordinate frames. An undefined return has no plotted point.

Inspect either pixel

Your selection pauses the tour.

01 / Two neighboring pixels

Start on the output grid.

Reprojection asks which source value belongs at each output pixel. Both forward mappings are finite in this regression.

  1. Output pixel(0, 0)
  2. World coordinate(1, 1)
  3. Source pixel(0, 0)
  4. Inverse output pixel(0, 0)

Distance check rejects?false

Inverse coordinate finite?true

Baseline decisionAccepted

abs(0 − 0) > 1 → false

Baseline result

Image values Input [1, 2]

Pixel 01
Pixel 12

Footprint 1 = mapped · 0 = unmapped

1
1

The valid pixel is retained.

These are the actual linear WCS values from the PR regression. They are coordinate-test values, not sky angles.

Why the change matters

NaN defeats a distance-only check.

The original check asks whether a returned coordinate moved by more than one pixel. For the undefined neighbor, abs(NaN − 1) > 1 is false, so the invalid mapping survives.

The proposed change also rejects a nonfinite inverse coordinate. Pixel 1 then becomes NaN with a zero footprint, while pixel 0 keeps value 1. The two modes here replay actual Python outputs from the same two-pixel fixture.

Inspect the change and regression ↗
Source and reproduction

PR #630 remains open. This lesson verifies its two-pixel regression. The submitted PR still has an outstanding solar-reference comparison; full-suite validation is described in the PR.

Recorded coordinates, arrays and package versions · Fixture exporter

The exporter checks the transformation module against the upstream base and submitted head. The recorded package versions are listed separately.