
    h                     *    d dl mZ d dlZd Zd Zd Zy)    Nc                    t        j                  d      \  }}|j                  | ddt         j                  j                  dt        j                  t        j                  |             z  t        j                  t        j                  |                   }|j                  |       |j                  |       t        j                          t        j                          y )N      )figsizelowerauto)originaspectcmapvminvmax)pltsubplotsmatshowcmafmhotnpmaxabscolorbar	set_titletight_layoutshow)signaltitlefigaxcaxs        N/var/www/html/engine/venv/lib/python3.12/site-packages/noisereduce/plotting.pyplot_spectrogramr"      s    ll7+GC
**VV]]"&&((VVBFF6N#  C LLLLHHJ    c                    t        j                  dd      \  }}|d   j                  | d      \  }|d   j                  |d      \  }|d   j                  |d      \  }|d   j                  d	       |d   j	                          |d
   j                  |d      }|j                  |       |d
   j                  d       t        j                          y)a  Plots basic statistics of noise reduction
    
    Arguments:
        mean_freq_noise {[type]} -- [description]
        std_freq_noise {[type]} -- [description]
        noise_thresh {[type]} -- [description]
        smoothing_filter {[type]} -- [description]
       r   )ncolsr   r   zMean power of noise)labelzStd. power of noisezNoise threshold (by frequency)zThreshold for mask   r   )r   zFilter for smoothing MaskN)r   r   plotr   legendr   r   r   )	mean_freq_noisestd_freq_noisenoise_threshsmoothing_filterr   r   plt_meanplt_stdr    s	            r!   plot_statistics_and_filterr1      s     llG4GCQ%**_4I*JKXAN2GHJWAL0PQJWqEOO()qELLN
Q%--(-
9CLLqEOO/0HHJr#   c                     t        | d       t        ||||       t        |d       t        |d       t        |d       y )NNoise)r   SignalzMask appliedzRecovered spectrogram)r"   r1   )noise_stft_dbr+   r,   r-   r.   sig_stft_dbsig_maskrecovered_specs           r!   plot_reduction_stepsr9   ,   sA     ]'27G [1X^4^+BCr#   )matplotlib.pyplotpyplotr   numpyr   r"   r1   r9    r#   r!   <module>r>      s      .Dr#   