plot_range_profile#
- FRTMPlotter.plot_range_profile(channel: str = None, frame: int = None, cpi_frame: int = None, window: str = None, size: int = None, quantity_format: str = None, title: str = 'Range profile', output_file: str = None, show: bool = True, show_legend: bool = True, plot_size: tuple = (1920, 1440), animation: bool = True, figure=None)#
Create a 2D plot of the range profile.
- Parameters:
- channel
str
,optional
Channel name. The default is
None
, in which case the first channel is used.- frame
int
,optional
Frame number. The default is
None
, in which case all frames are used.- cpi_frame
int
,optional
Cpi frame number. The default is
None
, in which case the middle cpi frame is used.- window: str, optional
Type of window. The default is
None
. Available options are"Hann"
,"Hamming"
, and"Flat"
.- size: int, optional
Output number of samples. The default is
None
.- quantity_format
str
,optional
Conversion data function. The default is
None
. Available functions are:"abs"
,"ang"
,"dB10"
,"dB20"
,"deg"
,"imag"
,"norm"
, and"real"
.- title
str
,optional
Title of the plot. The default is
"Range profile"
.- output_file
str
orpathlib.Path
,optional
Full path for the image file. The default is
None
, in which case an image in not exported.- showbool,
optional
Whether to show the plot. The default is
True
. IfFalse
, the Matplotlib instance of the plot is shown.- show_legendbool,
optional
Whether to display the legend or not. The default is
True
.- plot_size
tuple
,optional
Image size in pixel (width, height).
- animationbool,
optional
Create an animated plot or overlap the frames. The default is
True
.- figure
matplotlib.pyplot.Figure
,optional
An existing Matplotlib Figure to which the plot is added. If not provided, a new Figure and Axes objects are created. Default is
None
.
- channel
- Returns:
ansys.aedt.core.visualization.plot.matplotlib.ReportPlotter
PyAEDT matplotlib figure object.
Examples
>>> from ansys.aedt.core.visualization.advanced.frtm_visualization import get_results_files >>> from ansys.aedt.core.visualization.advanced.frtm_visualization import FRTMData >>> from ansys.aedt.core.visualization.advanced.frtm_visualization import FRTMPlotter >>> output_directory = "directory.results" >>> frames_dict = get_results_files(directory) >>> for frame, data_frame in frames_dict.items(): >>> doppler_data = FRTMData(data_frame) >>> data[frame] = doppler_data >>> frtm_plotter = FRTMPlotter(data) >>> frame_number = frtm_plotter.frames[0] >>> frtm_plotter.plot_range_profile(frame=frame_number) >>> frtm_plotter.plot_range_profile(output_file="range_profile.gif", animation=True, show=False) >>> frtm_plotter.plot_range_profile(animation=False)