Skip to content

Commit f31dcb1

Browse files
author
Ilya Mandel
committed
Addressing Jeff's comment
1 parent 726d94a commit f31dcb1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/BaseStar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3907,9 +3907,9 @@ double BaseStar::DrawSNKickMagnitude(const double p_Sigma,
39073907
// use Maxwellians with sigma set in CalculateSNKickMagnitude() for other SN types
39083908
SN_EVENT thisSNevent = utils::SNEventType(m_SupernovaDetails.events.current); // current SN event
39093909
if (thisSNevent == SN_EVENT::CCSN || (thisSNevent == SN_EVENT::PPISN && OPTIONS->NatalKickForPPISN())) {
3910-
kickMagnitude = 1001.0;
3911-
double rand = p_Rand; // makes it possible to adjust if p_Rand is too low, to avoid getting stuck
3912-
while( utils::Compare(kickMagnitude, 1000.0) > 0 ) { // maximum kick of 1000 km/s, following Disberg & Mandel (2025)
3910+
kickMagnitude = DISBERG_MANDEL_MAX_KICK + 1.0;
3911+
double rand = p_Rand; // makes it possible to adjust if p_Rand is too high, to avoid getting stuck
3912+
while( utils::Compare(kickMagnitude, DISBERG_MANDEL_MAX_KICK) > 0 ) { // maximum kick of 1000 km/s, following Disberg & Mandel (2025)
39133913
kickMagnitude = gsl_cdf_lognormal_Pinv(rand, DISBERG_MANDEL_MU, DISBERG_MANDEL_SIGMA);
39143914
rand = 0.99 * rand;
39153915
}

src/constants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ constexpr double MULLERMANDEL_SIGMAKICK = 0.3;
394394
// Constants for Disberg & Mandel (2025) SN kick prescription
395395
constexpr double DISBERG_MANDEL_MU = 5.60;
396396
constexpr double DISBERG_MANDEL_SIGMA = 0.68;
397+
constexpr double DISBERG_MANDEL_MAX_KICK = 1000.0;
397398

398399
constexpr double HOBBS_CORRECTED_SIGMA = 217.0; // Best fit Maxwellian sigma for 48 younger than 10 Myr pulsars with proper motions from Disberg & Mandel (2025) sample; corrects Hobbs+ 2005 missing Jacobian
399400

0 commit comments

Comments
 (0)