o
    si	                     @   s(  d Z ddlZddlZddlmZ ddlmZ ddl	Z	ddl
Z
ddlZddlmZ dZdd	 Zd
d Zejdddd+ddZejddd			d,ddZejdddd+ddZejddd			d,ddZdd Z	d-ddZdd  Zd.d!d"Zd#d$ Zd%d& Zd'd( Zejdddd)d* ZdS )/u  
.. warning::
    The mir_eval.separation module is deprecated in mir_eval version 0.8, and will be removed.
    We recommend that you migrate your code to use an alternative package such as sigsep-museval
    https://sigsep.github.io/sigsep-mus-eval/


Source separation algorithms attempt to extract recordings of individual
sources from a recording of a mixture of sources.  Evaluation methods for
source separation compare the extracted sources from reference sources and
attempt to measure the perceptual quality of the separation.

See also the bss_eval MATLAB toolbox:
    http://bass-db.gforge.inria.fr/bss_eval/

Conventions
-----------

An audio signal is expected to be in the format of a 1-dimensional array where
the entries are the samples of the audio signal.  When providing a group of
estimated or reference sources, they should be provided in a 2-dimensional
array, where the first dimension corresponds to the source number and the
second corresponds to the samples.

Metrics
-------

* :func:`mir_eval.separation.bss_eval_sources`: Computes the bss_eval_sources
  metrics from bss_eval, which optionally optimally match the estimated sources
  to the reference sources and measure the distortion and artifacts present in
  the estimated sources as well as the interference between them.

* :func:`mir_eval.separation.bss_eval_sources_framewise`: Computes the
  bss_eval_sources metrics on a frame-by-frame basis.

* :func:`mir_eval.separation.bss_eval_images`: Computes the bss_eval_images
  metrics from bss_eval, which includes the metrics in
  :func:`mir_eval.separation.bss_eval_sources` plus the image to spatial
  distortion ratio.

* :func:`mir_eval.separation.bss_eval_images_framewise`: Computes the
  bss_eval_images metrics on a frame-by-frame basis.

References
----------
  .. [#vincent2006performance] Emmanuel Vincent, Rémi Gribonval, and Cédric
      Févotte, "Performance measurement in blind audio source separation," IEEE
      Trans. on Audio, Speech and Language Processing, 14(4):1462-1469, 2006.


    N)toeplitz)fftconvolve   )utild   c                 C   s   | j |j krtd| j |j | jdks|jdkr$td| j|j| jdkr/td nt| r7td|jdkrBtd nt|rJtd|j d tksX| j d tkrgtd	| j d |j d td
S )a@  Check that the input data to a metric are valid, and throws helpful
    errors if not.

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing true sources
    estimated_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing estimated sources

    z}The shape of estimated sources and the true sources should match.  reference_sources.shape = {}, estimated_sources.shape = {}   ztThe number of dimensions is too high (must be less than 3). reference_sources.ndim = {}, estimated_sources.ndim = {}r   zureference_sources is empty, should be of size (nsrc, nsample).  sdr, sir, sar, and perm will all be empty np.ndarrayszAll the reference sources should be non-silent (not all-zeros), but at least one of the reference sources is all 0s, which introduces ambiguity to the evaluation. (Otherwise we can add infinitely many all-zero sources.)zuestimated_sources is empty, should be of size (nsrc, nsample).  sdr, sir, sar, and perm will all be empty np.ndarrayszAll the estimated sources should be non-silent (not all-zeros), but at least one of the estimated sources is all 0s. Since we require each reference source to be non-silent, having a silent estimated source will result in an underdetermined system.a  The supplied matrices should be of shape (nsrc, nsampl) but reference_sources.shape[0] = {} and estimated_sources.shape[0] = {} which is greater than mir_eval.separation.MAX_SOURCES = {}.  To override this check, set mir_eval.separation.MAX_SOURCES to a larger value.N)	shape
ValueErrorformatndimsizewarningswarn_any_source_silentMAX_SOURCES)reference_sourcesestimated_sources r   G/home/ubuntu/.local/lib/python3.10/site-packages/mir_eval/separation.pyvalidateC   sF   

	r   c              	   C   s.   t t jt j| ttd| jddkddS )zDReturn true if the parameter sources has any silent first dimensions   )axisr   r   )npanyallsumtupleranger   )sourcesr   r   r   r      s   &r   z0.8z0.9)versionversion_removedTc                 C   s  |j dkr|tjddf }| j dkr| tjddf } t| | | jdks+|jdkr=tg tg tg tg fS |jd }|rt||f}t||f}t||f}t|D ],}t|D ]%}t	| || |d\}	}
}}t
|	|
||\|||f< |||f< |||f< qcq]tttt|}tt|}t|}t|D ]\}}t|||f ||< q|t| }||f}|| || || t|fS t|}t|}t|}t|D ]}t	| || |d\}	}
}}t
|	|
||\||< ||< ||< qt|}||||fS )a:	  
    Ordering and measurement of the separation quality for estimated source
    signals in terms of filtered true source, interference and artifacts.

    The decomposition allows a time-invariant filter distortion of length
    512, as described in Section III.B of [#vincent2006performance]_.

    Passing ``False`` for ``compute_permutation`` will improve the computation
    performance of the evaluation; however, it is not always appropriate and
    is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_sources.

    Examples
    --------
    >>> # reference_sources[n] should be an ndarray of samples of the
    >>> # n'th reference source
    >>> # estimated_sources[n] should be the same for the n'th estimated
    >>> # source
    >>> (sdr, sir, sar,
    ...  perm) = mir_eval.separation.bss_eval_sources(reference_sources,
    ...                                               estimated_sources)

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing true sources (must have same shape as
        estimated_sources)
    estimated_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing estimated sources (must have same shape as
        reference_sources)
    compute_permutation : bool, optional
        compute permutation of estimate/source combinations (True by default)

    Returns
    -------
    sdr : np.ndarray, shape=(nsrc,)
        vector of Signal to Distortion Ratios (SDR)
    sir : np.ndarray, shape=(nsrc,)
        vector of Source to Interference Ratios (SIR)
    sar : np.ndarray, shape=(nsrc,)
        vector of Sources to Artifacts Ratios (SAR)
    perm : np.ndarray, shape=(nsrc,)
        vector containing the best ordering of estimated sources in
        the mean SIR sense (estimated source number ``perm[j]`` corresponds to
        true source number ``j``). Note: ``perm`` will be ``[0, 1, ...,
        nsrc-1]`` if ``compute_permutation`` is ``False``.

    References
    ----------
    .. [#] Emmanuel Vincent, Shoko Araki, Fabian J. Theis, Guido Nolte, Pau
        Bofill, Hiroshi Sawada, Alexey Ozerov, B. Vikrham Gowreesunker, Dominik
        Lutter and Ngoc Q.K. Duong, "The Signal Separation Evaluation Campaign
        (2007-2010): Achievements and remaining challenges", Signal Processing,
        92, pp. 1928-1936, 2012.

    r   Nr      )r   r   newaxisr   r   arrayr   emptyr   _bss_decomp_mtifilt_bss_source_critlist	itertoolspermutationslenarange	enumeratemeanargmaxasarray)r   r   compute_permutationnsrcsdrsirsarjestjtrues_truee_spate_interfe_artifpermsmean_sirdumipermpoptidxjr   r   r   bss_eval_sources   sN   
:

$
$	



"
rC   / 
 Fc                 C   s  |j dkr|tjddf }| j dkr| tjddf } t| | | jdks+|jdkr=tg tg tg tg fS | jd }tt| jd | | | }|dk rct	| ||}dd |D S t
||f}t
||f}	t
||f}
t
||f}t|D ]i}t|| || | }| dd|f }|dd|f }t|st|st	|||\|dd|f< |	dd|f< |
dd|f< |dd|f< qtj |dd|f<  |	dd|f<  |
dd|f< |dd|f< q||	|
|fS )a
  Framewise computation of bss_eval_sources

    Please be aware that this function does not compute permutations (by
    default) on the possible relations between reference_sources and
    estimated_sources due to the dangers of a changing permutation. Therefore
    (by default), it assumes that ``reference_sources[i]`` corresponds to
    ``estimated_sources[i]``. To enable computing permutations please set
    ``compute_permutation`` to be ``True`` and check that the returned ``perm``
    is identical for all windows.

    NOTE: if ``reference_sources`` and ``estimated_sources`` would be evaluated
    using only a single window or are shorter than the window length, the
    result of :func:`mir_eval.separation.bss_eval_sources` called on
    ``reference_sources`` and ``estimated_sources`` (with the
    ``compute_permutation`` parameter passed to
    :func:`mir_eval.separation.bss_eval_sources`) is returned.

    Examples
    --------
    >>> # reference_sources[n] should be an ndarray of samples of the
    >>> # n'th reference source
    >>> # estimated_sources[n] should be the same for the n'th estimated
    >>> # source
    >>> (sdr, sir, sar,
    ...  perm) = mir_eval.separation.bss_eval_sources_framewise(
             reference_sources,
    ...      estimated_sources)

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing true sources (must have the same shape as
        ``estimated_sources``)
    estimated_sources : np.ndarray, shape=(nsrc, nsampl)
        matrix containing estimated sources (must have the same shape as
        ``reference_sources``)
    window : int, optional
        Window length for framewise evaluation (default value is 30s at a
        sample rate of 44.1kHz)
    hop : int, optional
        Hop size for framewise evaluation (default value is 15s at a
        sample rate of 44.1kHz)
    compute_permutation : bool, optional
        compute permutation of estimate/source combinations for all windows
        (False by default)

    Returns
    -------
    sdr : np.ndarray, shape=(nsrc, nframes)
        vector of Signal to Distortion Ratios (SDR)
    sir : np.ndarray, shape=(nsrc, nframes)
        vector of Source to Interference Ratios (SIR)
    sar : np.ndarray, shape=(nsrc, nframes)
        vector of Sources to Artifacts Ratios (SAR)
    perm : np.ndarray, shape=(nsrc, nframes)
        vector containing the best ordering of estimated sources in
        the mean SIR sense (estimated source number ``perm[j]`` corresponds to
        true source number ``j``).  Note: ``perm`` will be ``range(nsrc)`` for
        all windows if ``compute_permutation`` is ``False``
    r   Nr   r   c                 S      g | ]}t |d qS r   expand_dims.0scorer   r   r   
<listcomp>[      z.bss_eval_sources_framewise.<locals>.<listcomp>)r   r   r"   r   r   r#   r   intfloorrC   r$   r   slicer   nan)r   r   windowhopr0   r1   nwinresultr2   r3   r4   r?   k	win_slice	ref_slice	est_slicer   r   r   bss_eval_sources_framewise  s8   
E

$
 >Dr\   c              	   C   s  t |}t | } t| | | jdks|jdkr/t g t g t g t g t g fS |jd }|jd }|jd }|rt ||f}t ||f}t ||f}t ||f}	t|D ]9}
t|D ]2}t| t j	||
 ||fdd|d\}}}}t
||||\||
|f< ||
|f< ||
|f< |	|
|f< qfq`tttt|}t t|}t |}t|D ]\}}t |||f ||< q|t | }||f}|| || || |	| t |fS t |}t |}t |}t |}	dg| }t d}t|D ]5}t| t j	|| ||fdd|d|| |\}}}}}}|||< t
||||\||< ||< ||< |	|< qt |}||||	|fS )a	  Compute the bss_eval_images function from the
    BSS_EVAL Matlab toolbox.

    Ordering and measurement of the separation quality for estimated source
    signals in terms of filtered true source, interference and artifacts.
    This method also provides the ISR measure.

    The decomposition allows a time-invariant filter distortion of length
    512, as described in Section III.B of [#vincent2006performance]_.

    Passing ``False`` for ``compute_permutation`` will improve the computation
    performance of the evaluation; however, it is not always appropriate and
    is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_images.

    Examples
    --------
    >>> # reference_sources[n] should be an ndarray of samples of the
    >>> # n'th reference source
    >>> # estimated_sources[n] should be the same for the n'th estimated
    >>> # source
    >>> (sdr, isr, sir, sar,
    ...  perm) = mir_eval.separation.bss_eval_images(reference_sources,
    ...                                               estimated_sources)

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl, nchan)
        matrix containing true sources
    estimated_sources : np.ndarray, shape=(nsrc, nsampl, nchan)
        matrix containing estimated sources
    compute_permutation : bool, optional
        compute permutation of estimate/source combinations (True by default)

    Returns
    -------
    sdr : np.ndarray, shape=(nsrc,)
        vector of Signal to Distortion Ratios (SDR)
    isr : np.ndarray, shape=(nsrc,)
        vector of source Image to Spatial distortion Ratios (ISR)
    sir : np.ndarray, shape=(nsrc,)
        vector of Source to Interference Ratios (SIR)
    sar : np.ndarray, shape=(nsrc,)
        vector of Sources to Artifacts Ratios (SAR)
    perm : np.ndarray, shape=(nsrc,)
        vector containing the best ordering of estimated sources in
        the mean SIR sense (estimated source number ``perm[j]`` corresponds to
        true source number ``j``).  Note: ``perm`` will be ``(1,2,...,nsrc)``
        if ``compute_permutation`` is ``False``.

    References
    ----------
    .. [#] Emmanuel Vincent, Shoko Araki, Fabian J. Theis, Guido Nolte, Pau
        Bofill, Hiroshi Sawada, Alexey Ozerov, B. Vikrham Gowreesunker, Dominik
        Lutter and Ngoc Q.K. Duong, "The Signal Separation Evaluation Campaign
        (2007-2010): Achievements and remaining challenges", Signal Processing,
        92, pp. 1928-1936, 2012.
    r   r   r   Forderr!   )r   
atleast_3dr   r   r#   r   r$   r   _bss_decomp_mtifilt_imagesreshape_bss_image_critr'   r(   r)   r*   r+   r,   r-   r.   r/   zeros)r   r   r0   r1   nsamplnchanr2   isrr3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   GjGrB   Gj_tempr   r   r   bss_eval_imagest  sr   
=

,






$





 
rk   c              	   C   s  t |}t | } t| | | jdks|jdkr+t g t g t g t g fS | jd }tt | jd | | | }|dk rQt| ||}dd |D S t 	||f}t 	||f}	t 	||f}
t 	||f}t 	||f}t
|D ]v}t|| || | }| dd|ddf }|dd|ddf }t|st|st|||\|dd|f< |	dd|f< |
dd|f< |dd|f< |dd|f< qxt j |dd|f<  |
dd|f<  |dd|f< |dd|f< qx||	|
||fS )aa
  Framewise computation of bss_eval_images

    Please be aware that this function does not compute permutations (by
    default) on the possible relations between ``reference_sources`` and
    ``estimated_sources`` due to the dangers of a changing permutation.
    Therefore (by default), it assumes that ``reference_sources[i]``
    corresponds to ``estimated_sources[i]``. To enable computing permutations
    please set ``compute_permutation`` to be ``True`` and check that the
    returned ``perm`` is identical for all windows.

    NOTE: if ``reference_sources`` and ``estimated_sources`` would be evaluated
    using only a single window or are shorter than the window length, the
    result of ``bss_eval_images`` called on ``reference_sources`` and
    ``estimated_sources`` (with the ``compute_permutation`` parameter passed to
    ``bss_eval_images``) is returned

    Examples
    --------
    >>> # reference_sources[n] should be an ndarray of samples of the
    >>> # n'th reference source
    >>> # estimated_sources[n] should be the same for the n'th estimated
    >>> # source
    >>> (sdr, isr, sir, sar,
    ...  perm) = mir_eval.separation.bss_eval_images_framewise(
             reference_sources,
    ...      estimated_sources,
             window,
    ....     hop)

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl, nchan)
        matrix containing true sources (must have the same shape as
        ``estimated_sources``)
    estimated_sources : np.ndarray, shape=(nsrc, nsampl, nchan)
        matrix containing estimated sources (must have the same shape as
        ``reference_sources``)
    window : int
        Window length for framewise evaluation
    hop : int
        Hop size for framewise evaluation
    compute_permutation : bool, optional
        compute permutation of estimate/source combinations for all windows
        (False by default)

    Returns
    -------
    sdr : np.ndarray, shape=(nsrc, nframes)
        vector of Signal to Distortion Ratios (SDR)
    isr : np.ndarray, shape=(nsrc, nframes)
        vector of source Image to Spatial distortion Ratios (ISR)
    sir : np.ndarray, shape=(nsrc, nframes)
        vector of Source to Interference Ratios (SIR)
    sar : np.ndarray, shape=(nsrc, nframes)
        vector of Sources to Artifacts Ratios (SAR)
    perm : np.ndarray, shape=(nsrc, nframes)
        vector containing the best ordering of estimated sources in
        the mean SIR sense (estimated source number perm[j] corresponds to
        true source number j)
        Note: perm will be range(nsrc) for all windows if compute_permutation
        is False
    r   r   r   c                 S   rF   rG   rI   rK   r   r   r   rN   T  rO   z-bss_eval_images_framewise.<locals>.<listcomp>N)r   r`   r   r   r#   r   rP   rQ   rk   r$   r   rR   r   rS   )r   r   rT   rU   r0   r1   rV   rW   r2   rg   r3   r4   r?   rX   rY   rZ   r[   r   r   r   bss_eval_images_framewise  s6   
H

$
 LDrl   c           	      C   s   |j }t| | t|d f}t| |tjddf ||| }t| ||| | }| | | }|d|  |7  < ||||fS )a  Decomposition of an estimated source image into four components
    representing respectively the true source image, spatial (or filtering)
    distortion, interference and artifacts, derived from the true source
    images using multichannel time-invariant filters.
    r   N)r   r   hstackrd   _projectr"   )	r   estimated_sourcerB   flenre   r7   r8   r9   r:   r   r   r   r%   n  s   r%   c                 C   s*  t |d }t |d }|duo|du}t t j| | ||fdd t ||d ff}	|rDt| |t jddf |||\}
}nt| |t jddf ||}
|
|	 }
|rbt| |||\}}nt| ||}||	 |
 }|	 |
 | }|ddd|f  | 7  < |r|	|
||||fS |	|
||fS )ax  Decomposition of an estimated source image into four components
    representing respectively the true source image, spatial (or filtering)
    distortion, interference and artifacts, derived from the true source
    images using multichannel time-invariant filters.
    Adapted version to work with multichannel sources.
    Improved performance can be gained by passing Gj and G parameters initially
    as all zeros. These parameters store the results from the computation of
    the G matrix in _project_images and then return them for subsequent calls
    to this function. This only works when not computing permutations.
    r   r   Nr]   r^   )r   r   rm   rb   	transposerd   _project_imagesr"   )r   ro   rB   rp   rh   ri   re   rf   savegr7   r8   r9   r:   r   r   r   ra     s2   
 ra   c              
   C   s  | j d }| j d }t| t||d ff} t|t|d f}tdtt|| d  }tjj	| |dd}tjj	||d}t|| || f}t
|D ]a}	t
|D ]Z}
||	 t||
  }ttj|}tt|d |d| d f|d| d	}|||	| |	d | |
| |
d | f< |j||
| |
d | |	| |	d | f< qZqTt|| }t
|D ]-}	||	 t| }ttj|}t|d |d| d f||	| |	d | < qztj||j||d
d}W n tjjjy   tj||d j||d
d}Y nw t|| d }t
|D ]}	|t|dd|	f | |	 d|| d  7 }q(|S )zLeast-squares projection of estimated source on the subspace spanned by
    delayed versions of reference sources, with delays between 0 and flen-1
    r   r   r         ?nr   rv   rH   Nrr]   r^   )r   r   rm   rd   rP   ceillog2scipyfftpackfftr   conjrealifftr   Tlinalgsolverb   LinAlgErrorlstsqr   )r   ro   rp   r1   re   n_fftsfsefri   r>   rB   ssfssDssefCsprojr   r   r   rn     s<   

 .,04"2rn   c              
   C   sP  | j d }| j d }| j d }tjt| d|| |fdd} t| t|| |d ff} t| t||d ff}tdtt|| d  }t	j
j| |dd}t	j
j||d	}	|d
u rd}
t|| | || | f}t|| D ]c}t|d D ]Z}|| t||  }tt	j
|}tt|d |d| d f|d
| d}|||| |d | || |d | f< |j||| |d | || |d | f< qq{nd}
t|dkrdt|| | || | f}t|| D ]d}t|d D ][}|| t||  }tt	j
|}tt|d |d| d f|d
| d}|||| |d | || |d | f< |j||| |d | || |d | f< qqt|| | |f}t|| D ]<}t|D ]4}|| t|	|  }tt	j
|}t|d |d| d f ||| |d | |f< q{quztj||j||| |dd}W n tjjjy   tj||d j||| |dd}Y nw t||| d f}t|| D ])}t|D ]!}||  t|d
d
||f  | | d
|| d  7  < qq|
r&||fS |S )aY  Least-squares projection of estimated source on the subspace spanned by
    delayed versions of reference sources, with delays between 0 and flen-1.
    Passing G as all zeros will populate the G matrix and return it so it can
    be passed into the next call to avoid recomputing G (this will only works
    if not computing permutations).
    r   r   r   )r   r   r   r]   r^   rt   ru   rw   NFrH   rx   T)r   r   rb   rq   rm   rd   rP   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   )r   ro   rp   ri   r1   re   rf   r   r   r   rs   r>   rB   r   r   r   rX   r   r   r   r   r   r   rr     s   


 .,0.,2		$(&rr   c                 C   st   | | }t t|d t|| d }t t|d t|d }t t|| d t|d }|||fS )zMeasurement of the separation quality for a given source in terms of
    filtered true source, interference and artifacts.
    r   _safe_dbr   r   )r7   r8   r9   r:   s_filtr2   r3   r4   r   r   r   r&   3  s
   ""
r&   c                 C   s   t t| d t|| | d }t t| d t|d }t t| | d t|d }t t| | | d t|d }||||fS )zMeasurement of the separation quality for a given image in terms of
    filtered true source, spatial error, interference and artifacts.
    r   r   )r7   r8   r9   r:   r2   rg   r3   r4   r   r   r   rc   ?  s
   &"&rc   c                 C   s    |dkrt jS dt | |  S )zProperly handle the potential +Inf db SIR, instead of raising a
    RuntimeWarning. Only denominator is checked because the numerator can never
    be 0.
    r   
   )r   inflog10)numdenr   r   r   r   K  s   r   c           	      K   st  t  }tjt| |fi |\}}}}}| |d< | |d< | |d< | |d< | |d< tjt| |fi |\}}}}}| |d< | |d< | |d< | |d	< | |d
< | jdk r|jdk rtjt| |fi |\}}}}| |d< | |d< | |d< | |d< tjt	| |fi |\}}}}| |d< | |d< | |d< | |d< |S )a  Compute all metrics for the given reference and estimated signals.

    NOTE: This will always compute :func:`mir_eval.separation.bss_eval_images`
    for any valid input and will additionally compute
    :func:`mir_eval.separation.bss_eval_sources` for valid input with fewer
    than 3 dimensions.

    Examples
    --------
    >>> # reference_sources[n] should be an ndarray of samples of the
    >>> # n'th reference source
    >>> # estimated_sources[n] should be the same for the n'th estimated source
    >>> scores = mir_eval.separation.evaluate(reference_sources,
    ...                                       estimated_sources)

    Parameters
    ----------
    reference_sources : np.ndarray, shape=(nsrc, nsampl[, nchan])
        matrix containing true sources
    estimated_sources : np.ndarray, shape=(nsrc, nsampl[, nchan])
        matrix containing estimated sources
    **kwargs
        Additional keyword arguments which will be passed to the
        appropriate metric or preprocessing functions.

    Returns
    -------
    scores : dict
        Dictionary of scores, where the key is the metric name (str) and
        the value is the (float) score achieved.

    zImages - Source to DistortionzImages - Image to SpatialzImages - Source to InterferencezImages - Source to ArtifactzImages - Source permutationz$Images Frames - Source to Distortionz Images Frames - Image to Spatialz&Images Frames - Source to Interferencez"Images Frames - Source to Artifactz"Images Frames - Source permutationr   z%Sources Frames - Source to Distortionz'Sources Frames - Source to Interferencez#Sources Frames - Source to Artifactz#Sources Frames - Source permutationzSources - Source to Distortionz Sources - Source to InterferencezSources - Source to ArtifactzSources - Source permutation)
collectionsOrderedDictr   filter_kwargsrk   tolistrl   r   r\   rC   )	r   r   kwargsscoresr2   rg   r3   r4   r?   r   r   r   evaluateU  sR   #r   )T)rD   rE   F)NN)N)__doc__numpyr   scipy.fftpackr|   scipy.linalgr   scipy.signalr   r   r(   r    r   r   r   r   
deprecatedrC   r\   rk   rl   r%   ra   rn   rr   r&   rc   r   r   r   r   r   r   <module>   sJ    4Kno r
3
,P
