Skip to content

Commit 6bd7c07

Browse files
API Brain.save_movie(): remove col and row parameters
1 parent 112aa87 commit 6bd7c07

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

examples/save_movie.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@
4747
time_dilation because the sample stc only covers 30 ms
4848
"""
4949
brain.save_movie('example_current.mov', time_dilation=30)
50-
brain.save_movie('example_single.mov', time_dilation=30, montage='single')
51-
brain.save_movie('example_h.mov', time_dilation=30, montage=['lat', 'med'],
52-
orientation='h')
50+
brain.save_movie('example_lat.mov', time_dilation=30, montage='lat')
51+
brain.save_movie('example_h.mov', time_dilation=30, montage=['lat', 'med'])
5352
brain.save_movie('example_v.mov', time_dilation=30, montage=[['lat'], ['med']])
5453

5554
brain.close()

surfer/viz.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,8 +2087,7 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
20872087

20882088
def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
20892089
montage='current', colorbar='auto', border_size=15,
2090-
framerate=25, interpolation='quadratic', codec='mpeg4',
2091-
row=-1, col=-1):
2090+
framerate=25, interpolation='quadratic', codec='mpeg4'):
20922091
"""Save a movie (for data with a time axis)
20932092
20942093
.. Warning::
@@ -2108,10 +2107,9 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21082107
First time point to include (default: all data).
21092108
tmax : float
21102109
Last time point to include (default: all data).
2111-
montage: 'current' | 'single' | list
2110+
montage: 'current' | list
21122111
Views to include in the images: 'current' (default) uses the
2113-
currently displayed image; 'single' uses a single view, specified
2114-
by the ``row`` and ``col`` parameters; a 1 or 2 dimensional list
2112+
currently displayed image; a 1 or 2 dimensional list
21152113
can be used to specify a complete montage. Examples:
21162114
``['lat', 'med']`` lateral and ventral views ordered horizontally;
21172115
``[['fro'], ['ven']]`` frontal and ventral views ordered vertically.
@@ -2128,10 +2126,6 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21282126
default 'quadratic').
21292127
codec : str
21302128
Codec to use (default 'mpeg4').
2131-
row : int
2132-
row index of the brain to use (default -1).
2133-
col : int
2134-
column index of the brain to use (default -1).
21352129
"""
21362130
if not has_ffmpeg():
21372131
err = ("FFmpeg is needed for saving movies and was not found in "
@@ -2170,7 +2164,7 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21702164
tempdir = mkdtemp()
21712165
frame_pattern = 'frame%%0%id.png' % (np.floor(np.log10(n_times)) + 1)
21722166
fname_pattern = os.path.join(tempdir, frame_pattern)
2173-
self.save_image_sequence(time_idx, fname_pattern, False, row, col,
2167+
self.save_image_sequence(time_idx, fname_pattern, False, -1, -1,
21742168
montage, border_size, colorbar, interpolation)
21752169
ffmpeg(fname, fname_pattern, framerate, codec)
21762170

0 commit comments

Comments
 (0)