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

Added SN Ia luminosity function calculation #232

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

Conversation

cmistick
Copy link
Collaborator

@cmistick cmistick commented Aug 7, 2024

  • Added luminosity function calculation (OM10 - Eq. 18) within supernovae_pop.py
  • Added corresponding test function in test_supernovae_pop.py
  • Also some minor syntax changes to previous code

@cmistick cmistick requested a review from nkhadka21 August 7, 2024 00:35
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.51%. Comparing base (8a70d74) to head (cf21598).
Report is 91 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   97.53%   97.51%   -0.02%     
==========================================
  Files          58       58              
  Lines        4171     4182      +11     
==========================================
+ Hits         4068     4078      +10     
- Misses        103      104       +1     
Files Coverage Δ
slsim/Sources/Supernovae/supernovae_pop.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

Copy link
Collaborator

@nkhadka21 nkhadka21 left a comment

Choose a reason for hiding this comment

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

Hi @cmistick , thank you very much for this PR! the function looks good. You can use this function to sample supernovae magnitudes. For this, you need to compute cdf using luminosity function and sample magnitudes from the cdf. Then, you should get supernovae redshift and magnitudes in your sample. Please look at @emsonmez 's class for the detailed process.

slsim/Sources/Supernovae/supernovae_pop.py Show resolved Hide resolved
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