a
    iiÙ`©  ã                   @   sp   d Z ddlZddlmZ ddlmZ ddlm	Z	 ddd„Z
edkrle	dƒ\ZZe d	d
¡ZeeƒZe
eeƒ dS )z

é    N)Ú	inst_freq)Úfmlinc           	      K   s*  t  t  |¡¡}t  || ¡}t ¡ }|dur¬| d¡}| g d¢¡ t |¡ t 	| t  
|¡¡ t d¡ t d¡ t |  ¡ |  ¡ ¡ | d¡}| g d¢¡ t |¡ t 	| |¡ t |  ¡ |  ¡ ¡ t | dd¡¡ |d	krôt d	d
¡ nt dd
¡ t d¡ t d¡ t d¡ t ¡  dS )aB  Plot normalized instantaneous frequency laws.

    :param time_instants: timestamps of the signal
    :param iflaws: instantaneous freqency law(s) of the signal.
    :param signal: if provided, display it.
    :type time_instants: array-like
    :type iflaws: array-like
    :type signal: array-like
    :return: None
    NéÓ   )çš™™™™™¹?g®Gázæ?çš™™™™™é?g      Ð?ZSignalTéÔ   )r   gáz®GáÊ?r   gÍÌÌÌÌÌÜ?Úgridr   g      à?g      à¿ZTimezNormalized frequencyzInstantaneous frequency law(s))ÚnpZlogical_notÚisnanZaminÚpltZfigureZadd_subplotZset_positionZscaZplotÚrealÚtitler   ZxlimÚminÚmaxÚgetZylimZxlabelZylabelZshow)	Ztime_instantsZiflawsÚsignalÚkwargsÚindicesZminifZfigZaxsigZaxtfr© r   úd/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/tftb/processing/plotifl.pyÚplotifl   s0    








r   Ú__main__é   é   i  )N)Ú__doc__Únumpyr	   Zmatplotlib.pyplotZpyplotr   Ztftb.processing.freq_domainr   Ztftb.generatorsr   r   Ú__name__r   Ú_ZarangeZtime_samplesZifrr   r   r   r   Ú<module>	   s   
&