File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ sbpy.names
12
12
rates in the LSST survey era [#406]
13
13
14
14
15
+ Other Changes and Additions
16
+ ---------------------------
17
+
18
+ sbpy.activity.gas
19
+ ^^^^^^^^^^^^^^^^^
20
+ - Replaced calls to the deprecated function `scipy.integrate.romberg ` with
21
+ `scipy.integrate.quad `. [#412]
22
+
23
+
15
24
0.5.0 (2024-08-28)
16
25
==================
17
26
Original file line number Diff line number Diff line change @@ -148,9 +148,9 @@ number of molecules in an aperture. Parent and daughter data is provided via
148
148
>>> Q = 1e28 / u.s # water production rate
149
149
>>> coma = gas.VectorialModel(Q, water, hydroxyl)
150
150
>>> print (coma.column_density(10 * u.km)) # doctest: +FLOAT_CMP
151
- 2.8976722840952486e +17 1 / m2
151
+ 2.8974972922255264e +17 1 / m2
152
152
>>> print (coma.total_number(1000 * u.km)) # doctest: +FLOAT_CMP
153
- 6.995158827300034e +29
153
+ 6.995084479934798e +29
154
154
155
155
Production Rate calculations
156
156
----------------------------
Original file line number Diff line number Diff line change 24
24
try :
25
25
import scipy
26
26
from scipy import special
27
- from scipy .integrate import quad , dblquad , romberg
27
+ from scipy .integrate import quad , dblquad
28
28
from scipy .interpolate import CubicSpline , PPoly
29
29
except ImportError :
30
30
scipy = None
@@ -1635,8 +1635,8 @@ def _column_density_at_rho(self, rho: np.float64) -> np.float64:
1635
1635
def column_density_integrand (z ):
1636
1636
return self ._volume_density (np .sqrt (z ** 2 + rhosq ))
1637
1637
1638
- c_dens = 2 * romberg (column_density_integrand , 0 ,
1639
- z_max , rtol = 0.0001 , divmax = 50 )
1638
+ c_dens = 2 * quad (column_density_integrand , 0 ,
1639
+ z_max , epsrel = 0.0001 )[ 0 ]
1640
1640
1641
1641
# result is in 1/m^2
1642
1642
return c_dens
@@ -1745,14 +1745,13 @@ def _calc_num_fragments_grid(self) -> np.float64:
1745
1745
def vol_integrand (r , r_func ):
1746
1746
return r_func (r ) * r ** 2
1747
1747
1748
- r_int = romberg (
1748
+ r_int = quad (
1749
1749
vol_integrand ,
1750
1750
0 ,
1751
1751
max_r ,
1752
1752
args = (self .vmr .volume_density_interpolation ,),
1753
- rtol = 0.0001 ,
1754
- divmax = 20 ,
1755
- )
1753
+ epsrel = 0.0001 ,
1754
+ )[0 ]
1756
1755
return 4 * np .pi * r_int
1757
1756
1758
1757
def _column_density (self , rho ) -> np .float64 :
You can’t perform that action at this time.
0 commit comments