Skip to content

Fix spin conversion error to avoid NaN#1052

Open
ThibeauWouters wants to merge 2 commits intobilby-dev:mainfrom
ThibeauWouters:main
Open

Fix spin conversion error to avoid NaN#1052
ThibeauWouters wants to merge 2 commits intobilby-dev:mainfrom
ThibeauWouters:main

Conversation

@ThibeauWouters
Copy link

Closes #1051

Essentially simply adds the try-except from the else branch of the if-else block to the if branch to check for zero spins that would cause division by zero. This fixes the problem described in the issue but might be a bit of a lazy solution so feedback welcome.

Also added a test for this. The test succeeds but CI/CD fails, which I believe comes from other issues from the CI/CD?

@ColmTalbot
Copy link
Collaborator

I think Github actions were unhappy yesterday. I'm going to rebase and check that this works now.

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.

BUG: convert_to_lal_binary_black_hole_parameters gives NaNs when called twice on parameters with chi_1 = 0 or chi_2 = 0

2 participants