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

Changes to composite mass modeling #26

Merged
merged 33 commits into from
Jan 22, 2024
Merged

Conversation

williyamshoe
Copy link
Collaborator

@williyamshoe williyamshoe commented Jan 5, 2024

Changes include:

  • Bug fixes
  • QoL changes
    • ability to specify kappa_s and r_scale_angle distributions instead of rho0 and r_scale
    • ability to bypass MGE if provided light profile is already "MULTI_GAUSSIAN"
    • providing amp_2_luminosity parameter in KinConstraintsComposite to help intuitive converting amplitudes to correct units
  • Changed population level m2l to log_m2l
  • Functionality to input M/L distribution, and so to not model population-level M/L
    • see KinConstraintsCompositeM2l subclass

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b331dbc) 99.35% compared to head (5a2a42a) 99.33%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
- Coverage   99.35%   99.33%   -0.03%     
==========================================
  Files          44       44              
  Lines        2182     2262      +80     
==========================================
+ Hits         2168     2247      +79     
- Misses         14       15       +1     
Files Coverage Δ
hierarc/Likelihood/hierarchy_likelihood.py 98.25% <100.00%> (+0.15%) ⬆️
hierarc/Likelihood/parameter_scaling.py 100.00% <100.00%> (ø)
hierarc/LensPosterior/kin_constraints_composite.py 99.30% <98.70%> (-0.70%) ⬇️

@ajshajib
Copy link
Collaborator

ajshajib commented Jan 6, 2024

@williyamshoe, the formatting check is failing. You can run these commands locally and then push a commit to resolve this:

black .
docformatter -r ./* --black --in-place

You can pip install black and docformatter if needed.

hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/Likelihood/parameter_scaling.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite_m2l.py Outdated Show resolved Hide resolved
hierarc/Likelihood/hierarchy_likelihood.py Outdated Show resolved Hide resolved
@ajshajib
Copy link
Collaborator

@williyamshoe, thanks a lot for making the changes! Are you done implementing them, or is it still in progress?

@williyamshoe
Copy link
Collaborator Author

@williyamshoe, thanks a lot for making the changes! Are you done implementing them, or is it still in progress?

Yup, I'm done implementing the changes!

@ajshajib
Copy link
Collaborator

@williyamshoe, looks good to me, except for I requested a docstring to be added. I also changed the method name to _check_arrays() to make it explicit that it's a private method.

hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
hierarc/LensPosterior/kin_constraints_composite.py Outdated Show resolved Hide resolved
@ajshajib ajshajib merged commit 9a84577 into sibirrer:main Jan 22, 2024
2 checks passed
@ajshajib
Copy link
Collaborator

@williyamshoe, oops, I missed to check the coverage report before merging! Line 535 in kin_constraints_composite.py is missing coverage. If possible, can you make a quick PR to cover that line?

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