xarray.DataArray.kspace.estimate_resolution¶
- DataArray.kspace.estimate_resolution(self, axis, lims=None, from_numpoints=False)[source]¶
Estimate resolution for a given momentum axis.
- Parameters:
axis (
Literal['kx','ky','kz']) – Axis to estimate the resolution for.lims (
tuple[float,float] |None, default:None) – The limits of the axis used whenfrom_numpointsisTrue. If not provided, reasonable limits will be calculated byestimate_bounds(), by defaultNonefrom_numpoints (
bool, default:False) –If
True, estimate the resolution from the number of points in the relevant axis. IfFalse, estimate the resolution based on the data, by defaultFalseChanged in version 3.20.1: When
from_numpoints=True, the estimated step now uses adjacent-point spacing over inclusive bounds:(max - min) / (N - 1). Datasets with fewer than 2 points on the relevant axis returnnp.inf.
- Returns:
float– The estimated resolution.- Raises:
ValueError – If no photon energy axis is found in data for axis
'kz'.- Return type: