@@ -813,10 +813,10 @@ def _linear_interpolation(x0, y0, x1, youtleft, youtright):
813
813
y1 [m1 ] = w0lo * y0 [ilo0 ] + w0hi * y0 [ihi0 ]
814
814
return y1
815
815
816
+
816
817
def grid_interpolation (x0 , y0 , x1 , tp , left = None , right = None ):
817
- """
818
- Interpolate values from one grid onto another using either linear
819
- or Whittaker–Shannon interpolation.
818
+ """Interpolate values from one grid onto another using either linear or
819
+ Whittaker–Shannon interpolation.
820
820
821
821
Parameters
822
822
----------
@@ -827,11 +827,11 @@ def grid_interpolation(x0, y0, x1, tp, left=None, right=None):
827
827
x1 : array_like
828
828
New x-grid upon which to interpolate.
829
829
tp : {'data', 'Nyquist', 'custom'}, optional
830
- Corresponding fit sampling type. Use Whittaker–Shannon interpolation
830
+ Corresponding fit sampling type. Use Whittaker–Shannon interpolation
831
831
for Nyquist resampling and linear interpolation otherwise.
832
832
If not provided, linear interpolation is used.
833
833
left : float, optional
834
- Value for interpolated y1 for x1 below the x0 range.
834
+ Value for interpolated y1 for x1 below the x0 range.
835
835
Default: if tp='Nyquist' then y1[0] is used. Otherwise 0.0 is used.
836
836
right : float, optional
837
837
Value for interpolated y1 for x1 above the x0 range.
@@ -847,7 +847,7 @@ def grid_interpolation(x0, y0, x1, tp, left=None, right=None):
847
847
When tp='Nyquist', the function calls :func:`wsinterp` to perform Whittaker–Shannon interpolation.
848
848
Otherwise it uses the internal :func:`_linear_interpolation` routine.
849
849
"""
850
- if tp == ' Nyquist' :
850
+ if tp == " Nyquist" :
851
851
return wsinterp (x1 , x0 , y0 , left , right )
852
852
else :
853
853
left = 0.0 if left is None else left
0 commit comments