From 0a8c4487e030966a7a8a1e5772552fe1863e8f19 Mon Sep 17 00:00:00 2001 From: James Grimmett Date: Wed, 8 Jan 2025 19:29:27 +1100 Subject: [PATCH] swap gsl_gamma_inc with gsl_gamma_inc_P for mass calculation --- .../potential/potential_c_ext/PowerSphericalPotentialwCutoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galpy/potential/potential_c_ext/PowerSphericalPotentialwCutoff.c b/galpy/potential/potential_c_ext/PowerSphericalPotentialwCutoff.c index 05af71391..d3340fd5a 100644 --- a/galpy/potential/potential_c_ext/PowerSphericalPotentialwCutoff.c +++ b/galpy/potential/potential_c_ext/PowerSphericalPotentialwCutoff.c @@ -7,7 +7,7 @@ //PowerSphericalPotentialwCutoff //3 arguments: amp, alpha, rc double mass(double r2,double alpha, double rc){ - return 2. * M_PI * pow ( rc , 3. - alpha ) * ( gsl_sf_gamma ( 1.5 - 0.5 * alpha ) - gsl_sf_gamma_inc ( 1.5 - 0.5 * alpha , r2 / rc / rc ) ); + return 2. * M_PI * pow ( rc , 3. - alpha ) * ( gsl_sf_gamma ( 1.5 - 0.5 * alpha ) * gsl_sf_gamma_inc_P ( 1.5 - 0.5 * alpha , r2 / rc / rc ) ); } double PowerSphericalPotentialwCutoffEval(double R,double Z, double phi, double t,