Skip to content

update: chromatic noise models & feat: hypermodel empirical distributions#242

Merged
paulthebaker merged 185 commits into
nanograv:masterfrom
jeremy-baier:jgb-15yr-cnm
Sep 29, 2025
Merged

update: chromatic noise models & feat: hypermodel empirical distributions#242
paulthebaker merged 185 commits into
nanograv:masterfrom
jeremy-baier:jgb-15yr-cnm

Conversation

@jeremy-baier
Copy link
Copy Markdown
Contributor

@jeremy-baier jeremy-baier commented Sep 8, 2024

This PR contains many various updates associated with chromatic noise modeling efforts over the past several years.
Notable changes include:

  • functionality for “fixed-point” analysis where one can set a chromatic signal to a max likelihood value rather than sampling in that GPs hyperparameters.
  • the ability to sample in the chromatic index of a chromatic model.
  • it also expands functionality for empirical distributions to include a hypermodel empirical distribution.
  • cleans up the hypermodel code caching stuff which is called in each iteration unnecessarily
  • move the hypermodel weights to the lnPRIOR rather than the lnLIKELIHOOD (fixes issues with PTMCMC and hm weights)
  • prints hypermodel weights to a file in out directory (model_log_weights.json)
  • adds support for the SW GP basis & kernel from Nitu et al 2024

@paulthebaker paulthebaker self-requested a review September 18, 2025 21:42
Copy link
Copy Markdown
Member

@paulthebaker paulthebaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making the minor changes suggested

Comment thread enterprise_extensions/chromatic/chromatic.py Outdated
sign_param = parameter.Constant()
elif sign == "positive":
sign_param = 1.0
else:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above: elif sign == "negative", and optionally raise a ValueError in a final else

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread enterprise_extensions/chromatic/chromatic.py Outdated
Comment thread enterprise_extensions/blocks.py Outdated
Comment thread enterprise_extensions/sampler.py Outdated
Comment thread setup.py Outdated
@paulthebaker
Copy link
Copy Markdown
Member

If you have to make any changes, it should be trivial to fix issue #260 while you are at it.

@jeremy-baier
Copy link
Copy Markdown
Contributor Author

@blarsen10 is going to add one more thing. and we are finalizing compatibility tests. so please don’t merge quite yet, @paulthebaker . but otherwise, I think that things are in order.

@jeremy-baier
Copy link
Copy Markdown
Contributor Author

@paulthebaker i think all of the code for this PR is now finalized actually. i want to spend a few hours this afternoon doing some last minute checks, but then it should be ready for merge.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 19.84733% with 315 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.48%. Comparing base (a52eed4) to head (9802911).
⚠️ Report is 100 commits behind head on master.

Files with missing lines Patch % Lines
enterprise_extensions/blocks.py 21.01% 109 Missing ⚠️
enterprise_extensions/chromatic/solar_wind.py 0.00% 64 Missing ⚠️
enterprise_extensions/chromatic/chromatic.py 18.30% 58 Missing ⚠️
enterprise_extensions/sampler.py 15.15% 56 Missing ⚠️
enterprise_extensions/gp_kernels.py 39.28% 17 Missing ⚠️
enterprise_extensions/hypermodel.py 61.90% 8 Missing ⚠️
enterprise_extensions/models.py 50.00% 2 Missing ⚠️
enterprise_extensions/model_utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
- Coverage   37.29%   34.48%   -2.82%     
==========================================
  Files          20       23       +3     
  Lines        3974     4759     +785     
==========================================
+ Hits         1482     1641     +159     
- Misses       2492     3118     +626     
Files with missing lines Coverage Δ
enterprise_extensions/model_utils.py 14.46% <0.00%> (+1.07%) ⬆️
enterprise_extensions/models.py 42.16% <50.00%> (+0.24%) ⬆️
enterprise_extensions/hypermodel.py 50.42% <61.90%> (+2.12%) ⬆️
enterprise_extensions/gp_kernels.py 35.93% <39.28%> (-52.14%) ⬇️
enterprise_extensions/sampler.py 35.05% <15.15%> (-3.24%) ⬇️
enterprise_extensions/chromatic/chromatic.py 15.92% <18.30%> (+0.58%) ⬆️
enterprise_extensions/chromatic/solar_wind.py 34.26% <0.00%> (-9.00%) ⬇️
enterprise_extensions/blocks.py 39.18% <21.01%> (-5.23%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e1ce07...9802911. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@paulthebaker paulthebaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use enterprise.constants module when applicable for easier human readability

Comment thread tests/test_models.py Outdated
Comment thread tests/test_models.py Outdated
Comment thread tests/test_models.py Outdated
@paulthebaker paulthebaker merged commit 3493fab into nanograv:master Sep 29, 2025
10 checks passed
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.

6 participants