fun_K03_peak_wavevector.py
输入似然应有限且包含可定位的峰。非有限或完全平坦的数组抛 ValueError;相等最大值按数组顺序取第一个。
直接用途
定位对数似然网格的极大点。
参数表
参数 |
方向 |
shape / 范围 |
含义 |
单位 / 归一化 |
索引 / 轴约定 |
|---|---|---|---|---|---|
|
|
|
来自 |
无量纲 |
输出按 |
|
|
|
波数网格。 |
rad/m |
对应输出的轴 1。 |
|
|
|
波数网格。 |
rad/m |
对应输出的轴 0。 |
返回值
dict,含 kx、ky、k_magnitude、angle_deg 和 peak_log_likelihood。
局部假设 / 前置条件
估计值被限制在网格上,精度与网格分辨率及混叠分支选择有关。
实现逻辑
argmax后unravel_index,同时给出直角坐标与极坐标形式。
调用注意
峰位落在边界时,可扩大范围并比较结果;
angle_deg由arctan2给出。
The input likelihood must be finite and have a locatable peak. Nonfinite or flat arrays raise ValueError; exact ties select the first point in array order.
Direct Purpose
Locate the maximum of a log-likelihood grid.
Parameter Table
Parameter |
Direction |
Shape / range |
Meaning |
Units / normalisation |
Indexing / axis convention |
|---|---|---|---|---|---|
|
|
|
Likelihood from |
Dimensionless |
The output is indexed |
|
|
|
Wavenumber grid. |
rad/m |
Maps to axis 1 of the output. |
|
|
|
Wavenumber grid. |
rad/m |
Maps to axis 0 of the output. |
Return Value
dict with kx, ky, k_magnitude, angle_deg and peak_log_likelihood.
Local Assumptions and Preconditions
The estimate is confined to the grid, so the accuracy depends on grid resolution and alias selection.
Implementation Notes
argmaxfollowed byunravel_index, reported in both Cartesian and polar form.
Calling Notes
For a boundary peak, expand the range and compare the resulting estimates.
angle_degcomes fromarctan2.