hypergas.a_priori_mask module

Create a priori plume mask for hyperspectral satellite data.

class hypergas.a_priori_mask.Mask(scn, varname, n_min_threshold=5, sigma_threshold=1)[source]

Bases: object

Create a priori plume mask from trace gas enhancement field.

Initialize Mask.

Parameters:
  • scn (Scene) – Satpy Scene including one variable named segmentation, which is generated by hypergas.landmask.Land_mask. segmentation is a DataArray: 0 = ocean, >0 = land.

  • varname (str) – The variable used to create plume mask (recommend: <gas>_comb_denoise, which is the denoised data).

  • n_min_threshold (int) – The minimum number of pixels per threshold for detecting features. Default is 5.

  • sigma_threshold (int) – Gaussian filter sigma for smoothing field. Default is 1. Because the <gas>_comb_denoise field is already smoothed, 1 should be high enough.

get_feature_mask()[source]

Calculate max features and apply segmentation by tobac.

Returns:

  • thresholds (list) – Thresholds for creating feature and mask.

  • features (DataFrame) – Detected features.

  • masks (DataArray) – Segmentations based on features.