feat: Add decentering parameterization and decentering+cw capabilities#107
Draft
meyers-academic wants to merge 15 commits into
Draft
feat: Add decentering parameterization and decentering+cw capabilities#107meyers-academic wants to merge 15 commits into
meyers-academic wants to merge 15 commits into
Conversation
… block matrices in signals.py
ArrayLogL wraps a dict-based likelihood so JIT/grad see a single array leaf instead of a ~136-key parameter dict, avoiding the per-leaf pytree marshalling that dominates GPU forward/grad time. Exposed as .loglike_arr on PulsarLikelihood, GlobalLikelihood, and ArrayLikelihood. sample_uniform and makelogprior_uniform gain an array=True flag producing/consuming the matching flat layout; the dict-based logprior now reduces array-valued parameters to a scalar. Tests: ArrayLogL cases in test_likelihood.py, new test_prior.py for the array prior path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… the likelihood slowing things down.
… being required for the whole package.
# Conflicts: # src/discovery/likelihood.py # src/discovery/params.py
…ge. sneaking in the change now.
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.
Add decentering transformation to
ArrayLikelihood.clogL. This is not quite complete. Task list below. But it's ready for people to look at.If you supply a correlated model, the decentering will ignore the correlations so that it can be vectorized across pulsars.
make_kernelproduct_gpcomponentso that we can also sample CWs (need to be careful of order if decentering is included. decentering should be applied first)meansin thecommongpto create a transformation that implements the CWs.