Skip to content

feat: Add decentering parameterization and decentering+cw capabilities#107

Draft
meyers-academic wants to merge 15 commits into
nanograv:mainfrom
meyers-academic:decentering
Draft

feat: Add decentering parameterization and decentering+cw capabilities#107
meyers-academic wants to merge 15 commits into
nanograv:mainfrom
meyers-academic:decentering

Conversation

@meyers-academic
Copy link
Copy Markdown
Collaborator

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.

  • Allow for multiple transformations to be passed to make_kernelproduct_gpcomponent so that we can also sample CWs (need to be careful of order if decentering is included. decentering should be applied first)
  • use means in the commongp to create a transformation that implements the CWs.
  • needs some optimization

meyers-academic and others added 11 commits October 7, 2025 15:30
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>
# Conflicts:
#	src/discovery/likelihood.py
#	src/discovery/params.py
@meyers-academic meyers-academic changed the title Decentering feat: Add decentering parameterization and decentering+cw capabilities May 22, 2026
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