Skip to content

Commit

Permalink
processor.PTV2del(): rename integrate func call to scipy-1.14 (#35)
Browse files Browse the repository at this point in the history
+ `processor.PTV2del()`: rename integrate func call to scipy-1.14 from `scipy.integrate.cumtrapz()` to `scipy.integrate.cumulative_trapezoid()`, as the former is removed from scipy since version 1.14.
  • Loading branch information
yunjunz authored Jun 26, 2024
1 parent 293308e commit 007ff97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyaps3/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ def PTV2del(Presi,Tempi,Vpri,hgt,cdict,verbose=False):
DDry2[:,:,:] = k1*Rd*(Presi[:,:,:] - Presi[:,:,-1][:,:,np.newaxis])*1.0e-6/g

#Wet delay
S1 = intg.cumtrapz(WonT,x=hgt,axis=-1)
S1 = intg.cumulative_trapezoid(WonT,x=hgt,axis=-1)
val = 2*S1[:,:,-1]-S1[:,:,-2]
val = val[:,:,None]
S1 = np.concatenate((S1,val),axis=-1)
del WonT

S2 = intg.cumtrapz(WonT2,x=hgt,axis=-1)
S2 = intg.cumulative_trapezoid(WonT2,x=hgt,axis=-1)
val = 2*S2[:,:,-1]-S2[:,:,-2]
val = val[:,:,None]
S2 = np.concatenate((S2,val),axis=-1)
Expand Down

0 comments on commit 007ff97

Please sign in to comment.