make_interpolated¶
- behavenet.plotting.cond_ae_utils.make_interpolated(ims, save_file, markers=None, text=None, text_title=None, text_color=[1, 1, 1], fontsize=4, frame_rate=20, scale=3, markersize=10, markeredgecolor='w', markeredgewidth=1, ax=None)[source]¶
Make a latent space interpolation movie.
- Parameters:
ims (
listofnp.ndarray) – each list element is an array of shape (y_pix, x_pix)save_file (
str) – absolute path of save file; does not need file extension, will automatically be saved as mp4. To save as a gif, include the ‘.gif’ file extension in save_file. The movie will only be saved if ax is NoneType; else the list of animated frames is returnedmarkers (
array-like, optional) – array of size (n_frames, 2) which specifies the (x, y) coordinates of a marker on each frametext (
array-like, optional) – array of size (n_frames) which specifies text printed in the lower left corner of each frametext_title (
array-like, optional) – array of size (n_frames) which specifies text printed in the upper left corner of each frametext_color (
array-like, optional) – rgb array specifying color of text and text_title, if applicableframe_rate (
float, optional) – frame rate of saved moviescale (
float, optional) – width of panel is (scale / 2) inchesmarkersize (
float, optional) – size of marker if markers is not NoneTypemarkeredgecolor (
float, optional) – color of marker edge if markers is not NoneTypemarkeredgewidth (
float, optional) – width of marker edge if markers is not NoneTypeax (
matplotlib.axes.Axesobject) – optional axis in which to plot the frames; if this argument is not NoneType the list of animated frames is returned and the movie is not saved
- Returns:
list of list of animated frames if ax is True; else save movie
- Return type:
list