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

Add presn.Yoshida_2016 model #330

Merged
merged 6 commits into from
May 31, 2024
Merged

Add presn.Yoshida_2016 model #330

merged 6 commits into from
May 31, 2024

Conversation

Sheshuk
Copy link
Contributor

@Sheshuk Sheshuk commented May 7, 2024

Closes #215

  • Add loader class
  • Add registry model
  • Add example notebook
  • Cross-check the resulting plots with the model paper

@Sheshuk Sheshuk added the SupernovaModel Implementing/correcting supernova model label May 7, 2024
@Sheshuk
Copy link
Contributor Author

Sheshuk commented May 10, 2024

Cross-check with Yoshida_2016 paper (Fig.5):
image

Using a script here I plot the image
https://gist.github.com/Sheshuk/3a11f9b033fb8a3029b53fada9aa4f9a
image

@Sheshuk Sheshuk marked this pull request as ready for review May 10, 2024 17:52
@Sheshuk Sheshuk changed the title Sheshuk/add yoshida model Add presn.Yoshida_2016 model May 10, 2024
@JostMigenda
Copy link
Member

From the figure, it looks like the NU_E and NU_X rates are almost identical (both solid lines overlap); while the NU_E_BAR and NU_X_BAR are both almost identical to each other (both dashed lines overlap), and a factor of ~4 lower than the solid lines. However, physically, this doesn’t seem right at all: The main emission mechanism is pair production; so NU_E should be very similar to NU_E_BAR, NU_X should be very similar to NU_X_BAR, and there’s no a priori reason why NU_E and NU_X should be similar.

Therefore, I suspect that NU_E_BAR and NU_X have been mixed up here. Looking at the README, the input files use the order NU_E, NU_E_BAR, NU_X, NU_X_BAR; while the Flavor enum in snewpy.neutrino uses the order NU_E, NU_X, NU_E_BAR, NU_X_BAR. Maybe that’s the origin of the problem?

@Sheshuk
Copy link
Contributor Author

Sheshuk commented May 23, 2024

Oh, you're right, I mixed up the flavors! Thanks for noticing this! Fixed now, here is the image from the same script:
image

Copy link
Member

@JostMigenda JostMigenda left a comment

Choose a reason for hiding this comment

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

Looks good to me now; but let’s add this to the test_presn_rates.py to have at least some basic checks that the model initializes successfully and produces reasonable rates.

Sheshuk and others added 2 commits May 24, 2024 12:53
@Sheshuk Sheshuk requested a review from JostMigenda May 24, 2024 10:21
Copy link
Member

@JostMigenda JostMigenda left a comment

Choose a reason for hiding this comment

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

Looks good; thanks a lot! ☺️

@JostMigenda JostMigenda merged commit a97833c into main May 31, 2024
10 checks passed
@JostMigenda JostMigenda deleted the Sheshuk/add_Yoshida_model branch May 31, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SupernovaModel Implementing/correcting supernova model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add presn.Yoshida model
2 participants