make_neural_reconstruction_movie

behavenet.plotting.decoder_utils.make_neural_reconstruction_movie(ims_orig, ims_recon_ae, ims_recon_neural, latents_ae, latents_neural, ae_model_class='AE', colored_predictions=False, scale=0.5, xtick_locs=None, frame_rate_beh=None, save_file=None, frame_rate=15)[source]

Produce movie with original video, ae reconstructed video, and neural reconstructed video.

Latent traces are additionally plotted, as well as the residual between the ae reconstruction and the neural reconstruction.

Parameters:
  • ims_orig (np.ndarray) – original images; shape (n_frames, n_channels, y_pix, x_pix)

  • ims_recon_ae (np.ndarray) – images reconstructed by AE; shape (n_frames, n_channels, y_pix, x_pix)

  • ims_recon_neural (np.ndarray) – images reconstructed by neural activity; shape (n_frames, n_channels, y_pix, x_pix)

  • latents_ae (np.ndarray) – original AE latents; shape (n_frames, n_latents)

  • latents_neural (np.ndarray) – latents reconstruted by neural activity; shape (n_frames, n_latents)

  • ae_model_class (str, optional) – ‘AE’, ‘VAE’, etc. for plot titles

  • colored_predictions (bool, optional) – False to plot reconstructions in black, True to plot in different colors

  • scale (int, optional) – scale magnitude of traces

  • xtick_locs (array-like, optional) – tick locations in units of bins

  • frame_rate_beh (float, optional) – frame rate of behavorial video; to properly relabel xticks

  • save_file (str, optional) – full save file (path and filename)

  • frame_rate (float, optional) – frame rate of saved movie