Skip to content

Commit cded2a0

Browse files
DOC: interpolation
- list different methods - be explicit about when it's applied
1 parent 3b262e3 commit cded2a0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

surfer/viz.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,10 +1549,13 @@ def set_data_time_index(self, time_idx, interpolation='quadratic'):
15491549
Parameters
15501550
----------
15511551
time_idx : int | float
1552-
Time index. Floats will cause samples to be interpolated.
1552+
Time index. Non-integer values will be displayed using interpolation
1553+
between samples.
15531554
interpolation : str
15541555
Interpolation method (``scipy.interpolate.interp1d`` parameter,
1555-
default 'quadratic').
1556+
one of 'linear' | 'nearest' | 'zero' | 'slinear' | 'quadratic' |
1557+
'cubic', default 'quadratic'). Interpolation is only used for
1558+
non-integer indexes.
15561559
"""
15571560
if self.n_times is None:
15581561
raise RuntimeError('cannot set time index with no time data')
@@ -1956,7 +1959,8 @@ def save_image_sequence(self, time_idx, fname_pattern, use_abs_idx=True,
19561959
Parameters
19571960
----------
19581961
time_idx : array-like
1959-
Time indices to save.
1962+
Time indices to save. Non-integer values will be displayed using
1963+
interpolation between samples.
19601964
fname_pattern : str
19611965
Filename pattern, e.g. 'movie-frame_%0.4d.png'.
19621966
use_abs_idx : boolean
@@ -1982,7 +1986,9 @@ def save_image_sequence(self, time_idx, fname_pattern, use_abs_idx=True,
19821986
views. For ``None``, no colorbar is shown.
19831987
interpolation : str
19841988
Interpolation method (``scipy.interpolate.interp1d`` parameter,
1985-
default 'quadratic').
1989+
one of 'linear' | 'nearest' | 'zero' | 'slinear' | 'quadratic' |
1990+
'cubic', default 'quadratic'). Interpolation is only used for
1991+
non-integer indexes.
19861992
19871993
Returns
19881994
-------
@@ -2112,7 +2118,8 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21122118
Framerate of the movie (frames per second, default 25).
21132119
interpolation : str
21142120
Interpolation method (``scipy.interpolate.interp1d`` parameter,
2115-
default 'quadratic').
2121+
one of 'linear' | 'nearest' | 'zero' | 'slinear' | 'quadratic' |
2122+
'cubic', default 'quadratic').
21162123
codec : str
21172124
Codec to use with ffmpeg (default 'mpeg4').
21182125

0 commit comments

Comments
 (0)