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

major restructuring of parameter distribution and design of the inter… #38

Merged
merged 19 commits into from
Jun 29, 2024

Conversation

sibirrer
Copy link
Owner

…polation grid for the kinematic scaling

New: require list of parameter names with the interpolation grid, which allows more flexibility for further development

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 99.60938% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.37%. Comparing base (905f027) to head (3be0ca7).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   99.40%   99.37%   -0.03%     
==========================================
  Files          46       48       +2     
  Lines        2346     2407      +61     
==========================================
+ Hits         2332     2392      +60     
- Misses         14       15       +1     
Files Coverage Δ
hierarc/Diagnostics/goodness_of_fit.py 100.00% <100.00%> (ø)
hierarc/LensPosterior/base_config.py 100.00% <100.00%> (ø)
hierarc/LensPosterior/ddt_kin_constraints.py 100.00% <ø> (ø)
hierarc/LensPosterior/ddt_kin_gauss_constraints.py 100.00% <ø> (ø)
hierarc/LensPosterior/kin_constraints.py 97.18% <100.00%> (ø)
hierarc/LensPosterior/kin_constraints_composite.py 100.00% <100.00%> (ø)
hierarc/LensPosterior/kin_scaling_config.py 100.00% <100.00%> (ø)
hierarc/Likelihood/cosmo_likelihood.py 92.55% <100.00%> (ø)
hierarc/Likelihood/hierarchy_likelihood.py 97.79% <100.00%> (-0.47%) ⬇️
hierarc/Likelihood/kin_scaling.py 100.00% <100.00%> (ø)
... and 6 more

@sibirrer sibirrer requested a review from williyamshoe June 28, 2024 01:35
Copy link
Collaborator

@williyamshoe williyamshoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things look good and more organized, especially on the top level! I just have a minor comment!

Comment on lines 62 to 65
# we draw a linear gaussian for 'const' anisotropy and a scaled proportional one for 'OM
if self._distribution_function in ["GAUSSIAN"]:
if self._anisotropy_model == "OM":
a_ani_draw = np.random.normal(a_ani, a_ani_sigma * a_ani)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own understanding, what's the reasoning for a scaled proportional Gaussian for OM? Also, would it be more clear/explicit if you introduce another distribution type (e.g., "SCALED GAUSSIAN")?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main reason was as a_ani close to zero, the distribution becomes one-sided and has a much stronger effect, so having a relative scatter distribution seemed more reasonable (and recommended). I understand that this was not transparent in the code and I changed it now to GAUSSIAN_SCALED. I suggest you use this when using "OM" or "GOM" models

@sibirrer sibirrer merged commit d093fb0 into main Jun 29, 2024
4 checks passed
@sibirrer sibirrer deleted the kin_scaling_restructuring branch June 29, 2024 01:19
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.

3 participants