raytrace_path#
- pycraf.atm.raytrace_path(elevation, obs_alt, atm_layers_cache, max_arc_length=<Quantity 180. deg>, max_path_length=<Quantity 1000. km>)[source]#
Calculate the propagation path geometry through atmosphere by ray-tracing.
For several tasks related to the
atm
sub-package, it is necessary to determine the exact path geometry of a propagating ray through Earth’s atmosphere. One example would be the application of theatten_slant_annex1
function to calculate the total attenuation along a (slant) path, where the length of a ray within each of the discrete layers of an atmospheric model must be multiplied with the specific attenuation of the layers.- Parameters:
- elevation
Quantity
, scalar (Apparent) elevation of source/target as seen from observer [deg]
- obs_alt
Quantity
, scalar Height of observer above sea-level [km]
- atm_layers_cache
dict
Pre-computed physical parameters for each atmopheric layer as returned by the
atm_layers
function.- max_path_length
Quantity
, scalar Maximal length of path before stopping the ray-tracing [km]
(default: 1000 km; useful for terrestrial paths)
- max_arc_length
Quantity
, scalar Maximal arc-length (true angular distance between observer and source/ target) of path before stopping ray-tracing [deg]
(default: 180 deg; useful for terrestrial paths)
- elevation
- Returns:
- path_params
recarray
Geometric parameters of each piece of the paths (i.e., per layer) as determined by the ray-tracing algorithm. It has the following fields:
a_n : float
Length of path through the layer during iteration
n
. [km]r_n : float
Distance to Earth’s center after iteration
n
. [km]h_n : float
Height above Earth’s surface after iteration
n
. [km]x_n/y_n : float
Cartesian coordinates of path after iteration
n
. [km]The reference is Earth’s center. Starting point is
(0, r_E + obs_alt)
.alpha_n : float
Exit angle of path after going through the layer (relative to surface normal vector) after iteration
n
. [km]beta_n : float
Entry angle of path into the layer (relative to surface normal vector) at beginning of iteration
n
. [km]delta_n : float
Angular distance of path position after iteration
n
w.r.t. starting point. [deg]The polar coordinates
(r_n, delta_n)
are directly associated with the cartesian coordinates(x_n, y_n)
.layer_idx : int
Index of the layer, through which the path went during each step. This could be used to query the physical parameters from the atm layers cache (see
atm_layers
).layer_edge_left_idx : int
Index of the layer edge to the left (associated with the entry point) of current step.
layer_edge_right_idx : int
Index of the layer edge to the right (associated with the exit point) of current step.
- refraction
Quantity
, scalar Refraction angle (i.e., the total “bending” angle of the ray) [deg]
- is_space_pathbool
Whether the paths ends outside of Earth’s atmosphere (in terms of the atmospheric profile function used).
- path_params
Notes
Terrain heights are neglected by the
atm
sub-package. All heights are w.r.t. the flat (spherical) Earth (with a radius of 6371 km).The first row in the
path_params
array is the starting point of the path and has valid entries only for ther_n
,h_n
, andx_n
/y_n
parameters. There aren+1
layer edges andn
layers. The edge indices start from zero, while the layer indices start from one.