hypergas.denoise module#
Reduce the radom noise.
- class hypergas.denoise.Denoise(scene, varname, method='calibrated_tv_filter', weight=None, skip_water=True)[source]#
Bases:
objectThe Denoise Class.
Initialize Denoise.
- Parameters:
scn (
Scene) – Satpy Scene which includes a variable to be denoised.varname (str) – The variable to be denoised.
method (str) – The denoising method: “tv_filter” and “calibrated_tv_filter” (default).
weight (int) – The weight for denoise_tv_chambolle. It would be neglected if method is “calibrated_tv_filter”. If the weight is
None(default) andmethodis “tv_filter”, the denoise_tv_chambolle will use the default value (0.1) which is too low for hyperspectral noisy gas field.skip_water (bool) – Whether skip retrieval for water pixels, whose segmentation value is zero if cluster is False. Default: True.
- calibrated_tv_filter(n_weights=50, return_loss=False)[source]#
Apply TV filter with auto calibration.
- Parameters:
- Returns:
denoised_calibrated_tv (
DataArray) – 2D denoised data field using calibrated parameters.weights (
numpy.ndarray, optional) – 1D array of weights tested for calibration. Returned only ifreturn_loss == True.losses_tv (
numpy.ndarray, optional) – 1D array of total variation (TV) filter losses. Returned only ifreturn_loss == True.