
    h~                     8    S r SSKrSSKrSSKJr   " S S5      rg)zDuration module.    N)_apic                      \ rS rSrSrSS/rS rS rS rS r	S	 r
S
 rS r\R                  " \\R                   5      r\R                  " \\R$                  5      r\R                  " \\R(                  5      r\R                  " \\R,                  5      r\R                  " \\R0                  5      r\R                  " \\R4                  5      rS rS rS r\rS r S r!S r"Sr#g)Duration	   zClass Duration in development.ETUTCc                 Z    [         R                  " U R                  US9  Xl        X l        g)z
Create a new Duration object.

= ERROR CONDITIONS
- If the input frame is not in the allowed list, an error is thrown.

= INPUT VARIABLES
- frame     The frame of the duration.  Must be 'ET' or 'UTC'
- seconds  The number of seconds in the Duration.
)frameN)r   check_in_listallowed_frame_seconds)selfr
   secondss      W/var/www/html/env/lib/python3.13/site-packages/matplotlib/testing/jpl_units/Duration.py__init__Duration.__init__   s"     	4<<u5    c                     U R                   $ )z$Return the frame the duration is in.)r   r   s    r   r
   Duration.frame   s    {{r   c                 T    [        U R                  [        U R                  5      5      $ )z*Return the absolute value of the duration.)r   r   absr   r   s    r   __abs__Duration.__abs__!   s    S%788r   c                 D    [        U R                  U R                  * 5      $ )z+Return the negative value of this Duration.)r   r   r   r   s    r   __neg__Duration.__neg__%   s    dmm^44r   c                     U R                   $ )z-Return the number of seconds in the Duration.r   r   s    r   r   Duration.seconds)   s    }}r   c                      U R                   S:g  $ )Nr   r    r   s    r   __bool__Duration.__bool__-   s    }}!!r   c                 `    U R                  US5        U" U R                  UR                  5      $ )zD
Check that *self* and *rhs* share frames; compare them using *op*.
compare)checkSameFramer   )r   oprhss      r   _cmpDuration._cmp0   s)     	C+$--..r   c                     SSK Js  Jn  [        XR                  5      (       a  X-   $ U R                  US5        [        U R                  U R                  UR                  -   5      $ )z
Add two Durations.

= ERROR CONDITIONS
- If the input rhs is not in the same frame, an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to add.

= RETURN VALUE
- Returns the sum of ourselves and the input Duration.
r   Nadd)	matplotlib.testing.jpl_unitstesting	jpl_units
isinstanceEpochr'   r   r   r   )r   r)   Us      r   __add__Duration.__add__>   sO     	10c77##:C'T]]S\\%ABBr   c                     U R                  US5        [        U R                  U R                  UR                  -
  5      $ )z
Subtract two Durations.

= ERROR CONDITIONS
- If the input rhs is not in the same frame, an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to subtract.

= RETURN VALUE
- Returns the difference of ourselves and the input Duration.
sub)r'   r   r   r   r   r)   s     r   __sub__Duration.__sub__T   s2     	C'T]]S\\%ABBr   c                 Z    [        U R                  U R                  [        U5      -  5      $ )z
Scale a UnitDbl by a value.

= INPUT VARIABLES
- rhs     The scalar to multiply by.

= RETURN VALUE
- Returns the scaled Duration.
)r   r   r   floatr8   s     r   __mul__Duration.__mul__d   s"     T]]U3Z%?@@r   c                 :    U R                   S SU R                   3$ )Print the Duration.g )r   r   r   s    r   __str__Duration.__str__r   s    --"!DKK=11r   c                 >    SU R                    SU R                  S S3$ )r@   z
Duration('z', rA   )r   r   r   s    r   __repr__Duration.__repr__v   s"    DKK=DMM!+<A>>r   c                     U R                   UR                   :w  a(  [        SU SU R                    SUR                    35      eg)a  
Check to see if frames are the same.

= ERROR CONDITIONS
- If the frame of the rhs Duration is not the same as our frame,
  an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to check for the same frame
- func    The name of the function doing the check.
zCannot z' Durations with different frames.
LHS: z
RHS: N)r   
ValueError)r   r)   funcs      r   r'   Duration.checkSameFramez   sN     ;;#**$$  } %

|%& & %r   rG   N)$__name__
__module____qualname____firstlineno____doc__r   r   r
   r   r   r   r#   r*   	functoolspartialmethodoperatoreq__eq__ne__ne__lt__lt__le__le__gt__gt__ge__ge__r4   r9   r=   __rmul__rC   rH   r'   __static_attributes__ r   r   r   r   	   s    (UmG 95"/ $$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7FC,C 
A H2?&r   r   )rR   rS   rU   
matplotlibr   r   rd   r   r   <module>rf      s       A& A&r   