@@ -140,10 +140,10 @@ def compute_zred(self, galaxy, no_corrections=False):
140
140
calcinds , = np .where (dist > 1e-5 )
141
141
142
142
if calcinds .size >= 3 :
143
- tdist = scipy .integrate .trapz (dist [calcinds ], self .zredstr .z [calcinds ])
144
- zred_temp = scipy .integrate .trapz (dist [calcinds ] * self .zredstr .z [calcinds ],
143
+ tdist = scipy .integrate .trapezoid (dist [calcinds ], self .zredstr .z [calcinds ])
144
+ zred_temp = scipy .integrate .trapezoid (dist [calcinds ] * self .zredstr .z [calcinds ],
145
145
self .zredstr .z [calcinds ]) / tdist
146
- zred_e = scipy .integrate .trapz (dist [calcinds ] * self .zredstr .z [calcinds ]** 2. ,
146
+ zred_e = scipy .integrate .trapezoid (dist [calcinds ] * self .zredstr .z [calcinds ]** 2. ,
147
147
self .zredstr .z [calcinds ]) / tdist - zred_temp ** 2.
148
148
else :
149
149
tdist = np .sum (dist [calcinds ])
@@ -203,7 +203,7 @@ def compute_zred(self, galaxy, no_corrections=False):
203
203
if calcinds .size >= 3 :
204
204
# Note there maybe should be a distcorr here, but this is not
205
205
# actually computed in the IDL code (bug?)
206
- lkhd = scipy .integrate .trapz (newdist [calcinds ] * (lndist [calcinds ]), self .zredstr .z [calcinds ]) / scipy .integrate .trapz (newdist [calcinds ], self .zredstr .z [calcinds ])
206
+ lkhd = scipy .integrate .trapezoid (newdist [calcinds ] * (lndist [calcinds ]), self .zredstr .z [calcinds ]) / scipy .integrate .trapezoid (newdist [calcinds ], self .zredstr .z [calcinds ])
207
207
else :
208
208
lkhd = np .sum (newdist [calcinds ] * lndist [calcinds ]) / np .sum (newdist [calcinds ])
209
209
0 commit comments