fix: name FDJUMP parameters by coefficient, not storage slot - #86
Open
vhaasteren wants to merge 1 commit into
Open
fix: name FDJUMP parameters by coefficient, not storage slot#86vhaasteren wants to merge 1 commit into
vhaasteren wants to merge 1 commit into
Conversation
Tempo2 keeps the frequency power in fdjumpIdx and only uses the array
index as insertion order. Naming FDJUMP{slot} made DM-first or sparse
models expose the wrong public labels, so MetaPulsar could not match
chart identities such as FDJUMP1_1.
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.
Summary
fdjumpIdx(the frequency power), not from the insertion-order slot.FDJUMPDM{k}as an occurrence count among DM jumps; repeated masks of the same coefficient becomeFDJUMP{p}_{q}.subctas the tempo2 array slot so fitting / design-matrix derivatives stay pointed at the right term.Why
Tempo2 stores the physical identity of each fdjump in
fdjumpIdx(pfor the frequency power,-2forFDJUMPDM) and only uses the array index as file order. Residuals, the fitter, and tempo2’s own writer already usefdjumpIdx.libstempo named frequency terms
FDJUMP{slot}. That is harmless when slot equals coefficient (the commonFDJUMP1,FDJUMP2,FDJUMPDMorder). It is wrong whenFDJUMPDMis stored first, when coefficients are sparse (FDJUMP3only), or whenFD1JUMP/FD2JUMPare appended after a DM term. In those cases coefficient 1 was published asFDJUMP2.Details
FDJUMP1,FDJUMP2,FDJUMPDMFDJUMP1,FDJUMP2,FDJUMPDM1FDJUMPDM,FDJUMP1,FDJUMP2FDJUMPDM1,FDJUMP2,FDJUMP3FDJUMPDM1,FDJUMP1,FDJUMP2FDJUMP3FDJUMP1FDJUMP3FDJUMP1masksFDJUMP1,FDJUMP2FDJUMP1,FDJUMP1_2FDJUMP1_2is an in-memory suffix. Tempo2 par syntax does not encode the mask occurrence. A duplicate generated name now raisesRuntimeErrorinstead of silently overwritingpardict.Not changed: ordinary
JUMP{ct}naming,subct, tempo2fdjumpIdxassignment, and emittingFDxJUMPfromfdjump_pint_format(that flag is file-global and is set byFDJUMPLOGeven onFDJUMPnfiles).CI
These tests need tempo2 >= 2024.02.1 (
FDJUMPDM/FDJUMP_SCALE; added 2024-02-15, first tag 2024.02.1).GitHub Actions uses
install_tempo2.sh, which still installs 2021.07.1-correct. That build parsesFDJUMPnandfdjumpIdx, but it does not recognizeFDJUMPDM(theDMsuffix failssscanfand the line is dropped). That is the('FDJUMP3', 'FDJUMP1')vs('FDJUMPDM1', 'FDJUMP3', 'FDJUMP1')failure.