Skip to content

Rework of JUMP flags in config files and TimingConfiguration#157

Merged
rossjjennings merged 3 commits intomainfrom
feature/jump_flag_rework
Mar 11, 2026
Merged

Rework of JUMP flags in config files and TimingConfiguration#157
rossjjennings merged 3 commits intomainfrom
feature/jump_flag_rework

Conversation

@mtlam
Copy link
Copy Markdown
Member

@mtlam mtlam commented Feb 27, 2026

As discussed on calls and in preparation for the JumpChecker (part of #147), JUMPs can now be listed separately in the config files with a free-jumps: key and a list, for example in the notation we've proposed:

free-jumps:
- ["-fe", "Rcvr_800"]

TimingConfiguration now has a get_free_jumps() function which will return the list of free jumps either as ["JUMP -fe Rcvr_800"] or JUMP1 depending on if convert_to_indices is set to True (for the latter) and a fitter object is provided. If the fitter object is not provided, then convert_to_indices overrides to False but we should discuss this choice. The get_free_params() function now uses get_free_jumps() under the hood. The way this operates now, the old method of listing JUMP1, JUMP2, etc, in free-params is still respected. However, if one chooses to use both methods, they would have to worry about collisions and this is not checked.

This PR also fixes some minor issues in free-params. If the function was called multiple times, then the list would be modified in place repeatedly, leading to duplicate parameters being returned; I am not sure how this interacts with PINT so maybe it would be okay but it is still odd to have multiple copies of the parameters returned. It also makes sure that free-dmx is in the config file and does not assume it is there just in case.

A corresponding unit test that coverts both get_free_param() and get_free_jumps() has been implemented, and the test config file has been modified with the new JUMP syntax.

@mtlam mtlam added bug Something isn't working enhancement New feature or request discussed Discussed during a NANOGrav GitFlowers Meeting. labels Feb 27, 2026
@mtlam mtlam self-assigned this Feb 27, 2026
@mtlam mtlam added this to the NG20 v2.0 requirements milestone Feb 27, 2026
@mtlam
Copy link
Copy Markdown
Member Author

mtlam commented Mar 10, 2026

After discussion, is fitter is None and convert_to_indices is True, should raise an error.

@mtlam mtlam requested a review from rossjjennings March 10, 2026 17:14
@rossjjennings rossjjennings merged commit 48b9feb into main Mar 11, 2026
3 checks passed
@mtlam mtlam deleted the feature/jump_flag_rework branch March 11, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working discussed Discussed during a NANOGrav GitFlowers Meeting. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants