Skip to content

Avoid divide by 0 in Pulse modeling #907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Apicazo9
Copy link

Relevant Issue(s)/PR(s)

Avoid divide by 0

Provide an overview of the implemented solution or the fix and elaborate on the modifications.

stingray\stingray\pulse\modeling.py

Avoid divide by 0 by changing parameter to a very small number (1e-10)

Is there a new dependency introduced by your contribution? If so, please specify.

Any other comments?

@matteobachetti
Copy link
Member

@Apicazo9 the number that comes out of that operation is already flagged a couple of lines below. Do you have any specific reason to avoid at all cost the division by zero?

@Apicazo9
Copy link
Author

@matteobachetti I changed it because while changing values in the interactive phaseogram a warning showed up. I've been testing it now and it works fine, i don't understand what happened.

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.

2 participants