Noise estimation¶
The hera_stats.noise
module contains simple empirical noise estimation functions, including a function (estimate_noise_rms
) to estimate the noise rms by differencing data in the time direction and fit a smooth polynomial model that interpolates over flagged channels.
-
hera_stats.noise.
estimate_noise_rms
(uvd, bls, fit_poly=True, order=2)[source]¶ Estimate noise RMS per frequency channel by taking a simple standard deviation of differences along the time axis. The real and imaginary parts are treated independently. A smooth polynomial model fit can be returned if desired.
Parameters: - uvd (UVData) – UVData file containing data to fit.
- bls (list of int/tuple) – List of baselines/baseline keys to calculate the noise rms for.
- fit_poly (bool, optional) – Fit a polynomial to the standard deviations as a function of frequency. Default: True.
- order (int, optional) – If fit_poly is True, order of the polynomial to fit to the standard deviations. Default: 2.
Returns: - noise_rms (array_like, complex) – 1D array of noise RMS (in the same units as the input data) as a function of frequency. Shape is (Nbls, Nfreq).
- rms_model (array_like, complex, optional) – If poly_fit is True, return the smooth polynomial fit to the noise rms. Shape is (Nbls, Nfreq).