atten_path_fast#
- pycraf.pathprof.atten_path_fast(freq, temperature, pressure, h_tg, h_rg, timepercent, hprof_data, polarization=0, version=16, base_water_density=<Quantity 7.5 g / m3>)[source]#
Calculate attenuation along a path using a parallelized method.
- Parameters:
- freq
Quantity
Frequency of radiation [GHz]
- temperature
Quantity
Temperature (K)
- pressure
Quantity
Pressure (hPa)
- h_tg, h_rg
Quantity
Transmitter/receiver heights over ground [m]
- timepercent
Quantity
Time percentage [%] (maximal 50%)
- hprof_data
dict
, dict-like Dictionary with height profile auxillary data as calculated with
height_path_data
orheight_path_data_generic
.- polarization
int
, optional Polarization (default: 0) Allowed values are: 0 - horizontal, 1 - vertical
- version
int
, optional ITU-R Rec. P.452 version. Allowed values are: 14, 16
- base_water_density
Quantity
, optional For atmospheric attenuation, the water vapor content plays a role. In Rec. ITU-R P.452, Eq. (9a), the water content is variable (depending on the fraction of the path over the water). However, the base level is set to \(7.5~\mathrm{g}/\mathrm{m}^3\). For extraordinarily dry places, which are often used for radio astronomy, this value can be too high. (Default: 7.5 g / m^3)
- freq
- Returns:
- results
dict
Results of the path attenuation calculation. Each entry in the dictionary is a 1D
ndarray
containing the associated value for the path. The following entries are contained:L_b0p
- Free-space loss including focussing effects(for p% of time) [dB]
L_bd
- Basic transmission loss associated with diffractionnot exceeded for p% time [dB]; L_bd = L_b0p + L_dp
L_bs
- Tropospheric scatter loss [dB]L_ba
- Ducting/layer reflection loss [dB]L_b
- Complete path propagation loss [dB]L_b_corr
- As L_b but with clutter correction [dB]eps_pt
- Elevation angle of paths w.r.t. Tx [deg]eps_pr
- Elevation angle of paths w.r.t. Rx [deg]d_lt
- Distance to horizon w.r.t. Tx [km]d_lr
- Distance to horizon w.r.t. Rx [km]path_type
- Path type (0 - LoS, 1 - Trans-horizon)
- results
Notes
The diffraction-loss algorithm was changed between ITU-R P.452 version 14 and 15. The former used a Deygout method, the new one is based on a Bullington calculation with correction terms.
In future versions, more entries may be added to the results dictionary.
Examples
A typical usage would be:
import numpy as np import matplotlib.pyplot as plt from astropy import units as u from pycraf import pathprof lon_t, lat_t = 6.8836 * u.deg, 50.525 * u.deg lon_r, lat_r = 7.3334 * u.deg, 50.635 * u.deg hprof_step = 100 * u.m hprof_data = pathprof.height_path_data( lon_t, lat_t, lon_r, lat_r, hprof_step, zone_t=pathprof.CLUTTER.URBAN, zone_r=pathprof.CLUTTER.SUBURBAN, ) plt.plot(hprof_data['distances'], hprof_data['heights'], 'k-') plt.grid() plt.show() freq = 1. * u.GHz temperature = 290. * u.K pressure = 1013. * u.hPa h_tg, h_rg = 5. * u.m, 50. * u.m time_percent = 2. * u.percent results = pathprof.atten_path_fast( freq, temperature, pressure, h_tg, h_rg, time_percent, hprof_data, ) for k in ['L_bfsg', 'L_bd', 'L_bs', 'L_ba', 'L_b', 'L_b_corr']: plt.plot(hprof_data['distances'], results[k], '-') plt.ylim((50, 275)) plt.grid() plt.legend( ['LOS', 'Diffraction', 'Troposcatter', 'Ducting', 'Total', 'Total w. clutter' ], fontsize=10, loc='lower right') plt.show() plt.plot(hprof_data['distances'], eps_pt_path, 'b-') plt.plot(hprof_data['distances'], eps_pr_path, 'r-') plt.grid() plt.show()