Repository navigation
Rework series, Tier B-04, convert our changes to transform2d as opt-in and keeping upstream version as default - #36
Open
Yashvi-Sharma wants to merge 3 commits into
Open
Yashvi-Sharma wants to merge 3 commits into
Yashvi-Sharma wants to merge 3 commits into
Conversation
Transform2D.fit rescaled its inputs to [-1, 1] unconditionally. That changes what .matrix means, so it cannot be the default for a fork that intends to upstream it. It is now off by default and selected per trace via fit_normalize, alongside the existing fit_degree, which is already the established way to vary the fit for one instrument. Measured, the rescaling is a safeguard for poorly scaled inputs rather than a general improvement. On coordinates running 0..2048 it cuts the worst residual by a factor of ~650 (5.8e-11 to 8.9e-14). On the centred focal-plane mm that ScopeSim actually fits, both routes reach machine precision and the unnormalized fit is if anything slightly better, so enabling it does not move an existing trace. Two existing tests were named for normalization but passed with or without it, so they were not testing it. Both now state their mode explicitly, and new tests cover the case where rescaling genuinely matters, the case where it is immaterial, and that the chain-rule factor keeps gradients in input units. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.