+
    
þÎj:'  ã                   ó   € R t R.t^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
HtHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ R	IHt ^ R
IHt ^ RIHtHtHt ^ RIHtHtH t  ]PB                  ! ]] ,          4      t" ! R R]4      t#R# )zb
This module has all the classes and functions related to waves in optics.

**Contains**

* TWave
ÚTWave)ÚBasic)ÚExpr)Ú
DerivativeÚFunction)ÚNumberÚpiÚI)ÚS)ÚSymbolÚsymbols)Ú_sympifyÚsympify)Úexp)Úsqrt)Úatan2ÚcosÚsin)Úspeed_of_lightÚmeterÚsecondc                   ó2  a € ] tR t^t o RtR]P                  R]! R4      3R lt]	R 4       t
]	R 4       t]	R 4       t]	R 4       t]	R	 4       t]	R
 4       t]	R 4       t]	R 4       t]	R 4       tR t]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# )r   ax  
This is a simple transverse sine wave travelling in a one-dimensional space.
Basic properties are required at the time of creation of the object,
but they can be changed later with respective methods provided.

Explanation
===========

It is represented as :math:`A \times cos(k*x - \omega \times t + \phi )`,
where :math:`A` is the amplitude, :math:`\omega` is the angular frequency,
:math:`k` is the wavenumber (spatial frequency), :math:`x` is a spatial variable
to represent the position on the dimension on which the wave propagates,
and :math:`\phi` is the phase angle of the wave.


Arguments
=========

amplitude : Sympifyable
    Amplitude of the wave.
frequency : Sympifyable
    Frequency of the wave.
phase : Sympifyable
    Phase angle of the wave.
time_period : Sympifyable
    Time period of the wave.
n : Sympifyable
    Refractive index of the medium.

Raises
=======

ValueError : When neither frequency nor time period is provided
    or they are not consistent.
TypeError : When anything other than TWave objects is added.


Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A1, phi1, A2, phi2, f = symbols('A1, phi1, A2, phi2, f')
>>> w1 = TWave(A1, f, phi1)
>>> w2 = TWave(A2, f, phi2)
>>> w3 = w1 + w2  # Superposition of two waves
>>> w3
TWave(sqrt(A1**2 + 2*A1*A2*cos(phi1 - phi2) + A2**2), f,
    atan2(A1*sin(phi1) + A2*sin(phi2), A1*cos(phi1) + A2*cos(phi2)), 1/f, n)
>>> w3.amplitude
sqrt(A1**2 + 2*A1*A2*cos(phi1 - phi2) + A2**2)
>>> w3.phase
atan2(A1*sin(phi1) + A2*sin(phi2), A1*cos(phi1) + A2*cos(phi2))
>>> w3.speed
299792458*meter/(second*n)
>>> w3.angular_velocity
2*pi*f

NÚnc                ó¤  € Ve#   \        V4      p\        P                  V,          pVeN   \        V4      p\        P                  V,          pVe(   V\        P                  V,          8w  d   \        R4      hVf   Vf   \        R4      hVf   XpVf   Xp\        V4      p\        V4      p\	        V4      p\
        P                  ! WW#WE4      pV# )Nz/frequency and time_period should be consistent.z*Either frequency or time period is needed.)r   r
   ÚOneÚ
ValueErrorr   r   Ú__new__)	ÚclsÚ	amplitudeÚ	frequencyÚphaseÚtime_periodr   Ú
_frequencyÚ_time_periodÚobjs	   &&&&&&   ÚP/opt/data/home/.local/lib/python3.14/site-packages/sympy/physics/optics/waves.pyr   ÚTWave.__new__Y   sÂ   € ð Ò"Ü" ;Ó/ˆKÜŸ™˜{Õ*ˆJØÒ Ü  Ó+ˆIÜŸ5™5 �?ˆLØÒ&Ø¤§¡ kÕ 1Ô1Ü$Ð%VÓWÐWØÒ Ò!4ÜÐIÓJÐJØÒØ"ˆIØÒØ&ˆKä˜YÓ'ˆ	Ü˜“ˆÜ�A‹JˆÜ�mŠm˜C¨I¸kÓMˆØˆ
ó    c                ó(   € V P                   ^ ,          # )zÑ
Returns the amplitude of the wave.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.amplitude
A
©Úargs©Úselfs   &r%   r   ÚTWave.amplitudev   s   € ð �y‰y˜�|Ðr'   c                ó(   € V P                   ^,          # )zç
Returns the frequency of the wave,
in cycles per second.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.frequency
f
r)   r+   s   &r%   r   ÚTWave.frequency‡   ó   € ð  �y‰y˜�|Ðr'   c                ó(   € V P                   ^,          # )zÝ
Returns the phase angle of the wave,
in radians.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.phase
phi
r)   r+   s   &r%   r    ÚTWave.phase™   r0   r'   c                ó(   € V P                   ^,          # )zñ
Returns the temporal period of the wave,
in seconds per cycle.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.time_period
1/f
r)   r+   s   &r%   r!   ÚTWave.time_period«   r0   r'   c                ó(   € V P                   ^,          # )z,
Returns the refractive index of the medium
r)   r+   s   &r%   r   ÚTWave.n½   s   € ð
 �y‰y˜�|Ðr'   c                óR   € \         V P                  V P                  ,          ,          # )a:  
Returns the wavelength (spatial period) of the wave,
in meters per cycle.
It depends on the medium of the wave.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.wavelength
299792458*meter/(second*f*n)
)Úcr   r   r+   s   &r%   Ú
wavelengthÚTWave.wavelengthÄ   s   € ô" �$—.‘. §¡Õ'Õ(Ð(r'   c                ó<   € V P                   V P                  ,          # )a/  
Returns the propagation speed of the wave,
in meters per second.
It is dependent on the propagation medium.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.speed
299792458*meter/(second*n)
)r9   r   r+   s   &r%   ÚspeedÚTWave.speedØ   s   € ð" �‰˜tŸ~™~Õ-Ð-r'   c                ó>   € ^\         ,          V P                  ,          # )zû
Returns the angular velocity of the wave,
in radians per second.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.angular_velocity
2*pi*f
)r   r   r+   s   &r%   Úangular_velocityÚTWave.angular_velocityë   s   € ð  ”�t�D—N‘NÕ"Ð"r'   c                ó>   € ^\         ,          V P                  ,          # )a  
Returns the wavenumber of the wave,
in radians per meter.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.optics import TWave
>>> A, phi, f = symbols('A, phi, f')
>>> w = TWave(A, f, phi)
>>> w.wavenumber
pi*second*f*n/(149896229*meter)
)r   r9   r+   s   &r%   Ú
wavenumberÚTWave.wavenumberý   s   € ð  ”�t�D—O‘OÕ#Ð#r'   c                óf   € ^ RI Hp \        V 4      P                  V! V P                  4      ,           # )z!String representation of a TWave.)Ússtr)Úsympy.printingrE   ÚtypeÚ__name__r*   )r,   rE   s   & r%   Ú__str__ÚTWave.__str__  s"   € å'Ü�D‹z×"Ñ"¡T¨$¯)©)£_Õ4Ð4r'   c                óŠ  € \        V\        4      '       Ed‰   V P                  VP                  8X  Edb   V P                  VP                  8X  EdF   \        \	        V P
                  ^,          VP
                  ^,          ,           ^V P
                  ,          VP
                  ,          \        V P                  VP                  ,
          4      ,          ,           4      V P                  \        V P
                  \        V P                  4      ,          VP
                  \        VP                  4      ,          ,           V P
                  \        V P                  4      ,          VP
                  \        VP                  4      ,          ,           4      4      # \        R4      h\        \        V4      P                  R,           4      h)zw
Addition of two waves will result in their superposition.
The type of interference will depend on their phase angles.
zJInterference of waves with different frequencies has not been implemented.z# and TWave objects cannot be added.)Ú
isinstancer   r   r9   r   r   r   r    r   r   ÚNotImplementedErrorÚ	TypeErrorrG   rH   ©r,   Úothers   &&r%   Ú__add__ÚTWave.__add__  sD  € ô
 �eœU×#Ó#Ø�~‰~ §¡Õ0°T·_±_È×HXÑHXÕ5XÜœT $§.¡.°!Õ"3°e·o±oÀqÕ6HÕ"HÈ1Ø"&§.¡.õL1Ø16·±õLAÜADØ&*§j¡j°5·;±;Õ&>óB@õL@õ #@ó Að "Ÿ^™^Ü" 4§>¡>´#°d·j±j³/Õ#AØ$Ÿ™¬s°5·;±;Ó/?Õ?õ$@à!Ÿ^™^¬C°·
±
«OÕ;Ø$Ÿ™¬s°5·;±;Ó/?Õ?õ@óAó	ð ô *ð +1ó 2ð 2ô œD ›K×0Ñ0Ð3XÕXÓYÐYr'   c                óì   € \        V4      p\        V\        4      '       d0   \        V P                  V,          .V P
                  R,          O5!  # \        \        V4      P                  R,           4      h)zD
Multiplying a wave by a scalar rescales the amplitude of the wave.
:é   NNz( and TWave objects cannot be multiplied.)	r   rL   r   r   r   r*   rN   rG   rH   rO   s   &&r%   Ú__mul__ÚTWave.__mul__,  sV   € ô ˜“ˆÜ�eœV×$Ò$Ü˜Ÿ™¨Õ-Ð>°·	±	¸"µÓ>Ð>äœD ›K×0Ñ0Ð3]Õ]Ó^Ð^r'   c                ó2   € V P                  RV,          4      # ©rT   éÿÿÿÿ©rQ   rO   s   &&r%   Ú__sub__ÚTWave.__sub__6  s   € Ø�|‰|˜B˜u�HÓ%Ð%r'   c                ó$   € V P                  R4      # rX   ©rU   r+   s   &r%   Ú__neg__ÚTWave.__neg__9  s   € Ø�|‰|˜BÓÐr'   c                ó$   € V P                  V4      # ©NrZ   rO   s   &&r%   Ú__radd__ÚTWave.__radd__<  ó   € Ø�|‰|˜EÓ"Ð"r'   c                ó$   € V P                  V4      # rb   r^   rO   s   &&r%   Ú__rmul__ÚTWave.__rmul__?  re   r'   c                ó&   € V ) P                  V4      # rb   )rc   rO   s   &&r%   Ú__rsub__ÚTWave.__rsub__B  s   € Ø�×Ñ Ó&Ð&r'   c                óú   € V P                   \        V P                  \        R 4      ,          V P                  \        R4      ,          ,
          V P
                  ,           \        ^,          ,           RR7      ,          # )ÚxÚtF)Úevaluate)r   r   rB   r   r?   r    r   ©r,   r*   Úkwargss   &*,r%   Ú_eval_rewrite_as_sinÚTWave._eval_rewrite_as_sinE  s_   € Ø�~‰~œc $§/¡/´&¸³+Õ"=Ø×#Ñ#¤F¨3£KÕ/õ#0Ø26·*±*õ#=Ü?AÀ!½tõ#DØNSôUõ Uð 	Ur'   c                óÒ   € V P                   \        V P                  \        R 4      ,          V P                  \        R4      ,          ,
          V P
                  ,           4      ,          # ©rm   rn   )r   r   rB   r   r?   r    rp   s   &*,r%   Ú_eval_rewrite_as_cosÚTWave._eval_rewrite_as_cosI  sL   € Ø�~‰~œc $§/¡/´&¸³+Õ"=Ø×#Ñ#¤F¨3£KÕ/õ#0Ø26·*±*õ#=ó >õ >ð 	>r'   c                ó¤   € \        R 4      w  r4rV\        R4      p\        V! WV4      V^4      W4,          \        V! WV4      V^4      ,          ,           # )zmu, epsilon, x, tÚE)r   r   r   )r,   r*   rq   ÚmuÚepsilonrm   rn   ry   s   &*,     r%   Ú_eval_rewrite_as_pdeÚTWave._eval_rewrite_as_pdeM  sG   € Ü#Ð$7Ó8Ñˆ�QÜ�S‹MˆÜ™!˜A›' 1 aÓ(¨2­:´jÁÀ1ÃÈ!ÈQÓ6OÕ+OÕOÐOr'   c           	     óè   € V P                   \        \        V P                  \	        R 4      ,          V P
                  \	        R4      ,          ,
          V P                  ,           ,          4      ,          # ru   )r   r   r	   rB   r   r?   r    rp   s   &*,r%   Ú_eval_rewrite_as_expÚTWave._eval_rewrite_as_expR  sS   € Ø�~‰~œc¤! T§_¡_´V¸C³[Õ%@Ø×#Ñ#¤F¨3£KÕ/õ&0Ø26·*±*õ&=õ #>ó ?õ ?ð 	?r'   © )"rH   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r
   ÚZeror   r   Úpropertyr   r   r    r!   r   r9   r<   r?   rB   rI   Ú__repr__rQ   rU   r[   r_   rc   rg   rj   rr   rv   r|   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r%   r   r      s&  ø‡ € ñ:ð~ Ø—&‘&ØÙ�S‹kôð: ñó ðð  ñó ðð" ñó ðð" ñó ðð" ñó ðð ñ)ó ð)ð& ñ.ó ð.ð$ ñ#ó ð#ð" ñ$ó ð$ò"5ð
 €HòZò,_ò&ò ò#ò#ò'òUò>òP÷
?ð ?r'   N)$r…   Ú__all__Úsympy.core.basicr   Úsympy.core.exprr   Úsympy.core.functionr   r   Úsympy.core.numbersr   r   r	   Úsympy.core.singletonr
   Úsympy.core.symbolr   r   Úsympy.core.sympifyr   r   Ú&sympy.functions.elementary.exponentialr   Ú(sympy.functions.elementary.miscellaneousr   Ú(sympy.functions.elementary.trigonometricr   r   r   Úsympy.physics.unitsr   r   r   Ú
convert_tor8   r   r�   r'   r%   Ú<module>r™      sa   ðñð ˆ)€å "Ý  ß 4ß .Ñ .Ý "ß /ß 0Ý 6Ý 9ß FÑ Fß =Ñ =ð ×Ò˜e F�lÓ+€ôy?ˆDö y?r'   