lisa_noise.modelled.mask ======================== .. py:module:: lisa_noise.modelled.mask .. autoapi-nested-parse:: Likelihood mask around the nulls of the TDI covariance. At the TDI nulls the model covariance is near-singular, so the bins around them can be left out of the likelihood. The mask is a boolean array over the science band: True = keep, False = leave out. Functions --------- .. autoapisummary:: lisa_noise.modelled.mask.build_likelihood_mask lisa_noise.modelled.mask.apply_mask Module Contents --------------- .. py:function:: build_likelihood_mask(freq, cov, n_buffer=100, min_null_depth=100.0, min_null_depth_cross=10.0) Mask of the bins to keep: all but ``±n_buffer`` around each null. Nulls are found in the three PSDs and the three cross-spectrum amplitudes of ``cov`` separately; a bin near a null of any of them is left out. :param freq: Science-band frequencies in Hz. :type freq: (Nf,) array :param cov: XYZ covariance. :type cov: (Nf, 3, 3) complex array :param n_buffer: Bins left out either side of each null. :type n_buffer: int :param min_null_depth: Depth of a PSD null: the factor it drops below its surroundings. :type min_null_depth: float :param min_null_depth_cross: The same for the cross-spectra. :type min_null_depth_cross: float :returns: **mask** :rtype: (Nf,) bool array .. py:function:: apply_mask(data, mask) Apply a boolean mask to a dictionary of data arrays. :param data: Data arrays to be masked (e.g. FFTs of TDI channels). :type data: dict of (N_freq,) arrays :param mask: Mask to apply, where ``True`` means "keep this bin". :type mask: (N_freq,) bool array :returns: **masked_data** :rtype: dict of (M_freq,) arrays