def _bss_image_crit(s_true, e_spat, e_interf, e_artif):
    """Measurement of the separation quality for a given image in terms of
    filtered true source, spatial error, interference and artifacts.
    """
    # energy ratios
    sdr = _safe_db(np.sum(s_true**2), np.sum((e_spat+e_interf+e_artif)**2))
    isr = _safe_db(np.sum(s_true**2), np.sum(e_spat**2))
    sir = _safe_db(np.sum((s_true+e_spat)**2), np.sum(e_interf**2))
    sar = _safe_db(np.sum((s_true+e_spat+e_interf)**2), np.sum(e_artif**2))
    return (sdr, isr, sir, sar)
def _bss_image_crit ( s_true , e_spat , e_interf , e_artif ) : sdr = _safe_db ( np . sum ( s_true ** 2 ) , np . sum ( ( e_spat + e_interf + e_artif ) ** 2 ) ) isr = _safe_db ( np . sum ( s_true ** 2 ) , np . sum ( e_spat ** 2 ) ) sir = _safe_db ( np . sum ( ( s_true + e_spat ) ** 2 ) , np . sum ( e_interf ** 2 ) ) sar = _safe_db ( np . sum ( ( s_true + e_spat + e_interf ) ** 2 ) , np . sum ( e_artif ** 2 ) ) return ( sdr , isr , sir , sar )
Measurement of the separation quality for a given image in terms of
    filtered true source, spatial error, interference and artifacts.