Implement mathematical documentation fix for log-tens transformation#9
Open
zonca wants to merge 12 commits into
Open
Implement mathematical documentation fix for log-tens transformation#9zonca wants to merge 12 commits into
zonca wants to merge 12 commits into
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
11d271e to
873a928
Compare
5e78a0a to
092e3c3
Compare
873a928 to
9d8ad0a
Compare
092e3c3 to
36366fc
Compare
Use log(m + eps) / exp(x) - eps instead of log(max(m, eps)) / exp(x), making the forward and inverse transforms a true inverse pair. The previous implementation introduced a bias for pixels where m < eps because the inverse did not account for the epsilon floor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Major reorganization of the notebook from 94 cells to 53 cells: - Organize into 12 numbered sections with clear markdown hierarchy - Add detailed explanations for each processing step including the EM-to-temperature conversion physics (Gaunt factor, references), the log-transform pair, power-conserving cross-fade filters, and the patch-based modulation map construction - Fix stale math documentation: update formulas to match the actual log(I+eps)/exp(i)-eps transform pair - Import sigmoid from pysm3.utils instead of redefining it locally - Use pysm3.utils.add_metadata for FITS output coordinate/unit metadata - Consolidate imports into a single cell, remove 14 empty cells - Extract all hardcoded parameters to a documented configuration cell - Rename variables for clarity: gamma_fit2 -> gamma_target, A_fit2 -> A_extrap, map_to_log_pol_tens -> map_to_log - Remove dead code (unused variables, commented-out saves, debug prints) - Add RANDOM_SEED=777 for reproducibility - Notebook executes successfully at nside=2048 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The executed notebook (with outputs and plots) is available as a gist: https://gist.github.com/zonca/22ca2c4e94e6756a6c87f7bde489c294 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix SyntaxWarning: use raw strings for label with C_\ell in cell 27 - Add grid to power spectra comparison plot - Remove diff panels from gnomview comparison - Compare f1 vs f2 on same color scale after monopole removal - Add full-sky mollview comparison with monopole removed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
This PR fixes a mathematical typo in Cell 11 of the free-free small-scale template notebook. The transformation 'i' was correctly implemented in code as ln(I) but incorrectly documented as ln(I^2).