Skip to content

Add resampling - #8

Open
timj wants to merge 24 commits into
u/timj/phase5-mappingsfrom
u/timj/phase6-resample
Open

timj wants to merge 24 commits into
u/timj/phase5-mappingsfrom
u/timj/phase6-resample

Conversation

@timj

@timj timj commented Nov 19, 2026

Copy link
Copy Markdown
Member

No description provided.

timj and others added 24 commits November 18, 2026 08:21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Accept arrays longer than their grids, and resample through per-thread
copies rather than one shared Mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
…ux conservation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
… and flux conservation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Mapping.rebin and rebinI/F/D rebin through C's Rebin<X>,
RebinAdaptively, RebinWithBlocking and RebinSection (Rebin) with the
nearest, linear and kernel spreading functions (RebinSpreaders).
Variances are rebinned when both variance arrays are given, which
jniast never asked C to do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
jniast has no rebinSeq, so the tests of test_rebinseq.rs and
test_rebinseq_oracle.rs are listed in rust-tests.txt with the reason
"astRebinSeq (not in jniast)". Every test of the six resampling and
rebinning Rust test files is now translated or listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
The Mapping class's contract says no transformation gives a NaN output,
but IntraMap passed its Transformer's values on unchanged, so resampling
and rebinning, which take only AST__BAD to be a bad position, indexed
pixels from NaN positions. Infinite values are kept, as other Mappings
keep them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Derive each ResampleTest tolerance from its computation, allow an
integer resampling output to differ from C's by one only near a
half-integer, and compare each thread's results as they are made so
ResampleThreadsTest keeps no results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
A null Spreader reached a NullPointerException only after rebin had
zeroed the output. Every argument other than the variance arrays is now
checked first, and the exception names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
With npix zero or less, a position at or beyond 2^63 pixels overflowed
the block's bounds, so the block took in the whole axis instead of
nothing. The pixel index is now held within 2^32 of the grid, which
leaves every block the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
Two block-averaging cases with NaN outputs failed CI on x86-64: their
values matched C's but the hash did not. IEEE 754 leaves the sign of a
NaN from 0 / 0 open; x86-64 sets it and AArch64, where the oracles were
made, does not. The hashes now use doubleToLongBits, which gives every
NaN the canonical bits the probes print.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DidLSPfwbAELCxqtcAbPhR
@timj
timj added this pull request to stack #4 November 19, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant