|
16 | 16 |
|
17 | 17 | import ansys.aedt.core |
18 | 18 | 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 |
19 | 21 | # - |
20 | 22 |
|
21 | 23 | # Define constants. |
|
40 | 42 | local_path=temp_folder.name |
41 | 43 | ) |
42 | 44 |
|
| 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 | + |
43 | 55 | # ## Launch HFSS and open project |
44 | 56 | # |
45 | 57 | # Launch HFSS and open the project. |
|
153 | 165 | # creates a setup and a parametric sweep on the time variable with a |
154 | 166 | # duration of two seconds. The step is computed automatically from CPI. |
155 | 167 |
|
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) |
157 | 169 | app.set_sbr_current_sources_options() |
158 | 170 | app.validate_simple() |
159 | 171 |
|
|
166 | 178 | # app.analyze_setup(sweep.name) |
167 | 179 | # - |
168 | 180 |
|
| 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 | + |
169 | 212 | # ## Release AEDT |
170 | 213 | # |
171 | 214 | # Release AEDT and close the example. |
|
0 commit comments