find_elevation#
- pycraf.atm.find_elevation(obs_alt, target_alt, arc_length, atm_layers_cache, niter=50, interval=10, stepsize=0.05, seed=None)[source]#
Finds the optimal path elevation angle from an observer to reach target.
Based on
basinhopping
; see their manual for an explanation of the hyper-parameters (niter
,interval
,stepsize
, andseed
).- Parameters:
- obs_alt
Quantity
, scalar Height of observer above sea-level [km]
- obs_alt
Quantity
, scalar Height of target above sea-level [km]
- arc_length
Quantity
, scalar Arc-length (true angular distance) between observer and target [deg]
- atm_layers_cache
dict
Pre-computed physical parameters for each atmopheric layer as returned by the
atm_layers
function.- niter
integer
, optional The number of basin hopping iterations (default: 50)
- interval
integer
, optional Interval for how often to update the stepsize (default: 10)
- stepsize
float
, optional Initial step size for use in the random displacement. (default: 0.05)
- seed
int
ornp.random.RandomState
, optional Seed to use for internal random number generation. (default: None)
- obs_alt
Notes
Because of the approximation of Earth’s atmosphere with layers of discrete refractive indices, caustics are generated (see
pycraf
manual), i.e., there are certains target points that cannot be reached, regardless of the elevation angle at the observer. This in turns means that there is only the possibility of using stochastic optimization algorithms to get an approximate solution to the problem.