mitigation Package¶
outlier_masking Module¶
Created on Jan 22, 2015
author: seehars
sum_threshold Module¶
Created on Jan 21, 2015
author: jakeret
-
seek.mitigation.sum_threshold.binary_mask_dilation(mask, struct_size_0, struct_size_1)[source]¶ Dilates the mask.
Parameters: - mask – original mask
- struct_size_0 – dilation parameter
- struct_size_1 – dilation parameter
Returns: dilated mask
-
seek.mitigation.sum_threshold.get_di_kwrags(struct_size_0=3, struct_size_1=3)[source]¶ Creates a dict with the dilation keywords.
Parameters: - struct_size_0 – struct size in axis=0
- struct_size_1 – struct size in axis=1
Returns: dictionary with the dilation keywords
-
seek.mitigation.sum_threshold.get_rfi_mask(tod, mask=None, chi_1=35000, eta_i=[0.5, 0.55, 0.62, 0.75, 1], normalize_standing_waves=True, suppress_dilation=False, plotting=True, sm_kwargs=None, di_kwargs=None)[source]¶ Computes a mask to cover the RFI in a data set.
Parameters: - data – array containing the signal and RFI
- mask – the initial mask
- chi_1 – First threshold
- eta_i – List of sensitivities
- normalize_standing_waves – whether to normalize standing waves
- suppress_dilation – if true, mask dilation is suppressed
- plotting – True if statistics plot should be displayed
- sm_kwargs – smoothing key words
- di_kwargs – dilation key words
Return mask: the mask covering the identified RFI
-
seek.mitigation.sum_threshold.get_sm_kwargs(kernel_m=40, kernel_n=20, sigma_m=7.5, sigma_n=15)[source]¶ Creates a dict with the smoothing keywords.
Parameters: - kernel_m – kernel window size in axis=1
- kernel_n – kernel window size in axis=0
- sigma_m – kernel sigma in axis=1
- sigma_n – kernel sigma in axis=0
Returns: dictionary with the smoothing keywords
-
seek.mitigation.sum_threshold.get_sumthreshold_kwargs(params)[source]¶ Creates the smoothing and dilation kwargs from a params objects.
Parameters: params – the params object containing the configuration Returns: smoothing and dilation kwargs
sum_threshold_utils Module¶
Created on Dec 21, 2015
author: jakeret
-
seek.mitigation.sum_threshold_utils.get_stats(rfi, rfi_mask)[source]¶ Returns the stats needed to compute a ROC curve.
Parameters: - rfi – array containing the RFI pixels
- rfi_mask – boolean array that masks the RFI
Returns rl, ml, il: count of rfi pixels, count of masked pixels, count of intersecting pixels
-
seek.mitigation.sum_threshold_utils.plot_data(data, ax, title, vmin=None, vmax=None, cb=True, norm=None, extent=None, cmap=None)[source]¶ Plot TOD.
-
seek.mitigation.sum_threshold_utils.plot_dilation(st_mask, mask, dilated_mask)[source]¶ Plot mask and dilation.