pysdic.display_residual_maps#

display_residual_maps(analysis, residuals, *, fill_radius=None, channel=None, clim=None, cmap='RdBu', image_opacity=0.3, show_mesh=True, figsize=(18, 6), title=None, show=True)[source]#

Display the residuals of a pairing (see pysdic.compute_pixel_residual_maps()).

The figure has 3 panels: the residual map on the view 1 and on the view 2 of the pairing (over their images, with the deformed mesh), and the histogram of the residuals of the points, with their mean and RMS.

Parameters:
  • analysis (pysdic.SDICAnalysis) – The analysis.

  • residuals (pysdic.PairingResiduals) – The residuals of the pairing (pysdic.compute_residuals() or pysdic.SDICCorrelationTerm.compute_residuals()).

  • fill_radius (Optional[Real], optional) – See pysdic.compute_pixel_residual_maps().

  • channel (Optional[Integral], optional) – The channel of the residual to display, required for images with several channels.

  • clim (Optional[Tuple[Real, Real]], optional) – The color limits of the maps. By default, symmetric limits given by the 99th percentile of \(|r|\).

  • cmap (str, optional (default: "RdBu")) – The colormap of the maps.

  • image_opacity (Real, optional (default: 0.3)) – The opacity of the images under the maps.

  • show_mesh (bool, optional (default: True)) – Whether to draw the edges of the mesh deformed by the displacements of the residuals.

  • figsize (Tuple[Real, Real], optional (default: (18, 6))) – The size of the figure in inches (width, height).

  • title (Optional[str], optional) – The title of the figure. By default, the pairing and the correction.

  • show (bool, optional (default: True)) – Whether to show the figure (with matplotlib.pyplot.show).

Returns:

The figure.

Return type:

matplotlib.figure.Figure

Raises:

ValueError – If channel is missing for images with several channels, or if no residual is finite.