Skip to content

Evaluate sparse ELL1 FB derivatives and reject inactive DDGR FB terms - #7

Closed
vhaasteren wants to merge 1 commit into
ipta:masterfrom
vhaasteren:fixbinaryparfile
Closed

Evaluate sparse ELL1 FB derivatives and reject inactive DDGR FB terms#7
vhaasteren wants to merge 1 commit into
ipta:masterfrom
vhaasteren:fixbinaryparfile

Conversation

@vhaasteren

@vhaasteren vhaasteren commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

PINT companion PR

Companion PINT PR: nanograv/PINT#2023

Overview

This addresses #6

ELL1 represents the accumulated number of binary orbits as:

N(dt) = FB0 dt
      + FB1 dt² / 2!
      + FB2 dt³ / 3!
      + ...
      + FBn dt^(n+1) / (n+1)!,

with:

FB0 = 1 / (PB × 86400)
FB1 = -PBDOT × FB0²

when the constant and first derivative are supplied through PB and
PBDOT.

The current ELL1 implementation uses the presence of FB1
(paramSet[1]) as a sentinel for the entire higher-FB branch. As a result:

  • PB + FB2 silently ignores FB2;
  • PB + PBDOT + FB2 applies PBDOT but silently ignores FB2;
  • FB0 + FB2 silently ignores FB2.

That does not follow the Taylor series. A missing interior coefficient is
zero; it must not disable explicitly supplied higher coefficients.

This PR activates ELL1's higher-FB branch when any FBn, n >= 1, is
present. Within that branch the quadratic coefficient is selected as:

explicit FB1,                    when present;
-PBDOT / pb_seconds²,            otherwise when PBDOT is present;
0,                               otherwise.

Every supplied FB2+ coefficient is then evaluated with the existing
factorial convention. The implementation retains PB/PBDOT as tempo2
parameters; it does not rewrite the par file or synthesize stored zero
coefficients.

When both PBDOT and explicit FB1 are supplied for ELL1, explicit FB1 takes
precedence. Tempo2 now warns and disables PBDOT, including its fit flag.
This is necessary for model consistency: the old forward phase ignored
PBDOT in that configuration while the analytic PBDOT derivative remained
nonzero. PBDOT remains active, with its existing derivative, when FB1 is
absent and sparse FB2+ terms are present.

Normal contiguous models are unchanged. In particular, PPTA DR2/DR3
J2241−5236 uses PB + FB1...FB17 and already enters the higher-FB branch,
so its nominal timing remains unchanged.

This PR also rejects any FB parameter used with BINARY DDGR.
DDGRmodel.C obtains its orbital period, mean motion, GR post-Keplerian
quantities, phase, and derivatives from PB and never reads param_fb.
Previously, DDGR pars could therefore contain FB parameters that had no
effect. The new error is a validation change, not an implementation of
DDGR+FB.

Correct DDGR+FB support requires a single dynamic PB/FB source of truth and
derivatives including:

d(PK)/d(FB0) = d(PK)/d(PB) × d(PB)/d(FB0).

That larger physics change is outside this PR.

Other binary models are deliberately unchanged. In particular, this PR does
not add a general rejection rule for FB lines accepted but unused by DD, BT,
ELL1H, or other models. Its validation scope is limited to the two behaviors
covered by the companion PINT work: sparse ELL1 FB evaluation and explicit
DDGR rejection.

Tests cover:

  • PB + FB2;
  • PB + PBDOT + FB2;
  • FB0 + PBDOT + FB2;
  • PB + FB1 + FB3;
  • FB0 + FB2;
  • a direct check that sparse FB2 changes the delay;
  • unchanged ordinary PB/PBDOT behavior;
  • PBDOT/FB1 conflict resolution;
  • the defensive PBDOT derivative for direct programmatic construction;
  • DDGR rejection for FB0 and higher FB terms;
  • unchanged DDGR parsing without FB parameters.

This is the tempo2 companion to the PINT PR linked above, which implements
canonical hybrid/sparse FB-series normalization. Both implementations now
evaluate the same nominal sparse ELL1 phase while retaining their native
parameter representations.

Activate the ELL1 higher-FB phase branch when any FB1+ coefficient is
present, use PBDOT as the missing FB1 coefficient, and reject inactive
FB parameters in DDGR.
@vhaasteren vhaasteren closed this Jul 25, 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