<jupyter_start><jupyter_text>***Introduction to Radar Using Python and MATLAB*** <NAME> - Copyright (C) 2019 Artech House Power Density*** The power density at a target at a given distance is expressed as (Equation 4.22)$$P_d = \frac{P_{in}\,G(\theta,\phi)}{4 \pi r^2} \hspace{0.5in} \text{(W/m}^2\text{)}$$*** Begin by getting the library path<jupyter_code>import lib_path<jupyter_output><empty_output><jupyter_text>Set the target minimum and maximum range (m)<jupyter_code>target_min_range = 1e3

target_max_range = 10e3<jupyter_output><empty_output><jupyter_text>Import the `linspace` routine from `scipy` for the target range array<jupyter_code>from numpy import linspace

target_range = linspace(target_min_range, target_max_range, 2000)<jupyter_output><empty_output><jupyter_text>Set the radar antenna gain (dB) and peak power (W)<jupyter_code>antenna_gain = 10.0

peak_power = 50e3<jupyter_output><empty_output><jupyter_text>Set up the keyword args<jupyter_code>kwargs = {'target_range': target_range,

          'peak_power': peak_power,

          'antenna_gain': 10.0 ** (antenna_gain / 10.0)}<jupyter_output><empty_output><jupyter_text>Import the `power_density` routine<jupyter_code>from Libs.radar_range.radar_range import power_density<jupyter_output><empty_output><jupyter_text>Calculate the power density at the target (W/m^2)<jupyter_code>pd = power_density(**kwargs)<jupyter_output><empty_output><jupyter_text>Import the `matplotlib` routines<jupyter_code>from matplotlib import pyplot as plt
# Set the figure size

plt.rcParams["figure.figsize"] = (15, 10)


# Display the results

plt.plot(target_range / 1.0e3, pd)


 # Set the plot title and labels

plt.title('Power Density at the Target', size=14)

plt.xlabel('Target Range (km)', size=12)

plt.ylabel('Power Density (W/m$^2$)', size=12)


 # Set the tick label size

plt.tick_params(labelsize=12)


# Turn on the grid

plt.grid(linestyle=':', linewidth=0.5)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12283384301732926, 'fraction_numerical': 0.026503567787971458, 'mean_word_length': 6.820717131474104, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '359716', 'license': 'Apache-2.0', 'n_tokens_mistral': 758, 'n_tokens_neox': 699, 'n_words': 160, 'path': 'jupyter/Chapter04/power_density.ipynb', 'repo_name': 'mberkanbicer/software', 'size': '1969'}