Skip to content
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

Set default values of constants in white_noise_block #226

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

Conversation

mattpitkin
Copy link

Currently, in the white_noise_block function, if vary=False the efac, equad and ecorr values are set as Constant parameters without a given value for that constant. This means that the constant value will default to None. The docstring suggests that the constant values can be set later, but in a function such as model_singlepsr_noise, if white_vary=False these constants don't get set and subsequent likelihood calls on the returned pta object fail due to the constants returning None.

This PR attempts to fix this by setting some default values for the constants. In this case a value of 1.0 for efac and -inf for both equad and ecorr. This (assuming I understand things correctly!) would mean that the likelihood just uses the TOA errors as given as the standard deviations in the likelihood calculation (without any scaling, additional component, or correlation).

See also nanograv/enterprise#379.

@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.29%. Comparing base (d91baf2) to head (70f9434).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #226   +/-   ##
=======================================
  Coverage   37.29%   37.29%           
=======================================
  Files          20       20           
  Lines        3974     3974           
=======================================
  Hits         1482     1482           
  Misses       2492     2492           
Files Coverage Δ
enterprise_extensions/blocks.py 44.41% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d91baf2...70f9434. Read the comment docs.

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