utils Package¶
utils Package¶
-
seek.utils.format_date(date, fmt='%Y-%m-%d')[source]¶ Format datetime object into specific format string.
Parameters: - date – datetime object
- fmt – format definition
Returns: formatted string
filter Module¶
Created on Jan 23, 2015
author: jakeret
-
seek.utils.filter.gaussian_filter(V, mask, M=40, N=20, sigma_m=0.5, sigma_n=0.5)[source]¶ Applies a gaussian filter (smoothing) to the given array taking into account masked values :param V: the value array to be smoothed :param mask: boolean array defining masked values :param M: kernel window size in axis=1 :param N: kernel window size in axis=0 :param sigma_m: kernel sigma in axis=1 :param sigma_n: kernel sigma in axis=0
Returns vs: the filtered array
plotting Module¶
sphere Module¶
Created on Dec 22, 2014
author: jakeret
tod_utils Module¶
Created on Aug 18, 2015
author: jakeret
-
seek.utils.tod_utils.smooth(tod, factor, axis=1)[source]¶ Smoothes a tod by the given factor. E.g. (axis=1):
[[1,1,2,2,3,3], -- factor 2 --> [[1,2,3], [4,4,5,5,6,6]] [4,5,6]]
Parameters: - tod – the data to be smoothed
- factor – the factor to use for the integration
-
seek.utils.tod_utils.spectral_kurtosis_mask(p_phase0, p_phase1, p2_phase0, p2_phase1, M, offset)[source]¶ Creates a mask using the spectral kurtosis for the given arrays
Parameters: - p_phase0 – array of P values for phase0
- p_phase1 – array of P values for phase1
- p2_phase0 – array of P^2 values for phase0
- p2_phase1 – array of P^2 values for phase1
- M – number of accumulations
- offset – P_select 0
Returns mask: boolean array containing the mask