+
     ]i  c                   sV    R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	  ! R R4      t
R# )zEpoch module.N)_api)date2numc                   s  a  ] tR t^t o RRR/RRR//tRR ltR tR tR tR	 t	R
 t
]P                  ! ]
]P                  4      t]P                  ! ]
]P                   4      t]P                  ! ]
]P$                  4      t]P                  ! ]
]P(                  4      t]P                  ! ]
]P,                  4      t]P                  ! ]
]P0                  4      tR tR tR tR t]R 4       tRt V t!R# )EpochZETZUTCg oP@Nc           
     s   Vf   Vf]   Ve   VeU   Ve	   VfM   VfI   Vf   Vf	   Ve=   Ve9   Ve   Vf1   Ve	   Vf)   Vf%   Ve<   \        V\        P                  4      '       g   \        RV: RV: RV: RV: 24      h\        P
                  ! V P                  VR7       Wn        Ve   \        V4      pVeN   \        V4      R,           p\        P                  ! V4      V n        W0P                  ,
          R,          V n        R# \        V4      V n        \        V4      V n        \        P                  ! V P                  R	,          4      pV ;P                  V,          un        V ;P                  VR,          ,          un        R# )
a*  
Create a new Epoch object.

Build an epoch 1 of 2 ways:

Using seconds past a Julian date:
#   Epoch('ET', sec=1e8, jd=2451545)

or using a matplotlib day number
#   Epoch('ET', daynum=730119.5)

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

= INPUT VARIABLES
- frame     The frame of the epoch.  Must be 'ET' or 'UTC'
- sec        The number of seconds past the input JD.
- jd         The Julian date of the epoch.
- daynum    The matplotlib day number of the epoch.
- dt         A python datetime instance.
NzlInvalid inputs.  Must enter sec and jd together, daynum by itself, or dt (must be a python datetime).
Sec = z
JD  = z
dnum= z
dt  = )frameg   QD:A     @Q )
isinstanceDTdatetimeZ
ValueErrorr    Zcheck_in_listallowed_framer   ZfloatmathZfloor_jd_seconds)selfr   secjdZdaynumZdtZ	deltaDayss   &&&&&& I/usr/lib64/python3.14/site-packages/matplotlib/testing/jpl_units/Epoch.py__init__ZEpoch.__init__   s0   , [R^RZ#/R^BJ+#S_.*R*E*E "2vr34 4 	4<<u5>b\Fv*Bzz"~DH((]g5DM "#JDMRyDH 

4==5#89IHH	!HMMY00M    c                s    V P                   V8X  d   V # V P                  V P                   ,          V,          p\        WP                  V,           V P                  4      # N)r
   r	   r   r   r   )r   r   Zoffset   && r   convertZEpoch.convertT   sD    ;;%Kdkk*51UMMF2DHH==r   c                s    V P                   # r   )r
   r      &r   r   ZEpoch.frame\   s    {{r   c                s    T pWP                   8w  d   V P                  V4      pVP                  VP                  R ,          ,           # )r   r
   r   r   r   )r   r   tr   r   
julianDateZEpoch.julianDate_   s7    KKU#AuuqzzG+++r   c                s    T pWP                   8w  d   V P                  V4      pVP                  V,
          pVP                  VR ,          ,           # )r   r   )r   r   r   r   Zdeltas   &&&  r   secondsPastZEpoch.secondsPastf   s?    KKU#A
zzEEM))r   c                s   T pV P                   VP                   8w  d   V P                  VP                   4      pVP                  VP                  8w  d   V! VP                  VP                  4      # V! VP                  VP                  4      # )z4Compare Epochs *self* and *rhs* using operator *op*.r   )r   Zoprhsr   s   &&& r   _cmpZ
Epoch._cmpn   sc    ;;#**$SZZ(A55CGGaeeSWW%%!**cll++r   c                s    T pV P                   VP                  4       8w  d   V P                  VP                   4      pVP                  VP	                  4       ,           p\        VP                   W2P                  4      # )z
Add a duration to an Epoch.

= INPUT VARIABLES
- rhs     The Epoch to subtract.

= RETURN VALUE
- Returns the difference of ourselves and the input Epoch.
)r
   r   r   r   Zsecondsr   r   )r   r   r   r   s   &&  r   __add__ZEpoch.__add__~   sV     ;;#))+%SZZ(Ajj3;;=(QXXsEE**r   c                s   ^ RI Hu Hp \        WP                  4      '       d
   W) ,           # T pV P
                  VP
                  8w  d   V P                  VP
                  4      pVP                  VP                  ,
          pVP                  VP                  ,
          pVP	                  VP
                  VR,          V,           4      # )a3  
Subtract two Epoch's or a Duration from an Epoch.

Valid:
Duration = Epoch - Epoch
Epoch = Epoch - Duration

= INPUT VARIABLES
- rhs     The Epoch to subtract.

= RETURN VALUE
- Returns either the duration between to Epoch's or the a new
  Epoch that is the result of subtracting a duration from an epoch.
Nr   )	Zmatplotlib.testing.jpl_unitsZtestingZ	jpl_unitsr   ZDurationr
   r   r   r   )r   r   ZUr   Zdaysr   s   &&    r   __sub__ZEpoch.__sub__   s      	10 c::&&$;;;#**$SZZ(Auuswwjj3<<'zz#**d5j3&677r   c                sX    V P                  V P                  4      R RV P                   2# )Print the Epoch.z22.15eZ )r   r
   r   r   r   __str__ZEpoch.__str__   s'    //$++.v6a}EEr   c                s    \        V 4      # )r!   )Zstrr   r   r   __repr__ZEpoch.__repr__   s    4yr   c                st    . p^ p WV,          ,           pWQ8  d    V# VP                  V4       V^,          pK5  )at  
Generate a range of Epoch objects.

Similar to the Python range() method.  Returns the range [
start, stop) at the requested step.  Each element will be a
Epoch object.

= INPUT VARIABLES
- start     The starting value of the range.
- stop      The stop value of the range.
- step      Step to use.

= RETURN VALUE
- Returns a list containing the requested Epoch values.
)Zappend)ZstartZstopZstepZelemsZiZds   &&&   r   rangeZEpoch.range   sB    " D Ay
  LLOFAr   )r
   r   r   g oP)NNNN)"Z__name__Z
__module__Z__qualname__Z__firstlineno__r	   r   r   r   r   r   r   	functoolsZpartialmethodoperatorZeqZ__eq__ZneZ__ne__ZltZ__lt__ZleZ__le__ZgtZ__gt__ZgeZ__ge__r   r    r"   r#   Zstaticmethodr$   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s      	8 	(	
G:1x>,*, $$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7F$$T8;;7F+$8>F  r   r   )Z__doc__r%   r&   r   r   r   Z
matplotlibr    Zmatplotlib.datesr   r   ) r   r   <module>r'      s&          %G Gr   