Skip to content

Commit 9790a16

Browse files
DOCS: Add FRTM post (#387)
Co-authored-by: Sébastien Morais <[email protected]>
1 parent 56bb60d commit 9790a16

File tree

1 file changed

+44
-1
lines changed
  • examples/high_frequency/antenna/large_scenarios

1 file changed

+44
-1
lines changed

examples/high_frequency/antenna/large_scenarios/doppler.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
import ansys.aedt.core
1818
from ansys.aedt.core.examples.downloads import download_multiparts
19+
from ansys.aedt.core.examples.downloads import download_file
20+
from ansys.aedt.core.examples.downloads import unzip
1921
# -
2022

2123
# Define constants.
@@ -40,6 +42,16 @@
4042
local_path=temp_folder.name
4143
)
4244

45+
zip_file = download_file(
46+
"frtm",
47+
name="doppler_sbr.results.zip",
48+
local_path=temp_folder.name
49+
)
50+
51+
results = os.path.join(temp_folder.name, "doppler_sbr.results")
52+
53+
unzip(zip_file, results)
54+
4355
# ## Launch HFSS and open project
4456
#
4557
# Launch HFSS and open the project.
@@ -153,7 +165,7 @@
153165
# creates a setup and a parametric sweep on the time variable with a
154166
# duration of two seconds. The step is computed automatically from CPI.
155167

156-
setup, sweep = app.create_sbr_pulse_doppler_setup(sweep_time_duration=2)
168+
setup, sweep = app.create_sbr_pulse_doppler_setup(sweep_time_duration=2, velocity_resolution=0.05)
157169
app.set_sbr_current_sources_options()
158170
app.validate_simple()
159171

@@ -166,6 +178,37 @@
166178
# app.analyze_setup(sweep.name)
167179
# -
168180

181+
# ## Doppler post-processing
182+
#
183+
# Once the design is solved, you can get the raw data inside the .aedtresults directory. The format of this data is
184+
# called FRTM.
185+
# PyAEDT offers sophisticated tools for FRTM post-processing
186+
# [FRTM](https://aedt.docs.pyansys.com/version/stable/API/visualization/advanced.html#frtm-processing/)
187+
188+
from ansys.aedt.core.visualization.advanced.frtm_visualization import get_results_files
189+
from ansys.aedt.core.visualization.advanced.frtm_visualization import FRTMPlotter
190+
from ansys.aedt.core.visualization.advanced.frtm_visualization import FRTMData
191+
192+
# ## Load FRTM files
193+
#
194+
# You can load all the FRTM files inside a directory or you could load one single file.
195+
196+
doppler_data_frames = {}
197+
frames_dict = get_results_files(results)
198+
199+
for frame, data_frame in frames_dict.items():
200+
doppler_data = FRTMData(data_frame)
201+
doppler_data_frames[frame] = doppler_data
202+
203+
# ## FRTM plotter
204+
#
205+
# You can perform multiple post-processing operations like range-doppler or direction of arrival.
206+
207+
frtm_plotter = FRTMPlotter(doppler_data_frames)
208+
frame_number = frtm_plotter.frames[0]
209+
frtm_plotter.plot_range_doppler(frame=frame_number)
210+
frtm_plotter.plot_range_angle_map(frame=frame_number, polar=True)
211+
169212
# ## Release AEDT
170213
#
171214
# Release AEDT and close the example.

0 commit comments

Comments
 (0)