Skip to content

Commit f58b794

Browse files
API Brain.save_movie(): remove montage option
1 parent c459429 commit f58b794

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

examples/save_movie.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,9 @@
4343
brain.scale_data_colormap(fmin=13, fmid=18, fmax=22, transparent=True)
4444

4545
"""
46-
Save movies with different combinations of views. Use a large value for
47-
time_dilation because the sample stc only covers 30 ms
46+
Save a movie. Use a large value for time_dilation because the sample stc only
47+
covers 30 ms.
4848
"""
4949
brain.save_movie('example_current.mov', time_dilation=30)
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'])
52-
brain.save_movie('example_v.mov', time_dilation=30, montage=[['lat'], ['med']])
5350

5451
brain.close()

surfer/tests/test_viz.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,8 @@ def test_movie():
227227
tempdir = mkdtemp()
228228
try:
229229
dst = os.path.join(tempdir, 'test')
230-
brain.save_movie(dst, montage='current')
231-
brain.save_movie(dst, montage='current', tmin=0.081, tmax=0.102)
232-
brain.save_movie(dst, montage='single')
233-
# brain.save_movie(dst, montage=['lat', 'med'], orientation='v')
234-
# brain.save_movie(dst, montage=[['lat'], ['med']])
230+
brain.save_movie(dst)
231+
brain.save_movie(dst, tmin=0.081, tmax=0.102)
235232
finally:
236233
# clean up
237234
shutil.rmtree(tempdir)

surfer/viz.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,7 +2088,6 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
20882088
return out
20892089

20902090
def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
2091-
montage='current', colorbar='auto', border_size=15,
20922091
framerate=25, interpolation='quadratic', codec='mpeg4'):
20932092
"""Save a movie (for data with a time axis)
20942093
@@ -2109,25 +2108,13 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21092108
First time point to include (default: all data).
21102109
tmax : float
21112110
Last time point to include (default: all data).
2112-
montage: 'current' | list
2113-
Views to include in the images: 'current' (default) uses the
2114-
currently displayed image; a 1 or 2 dimensional list
2115-
can be used to specify a complete montage. Examples:
2116-
``['lat', 'med']`` lateral and ventral views ordered horizontally;
2117-
``[['fro'], ['ven']]`` frontal and ventral views ordered vertically.
2118-
colorbar: 'auto' | int | list of int | None
2119-
For 'auto', the colorbar is shown in the middle view (default).
2120-
For int or list of int, the colorbar is shown in the specified
2121-
views. For ``None``, no colorbar is shown.
2122-
border_size: int
2123-
Size of image border for montage (more or less space between images)
21242111
framerate : float
21252112
Framerate of the movie (frames per second, default 25).
21262113
interpolation : str
21272114
Interpolation method (``scipy.interpolate.interp1d`` parameter,
21282115
default 'quadratic').
21292116
codec : str
2130-
Codec to use (default 'mpeg4').
2117+
Codec to use with ffmpeg (default 'mpeg4').
21312118
"""
21322119
if not has_ffmpeg():
21332120
err = ("FFmpeg is needed for saving movies and was not found in "
@@ -2167,7 +2154,7 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21672154
frame_pattern = 'frame%%0%id.png' % (np.floor(np.log10(n_times)) + 1)
21682155
fname_pattern = os.path.join(tempdir, frame_pattern)
21692156
self.save_image_sequence(time_idx, fname_pattern, False, -1, -1,
2170-
montage, border_size, colorbar, interpolation)
2157+
'current', interpolation=interpolation)
21712158
ffmpeg(fname, fname_pattern, framerate, codec)
21722159

21732160
def animate(self, views, n_steps=180., fname=None, use_cache=False,

0 commit comments

Comments
 (0)