initial_comparison module
- src.visualization.initial_comparison.get_bscan_mse(bscan1: ndarray, bscan2: ndarray)[source]
Computes the MSE between flattened versions of the B-scans
- Parameters:
- bscan1np.ndarray
the first B-scan
- bscan2np.ndarray
the second B-scan
- Returns:
- float
value of the mean squared error
- src.visualization.initial_comparison.initial_comparison()[source]
Performs the initial comparison between different 2D and 3D geometries.
- Compares the following models:
2D box
2D cylindrical
3D cylindrical
3D cylindrical with rails
3D spheres with rails
2D spheres cut from the 3D geometry
Where all the models use a Peplinski soil model, except for the 2D box.
- src.visualization.initial_comparison.plot_ascans(bscan1: ndarray, bscan2: ndarray, labels: tuple[str, str], colors: tuple[str, str] = ['r', 'b']) ndarray[source]
Plots and shows the central A-scans related to the provided B-scans, together with their difference.
- Parameters:
- bscan1np.ndarray
the first B-scan.
- bscan2np.ndarray
the second B-scan, its shape must be the same as bscan1.shape
- labelstuple[str, str]
the labels to put in the plot legend
- colorstuple[str, str], default: [“r”, “b”]
the colors to use for the plot
- Returns:
- np.ndarray
a copy of the second B-scan, temporally shifted to match the first one.
- src.visualization.initial_comparison.plot_bscan(title: str, ax: Axes, bscan: ndarray, dt: float)[source]
Plots a B-scan in the specitied subplot.
- Parameters:
- titlestr
the title of the B-scan
- axAxes
the subplot in which to plot
- bscannp.ndarray
the B-scan to plot
- dtfloat
the temporal resolution of the B-scan.