Repository navigation
Allow user choice for sky loc param names, add unit tests for sky loc dists - #5189
Open
titodalcanton wants to merge 4 commits into
Open
titodalcanton wants to merge 4 commits into
titodalcanton wants to merge 4 commits into
Conversation
titodalcanton
marked this pull request as draft
September 24, 2025 15:44
titodalcanton
force-pushed
the
sky-loc-param-names
branch
from
September 26, 2025 20:26
4c0472f to
51453da
Compare
titodalcanton
marked this pull request as ready for review
October 3, 2025 11:51
spxiwh
removed their request for review
October 30, 2026 15:10
Contributor
|
I think this is better reviewed by @cdcapano than be me ... Though this will need a rebase if still relevant |
titodalcanton
force-pushed
the
sky-loc-param-names
branch
2 times, most recently
from
November 18, 2026 15:58
da4d255 to
ed9fdba
Compare
Contributor
Author
|
Rebasing this is pretty much impossible, easier to recreate it from master. Ongoing… |
titodalcanton
force-pushed
the
sky-loc-param-names
branch
from
November 23, 2026 15:30
ed9fdba to
ca57dbf
Compare
titodalcanton
force-pushed
the
sky-loc-param-names
branch
from
November 23, 2026 15:37
ca57dbf to
d654589
Compare
| """ | ||
| try: | ||
| polar_angle = cp.get_opt_tag(section, "polar-angle", tag) | ||
| except Error: |
| azimuthal_angle = cls._default_azimuthal_angle | ||
| variable_args = tag.split(VARARGS_DELIM) | ||
| if azimuthal_angle not in variable_args: | ||
| raise Error( |
| f"variable args {variable_args}" | ||
| ) | ||
| if polar_angle not in variable_args: | ||
| raise Error( |
This branch has not been deployed
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.
Current sky location distributions require the angular parameters to be called "ra" and "dec". This allows the user to use different names.
Standard information about the request
This is a new feature.
This change affects mostly PyGRB and potentially inference.
This change changes the syntax of config files.
Motivation
Most of the existing sky location distributions hardcode the angular parameters to be called "ra" and "dec". This prevents the use of waveform transforms, e.g. the case where we draw the sky location from a Fisher distribution but then want to transform it to keep the source fixed with respect to the Earth. This patch enables the use of arbitrary names, based on how the
angularmodule does it.Contents
Each distribution specification can now use
azimuthal-angleandpolar-angleto indicate the names of the corresponding parameters. These should match the section tag, and this is enforced.I also removed some code duplication by introducing a parent class to implement some common stuff.
Finally, I added very basic unit tests for (some) of the sky loc distributions. More complicated tests would be good, but will come in later PRs once I find the resources :)
Links to any issues or associated PRs
None.
Testing performed
Relying on the new unit tests.
Additional notes
None.