+
    /i4                         ^ RI t^ RIHt ^ RIHtHtHt ^ RI	H
u Ht R tRR ltR tR tR t ! R	 R
4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      tR# )    N)raises)assert_almost_equalxp_assert_equalxp_assert_closec                 @    WV,
          V ,          V,          ,           pV# N tf0f1t1fs   &&&& _/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/signal/tests/test_waveforms.pychirp_linearr      s    
2g]RAH    c                     V'       d.   WV,
          V ^,          ,          V^,          ,          ,           pV# W"V,
          W0,
          ^,          ,          V^,          ,          ,
          pV# )   r	   )r   r   r   r   vertex_zeror   s   &&&&& r   chirp_quadraticr      sQ    r'QT!BE)) H r'bfq[(2q500Hr   c                 >    WV,          W,          ,          ,          pV# r   r	   r
   s   &&&& r   chirp_geometricr      s    
eqt_AHr   c                 f    W,          V,          W,
          V ,          W#,          ,           ,          pV# r   r	   r
   s   &&&& r   chirp_hyperbolicr      s$    
bRWaK"%'(AHr   c                    V ^,          V ^ ,          ,
          p\         P                  ! V4      ^\         P                  ,          ,          V,          pRV R,          V RR ,           ,          pWC3# )zJ
Compute theta'(t)/(2*pi), where theta'(t) is the derivative of theta(t).
      ?:   NNN)npdiffpi)r   thetadtr   tfs   &&   r   compute_frequencyr%   $   sS     
1!B
"%% 2%A	aeafn	B5Lr   c                      a  ] tR t^0t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )	TestChirpc                T    \         P                  ! ^ RRRRR7      p\        VR4       R# )r         ?       @linearr   r   r   r   methodN	waveformschirpr   selfws   & r   test_linear_at_zeroTestChirp.test_linear_at_zero2   s"    OOaCCCIAs#r   c                   R pRpRpRp\         P                  ! ^ V^d4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )r+   r)   r*   ư>Nr   linspacer/   _chirp_phaser%   maxabsr   
r2   r-   r   r   r   r   phaser$   r   abserrs
   &         r   test_linear_freq_01TestChirp.test_linear_freq_016   sw    KK2s#&&qbf=!!+q<#??@A}}r   c                   R pRpRpRp\         P                  ! ^ V^d4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )r+         i@      Y@      $@r7   Nr8   r=   s
   &         r   test_linear_freq_02TestChirp.test_linear_freq_02A   sw    KK2s#&&qbf=!!+q<#??@A}}r   c           	     R   R pRpRpRp\         P                  ! ^ V^d4      p\        P                  ! WRWCVRR7      p\        P                  ! WRWCVRR7      p\         P                  ! V4      p\         P                  ! V4      p	V\         P
                  ! V	4      ,
          p
V
R8  g   Q hR# )r+   r)   r*   F)complexTr7   N)r   r9   r/   r0   varreal)r2   r-   r   r   r   r   w_real	w_complexw_pwr_rw_pwr_cerrs   &          r   test_linear_complex_power#TestChirp.test_linear_complex_powerL   s    KK2s#FOOA264H	&&.&&# ((Tzzr   c           	     V    \         P                  ! ^ RRRRRR7      p\        VR4       R# )r   r)   r+   Tr   r   r   r   r-   rI   N      $      ?        r/   r0   r   r1   s   & r   test_linear_complex_at_zero%TestChirp.test_linear_complex_at_zero]   s'    OOaEcc($(*8$r   c                T    \         P                  ! ^ RRRRR7      p\        VR4       R# )r   r)   r*   	quadraticr,   Nr.   r1   s   & r   test_quadratic_at_zero TestChirp.test_quadratic_at_zerob   s"    OOaCCCLAs#r   c           	     V    \         P                  ! ^ RRRRRR7      p\        VR4       R# )r   r)   r*   r[   F)r   r   r   r   r-   r   Nr.   r1   s   & r   test_quadratic_at_zero2!TestChirp.test_quadratic_at_zero2f   s'    OOaCCC(-/As#r   c           	     V    \         P                  ! ^ RRRRRR7      p\        VR4       R# )	r   r)   r*   r[   TrT   N      rV   rW   r1   s   & r   test_quadratic_complex_at_zero(TestChirp.test_quadratic_complex_at_zerok   s'    OOaDSS$(*6"r   c                   R pRpRpRp\         P                  ! ^ VR4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )r[   r)   r*     r7   Nr   r9   r/   r:   r%   r;   r<   r   r=   s
   &         r   test_quadratic_freq_01 TestChirp.test_quadratic_freq_01p   sw    KK2t$&&qbf=!!+q?22#BBCD}}r   c                   R pRpRpRp\         P                  ! ^ VR4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )r[         4@rE   rf   r7   Nrg   r=   s
   &         r   test_quadratic_freq_02 TestChirp.test_quadratic_freq_02{   sw    KK2t$&&qbf=!!+q?22#BBCD}}r   c                T    \         P                  ! ^ RRRRR7      p\        VR4       R# )r   r)   r*   logarithmicr,   Nr.   r1   s   & r   test_logarithmic_at_zero"TestChirp.test_logarithmic_at_zero   s"    OOaCCCNAs#r   c                   R pRpRpRp\         P                  ! ^ VR4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )ro   r)   r*   '  r7   Nr   r9   r/   r:   r%   r;   r<   r   r=   s
   &         r   test_logarithmic_freq_01"TestChirp.test_logarithmic_freq_01   sw    KK2u%&&qbf=!!+q?22#BBCD}}r   c                   R pRpRpRp\         P                  ! ^ VR4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )ro   rC   rD   rE   rs   r7   Nrt   r=   s
   &         r   test_logarithmic_freq_02"TestChirp.test_logarithmic_freq_02   w    KK2u%&&qbf=!!+q?22#BBCD}}r   c                   R pRpRpRp\         P                  ! ^ VR4      p\        P                  ! WRWCV4      p\	        WV4      w  rx\         P
                  ! \         P                  ! V\        WrW44      ,
          4      4      p	V	R8  g   Q hR# )ro   rD   rE   rs   r7   Nrt   r=   s
   &         r   test_logarithmic_freq_03"TestChirp.test_logarithmic_freq_03   rz   r   c                T    \         P                  ! ^ RRRRR7      p\        VR4       R# )r   rE   r)   
hyperbolicr,   Nr.   r1   s   & r   test_hyperbolic_at_zero!TestChirp.test_hyperbolic_at_zero   s"    OOaDSSNAs#r   c                    R pRp\         P                  ! ^ VR4      pRR.RR.RR.RR..pV FC  w  rV\        P                  ! W5W&V4      p\	        W74      w  r\        WWb4      p
\        WRR7       KE  	  R# )	r   r)   rs   rE   gHz>)atolNrU   rb   )r   r9   r/   r:   r%   r   r   )r2   r-   r   r   casesr   r   r>   r$   r   expecteds   &          r   test_hyperbolic_freq_01!TestChirp.test_hyperbolic_freq_01   s    KK2u%t  FB**1"&AE%a/EB'7HAd3	 r   c           	         R pRp\         P                  ! ^ V^4      p\        \        \        P
                  V^ V^V4       \        \        \        P
                  V^V^ V4       R# )r   r)   Nr   r9   assert_raises
ValueErrorr/   r0   )r2   r-   r   r   s   &   r   test_hyperbolic_zero_freq#TestChirp.test_hyperbolic_zero_freq   sN    KK2q!j)//1aQGj)//1aQGr   c           	         R pRpRpRp\         P                  ! ^ V^
4      p\        \        \        P
                  WRWCV4       R# )foorE   rk   r)   Nr   )r2   r-   r   r   r   r   s   &     r   test_unknown_methodTestChirp.test_unknown_method   s<    KK2r"j)//1"&Ir   c                    R pRp\         P                  ! R^^4      pRp\        P                  ! W1WB4      p^p\        P                  ! W1WB4      pRp\	        WeVR7       R# )rE   rk         @z'Integer input 't1=3' gives wrong resulterr_msgNr   r   r9   r/   r0   r   )r2   r   r   r   r   float_result
int_resultr   s   &       r   test_integer_t1TestChirp.test_integer_t1   sW    KKAr" qb5__QB3
;
'Br   c                    R pRp\         P                  ! R^^4      pRp\        P                  ! W4W!4      p^
p\        P                  ! W4W!4      pRp\	        WeVR7       R# )rk   r   rE   z(Integer input 'f0=10' gives wrong resultr   Nr   r   )r2   r   r   r   r   r   r   r   s   &       r   test_integer_f0TestChirp.test_integer_f0   W    KKAr" qb5__QB3
<
'Br   c                    R pRp\         P                  ! R^^4      pRp\        P                  ! W1W$4      p^p\        P                  ! W1W$4      pRp\	        WeVR7       R# )rE   r   rk   z(Integer input 'f1=20' gives wrong resultr   Nr   r   )r2   r   r   r   r   r   r   r   s   &       r   test_integer_f1TestChirp.test_integer_f1   r   r   c                    ^
p^p^p\         P                  ! R^^4      p\        P                  ! V\	        V4      \	        V4      \	        V4      4      p\        P                  ! WAW#4      pRp\        WeVR7       R# )
   z5Integer input 'f0=10, t1=3, f1=20' gives wrong resultr   Nr   )r   r9   r/   r0   floatr   )r2   r   r   r   r   r   r   r   s   &       r   test_integer_allTestChirp.test_integer_all   sb    KKAr" q%)U2Yb	J__QB3
I
'Br   r	   N)__name__
__module____qualname____firstlineno__r4   r@   rF   rQ   rX   r\   r_   rc   rh   rl   rp   ru   rx   r|   r   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r'   r'   0   s     $		"%
$$
#
		$			$4HJ	C	C	CC Cr   r'   c                   J   a  ] tR t^t o R tR tR tR tR tR t	R t
RtV tR	# )
TestSweepPolyc                .   \         P                  ! . RO4      p\         P                  ! ^ RR4      p\        P                  ! W!4      p\        W#4      w  rEV! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )r)   r   rs   r7   N)r)           r)   r   poly1dr9   r/   _sweep_poly_phaser%   r;   r<   r2   pr   r>   r$   r   r   r?   s   &       r   test_sweep_poly_quad1#TestSweepPoly.test_sweep_poly_quad1   sl    IIo&KK3&++A1!!+R5q|,-}}r   c                *   \         P                  ! R 4      p\         P                  ! ^ RR4      p\        P                  ! W!4      p\        W#4      w  rEV! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )r*   r   rs   r7   Nr   r   s   &       r   test_sweep_poly_const#TestSweepPoly.test_sweep_poly_const  sk    IIcNKK3&++A1!!+R5q|,-}}r   c                .   \         P                  ! RR.4      p\         P                  ! ^ RR4      p\        P                  ! W!4      p\        W#4      w  rEV! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )r)   rE   r   rs   r7   Nrb   r   r   s   &       r   test_sweep_poly_linear$TestSweepPoly.test_sweep_poly_linear  sp    IItTl#KK3&++A1!!+R5q|,-}}r   c                .   \         P                  ! . RO4      p\         P                  ! ^ RR4      p\        P                  ! W!4      p\        W#4      w  rEV! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )r)   r   rs   r7   N)r)   r          r   r   s   &       r   test_sweep_poly_quad2#TestSweepPoly.test_sweep_poly_quad2  sm    II&'KK3&++A1!!+R5q|,-}}r   c                .   \         P                  ! . RO4      p\         P                  ! ^ R R4      p\        P                  ! W!4      p\        W#4      w  rEV! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )r*   rs   r7   Nr*   r)   r   r   r   r   s   &       r   test_sweep_poly_cubic#TestSweepPoly.test_sweep_poly_cubic   sm    II+,KK3&++A1!!+R5q|,-}}r   c                V   \         P                  ! . RO4      p\         P                  ! ^ RR4      p\        P                  ! W!4      p\        W#4      w  rE\         P                  ! V4      ! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )z1Use an array of coefficients instead of a poly1d.r*   rs   r7   Nr   )	r   arrayr9   r/   r   r%   r   r;   r<   r   s   &       r   test_sweep_poly_cubic2$TestSweepPoly.test_sweep_poly_cubic2)  sv    HH*+KK3&++A1!!+99Q<#q|,-}}r   c                .   . ROp\         P                  ! ^ RR4      p\        P                  ! W!4      p\	        W#4      w  rE\         P
                  ! V4      ! V4      p\         P                  ! \         P                  ! WV,
          4      4      pVR8  g   Q hR# )z/Use a list of coefficients instead of a poly1d.r*   rs   r7   Nr   )r   r9   r/   r   r%   r   r;   r<   r   s   &       r   test_sweep_poly_cubic3$TestSweepPoly.test_sweep_poly_cubic33  sl    !KK3&++A1!!+99Q<#q|,-}}r   r	   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s-      r   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestGaussPulsei>  c                    \         P                  ! R RR7      p\         P                  ! R RR7      pRp\        W!VR7       R# )cutoffg     @@)fci  z*Integer input 'fc=1000' gives wrong resultr   Nr/   
gausspulser   r2   r   r   r   s   &   r   test_integer_fcTestGaussPulse.test_integer_fc@  s5     ++H@))(t<
>
'Br   c                    \         P                  ! R RR7      p\         P                  ! R ^R7      pRp\        W!VR7       R# )r   r)   )bwz'Integer input 'bw=1' gives wrong resultr   Nr   r   s   &   r   test_integer_bwTestGaussPulse.test_integer_bwF  s5     ++H=))(q9
;
'Br   c                    \         P                  ! R RR7      p\         P                  ! R RR7      pRp\        W!VR7       R# )r   )bwrz)Integer input 'bwr=-6' gives wrong resultr   Ng      ir   r   s   &   r   test_integer_bwrTestGaussPulse.test_integer_bwrL  s5     ++H$?))(;
=
'Br   c                    \         P                  ! R RR7      p\         P                  ! R RR7      pRp\        W!VR7       R# )r   )tprz*Integer input 'tpr=-60' gives wrong resultr   Ng      Nir   r   s   &   r   test_integer_tprTestGaussPulse.test_integer_tprR  s5     ++H%@))(<
>
'Br   r	   N)
r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r   >  s#     CCCC Cr   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestUnitImpulseiY  c           	         \        \        P                  ! ^4      \        P                  ! . RO4      4       \        \        P                  ! R4      \        P                  ! . RO. RO. RO.4      4       R# )   N)r)   r   r   r   r   r   r      r   )r)   r   r   r   r   r   r   r/   unit_impulser   asarrayr2   s   &r   test_no_indexTestUnitImpulse.test_no_index[  sM    	..q1

#:;	=	..v6

KI#FG	Ir   c           
     v   \        \        P                  ! ^
^4      \        P                  ! . RO4      4       \        \        P                  ! RR4      \        P                  ! . RO. RO. RO.4      4       \        P                  ! R^4      p\        V\        P                  ! . R	O. R	O. R
O. R	O.4      4       R# )r   N)
r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   )   r   )r   r   r   r   )r   r   r   r   r   r2   imps   & r   
test_indexTestUnitImpulse.test_indexa  s    	..r15

#CD	F	..vv>

KI#FG	I $$VQ/RZZ)7)7)7)9 : 	;r   c           	         \        \        P                  ! RR4      \        P                  ! . RO. RO. RO.4      4       \        \        P                  ! ^	R4      \        P                  ! . RO4      4       R# )r   midNr   r   r   r   )	r   r   r   r   r   r   r   r   r   r   r   s   &r   test_midTestUnitImpulse.test_midn  sR    	..vu=

KI#FG	I	..q%8

#@A	Cr   c                   \         P                  ! ^4      p\        P                  ! VP                  \        P
                  4      '       g   Q h\         P                  ! ^^\        R7      p\        P                  ! VP                  \        P                  4      '       g   Q h\         P                  ! RR\        R7      p\        P                  ! VP                  \        P                  4      '       g   Q hR# )r   dtypeN)   r   )r   r   )
r/   r   r   
issubdtyper   floatingintintegerrI   complexfloatingr   s   & r   
test_dtypeTestUnitImpulse.test_dtypet  s    $$Q'}}SYY4444$$Q5}}SYY

3333$$VV7C}}SYY(:(:;;;;r   r	   N)
r   r   r   r   r   r   r   r  r   r   r   s   @r   r   r   Y  s      I;C< <r   r   c                   &   a  ] tR tRt o R tRtV tR# )TestSawtoothWaveformi  c                V   \         P                  ! \        P                  ! ^\        P                  R7      \        P                  ! ^4      R7      pVP
                  \        P                  8X  g   Q h\         P                  ! ^4      pVP
                  \        P                  8X  g   Q hR# )r   r   )widthN)r/   sawtoothr   r   float32r   float64r2   waveforms   & r   r  TestSawtoothWaveform.test_dtype  sl    %%HHQbjj)A
 ~~+++%%a(~~+++r   r	   Nr   r   r   r   r  r   r   r   s   @r   r
  r
    s     , ,r   r
  c                   &   a  ] tR tRt o R tRtV tR# )TestSquareWaveformi  c                V   \         P                  ! \        P                  ! ^\        P                  R7      \        P                  ! R4      R7      pVP
                  \        P                  8X  g   Q h\         P                  ! ^4      pVP
                  \        P                  8X  g   Q hR# )r   r   r   )dutyN)r/   squarer   r   r  r   r  r  s   & r   r  TestSquareWaveform.test_dtype  sh    ##BHHQbjj$A

SVX~~+++##A&~~+++r   r	   Nr  r   s   @r   r  r    s     , ,r   r  )T)numpyr   pytestr   r   scipy._lib._array_apir   r   r   scipy.signal._waveformssignal
_waveformsr/   r   r   r   r   r%   r'   r   r   r   r
  r  r	   r   r   <module>r      s}     *  , +


	GC GCTA AHC C6#< #<L, ,, ,r   