
    IR-e                    p	   d dl Z d dlZd dlZd dlZd dl mZ d dlmZmZ d dlm	Z	 d dl
Z
d dlZd dlZd dl
mZ d dlmZ d dlmZ d dlmZ d d	lmZmZ d d
lmZmZmZmZmZmZm Z m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z'm(Z( d dl)m*Z*  ej+        ej,         ej-        e.          j/        d           Z0 ej+        ej,         ej-        e.          j/         ej-        e.          j/                  Z1 ej+        ej,         ej-        e.          j/         ej-        e.          j/        dz  dz            Z2 ej+        ej,         ej-        e.          j/        d          Z3d Z4d Z5 G d d          Z6 G d d          Z7 G d d          Z8 G d d          Z9 G d d          Z: G d d          Z; G d  d!          Z<d" Z=d# Z>d$ Z?d% Z@d& ZAd' ZBd( ZCd) ZDd* ZEd+ ZFd, ZGejH        jI        d-             ZJd. ZKd/ ZLd0 ZMd1 ZNd2 ZOd3 ZPd4 ZQd5 ZRd6 ZSd7 ZTd8 ZUd9 ZVejH        W                    e( d:;          d<             ZXd= ZYd> ZZd? Z[d@ Z\dA Z]dB Z^dC Z_dD Z`dE ZadF ZbdG ZcdH ZddI ZedJ ZfdK ZgdL ZhdM ZidN ZjdO ZkdP ZldQ ZmdR ZndS ZodT ZpdU ZqdV ZrdW ZsdX ZtdY ZudZ Zvd[ Zwd\ Zxd] Zyd^ Zzd_ Z{d` Z|dadbgdcddgdedfgdgdhgdidjgdkdlgdmZ} ee}          Z~e~                                Ze                    ej                  ZdmZejH                            dne~eeg          ejH                            doi dpdqig          ejH                            drdsdtg          du                                     Zdv ZejH                            doi dpdqig          dw             Zdx Zdy Zdz ZejH                            d{e          d|             ZejH                            d{e          d}             ZejH        W                    e' d~;          ejH                            d{e          d                         Zd Zd ZejH                            dddg          d             ZejH                            d ej                              d             ZejH                            dddg          d             Zd Zd Zd Zd Zd ZdS )    N)deepcopy)Decimallocalcontext)StringIO)ErfaWarning)assert_allclose)units)EarthLocation)ColumnTable)	STANDARD_TIME_SCALESTIME_FORMATS AstropyDatetimeLeapSecondWarningScaleValueErrorTime	TimeDelta
TimeStringTimezoneInfoconf)iers
isiterable)HAS_H5PYHAS_PYTZ)AstropyDeprecationWarningrtolatol   i          c                 B    t          t          j                  | _        d S N)r   r   FORMATSFORMATS_ORIGfuncs    =lib/python3.11/site-packages/astropy/time/tests/test_basic.pysetup_functionr'   /   s     ..D    c                     t           j                                         t           j                            | j                   d S r!   )r   r"   clearupdater#   r$   s    r&   teardown_functionr,   3   s5    LL)*****r(   c                   $   e Zd ZdZd Zd Zej                            de	j
                  d             Zej                            dddgg          d             Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )	TestBasicz;Basic tests stemming from initial example and API referencec                 v   ddg}t          |dd          }t          |          dk    sJ t          |j        t	          j        ddg                    sJ t          |j        t	          j        d	d
g                    sJ |j        }t          |          dk    sJ t          |j        t	          j        ddg                    sJ t          |j        t	          j        ddg                    sJ t          |j	                  dk    sJ t          |j        t	          j        ddg                    sJ d S )N1999-01-01 00:00:00.1234567892010-01-01 00:00:00isoutcformatscalezc<Time object: scale='utc' format='iso' value=['1999-01-01 00:00:00.123' '2010-01-01 00:00:00.000']>g    vBAg    OBAg߿g      zc<Time object: scale='tai' format='iso' value=['1999-01-01 00:00:32.123' '2010-01-01 00:00:34.000']>g#M߿g2Iv߿zb<Time object: scale='tt' format='iso' value=['1999-01-01 00:01:04.307' '2010-01-01 00:01:06.184']>gW<~A/^A)r   reprallclose_jdjd1nparrayallclose_jd2jd2taittallclose_seccxcsecselftimests      r&   test_simplezTestBasic.test_simple;   s   02GHuE222GG K K K K K 15"(Iy+A"B"BCCCCCE28:NKLL
 
 	
 	
 	

 EGG K K K K K 15"(Iy+A"B"BCCCCCEH35RSTT
 
 	
 	
 	
 JJ K K K K K Hbh 24FGHH
 
 	
 	
 	
 	
 	
r(   c                    d\  }}t          ||d          }|j        du r|j        dk    sJ t          j        dd          }t          |d          }|j        du r|j        |j        k    sJ d	}t          ||d          }|j        du r|j        |j        k    sJ t          j        d
          dz                      dd          }t          ||d          }|j        du sJ |j        t          j        ||          j        k    sJ dS )z+Test scalars, vector, and higher-dimensions)    (BAg      ?jdr5   T rI   g    -BAFr         @      $@      N)r   isscalarshaper;   arangereshape	broadcast)rD   valval1t1t2val2t3t4s           r&   test_different_dimensionsz#TestBasic.test_different_dimensionsc   s+    %	T#tD))){d""rx2~~~~i	9--#d###{e##CI(=(=(=(=#tD))){e##CI(=(=(=(=	#%..q!44#tD))){e####x2<T228888888r(   format_c                    t          g |          }|j        dk    sJ |j        dk    sJ |j        |k    sJ |j        }|j        dk    sJ |j        dk    sJ t          ||          }|j        dk    sJ |j        dk    sJ |j        |k    sJ |j        }|j        dk    sJ |j        dk    sJ |j        |k    sJ |j        dk    sJ d S )NrK   r   r   r?   )r   sizerR   r5   valuer?   r6   )rD   r^   rF   t_valuerY   r[   s         r&   test_empty_valuezTestBasic.test_empty_valuew   s   G$$$v{{{{w$x7""""'|q    }$$$$''***w!||||x4yG####Vw!||||x4yG####x5      r(   rb      NBAc                    t          |dd          }t          |d          }t          j        |j        |j        z
  dk              sJ t          j        ||z
  j        dk              sJ |j        j        |j        j        u sJ |j        j        |j        j        u sJ t          |d          }t          j        |j        |j        z
  dk              sJ t          j        ||z
  j        dk              sJ |j        j        |j        j        usJ |j        j        |j        j        usJ t          |dd	d
          }|j        dk    sJ t          |dd	d          }|j        dk    sJ dS )zbTest copying the values of a Time object by passing it into the
        Time initializer.
        rJ   r3   r4   F)copyr   Tr2   r?   rP   r5   r6   	precisionz2010-01-01 00:00:34.0dater5   r6   
out_subfmtz
2010-01-01N)r   r;   allrJ   _timer:   r>   rb   )rD   rb   rF   rY   s       r&   test_copy_timezTestBasic.test_copy_time   s   
 t5111!%   vadRUla'(((((vq2vkQ&'''''w{bhl****w{bhl****!$vadRUla'(((((vq2vkQ&'''''w{"(,....w{"(,.... !E!<<<x22222!E6BBBx<''''''r(   c                    t          j        dd          }t          |ddd          }|d         }|j        du sJ |j        j        |j        j        d         k    sJ |j        |j        u sJ t          |d         dd	          }|j        du sJ t          j        |j        j        |j        j        k              sJ t          |d                   }|j        du sJ t          j        |j        j        |j        j        k              sJ |d
d         }|j        du sJ t          j        |j        j        |j        j        d
d         k              sJ |j        |j        u sJ t          |d
d                   }|j        du sJ t          j        |j        j        |j        j        d
d         k              sJ t          |d
         |d         g          }|j        du sJ t          j        |j        j        |j        j        d
d         k              sJ t          |d
         |d         f          }	|	j        du sJ t          j        |	j        j        |j        j        d
d         k              sJ t          j        t          |                    |_	        |d
d         }
t          j        |
j
        |j
        d
d         k              sJ t          |ddt          j        t          |                    t          j        t          |                    f          }|d         }|j        |j        d         k    sJ |j        j        dk    sJ |dd
         }|j        j        dk    sJ |d         }|j        j        dk    sJ |d
d         }t          j        |j        |j        d
d         k              sJ t          j        d|j        j                  }|j                            t           j                  d         |k    sJ |j                            t           j                  d         |k    sJ ||j                            t           j                  d<   |j                            t           j                  d         |k    sJ t          j        ddd          }t          |ddt           j        f         |z   ddd          }|d         j        j        |j        j        d         k    sJ |d         j        du sJ t          j        |d         j        j        |j        j        d         k              sJ t          j        |d         j        j        |j        j        d         k              sJ t          j        |dddf         j        j        |j        j        dddf         k              sJ t          j        |dddf         j        j        |j        j        dddf         k              sJ t          j        |dddf         j        j        |j        j        k              sJ t          j        |dddf         j        j        |j        j        k              sJ |j        }|d         j	        |j	        d         k    sJ t          j        |d         j	        |j	        d         k              sJ t          j        |dddf         j	        |j	        dddf         k              sJ d|_	        |j        }|d         j	        dk    sJ |d         j	        dk    sJ |dddf         j	        dk    sJ t          |ddt           j        f         |z   ddt          j        t          |                    t          j        t          |                    f          }|d         j        |j        d         k    sJ t          j        |d         j        |j        d         k              sJ t          j        |dddf         j        |j        dddf         k              sJ |dd         }|j        du sJ |j        dk    sJ |j        dk    sJ dS )zTest that Time objects holding arrays are properly subscriptable,
        set isscalar as appropriate, and also subscript delta_ut1_utc, etc.P  Z  mjdr3   )45d50dr5   r6   location   Tr4         FrO   rL   )rP   r   )r   r   r   dtyper   +?皙?Nr   r      皙?r`   )r;   rS   r   rQ   rn   r:   rw   rm   lendelta_tdb_tt_delta_tdb_ttrR   r<   r|   viewndarraynewaxisr>   tdbra   )rD   rs   rF   rX   t1at1brY   t2at2bt2cr[   r\   t5at5bt5ct6allzerosfract7t7_tdbt7_tdb2t8t9s                          r&   test_getitemzTestBasic.test_getitem   s     iu%%U%.IIIqT{d""""x|qw{1~----{aj((((3q6%u555|t####vbhlcim3444441Q4jj|t####vbhlcim344444qsV{e####vbhlagk!A#&6677777{aj((((1QqS6ll|u$$$$vcimqw{1Q3'7788888AaD!A$<  |u$$$$vcimqw{1Q3'7788888AaD!A$<  |u$$$$vcimqw{1Q3'77888883q66**qsVvb&!/!A#*>>?????iC))29SXX+>+>?	
 
 
 e|r{1~----|!R''''1g|!T)))) !f|!R''''!WvbkR[1%5566666 8O2;3DEEE{
++B/8;;;;{
++A.(::::+3$$R({
++A.(::::yeS))2:%#	
 
 
 $x~!RX\$%77777$x D((((vbekoa899999vbekoa899999vbAhn(BHLA,>>?????vbAhn(BHLA,>>?????vbAhn(AGK788888vbAhn(AGK788888d|(F,?,EEEEEvfQi,0CA0FFGGGGGvfQQQTl/63Fqqq!t3LLMMMMM&t})S0000qz&#----qqq!t})S00002:%iD		**BIc$ii,@,@A	
 
 
 $x BK$55555vbenA677777vbAh'2;qqq!t+<<=====rrU{e####x4w!||||||r(   c                 (   t          ddd          }d|_        t          |j        d          sJ |j        dk    sJ |j        j        dk    sJ |j        j        d	k    sJ t          |j        j        d          sJ t          |j	        j        d
          sJ |j
        j        dk    sJ t          |j        d          sJ t          |j        d          sJ t          |j        d          sJ |j        t!          j        ddd          k    sJ dS )a  Use properties to convert scales and formats.  Note that the UT1 to
        UTC transformation requires a supplementary value (``delta_ut1_utc``)
        that can be obtained by interpolating from a table supplied by IERS.
        This is tested separately.r1   r2   r3   r4   ea?re   2010-01-01 00:00:00.000z2010-01-01 00:01:06.184z2010-01-01T00:00:34.000gp  NBAz2010-01-01T00:01:06.910g   NAr7   g  3Ai  rP   N)r   delta_ut1_utcr9   rJ   r2   r@   r?   fitsr3   ut1tcgisotrA   unixrB   gpsdatetimerD   rF   s     r&   test_propertieszTestBasic.test_properties  s3    &uEBBB 14+++++u11111tx44444uz66666158Y/////158%677777uz66666AFL11111AHm44444AE;/////zX.tQ::::::::r(   c                     t          ddd          }|j        dk    sJ d|_        |j        dk    sJ |j        j        j        dk    sJ dS )	zSet the output precision which is used for some formats.  This is
        also a test of the code that provides a dict for global and instance
        options.r1   r2   r3   r4   r   	   z2010-01-01 00:00:00.000000000N)r   r2   ri   r?   r3   r   s     r&   test_precisionzTestBasic.test_precision  sh    
 &uEBBBu11111 u77777uy} ???????r(   c                 0   d}t          j        t          |          5  t          dddd          }ddd           n# 1 swxY w Y   t          j        t          |          5  t          ddd	          }d
|_        ddd           dS # 1 swxY w Y   dS )zqVerifies that precision can only be 0-9 (inclusive). Any other
        value should raise a ValueError exception.z"precision attribute must be an intmatchr1   r2   r3   
   rh   Nr4   r}   )pytestraises
ValueErrorr   ri   )rD   err_messagerF   s      r&   test_precision_inputzTestBasic.test_precision_input(  s3    ;]:[999 	U 	U*5QSTTTA	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U ]:[999 	 	*5FFFAAK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s!   >AA$BBBc                 D   d}d}t          dddd||f          }d|_        |j        j        d	k    sJ |j        j        d
k    sJ |j        j        dk    sJ |j        j        dk    sJ |j        j        dk    sJ |j        j        dk    sJ |j	        j        dk    sJ dS )zTransform from UTC to all supported time scales (TAI, TCB, TCG,
        TDB, TT, UT1, UTC).  This requires auxiliary information (latitude and
        longitude).33333{3@=b}c2006-01-15 21:24:37.5r2   r3      r5   r6   ri   rw   r   2006-01-15 21:24:37.50000002006-01-15 21:24:37.83410002006-01-15 21:25:10.50000002006-01-15 21:25:42.68400002006-01-15 21:25:43.3226905z2006-01-15 21:25:42.6843728z2006-01-15 21:25:56.8939523N)
r   r   r3   r2   r   r?   r@   r   r   tcb)rD   latlonrF   s       r&   test_transformszTestBasic.test_transforms5  s    
 #3Z
 
 
 !uy99999uy99999uy99999tx88888uy99999uy99999uy9999999r(   c           	         t          dddd          }d|_        |j        j        dk    sJ |j        j        dk    sJ |j        j        d	k    sJ |j        j        d
k    sJ |j        j        dk    sJ |j        j        dk    sJ |j	        j        dk    sJ t          ddddt          j        z  dt          j        z  dt          j        z  f          }||k    sJ |j        |j        k    sJ dS )z=Location should default to geocenter (relevant for TDB, TCB).r   r2   r3   r   rh   r   r   r   r   r   r   z2006-01-15 21:25:42.6843725z2006-01-15 21:25:56.8939519r   rv   N)r   r   r3   r2   r   r?   r@   r   r   r   um)rD   rF   rY   s      r&   test_transforms_no_locationz%TestBasic.test_transforms_no_locationL  s   (eqQQQ uy99999uy99999uy99999tx88888uy99999uy99999uy99999#!#gq13wAC0	
 
 
 Bwwwwur(   c           	         d}d}t          dgddd||f          }t          |j        t                    sJ t          ||          }t          dgddd|          }t          |j        t                    sJ |j        |j        k    sJ t          dgddd|j        |j        |j        f          }t          |j        t                    sJ |j        |j        k    sJ dS )	zuCheck that location creates an EarthLocation object, and that
        such objects can be used as arguments.
        r   r   r   r2   r3   rz   r   N)r   
isinstancerw   r
   xyz)rD   r   r   rF   rw   rY   r[   s          r&   test_locationzTestBasic.test_locationa  s    $%3Z
 
 
 !*m44444 c**$%
 
 
 "+}55555{aj(((($%j(*hj9
 
 
 "+}55555{aj((((((r(   c                    d}d}t          dgdz  ddd||f          }t          j        |j        j        d	k              sJ t          j        |j        j        d
         dk              sJ t          dgdz  dddt          j        |d
g          t          j        |d
g          f          }t          j        |j        j        d	k              sJ |j        j        d
         dk    sJ |j        j        d         dk    sJ t          j        t                    5  t          ddddt          j        |d
g          t          j        |d
g          f           ddd           n# 1 swxY w Y   t          j        t                    5  t          dgdz  dddt          j        |d
g          t          j        |d
g          f           ddd           n# 1 swxY w Y   t          j
        dd                              dd          }t          |dd||f          }|j        dk    sJ |j        j        dk    sJ |j        j        |j        k    sJ t          |ddt          j        |d
g          t          j        |d
g          f          }|j        dk    sJ |j        j        |j        k    sJ |j        j        |j        k    sJ t          |ddt          j        |gd
gd
gd
gg          t          j        |gd
gd
gd
gg          f          }|j        dk    sJ |j        j        |j        k    sJ |j        j        |j        k    sJ dS )zCheck that location arrays are checked for size and used
        for the corresponding times.  Also checks that erfa
        can handle array-valued locations, and can broadcast these if needed.
        r   r   r   r   r2   r3   rz   r   z2006-01-15 21:24:37.500000r   z2006-01-15 21:25:42.684373rP   Nrx        j@g     k@ry   rs   rv   )ry   r   rL   )r   r;   rm   r3   r2   r   r<   r   r   r   rS   rT   rR   rw   )	rD   r   r   rF   rY   rs   r[   r\   t5s	            r&   test_location_arrayzTestBasic.test_location_array  s1    $%)3Z
 
 
 vaei#??@@@@@vaeil&BBCCCCC$%)hQx(("(C8*<*<=
 
 
 vbfj$@@AAAAAvz!} <<<<<vz!} <<<<<]:&& 	 	'(C8,,bhQx.@.@A   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ]:&& 	 	()A-(C8,,bhQx.@.@A   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 i))11!Q77#e5C:FFFx6!!!!{ B&&&&v|rx''''hQx(("(C8*<*<=	
 
 
 x6!!!!{ BH,,,,v|rx''''3%!qcA3/003%!qcA3/00	
 
 
 x6!!!!{ BH,,,,v|rx''''''s%   ?E''E+.E+AGG!Gc           	         d}d}t           j                            dd          5  t          D ]}t	          dd|||f          }t          D ]>}t          ||          }t          ||          }t          |j        |j                  sJ ?d}t          j	        t                    5  t          ||          }d	d	d	           n# 1 swxY w Y   	 d	d	d	           d	S # 1 swxY w Y   d	S )
zTest that standard scale transforms work.  Does not test correctness,
        except reversibility [#2074]. Also tests that standard scales can't be
        converted to local scalesr   r   auto_downloadFr   r2   rv   localN)r   r   set_tempr   r   getattrr9   rJ   r   r   r   )	rD   r   r   scale1rX   scale2rY   t21scale3s	            r&   test_all_scale_transformsz#TestBasic.test_all_scale_transforms  s    Y77 	- 	-. - -+  !3Z	   3 6 6F V,,B!"f--C&svru555555 !]?33 - - V,,B- - - - - - - - - - - - - - --	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	-s6   B C%C6CCC	C
CC #C c           	      |   t          dd           t          dd           t          dd           t          dd           t          dd	d
           t          ddd
           t          ddd
           t          ddd
           t          ddd
           t          ddd           t          ddd
           t          ddd           t          dd           t          ddd           t          dddd
           t          dddd
           t          d d!d
           t          d"d!d           t          j        d#d$d%d&d'd(d)          }t          |d*d
           t          ||gd*d
           t          j        d+          }t          |d,d
           t          ||gd,d
           d-S ).z.Create a time object using each defined format     B@decimalyearrK         Y@rB   r   r        x@byearr?   r4        @@jyearzB1950.0	byear_strzJ2000.0	jyear_strz2000-01-01 12:23:34.0r2   z2000-01-01 12:23:34.0Zr3   z2000-01-01T12:23:34.0r   z2000-01-01T12:23:34.0Zr   r      @OBAgh+@rJ   r   rs   z2000:001:12:23:34.0ydayz2000:001:12:23:34.0Z  rP   r   rx   ry   rO   @ r   z2012-06-18T02:00:05.453000000
datetime64N)r   r   r;   r   )rD   dtdt64s      r&   test_creating_all_formatsz#TestBasic.test_creating_all_formats  s   VM****U8$$$$U6""""U5!!!!VG51111VG51111Y{%8888Y{%8888$U%@@@@%e5AAAA$V5AAAA%fEBBBB$V4444$V5AAAAYd%@@@@S-U;;;;"6????#F%@@@@tQ1aF;;R
%0000b"Xj6666}<==T,e4444dD\,e<<<<<<r(   c           
         t          dd          }t          |j        ddd           t          |j        ddd           t          |j        d	d
d           |j        t          j        ddddddd          k    sJ |j        dk    sJ |j        dk    sJ |j        dk    sJ t          |j	        dd
d           t          |j
        dd
d           |j        dk    sJ |j        dk    sJ t          j        t                    5  |j         ddd           n# 1 swxY w Y   t          j        t                    5  |j         ddd           n# 1 swxY w Y   t          j        t                    5  |j         ddd           n# 1 swxY w Y   t          j        t                    5  |j         ddd           dS # 1 swxY w Y   dS )z
        Test transformation of local time to different formats
        Transformation to formats with reference time should give
        ScalevalueError
        r   r   r6   g[0{BAgLH>r   r   r   gl>@g5*)X@g sn=i  rP         r   %   i  z2006-01-15T21:24:37.500z2006:015:21:24:37.500g~G0+X@g:)X@z	B2006.042z	J2006.041N)r   r   rJ   rs   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rB   	plot_dater   s     r&   test_local_format_transformsz&TestBasic.test_local_format_transforms  s    (88807LSVWWWW18MTWXXXXM.		
 	
 	
 	
 zX.tQBBOOOOOOv22222v00000v22222G%,IPS	
 	
 	
 	
 	G'.KRU	
 	
 	
 	
 {k)))){k)))) ]?++ 	 	EE	 	 	 	 	 	 	 	 	 	 	 	 	 	 	]?++ 	 	FF	 	 	 	 	 	 	 	 	 	 	 	 	 	 	]?++ 	 	HH	 	 	 	 	 	 	 	 	 	 	 	 	 	 	]?++ 	 	KK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	sH   	DD!$D!EEE9FFF1GG
G
c           
      P   t          j         ddddddd          }t          j         ddd          }t          |d	d
          }|j        dk    sJ |j         |k    sJ |j        |k    sJ t          |j        d	          }|j         |k    sJ t          ||gd	          }t	          j        |j        ||gk              sJ t          dd          }|j         t          j         ddddddd          k    sJ |||z
  t	          j        d          z  z                       dd          }t          |d	          }|j        dk    sJ |d         j        |d         k    sJ |d         t          |d                   k    sJ t	          j        |j        |k              sJ t	          j        |d         j        |d         k              sJ t	          j        |dddf         t          |dddf                   k              sJ t          |d                   |d         k    sJ dS )z
        Test datetime format, including guessing the format from the input type
        by not providing the format keyword to Time.
        r   rP   r   rx   ry   rO   r     r3   r   r6   ri   z2000-01-02 03:04:05.123456000r   2000-01-01 01:01:01.123456789r?   iA    ry   rx   r   rP   Nr   r   )	r   r   r2   rb   r;   rm   rS   rT   rR   )rD   r   dt2rF   rY   dt3r[   s          r&   test_datetimezTestBasic.test_datetime#  sD   
 tQ1aF;;a++5A...u77777zRw"}}}}!%u%%%{b    "c%(((vag"c*+++++0>>>zX.tQ1aFKKKKKK S2X2..771==#U###x6!!!!$x~T****$x4D	??****vbh#o&&&&&vbekSV+,,,,,vbAh$s111a4y//122222BtH~~D))))))r(   c                     t          j        d          }t          j        d          }t          |ddd          }|j        dk    sJ |j        |k    sJ |j        |k    sJ t          |j        d          }|j        |k    sJ t          |dd	d          }|j        d
k    sJ |j        |k    sJ |j        |k    sJ t          |j        d          }|j        |k    sJ t          ||gdd          }t          j        |j        ||gk              sJ t          dd          }|j        t          j        d          k    sJ |||z
  t          j        d          z  z                       dd	          }t          |dd          }|j        dk    sJ |d         j        |d         k    sJ |d         t          |d         d          k    sJ t          j        |j        |k              sJ t          j        |d         j        |d         k              sJ t          j        |d d df         t          |d d df         d          k              sJ t          |d         d          |d         k    sJ d S )N2000-01-02T03:04:05.123456789z
2000-01-02r3   r   r   )r6   ri   r5   2000-01-02 03:04:05.123456789r   rx   z2000-01-02 00:00:00.000r6   r5   r   r?   z2000-01-01T01:01:01.123456789r   ry   r   r   rK   rP   r   r   )	r;   r   r   r2   rb   rm   rS   rT   rR   )rD   r   dt64_2rF   rY   r   r[   s          r&   test_datetime64zTestBasic.test_datetime64B  s   }<==|,,UaEEEu77777|t####w$!%u%%%}$$$$u,GGGu11111|v%%%%w&    !%u%%%}&&&&$u\BBBvag$/000000>>>|r}-LMMMMMM v}	"55>>q!DD#U<888x6!!!!$x~T****$x4D	,???????vbh#o&&&&&vbekSV+,,,,,vbAh$s111a4y"F"F"FFGGGGGBtH\222bh>>>>>>r(   c                    d}t          |ddd          }t          |j        d          sJ t          |j        d          sJ |j        dk    sJ |j        d	k    sJ t          |j        d
d          }t          |j        |          sJ t          |j        dd          }t          |j        |          sJ t          d	dd          }t          j	        |j        |dd          sJ |j        dk    sJ dS )z%Besselian and julian epoch transformsg*5BArJ   r?   rz   rh   gSߋ|@g2T;|@zB2015.136594zJ2015.134993r   r4   r   r   g|=r   r   N)
r   allclose_yearr   r   r   r   r9   rJ   r;   allclose)rD   rJ   rF   rY   s       r&   test_epoch_transformzTestBasic.test_epoch_transformd  s.   D;;;QW&899999QW&899999{n,,,,{n,,,,!''77725"%%%%%!''77725"%%%%%u:::{D"5q
 
 
 	
 	
 	
 {n,,,,,,r(   c                    ddg}t          j        t                    5  t          |dd           ddd           n# 1 swxY w Y   t          j        t                    5  t          ddd           ddd           n# 1 swxY w Y   t          j        t                    5  t          g            ddd           n# 1 swxY w Y   t          j        t                    5  t          d	gd
gdd           ddd           n# 1 swxY w Y   t          j        t                    5  t          d	d
dd           ddd           n# 1 swxY w Y   t          j        t                    5  t          dd           ddd           n# 1 swxY w Y   t          j        t                    5  t          t          j        dd           ddd           n# 1 swxY w Y   t          j        t                    5  t          j        t                    5  t          dd           ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   t          j        t                    5  t          d           ddd           n# 1 swxY w Y   t          j        t                    5  t          d           ddd           dS # 1 swxY w Y   dS )zWrong input type raises errorr      r2   r3   r4   N2000:001rJ   r   badrs   r?   z2005-08-04T00:01:02.000Zr   z2000-01-02T03:04:05(TAI)z2000-01-02T03:04:05(TAIz2000-01-02T03:04:05(UT(NIST))r   r   r   r   r;   nanwarnsr   )rD   rE   s     r&   test_input_validationzTestBasic.test_input_validationw  sK   R]:&& 	3 	3uE2222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3]:&& 	7 	7D6666	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7]:&& 	 	HHH	 	 	 	 	 	 	 	 	 	 	 	 	 	 	]:&& 	@ 	@'UGE????	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@]:&& 	< 	<%U;;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<]:&& 	: 	:+59999	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: ]:&& 	3 	3E2222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3]:&& 	> 	>788 > >/u====> > > > > > > > > > > > > > >	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> ]:&& 	, 	,*+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,]:&& 	1 	1/000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1s   =AA!B  BB$C  CC$DD
D
*E

EE.FFF0GG G=IH5)I5H9	9I<H9	=III0JJJ0KKKc                 $   dD ]\  }}}|dd|d}|dd|dd|d}t          j        t                    5  t          |dz   d          }ddd           n# 1 swxY w Y   |j        |d	z   k    sJ t          |d
z   d          }|j        |d
z   k    sJ t          |dz   d          }|j        |dz   k    sJ t          |dz   d          }|j        |dz   k    sJ |dk    r|dd}n	|dz   dd}t          j        t                    5  t          |dz   d          }ddd           n# 1 swxY w Y   |j        |dz   k    sJ t          |dz   d          }t          |dz   d          }t          ||z
  j        d          sJ dS )zlTime behaves properly near or in UTC leap second.  This
        uses the 2012-06-30 leap second for testing.))  rz      )  r      04d-02dz-01 23:59:60.0r3   r   Nz-02 00:00:00.000z 23:59:59.900z 23:59:60.000z 23:59:60.999rz   z-07-01rP   z-01-01z 23:59:61.0z 00:00:00.000z	 23:59:59z	 00:00:00       @)r   r  r   r   r2   rA   sec)	rD   yearmonthdayyyyy_mm
yyyy_mm_ddrX   yyyy_mm_dd_plus1t0s	            r&   test_utc_leap_seczTestBasic.test_utc_leap_sec  s    !@ 	4 	4D%///E///G <<<u<<<3<<<Jk** C C'$44EBBBC C C C C C C C C C C C C C C6W'999999 j?2%@@@B6Z/99999j?2%@@@B6Z/99999j?2%@@@B6Z/99999zz&*#6#6#6#6  &*Qh#:#:#:#: k** C C*}4EBBBC C C C C C C C C C C C C C C6-????? j;.e<<<B&4EBBBBbs333333=	4 	4s#   AA	!A	D11D5	8D5	c                 4   t          dd          }t          ddgd          }t          ||g          }t          |          dk    sJ |j        |j        k    sJ |j        |j        k    sJ t	          j        |j        t	          j        |j        g|j	        j        g          k              sJ t          |          }|j
        sJ |j        |j        k    sJ |j        |j        k    sJ t	          j        |j        |j        k              sJ t          |d          }|j        dk    sJ t	          j        |j        |j        j        k              sJ t          ||gd          }|j        dk    sJ |j        |j        k    sJ t	          j        |j        t	          j        |j        j        g|j        j        g          k              sJ t	          j        d	d
          }t	          j        ddd          }t          |ddt          j        f         |z   dd          }t          |dd         |dd         g          }|j        dk    sJ t!          j        t$                    5  t          |d           ddd           dS # 1 swxY w Y   dS )z(Initialize from one or more Time objects2007:001r?   r   z
2007-01-02z
2007-01-03r3   rx   r@   r   g    j@r   r~   r   Nrs   r4   r   ry   rO   )rx   rO   r   )r   r   r6   r5   r;   rm   rb   concatenater   r?   rQ   r3   r@   rS   r   rR   r   r   r   )rD   rX   rY   r[   rs   r   r\   r   s           r&   test_init_from_time_objectsz%TestBasic.test_init_from_time_objects  s   *E***<.e<<<2r(^^ 2ww!||||x28####yBI%%%%vbh".27)RV[1I"J"JJKKKKK "XX{x28####yBI%%%%vbh"(*+++++ "E"""x5    vbh"&,.///// 2r($'''x4yBI%%%%vbh".25:,
1K"L"LLMMMMM i))yeS))#aaam$t+EGGG2bqb62ac7#$$x6!!!! ]:&& 	$ 	$7####	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$s   .JJJN)__name__
__module____qualname____doc__rG   r]   r   markparametrizer   r"   rd   ro   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r"  r&  rL   r(   r&   r.   r.   8   s       EE&
 &
 &
P9 9 9( [Y55! ! 65!$ [Wy9+&>??( ( @?(0a a aF; ; ;(@ @ @  : : :.  * )  )  )DE( E( E(N- - -0= = =6$ $ $L* * *> ?  ?  ?D- - -&1 1 14!4 !4 !4F)$ )$ )$ )$ )$r(   r.   c                   *   e Zd ZdZej                            d eddd           eddd	d
ddddd           e ej	        d          dd           e e
j
        dddd
dd          dd          g          d             Zd Zd Zd Zd ZdS )TestVal2zTests related to val2d2001:001ignoredr3   )rV   rZ   r6     r   rx   r      M"-@r  r  r  hourminutesecondz
2005-02-25r   rP   r   c                     t          j        t                    5  t          di | ddd           dS # 1 swxY w Y   dS )zKTest that providing val2 is for string input lets user know we won't use itNrL   r   r   r   r   )rD   r/  s     r&   test_unused_val2_raisesz TestVal2.test_unused_val2_raises  s    0 ]:&& 	 	II1III	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   488c                     t          ddgddgdd          }|j        d         |j        d         k    sJ |j        d         |j        d         k    sJ dS )	zVarious tests of the val2 inputr   r   rs   r?   r4   r   rP   N)r   rs   rJ   r   s     r&   	test_val2zTestVal2.test_val2  s`    #w'3UKKKuQx158####tAw!$q'!!!!!!r(   c                 V   t          j        dd          }t          j        ddd          }t          |d d t           j        f         |dd          }|j        d	k    sJ t          j        t                    5  t          ddgg d
dd           d d d            d S # 1 swxY w Y   d S )Nr   g    j@r   r~   r   rs   r3   r4   )r   rO   )r         ?r  r?   )r;   rS   r   r   rR   r   r   r   )rD   rs   r   rF   s       r&    test_val_broadcasts_against_val2z)TestVal2.test_val_broadcasts_against_val2  s   i))yeS))QQQ
]#T%uEEEw&    ]:&& 	M 	M#weLLLL	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	Ms   9BB"%B"c                    dt          j        d          z   d d d f         }t          j        dddd          }t          ||dd	
          }t          |d|z  z   d|z  |z   dd	
          }t          dddd	
          }||d<   ||d<   |d         |d         k    s
J d            |d         |d         k    s
J d            |d         |d         k    s
J d            t          j        ||k              s
J d            d S )N鐁% rx   r   rP   ry   FendpointrJ   r?   rV   rZ   r5   r6     333333?)rP   r   writing worked)r   r   "broadcasting didn't cause problems)rP   rP   behaved as expected)r;   rS   linspacer   rm   rD   rV   rZ   rF   t_bt_is         r&   test_broadcast_not_writablez$TestVal2.test_broadcast_not_writable  s,   1%qqq$w/{1aU333StD>>>sQX~AGdN4uUUUu3t5AAAD	$4yAdG###%5###4yAdG###%I###4yAdG###%I###vcQh66!666666r(   c                    dt          j        d          z   }t          j        d          }t          ||dd          }t          |d|z  z   d|z  |z   dd          }t          dd	dd          }||d<   ||d<   |d         |d         k    s
J d
            |d         |d         k    s
J d            t          j        ||k              s
J d            d S )NrB  rx   rP   rJ   r?   rE  r   rF  rG  rH  rI  rJ  )r;   rS   r   rm   rL  s         r&   test_broadcast_one_not_writablez(TestVal2.test_broadcast_one_not_writable  s    	!$y||StD>>>sQX~AGdN4uUUUu3t5AAAA!1v1~~~/~~~1v1~~~C~~~vcQh66!666666r(   N)r'  r(  r)  r*  r   r+  r,  dictr;   r   r   r;  r=  r@  rO  rQ  rL   r(   r&   r.  r.    s0       [DZiu===D  $     D]R]<00yNNND%H%dAq"a;;)SX  	
 , - ,
" " "M M M7 7 7
7 
7 
7 
7 
7r(   r.  c                   T    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd ZdS )TestSubFormatz-Test input and output subformat functionalityc                 ,   g d}t          |dd          }t          j        |j        t          j        g d          k              sJ g d}t          |ddd          }t          j        |j        t          j        g d	          k              sJ d
S )Input subformat selection
2000-01-012000-01-01 01:012000-01-01 01:01:012000-01-01 01:01:01.123r2   r?   r4   )2000-01-01 00:00:00.0002000-01-01 01:01:00.0002000-01-01 01:01:01.000r[  )rY  rZ  r[  zdate_*r5   r6   	in_subfmt)r]  r^  r[  Nr   r;   rm   r2   r<   rC   s      r&   test_input_subformatz"TestSubFormat.test_input_subformat)  s    
 
 
 uE222vEx   

 

 
	
 
	
 
	
 WVVuEXFFFvEx   	
 	
 		
 		
 		
 		
 		
r(   c                     t          j        t                    5  t          dddd           ddd           dS # 1 swxY w Y   dS )zFailed format matchingrY  r2   r?   rj   r_  Nr:  rD   s    r&   test_input_subformat_failz'TestSubFormat.test_input_subformat_failM  s    ]:&& 	R 	R#E&QQQQ	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R   ;??c                     t          j        t                    5  t          dddd           ddd           dS # 1 swxY w Y   dS )zNon-existent input subformatrY  r2   r?   zdoesnt existr_  Nr:  rd  s    r&   test_bad_input_subformatz&TestSubFormat.test_bad_input_subformatR  s    ]:&& 	 	"5   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	rf  c                     g d}t          |ddd          }t          j        |j        t          j        g d          k              sJ dS )rV  rW  r2   r?   date_hmrk   )z2000-01-01 00:00rY  rY  rY  Nra  rC   s      r&   test_output_subformatz#TestSubFormat.test_output_subformatY  s{    
 
 
 uEiHHHvEx   

 

 
	
 
	
 
	
 
	
 
	
r(   c                 J   g d}t          |dd          }t          j        |j        t          j        g d          k              sJ t          |dd          }t          j        |j        t          j        g d          k              sJ d	|d
<   t          |dd          }t          j        |j        t          j        g d          k              sJ d|d
<   t          |dd          }t          j        |j        t          j        g d          k              sJ dS )z"FITS format includes bigger years.)rX  z2000-01-01T01:01:012000-01-01T01:01:01.123r   r?   r4   )z2000-01-01T00:00:00.000z2000-01-01T01:01:01.000rm  zlong*r5   rl   )+02000-01-01T00:00:00.000+02000-01-01T01:01:01.000z+02000-01-01T01:01:01.123z-00594-01-01r   )ro  rp  z-00594-01-01T00:00:00.000z+10594-01-01)ro  rp  z+10594-01-01T00:00:00.000N)r   r;   rm   r   r<   )rD   rE   rF   rY   r[   r\   s         r&   test_fits_formatzTestSubFormat.test_fits_formato  s    QPPvU333vFx   	
 	
 		
 		
 		
 %7;;;vGx   	
 	
 		
 		
 		
 "a%e444vGx   	
 	
 		
 		
 		
 "a%e444vGx   	
 	
 		
 		
 		
 		
 		
r(   c                    ddg}t          |dd          }d|_        t          j        |j        t          j        ddg          k              sJ d	|_        t          j        |j        t          j        d
dg          k              sJ dS )zYear:Day_of_year formatz
2000-12-01z2001-12-01 01:01:01.123r2   r?   r4   rj  z2000:336:00:00z2001:335:01:01*z2000:336:00:00:00.000z2001:335:01:01:01.123N)r   rl   r;   rm   r   r<   rC   s      r&   test_yday_formatzTestSubFormat.test_yday_format  s     89uE222 vaf*:<L)M N NNOOOOOvFbh 79PQRRR
 
 	
 	
 	
 	
 	
r(   c                    t          ddd          }|j        dk    sJ t          ddd          }|j        dk    sJ t          ddd          }|j        dk    sJ t          j        t                    5  t          dd	d
           ddd           n# 1 swxY w Y   t          j        t                    5  t          dd
           ddd           dS # 1 swxY w Y   dS )z&Test for issues related to scale inputr   rB   r3   r4   r   r?   r   r   r   z	bad scaleNz2000:001:00:00:00r   )r   r6   r   r   r   r   s     r&   test_scale_inputzTestSubFormat.test_scale_input  s    xu555w%vU333w%uE222w% ]?++ 	< 	<{;;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< ]?++ 	9 	9$K8888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9s$   7BBB:CC Cc                    dD ]}t          j        t                    5  t          |d                   }ddd           n# 1 swxY w Y   |j        |d         k    sJ t          |d         d|d                             d                   d|d                   }||k    sJ t          j        t                    5  t          d          }ddd           n# 1 swxY w Y   |j        }|j        d	k    sJ t          j        t                    5  t          d
          }ddd           n# 1 swxY w Y   |j        }|j        dk    sJ t          j        t                    5  t          d
d          }ddd           n# 1 swxY w Y   |j        dk    sJ t          j        t                    5  t          dd          }ddd           n# 1 swxY w Y   |j        dk    sJ t          j	        t                    5  t          j        t                    5  t          d
d          }ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )ziTest that the previous FITS-string formatting can still be handled
        but with a DeprecationWarning.))z2000-01-02(TAI)r?   )z!1999-01-01T00:00:00.123(ET(NIST))r@   )z2014-12-12T01:00:44.1(UTC)r3   r   NrP   (r   r4   z"1999-01-01T00:00:00.123456789(UTC)z1999-01-01T00:00:32.123z"1999-01-01T00:00:32.123456789(TAI)z1999-01-01T00:00:00.123r?   r   z!1999-01-01T00:00:32.123456789(ET)r@   r3   )r   r  r   r   r6   indexr?   r   r3   r   r   )rD   inputsrF   rY   s       r&   test_fits_scalezTestSubFormat.test_fits_scale  sS   
 	 	F
 788 $ $OO$ $ $ $ $ $ $ $ $ $ $ $ $ $ $7fQi'''' fQi 6&)//#"6"6 67fUViXXXB77777 \344 	; 	;9::A	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	;Ev22222\344 	; 	;9::A	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	;Ev22222 \344 	H 	H9GGGA	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	Hw%\344 	F 	F8EEEA	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	Fw$]:&& 	H 	H5N(O(O 	H 	H9GGGA	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	Hs   A  A	A	?CC"CD//D36D3'FF	F	6GGGIH=1I=I	II	IIIc                 p   t          dd          }|j        dk    sJ t          dd          }|j        dk    sJ t          dd          }|j        dk    sJ d	D ]}t          |          }|j        dk    sJ t          d
d          }|j        dk    sJ t          d          }|j        dk    sJ dS )z'Test behavior when no scale is providedr   rB   rK   r@   r   r3   r   r?   )r  z2000-01-01T00:00:00fffff@@r   J2000N)r   r6   )rD   rF   rj   s      r&   test_scale_defaultz TestSubFormat.test_scale_default  s     x(((w$v&&&w%u%%%w%7 	$ 	$DT

A7e#####(((w$MMw$r(   c                    t          ddd          }|j        j        dk    sJ t          |dd          }|j        dk    sJ d	}t          |dd
          }t	          |j        |          sJ t	          |j        |          sJ t	          |j        j        |          sJ t	          |j        j        |          sJ |j        dk    sJ t          dd
          }t	          |j        |          sJ t	          |j        j        |          sJ dD ]E}t          d|          }t          |j        |d          }t          ||          j        dk    sJ Ft          dd
          }t	          |j        d          sJ t	          |j        j        d          sJ t          dd
          }t	          |j        d          sJ dS )z,Test time formats derived from EpochFromTimer   rB   r?   r4   z1998-01-01 00:00:00.000r@   r2   r  r7   r3   z2010:001:00:00:00.000r   )r3   r@   r  r   r\  z2013-05-20 21:18:46g  ͤfAz2004-09-16T23:59:59g  ?RAN)	r   r@   r2   rb   rA   rB   r   r   r   )rD   rF   rY   t_cxcsecr6   s        r&   test_epoch_timeszTestSubFormat.test_epoch_times  s   XU333tx44444 !4...x44444 !(%888AGX.....AHh/////ADJ11111ADK22222v00000(666AHh/////ADK22222 # 	G 	GEZu---AafE&999B2u%%)-FFFFFF &e444AFL11111ADI|44444 &e444AFL1111111r(   c                     	 ddl m}  |t          j        ddd                    }n# t          $ r d}Y nw xY wt	          dd          }t          j        |j        |d	d
          sJ dS )a  Test the plot_date format.

        Depending on the situation with matplotlib, this can give different
        results because the plot date epoch time changed in matplotlib 3.3. This
        test tries to use the matplotlib date2num function to make the test
        independent of version, but if matplotlib isn't available then the code
        (and test) use the pre-3.3 epoch.
        r   )date2numr   rP   g    H&Az2000-01-01 00:00:00r3   r   gh㈵>r   N)matplotlib.datesr  r   ImportErrorr   r;   r  r   )rD   r  rV   rF   s       r&   test_plot_datezTestSubFormat.test_plot_date   s    
	:111111 (8,T1a8899CC  	 	 	 CCC	 &e444{1;$Q????????s   ( 77N)r'  r(  r)  r*  rb  re  rh  rk  rq  rt  rv  r{  r  r  r  rL   r(   r&   rT  rT  &  s        77"
 "
 "
HR R R
  
 
 
,4
 4
 4
l

 

 

9 9 9&#H #H #HJ  &"2 "2 "2H@ @ @ @ @r(   rT  c                      e Zd Zd Zej                             ej        ej	                  j
         ej        e          j
        k    d          d             Zej                             ej        ej	                  j
         ej        e          j
        k    d          d             Zej                             ej        ej	                  j
         ej        e          j
        k    d          ej                            dg d          d                         Zd	 Zej                            d
d          d             Zej                            dg d          d             Zd Zd Zej                            dg d          d             Zd Zej                            dddej	        fddefddefg          d             Zd Zd Zd Zd Zd Zd S )!TestNumericalSubFormatc                    t          dd          }|t          ddd          k    sJ |j        dk    sJ |j        dk    sJ |                    d          dk    sJ |                    dd          dk    sJ |                    dd	          d
k    sJ t	          j        d          t	          j        d          z   }t	          j        |                    dd          |dt	          j        t                    j	                  sJ d|_
        |j        dk    sJ |                    d          dk    sJ |j        dk    sJ |                    dd	          d
k    sJ |                    dd          dk    sJ d|_
        t	          j        |j        |dt	          j        t                    j	                  sJ t	          j        |                    dd           |dt	          j        t                    j	                  sJ t	          j        |j        |dt	          j        t                    j	                  sJ |                    dd          dk    sJ |                    dd          dk    sJ d S )N54321.000000000001rs   rK   1  -q=     @strsubfmtbytess   54321.000000000001longr   r   floatr   )r   rs   rb   to_valuer;   
longdoubler  finfor  epsrl   )rD   rF   expected_longs      r&   test_explicit_examplez,TestNumericalSubFormat.test_explicit_example9  s   %e444De4444444uw'!!!!zz%  G++++zz%z..2FFFFFzz%))-BBBBBg..u1E1EE {JJuVJ,,%$	
 
 
 	
 	
 	
 w.....zz%  G++++u,,,,,zz%z004IIIIIzz%z00G;;;;{17M"(5//BUVVVVVV{JJuTJ**%$	
 
 
 	
 	
 	
 {15-c@STTTTTTzz%z..2FFFFFzz%z00G;;;;;;r(   z long double is the same as floatreasonc                 d   d}t          dt          j        t          j                  j         z  dz  t          j        t
                    j                  }t          j        |          t          j        |          z   }||k    s
J d            t          |d          }t          ||d          }t          ||z
            dt          j
        z  k    sJ t          ||z   d          }|t          |d          k    sJ ||k    sJ |j        dk    sJ t          j        |                    dd	
          |dt          j        t
                    j                  sJ t          |dd	          }t          j        |j        |dt          j        t
                    j                  sJ d S )Nr  r     zlongdouble failure!rs   rK   g      4@r  r  r  r   r   rn  )maxr;   r  r  nmantr  r  r   absr   psrb   r  r  )rD   ifmjd_longrF   expectedt_floatrY   s           r&   test_explicit_longdoublez/TestNumericalSubFormat.test_explicit_longdouble\  s   
  "-00667%?%ATUU=##bmA&6&661}}}3}}}%(((1U+++1x<  D14K////q1uU+++$q///////!||||w'!!!!{JJuVJ,,%$	
 
 
 	
 	
 	
 (5V<<<{28XCbhuoo>QRRRRRRRRr(   c                    d}t          dt          j        t          j                  j         z  dz  t          j        t
                    j                  }t          ||d          }t          t          j        |          |d          }t          |t          j        |          d          }t          t          j        |          t          j        |          d          }||cxk    r|cxk    r|k    sn J dS )znEnsure either val1 or val2 being longdouble is possible.

        Regression test for issue gh-10033.
        r  r  r  rs   rK   N)r  r;   r  r  r  r  r  r   )rD   r  r  rX   rY   r[   r\   s          r&    test_explicit_longdouble_one_valz7TestNumericalSubFormat.test_explicit_longdouble_one_valw  s     "-00667%?%ATUU!Qu%%%"-""Ae444!R]1%%e444"-""BM!$4$4UCCCR####2############r(   fmt)rs   r   rB   c                    t          t          dd          |          }t          j        |          }t          j        t
                    j        |dk    rdndz  }|t          |t          j        t          j                  j        z  dz  |          z   }||k    s
J d            t          ||          }t          ||          }||k    sJ |                    |d	          }t          j	        ||d
|          sJ d S )N  rs   rK   r?  g     @r   zlongdouble weird!r  r  r   r   )
r   r   r;   r  r  r  r  r  r  r  )	rD   r  t_fmt
t_fmt_longr   t_fmt_long2tmtm2tm_long2s	            r&   test_longdouble_for_other_typesz6TestNumericalSubFormat.test_longdouble_for_other_types  s    U5111377]5))
 x"SE\\cc}M 3"-0044q8$$
 $
 
 [(((*=(((*S)));s+++Syyyy<<F<33{8[sFFFFFFFFr(   c                 n   d}|                     d          \  }}t          t          |          t          d|z             d          }t          |d          }t          |                    d          d          }t          t	          |          d          }||k    sJ ||k    sJ ||k    sJ d S )Nz54321.01234567890123456789.rs   rK   ascii)splitr   r  encoder   )rD   sr  r  rF   t_strt_bytes	t_decimals           r&   test_subformat_inputz+TestNumericalSubFormat.test_subformat_input  s    (wws||1q5q>>%888Qu%%%qxx((777E222	zzzz!||||A~~~~~~r(   rl   )r  r  c                    d}t          j        g d          }t          ||d|          }|j        }t          j        g d|          }t          j        ||k              sJ t          j        t          |d          |k              sJ t          ||d          }|                    d|          }t          j        ||k              sJ d S )	Nr  )r   g&.>r  rs   rn  )z54321.0z54321.000000001r  r{   rK   r  )r;   r<   r   rb   rm   r  )rD   rl   r  r  rF   rc   r  t_mjd_subfmts           r&   test_subformat_outputz,TestNumericalSubFormat.test_subformat_output  s    H'''((Ae
;;;'8@@@

 
 
 vg)*****vd8E222a788888 Ae$$$zz%
z;;vlh.///////r(   zfmt,string,val1,val2))rJ   z2451544.5333981g   @,BAgR@F?)r   z
2000.54321r   gna?)rB   100.01234563E Y@N)r   r  r  N)r   r  r  N)r   z1950.1gfffffx@N)r   z2000.1r}  Nc                     t          ||          }|t          |||          k    sJ |                    |d          |k    sJ d S )NrK   r  r  )r   r  )rD   r  stringrW   rZ   rF   s         r&   "test_explicit_string_other_formatsz9TestNumericalSubFormat.test_explicit_string_other_formats  s]     $$$DtC0000000zz#ez,,666666r(   c                 ~    t          ddd          }d|_        d|_        |j                            d          sJ d S )N2001r   r?   r4   rs   r  5)r   r5   rl   rb   
startswithr   s     r&   test_basic_subformat_settingz3TestNumericalSubFormat.test_basic_subformat_setting  sF    u555w!!#&&&&&&&r(   c                     t          ddd          }|                    dd           d|j        d	         v sJ |                    dd           d S )
Nr  r   r?   r4   rs   r  r  )rs   r  r5   )r   r  cacher   s     r&   )test_basic_subformat_cache_does_not_crashz@TestNumericalSubFormat.test_basic_subformat_cache_does_not_crash  s^    u555	

5
'''!22222	

5%     r(   )rJ   rs   rB   r   r   r   c                    t          ddd          }||_        t                      5 }d|_        |                    |d          }d d d            n# 1 swxY w Y   t          ddd          }||_        t                      5 }d|_        |                    |d          }d d d            n# 1 swxY w Y   ||k    s
J d            d S )	Nr  r   r?   r4   r   r  (   z:String representation should not depend on Decimal context)r   r5   r   precr  )rD   r  rF   ctxt_s_2rY   t2_s_40s          r&   +test_decimal_context_does_not_affect_stringzBTestNumericalSubFormat.test_decimal_context_does_not_affect_string  sJ   u555^^ 	+sCHJJsE**E	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ &666	^^ 	-sCHjje,,G	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- WG s#   AAAB..B25B2c                    t          dddd          }t                      5 }d|_        |                    dd          }d d d            n# 1 swxY w Y   t          dddd          }t                      5 }d	|_        |                    dd          }|                    dd          }d d d            n# 1 swxY w Y   ||k    s
J d
            ||k    s
J d            d S )Nr  g+=rs   r?   rE  r   decimalr  r  z6Should be the same but cache might make this automaticz3Different precision should produce the same results)r   r   r  r  )rD   rF   r  r  rY   t_s_40r  s          r&   test_decimal_context_cachingz3TestNumericalSubFormat.test_decimal_context_caching  sk   UuEBBB^^ 	8sCHJJuYJ77E	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 e%UCCC^^ 	;sCHZZiZ88Fkk%	k::G	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	;  X!Vs#   AAA96B;;B?B?zf, s, tr  r  r  r  c                 6   t          ddd          t          ddd          z
  }|                    ||          }t          ||          sJ ||_        ||_        t          |j        |          sJ t          |                    |d           |          sJ d S )N58000rs   r?   r4   58001)r   r  r   r5   rl   rb   )rD   r  r  rF   r   rb   s         r&   test_timedelta_basicz+TestNumericalSubFormat.test_timedelta_basic  s     '%u555E9
 9
 9
 
 Aq!!%#####	"(A&&&&&"++a..2222222r(   c                 D   t          d          }t          j        t          d          5  |                                 d d d            n# 1 swxY w Y   t          j        t
          d          5  |                    d           d d d            d S # 1 swxY w Y   d S )Nr~  zmissing.*required.*'format'r   format must be one ofjulian)r   r   r   	TypeErrorr  r   r   s     r&   test_need_format_argumentz0TestNumericalSubFormat.test_need_format_argument  s   MM]9,IJJJ 	 	JJLLL	 	 	 	 	 	 	 	 	 	 	 	 	 	 	]:-DEEE 	! 	!JJx   	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!s#   AAA2BBBc                 T   t          j        t          d          5  t          ddd           d d d            n# 1 swxY w Y   t          j        t          d          5  t          t	          j        d          dd           d d d            n# 1 swxY w Y   t          j        t          d          5  t          ddd	           d d d            n# 1 swxY w Y   t          j        t          d          5  t          ddd
           d d d            d S # 1 swxY w Y   d S )Nznot among selectedr   r  rs   r  r5   r`  r       R@r  r  )r   r   r   r   r;   r  rd  s    r&   test_wrong_in_subfmtz+TestNumericalSubFormat.test_wrong_in_subfmt  s2   ]:-ABBB 	; 	;'::::	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; ]:-ABBB 	H 	Hu%%ewGGGG	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H ]:-ABBB 	9 	9%8888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 ]:-ABBB 	: 	:&9999	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	:sC   ;??!%BBB8CCC=DD!$D!c                    t          dd          }t          j        t          d          5  |                    dd           d d d            n# 1 swxY w Y   t          j        t          d          5  d|_        d d d            n# 1 swxY w Y   t          j        t          d          5  d|_        d d d            d S # 1 swxY w Y   d S )Nr  rs   rK   zmust match oner   parrotr  r   r   r   r   r  rl   r`  r   s     r&   test_wrong_subfmtz(TestNumericalSubFormat.test_wrong_subfmt  s   ''']:-=>>> 	/ 	/JJuXJ...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ ]:-=>>> 	$ 	$#AL	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ ]:-=>>> 	# 	#"AK	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s5   AAA7BBB1CC
C
c                    t          d          }d}t          j        t          |          5  |                    dd           ddd           n# 1 swxY w Y   t          j        t          |          5  d|_        ddd           n# 1 swxY w Y   t          j        t          |          5  t          dd           ddd           n# 1 swxY w Y   t          j        t          |          5  d|_        ddd           n# 1 swxY w Y   t          j        t          |          5  t          ddd	           ddd           dS # 1 swxY w Y   dS )
z-Test case where format has no defined subfmtsr~  z*subformat not allowed for format jyear_strr   r   r  r  Nrl   r  r  )rD   rF   r   s      r&   test_not_allowed_subfmtz.TestNumericalSubFormat.test_not_allowed_subfmt&  s   MM<]:U333 	5 	5JJ{8J444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 ]:U333 	$ 	$#AL	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ ]:U333 	/ 	/X....	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ ]:U333 	# 	#"AK	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# ]:U333 	B 	BAAAA	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	B 	BsY   AAA7BBB1CCC5D		DD/EEEc                     t          dd          }|j        dk    sJ d|_        |j        dk    sJ |j        dk    sJ d S )N
2001-01-01rj  r  r   rs  z	J2001.001)r   rl   r5   rb   r   s     r&   (test_switch_to_format_with_no_out_subfmtz?TestNumericalSubFormat.test_switch_to_format_with_no_out_subfmt9  s\    )444|y(((( |s""""w+%%%%%%r(   N)r'  r(  r)  r  r   r+  skipifr;   r  r  r  r  r  r  r,  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  rL   r(   r&   r  r  8  s       !< !< !<F [#xrx'::1   S S	 S. [#xrx'::1   $ $	 $ [#xrx'::1    [U$=$=$=>>G G ?>	 
G 	 	 	 [\+;<<0 0 =<0  [	
 	
 	
 7 7 7
' ' '! ! ! [U$S$S$STTH H UTHW W W [FBM*Iw'E3	
 
3 
3 
3! ! !: : :	# 	# 	#B B B&& & & & &r(   r  c                       e Zd ZdZd ZdS )TestSofaErrorsz9Test that erfa status return values are handled correctlyc                     t          j        dgt           j                  }t          j        dgt           j                  }t          j        dgt           j                  }t          j        t
                    5  t          j        |||          \  }}d d d            n# 1 swxY w Y   d|d<   d|d<   t          j        t
                    5  t          j        |||          \  }}d d d            n# 1 swxY w Y   d|d<   t          j        t          d          5 }t          j        |||          \  }}d d d            n# 1 swxY w Y   t          |          dk    sJ t          |d	g          sJ t          |d
g          sJ d S )Nr   r{   ixr   r   zbad day    \(JD computed\)r   rP   r   g    (@)r;   r<   intcr   r   r   erfacal2jdr  r   r   r9   )rD   iyimiddjm0djmws          r&   test_bad_timezTestSofaErrors.test_bad_timeG  s)   XtfBG,,,XtfBG,,,XtfBG,,,]:&& 	0 	0BB//ID#	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 11]:&& 	0 	0BB//ID#	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 1\+-JKKK 	0qBB//ID#	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	01vv{{{{4)-----3	*******s6   =B##B'*B'C77C;>C;"EEEN)r'  r(  r)  r*  r  rL   r(   r&   r  r  D  s)        CC+ + + + +r(   r  c                   $    e Zd ZdZd Zd Zd ZdS )TestCopyReplicatez3Test issues related to copying and replicating datac                    t          j        dgt           j                  }t          |dd          }t	          |j        |          sJ d|d<   t	          |j        |          rJ t          j        dgt           j                  }t          |d	d          }t	          |j        dg          sJ d
|d<   t	          |j        dg          sJ dS )zInternals are never mutable.g   @(BAr{   rJ   r?   r4   i% r   r   rs   r   N)r;   r<   doubler   r9   rJ   )rD   jdsrF   mjdss       r&   test_immutable_inputz&TestCopyReplicate.test_immutable_input_  s    h	{")444T///14%%%%%AqtS)))))x	333e511114)-----Q14)-------r(   c                 B   t          dgddd          }|j        }|j        j                                        }|                                }|j        |j        k    sJ |j        |j        k    sJ |j        |j        k    sJ |j        |j        k    sJ |j        xj	        dz  c_	        |`
|`
|j        |j        k    sJ |j        |k    sJ |j        j        }d|d<   |j        j        |k    sJ |j        j        |j        j        k    sJ |j        j        |k    sJ d	S )
zTest replicate methodr  r   r?   rt   rt   rv   r   r   rL   N)r   r   rw   r   rg   	replicater5   r6   rn   r:   r  rD   rF   t_ydayt_loc_xrY   t2_loc_x_views         r&   test_replicatez TestCopyReplicate.test_replicatem  s;   *fENSSS*,##%%[[]]v    x29$$$$w"(""""zR[(((( 	 GHv    vb{}----z|r{},,,,z|w&&&&&&r(   c                    t          dddd          }|j        }|j        j                                        }|                                }|j        |j        k    sJ |j        xj        dz  c_        |`|`|j        |j        k    sJ |j        |k    sJ |j        j        }d|d<   |j        j        |k    sJ |j        j        |j        j        k    sJ |j        j        |k    sJ d	S )
zTest copy methodr  r   r?   r  rv   r   r   rL   N)r   r   rw   r   rg   rn   r:   r  r	  s         r&   	test_copyzTestCopyReplicate.test_copy  s    F%.QQQ*,##%%VVXXv     	 GHv    vb{}----z|r{},,,,z|w&&&&&&r(   N)r'  r(  r)  r*  r  r  r  rL   r(   r&   r   r   \  sG        ==. . .' ' '6' ' ' ' 'r(   r   c                   d    e Zd ZdZd Zej                            dg d          d             ZdS )TestStardatez(Sync chronometers with Starfleet Commandc                 ,   t          t          dd          j                  d d         dk    sJ t          t          dd          j                  d d         dk    sJ t          t          d	d          j                  d d         d
k    sJ d S )Nz
2320-01-01r?   r   r   z1368.99z
2330-01-01   z10552.76z
2340-01-01z19734.02)r  r   stardaterd  s    r&   test_iso_to_stardatez!TestStardate.test_iso_to_stardate  s    4E222;<<RaR@IMMMM4E222;<<RaR@JNNNN4E222;<<RaR@JNNNNNNr(   dates))i'  z2329-05-26 03:02)i N  z2340-04-15 19:05)i0u  z2351-03-07 11:08c                 p    |\  }}t          |d          }t          |dd          }|j        |k    sJ d S )Nr  rK   r2   rj  rn  )r   rb   )rD   r  r  r2   t_start_isos         r&   test_stardate_to_isoz!TestStardate.test_stardate_to_iso  sL     #hz222VEi@@@{c!!!!!!r(   N)	r'  r(  r)  r*  r  r   r+  r,  r  rL   r(   r&   r  r    sn        22O O O
 [	
 	
 	
 " " " " "r(   r  c                      t          ddd          } t          j        |           }t          j        |           }| j        |j        k    sJ | j        |j        k    sJ d S )Nr  r   r?   r4   )r   rg   r   rJ   )rF   rY   r[   s      r&   test_python_builtin_copyr    sX    Ze444A	1B	q		B425====425======r(   c                  .   t           j                             t           j        j                                      d          } t          j                    }|j        dk    sJ |j        dk    sJ |j         | z
  }|                                dk     sJ dS )zC
    Tests creating a Time object with the `now` class method.
    )tzNtzinfor   r3   r   )	r   nowtimezoner3   replacer   r5   r6   total_seconds)r!  rF   r   s      r&   test_nowr%    s     


8#4#8

9
9
A
A
A
N
NC

A8z!!!!7e	
c	B ######r(   c                  `   t          dd          } | j        dk    sJ t          dddgd          } t          j        | j        d	d
gk              sJ t          d          j        }t          d          j        }||z
  }t          j        | j        |d|z  z   |d|z  z   gk              sJ d S )Nr0  r   rK   g     D@r         ?g      ?r   r   g     C@r  )r   r   r;   rm   rb   rJ   )rF   jd0r:   d_jds       r&   test_decimalyearr*    s    Z'''A=F""""Vc4[777A6!'fg../////
z


C
z


C9D6!$3t+S4$;->??@@@@@@@r(   c                      t          j        t          d          5  t          dt          j        z  d           d d d            d S # 1 swxY w Y   d S )Nzcannot use Quantitiesr   g     V@r   rK   )r   r   r   r   r   yrrL   r(   r&   test_decimalyear_no_quantityr-    s    	z)@	A	A	A 2 2Vad]=11112 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2s   AAAc                      t          ddd          } | j        dk    sJ t          ddd          } | j        dk    sJ t          ddd          } | j        d	k    sJ d S )
Ng   QD:ArJ   r?   r4   z0001-01-01T00:00:00.000g   B:Az+00000-01-01T00:00:00.000g   vA:Az-00001-01-01T00:00:00.000r   r   rF   s    r&   test_fits_year0r1    s    Yt5111A6.....t5999A600000&t5AAAA60000000r(   c                      t          ddd          } | j        dk    sJ t          ddd          } | j        dk    sJ t          dddd          } | j        d	k    sJ d S )
Ng    TArJ   r?   r4   z+10000-01-01T00:00:00.000g   /TAz9999-01-01T00:00:00.000g)QΠEz9999-12-31T23:59:59.000r/  r0  s    r&   test_fits_year10000r3    s    Yt5111A600000t5999A6.....Y,TGGGA6.......r(   c                  P    t          ddd          } dt          |           v sJ d S )Nr  r   r?   r4   r3   )r   dirr0  s    r&   test_dirr6    s-    Ze444ACFF??????r(   c                  6   t          j        ddd          } | D ]V}t          |d          }t          j        |j                  |j        k    sJ t          j        |j                  dk    sJ Wt          | d          }t          j        t          j        |j                  |j        k              sJ t          j        t          j        |j                  dk              sJ t          j        t          j        |j                  dk              sJ dS )zyTest that jd1/jd2 in a TimeFromEpoch format is always well-formed:
    jd1 is an integral value and abs(jd2) <= 0.5.
    r   g     @1   rB   rK   r'  N)	r;   rK  r   roundr:   r  r>   rm   any)cxcsecsrB   rF   s      r&   test_time_from_epoch_jdsr<    s     k!["--G $ $)))x!%''''vae}}#####WX&&&A6"(15//QU*+++++6"&--3&'''''6"&--3&'''''''r(   c                      t          t          j        dd          dd          } t          |           du sJ t          | d                   du sJ t          | dd                   d	u sJ dS )
zCAny Time object should evaluate to True unless it is empty [#3520].rq   rr   rs   r3   r4   Tr   NF)r   r;   rS   boolr0  s    r&   	test_boolr?    su    RYue$$U%@@@A77d????!::"1";;%r(   c                     t          t          j        dd          dd          } t          |           dk    r| j        dk    sJ t          t          j        dd                              dd          dd          }t          |          dk    r|j        dk    sJ | d	d
         }t          |          d
k    r|j        d
k    sJ | d	d         }t          |          dk    r|j        dk    sJ | d         }t          j        t                    5 }t          |           d	d	d	           n# 1 swxY w Y   dt          |j
                  v sJ d	S )zBCheck length of Time objects and that scalar ones do not have one.rq   rr   rs   r3   r4   r   r   rO   NrP   r   r   )r   r;   rS   r   ra   rT   r   r   r  r  rb   )rF   rX   rY   r[   r\   errs         r&   test_len_sizerB    sw   RYue$$U%@@@Aq66R<<AFbLLLL	biu%%--a33E	O	O	OBr77a<<BGrMMMM	
2A2Br77a<<BGqLLLL	
2A2Br77a<<BGqLLLL	
1B	y	!	! SB               S^^######s   D00D47D4c                      t          dd          } d| _        t          j        t                    5  | j         | j        | j        j        k    sJ 	 ddd           dS # 1 swxY w Y   dS )zguard against recurrence of #1122, where TimeFormat class looses uses
    attributes (delta_ut1_utc here), preventing conversion to unix, cxcz
1900-01-01r   r   r   N)r   r   r   r  r   r   r3   r0  s    r&   test_TimeFormat_scalerD  0  s     	\'''AAO	k	"	" $ $	v#####$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $s   AA#&A#c                     |                      dd           t          t          j                    j        dd           d S )Nz%astropy.utils.iers.conf.auto_downloadTrB   r   r4   )setattrr   r!  rB   )monkeypatchs    r&   test_scale_conversionrH  :  s?    
 ?FFF	85999999r(   c                  T   t          j        ddg          } |                     d          }|                     d          }t          | d          }t          |d          }t          |d          }t          j        ||k              sJ t          j        ||k              sJ dS )z@Ensure that bigendian and little-endian both work (closes #2942)g     @g     ^@z>f8z<f8rs   rK   N)r;   r<   astyper   rm   )rs   
big_endianlittle_endiantime_mjdtime_bigtime_littles         r&   test_byteorderrP  C  s    
(Hh'
(
(CE""JJJu%%MC&&&HJu---H}U333K6(h&'''''6+)*******r(   c            
           G d dt           j                  } t          j         dddddd |             	          }t          |          }|j        t          j         dddd
dd          k    sJ dS )zJ
    Test #3160 that time zone info in datetime objects is respected.
    c                       e Zd Zd ZdS )"test_datetime_tzinfo.<locals>.TZm6c                 ,    t          j        d          S )Ni)hours)r   	timedelta)rD   r   s     r&   	utcoffsetz,test_datetime_tzinfo.<locals>.TZm6.utcoffsetU  s    %B////r(   N)r'  r(  r)  rW  rL   r(   r&   TZm6rS  T  s#        	0 	0 	0 	0 	0r(   rX    rP   r   r   rx   ry   r     N)r   r   r   rb   )rX  r/  rF   s      r&   test_datetime_tzinfor[  O  s    
0 0 0 0 0x 0 0 0 	$1b!Qttvv>>>AQA7h'aB1========r(   c                       G d dt                     } t          dd          }|j        dk    sJ |j        t          d          j        k    sJ dS )z@
    Test having a custom subfmts with a regular expression
    c                       e Zd ZdZdZdS )(test_subfmts_regex.<locals>.TimeLongYearlongyear))rj   z(?P<year>[+-]\d{5})-%m-%dz{year:+06d}-{mon:02d}-{day:02d}N)r'  r(  r)  namesubfmtsrL   r(   r&   TimeLongYearr^  b  s        
r(   rb  +02000-02-03r_  rK   z
2000-02-03N)r   r   rb   rJ   )rb  rF   s     r&   test_subfmts_regexrd  ]  sw    

 
 
 
 
z 
 
 
 	^J///A7n$$$$44%%(((((((r(   c                  *   ddddt          j         ddddd          fd	fD ]r\  } }t          d
d          }|                                }| |_        |j        |k    sJ |j        j        |j        j        u sJ |j        j        |j        j        u sJ sdS )z2
    Test basics of setting format attribute.
    )rJ   g   <BA)rs   g     /@)rB   gxFoAr   r   r   rx   r   )r2   z2000-02-03 00:00:00.000rc  r   rK   N)r   r   r  r5   rb   rn   r:   r>   )r5   rb   rF   r!  s       r&   test_set_format_basicrf  q  s    
 	 	X&tQ1a889* + + ///[[]]w%w{bhl****w{bhl*****+ +r(   c                      t          dd          } t          | j        | j        z
  d          sJ t          dd          } t          | j        | j        z
  d          sJ d S )N
2020-01-01r3   r   g     B@z
1970-01-01gv
  @)r   rA   unix_tair   r0  s    r&   test_unix_tai_formatrj    sj    \'''A
QV+T22222\'''A
QV+[9999999r(   c                      t          dddd          } |                                 }d| _        | j        dk    sJ | j        dk    sJ | j        dk    sJ d| _        | j        |j        k    sJ | j        dk    sJ dS )	zK
    Set format and round trip through a format that shares out_subfmt
    rc  r   date_hmsrO   )r5   rl   ri   r   z2000-02-03T00:00:00.00000N)r   rg   r5   ri   rl   rb   )rF   tcs     r&   test_set_format_shares_subfmtrn    s     	^FzQOOOA	
BAH;!<:%%%%711111AH7bh;!r(   c                      t          ddd          } d| _        | j        dk    sJ | j        dk    sJ d| _        | j        dk    sJ | j        dk    sJ dS )	zS
    Set format and round trip through a format that does not share out_subfmt
    rc  r   longdatern  r   rs  z2000-02-03T00:00:00.000N)r   r5   rl   rb   r0  s    r&   %test_set_format_does_not_share_subfmtrq    sz     	^FzBBBAAH<37/////AH<37///////r(   c                      t          dd          } t          j        t                    5 }|                     d           ddd           n# 1 swxY w Y   dt          |j                  v sJ dS )z`
    Passing a bad format to replicate should raise ValueError, not KeyError.
    PR #3857.
    r$  r?   r   definitely_not_a_valid_formatrK   Nr  )r   r   r   r   r  r  rb   rX   rA  s     r&   test_replicate_value_errorru    s    
 
j	&	&	&B	z	"	" =c
;<<<= = = = = = = = = = = = = = ="c#)nn444444s   AAAc                      t          dd          } d| j        vsJ t          j        t                    5 }t          | d           ddd           n# 1 swxY w Y   dt          |j                  v sJ dS )zw
    Make sure that 'astropy_time' format is really gone after #3857.  Kind of
    silly test but just to be sure.
    r$  r?   r   astropy_timerK   Nr  )r   r"   r   r   r   r  rb   rt  s     r&   test_remove_astropy_timerx    s    
 
j	&	&	&B++++	z	"	" (cR''''( ( ( ( ( ( ( ( ( ( ( ( ( ( ("c#)nn444444s   AAAc                      t          j                    } t          |           rJ t          ddgdd          }t          |          sJ dS )z
    Ensure that scalar `Time` instances are not reported as iterable by the
    `isiterable` utility.

    Regression test for https://github.com/astropy/astropy/issues/4048
    r0   r1   r2   r3   r4   N)r   r!  r   )rX   rY   s     r&   test_isiterablerz    s^     
B"~~		(*?@
 
 
B
 b>>r(   c                     t          dt          j        z  d          } t          d          }|                    |           }|                                t          j        dd          k    sJ t          |          }|                     |j                  |                                k    sJ ||k    sJ t          g d          }|                    |           }t          |          }t          |j        |          D ]2\  }}|                     |          |                                k    sJ 3t          j
        ||k              sJ d S )Ni	US/Hawaii)
utc_offsettzname2010-09-03 00:00:00   r   r  2005-09-03 06:00:00z1990-09-03 06:00:00)r   r   r6  r   to_datetimetimer   r~  zipr;   rm   )r  r  tz_aware_datetimeforced_to_astropy_timer   tz_dts         r&   test_to_datetimer    sU   	qvk	B	B	BB %&&D((,,!!##x}R';';;;;;!"34499T]##'8'?'?'A'AAAAA))))) UUUVVD((,,!"344(9:: / /	Eyy}}.....6$001111111r(   c                  X   t          d          } t          j        dddddd          }t          j        t          d          5  |                                  d d d            n# 1 swxY w Y   t          j        t          d          5  |                     d	          }||k    sJ 	 d d d            n# 1 swxY w Y   |                     d
	          }||k    sJ t          j        t          d          5  |                     d	           d d d            d S # 1 swxY w Y   d S )Nz2015-06-30 23:59:60.000r2  r   rP   r   zdoes not support leap secondsr   warn)leap_second_strictsilentz"leap_second_strict must be 'raise'invalid)r   r   r   r   r   r  r  r   )rF   dt_expr   s      r&   #test_to_datetime_leap_second_strictr    s   &''AtQ1a33F	z)I	J	J	J  	               
(0P
 
 
   ]]f]55V|||||	               
(	3	3B<<<<	z)N	O	O	O 4 4	3334 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4s6   A%%A),A)B77B;>B;;DD#&D#zrequires pytzr  c                     dd l } |                     d          }t          d          }|                    |          }t          |          }|                                t          j        dd          k    sJ |                    |j                  |                                k    sJ ||k    sJ t          g d          }|                    |          }t          |          }t          |j        |          D ]2\  }}|                    |          |                                k    sJ 3t          j	        ||k              sJ d S )Nr   r|  r  r  r  )
pytzr"  r   r  r  r   r~  r  r;   rm   )r  r  r  r  r  r   r  s          r&   test_to_datetime_pytzr    sU   KKK	{	#	#B%&&D((,,!"344!!##x}R';';;;;;99T]##'8'?'?'A'AAAAA))))) UUUVVD((,,!"344(9:: / /	Eyy}}.....6$001111111r(   c                  v   t          d          } t          d          }d| j        j        vsJ | j         | j        d         d         |j        k    sJ | j         | j        d         d         |j        k    sJ d| j        j        j        vsJ | `d| j        j        vsJ | j        rJ d| j        j        v sJ d S )Nr  r  r5   r2   r6   r?   )r   rn   __dict__r2   r  r?   r@   rF   rY   s     r&   
test_cacher    s    "##A	#	$	$B !'***** EE78U#rv---- EE77E"bf,,,, !$*----- 	
!'*****wag&&&&&&&r(   c            
          t          dd          } | j        dk    sJ | j        dk    sJ t          t          j        ddddd	d	          d          }|j        dk    sJ |j        dk    sJ d
S )zm
    Ensure that jd1 and jd2 of an epoch Time are respect the (day, fraction) convention
    (see #6638)
    r~  r   r   g   ,BAr   r   rP   r   r   N)r   r:   r>   r   r!  rX   s     r&   "test_epoch_date_jd_is_day_fractionr  -  s    
 
gU	#	#	#B6Y6S====	haB155U	C	C	CB6Y6S======r(   c                      t          dd          } t          dd          }| |k    sJ | dt          j        z  z   |dt          j        z  z   k    sJ dS )zV
    Ensure that two equal dates defined in different ways behave equally (#6638)
    r~  r   r   z2000-01-01 12:00:00rP   N)r   r   r8  r  s     r&   test_sum_is_equivalentr  =  sc     
gU	#	#	#B	#5	1	1	1B8888QX2AH#4555555r(   c                     d t          dd          D             } t          |           }|                    d          }t          |          }t          |          }t	          j        ||k              sJ t          t          dg                    }t          t          dg                    }||k    sJ t          ddg          } t	          j        t          |           t          d	d
g          k              sJ d S )Nc                 H    g | ]fd t          dd          D             S )c                 L    g | ]fd t          dd          D              S )c                 *    g | ]}d ddd|dS )r  r  r  rL   ).0r/  r   r   s     r&   
<listcomp>zDtest_string_valued_columns.<locals>.<listcomp>.<listcomp>.<listcomp>L  s8    	:	:	:Q
$
$
$Q
$
$
$Q
$
$
$	:	:	:r(   rP   rx   range)r  r   r   s    @r&   r  z9test_string_valued_columns.<locals>.<listcomp>.<listcomp>L  s:    PPPq	:	:	:	:	:eAqkk	:	:	:PPPr(   rO   r   r  )r  r   s    @r&   r  z.test_string_valued_columns.<locals>.<listcomp>K  sF        	QPPPE!QKKPPP  r(   r  i  SB1950s   B1950s
   2012-01-01s   2012-01-01T00:00:00z
2012-01-01z2012-01-01T00:00:00)r  r   rJ  r   r;   rm   )rE   cutf32cbytestutf32tbytess        r&   test_string_valued_columnsr  H  s     tT""  E E]]F]]3F&\\F&\\F6&F"#####&'##$$F&($$%%FVM#9:;;E6$u++|5J&K!L!LLMMMMMMMr(   c                  
   d} d}|                     d          | k    sJ t          |           }t          |          }||k    sJ t          j        |          }|j        j        dk    sJ t          |          }||k    sJ d S )Nz2011-01-02T03:04:05s   2011-01-02T03:04:05r  r  )decoder   r;   r<   r|   kind)tstringr  r!  rX   tarrayrY   s         r&   test_bytes_inputr  \  s    #G#F==!!W,,,,	gB	fB8888XfF<####	fB888888r(   c                  @   t          g dd          } d| d<   t          | d         j        d          sJ d| _        t	          j        t                    5 }d| d<   d d d            n# 1 swxY w Y   dt          |j                  v sJ t	          j        t                    5 }d| d d <   d d d            n# 1 swxY w Y   dt          |j                  v sJ d| _        d	| d<   t          | d         j        d	          sJ t          d
d          } d| d<   | j                            d          sJ t          d
dgd          } | j	        }t	          j        t                    5 }d|d<   d d d            n# 1 swxY w Y   dt          |j                  v sJ d S )NrP   r   rx   rB   rK   rM   rP   Fz'Time object is read-only. Make a copy()TrN   r  r3   r   2000:002rL   z2005:001r   )
r   rA   rb   	writeabler   r   r   r  r  r@   )rF   rA  rY   s      r&   test_writeable_flagr  i  s_   YYYx(((AAaD!
C(((((AK	z	"	" c!              4CIFFFF	z	"	" c!!!              4CIFFFFAKAaD!
D))))) 	Zu%%%AAbE7j))))) 	j*%U333A	
B	z	"	" c1              4CIFFFFFFs6   A((A,/A,$B88B<?B<)E;;E?E?c                  $   t          ddgt          j        z  ddgt          j        z  ddgt          j        z            } t          ddgddggd| 	          }d
|d<   t	          |j        d
dgddgg          sJ t          j        t                    5 }t          dd          |d<   d d d            n# 1 swxY w Y   d	                    | d
                   t          |j                  v sJ t          dd| d
         	          |d<   t	          |j        ddgddgg          sJ t          j        t                    5 }t          dd| d         	          |d<   d d d            n# 1 swxY w Y   d	                    | d
         | d                   t          |j                  v sJ t          ddgddggd          }t          j        t                    5 }t          dd| d         	          |d<   d d d            n# 1 swxY w Y   d	                    | d                   t          |j                  v sJ t          ddgddggd| 	          }t          ddgd| 	          |d
d d f<   t	          |j        ddgddgg          sJ d S )NrP   r   rx   ry   rO   rz   )r   r   r   rB   r5   rw   r   r   r}   rK   zVcannot set to Time with different location: expected location={} and got location=NonezTcannot set to Time with different location: expected location={} and got location={}zVcannot set to Time with different location: expected location=None and got location={})r
   r   r   r   rA   rb   r   r   r   r5   r  )locrF   rA  s      r&   test_setitem_locationr    su   
1a&13,1a&13,1a&13,
G
G
GCq!fq!fh===A AdG1a&1a&!122222 
z	"	" ,cr(+++$, , , , , , , , , , , , , , ,	"F3q6NNc#)nn	= 	= 	= 	= 2hQ888AdG2q'Aq6!233333 
z	"	" =cr(SV<<<$= = = = = = = = = = = = = = =	 &QQ00C	NN	C 	C 	C 	C 	q!fq!fh///A	z	"	" =cr(SV<<<$= = = = = = = = = = = = = = =	 &Q..C	NN	; 	; 	; 	; 	q!fq!fh===AB8Hs;;;AadG2r(QF!34444444s6   B44B8;B8E))E-0E-HHHc                     t          ddgddggd          } | j        i k    sJ | j         d| j        d         v sJ t          j        | j        d	d
gddggk              sJ d| d<   | j        i k    sJ t          | j        ddgddgg          sJ t          j        | j        d	dgddggk              sJ | j         d| dd d f<   | j        i k    sJ t          | j        ddgddgg          sJ ddg| d d df<   t          | j        ddgddgg          sJ t          ddg          } d| d<   t          j        t                    5 }d| d<   d d d            n# 1 swxY w Y   dt          |j                  v sJ d S )NrP   r   rx   ry   rB   rK   r2   r5   z1998-01-01 00:00:01.000z1998-01-01 00:00:02.000z1998-01-01 00:00:03.000z1998-01-01 00:00:04.000d   )r   rP   z1998-01-01 00:01:40.000   z1998:002z1998:003iQ i  r  r  r0  r   z0cannot convert value to a compatible Time object)r   r  r2   r;   rm   rA   rb   r   r   r   r  )rF   rA  s     r&    test_setitem_from_python_objectsr    s?   q!fq!fh///A7b====EEAGH%%%%%6	&(AB&(AB
	
     AdG7b====1c(QF!3444446	&(AB&(AB
	
     EEAadG7b====1c(S#J!788888 :&AaaadG1i.3	2B!CDDDDD 	j*%&&AAaD	z	"	" c!              =SYOOOOOOs   EE Ec                  <   t          ddgd          } t          dgd          }|d         | d<   | j        d         |j        j        d         k    sJ t          ddgd          } d	|_        |d         | d<   | j        d         |j        j        d         k    sJ d
S )zSet from existing Time object.r  r  r3   r   z2000:010r?   r   rP   r   N)r   rb   r3   r5   r   r  s     r&   test_setitem_from_time_objectsr    s     	j*%U333A	zl%	(	(	(Ba5AaD71:a(((( 	j*%U333ABIa5AaD6!9A&&&&&&r(   c                      t          ddgd          } t          j        t                    5  d| d<   d d d            d S # 1 swxY w Y   d S )NrP   r   rB   rK   rx   asdf)r   r   r   
IndexErrorr0  s    r&   test_setitem_bad_itemr    s    aVH%%%A	z	"	"  &	                 s   A  AAc                      t          ddgd          } ddg| _        ddg| _        d| d<   t          | d          rJ t          | d          rJ d	S )
z(Setting invalidates any transform deltasrP   r   rB   rK   rx   ry   r   _delta_ut1_utcN)r   r   r   hasattrr0  s    r&   test_setitem_deltasr    sj    aVH%%%AVAN!fAOAaDq/*****q*+++++++r(   c                       G d dt                     } t          d          } | |          }|j        | k    sJ ||k    sJ dS )z=Check that we can initialize subclasses with a Time instance.c                       e Zd ZdS )test_subclass.<locals>._TimeN)r'  r(  r)  rL   r(   r&   _Timer    s        r(   r  z1999-01-01T01:01:01N)r   	__class__)r  rX   rY   s      r&   test_subclassr    sm            
#	$	$B	rB<5    888888r(   c                      d} t          |           }|j        D ]$}||_        |                    d          | k    sJ %dS )Test of Time.strftimez2010-09-03 06:00:00%Y-%m-%d %H:%M:%SNr   r"   r5   strftimetime_stringrF   r5   s      r&   test_strftime_scalarr    sW    'K[A) > >zz-..+=====> >r(   c                      g d} t          |           }|j        D ]6}||_        |                    d                                          | k    sJ 7d S )N)r  r  1995-12-31 23:59:60r  )r   r"   r5   r  tolisttstringsrF   r5   s      r&   test_strftime_arrayr    sk    TTTHXA) D Dzz-..55778CCCCCD Dr(   c                  "   ddgddgg} t          j        |           } t          |           }|j        D ][}||_        t          j        |                    d          | k              sJ |                    d          j        | j        k    sJ \d S )N1998-01-01 00:00:011998-01-01 00:00:021998-01-01 00:00:03r  r  )r;   r<   r   r"   r5   rm   r  rR   r  s      r&   test_strftime_array_2r  "  s    	 56	 56H x!!HXA) G Gvajj!455ABBBBBzz-..4FFFFFG Gr(   c                      d} t          |           }|j        D ]$}||_        |                    d          | k    sJ %d S )Nr  r  r  r  s      r&   test_strftime_leapsecondr  1  sW    'K[A) > >zz-..+=====> >r(   c                  b    d} t          d          }t          j        | d          }||k    sJ dS )Test of Time.strptimez2007-May-04 21:08:122007-05-04 21:08:12%Y-%b-%d %H:%M:%SNr   strptimer  time_objectrF   s      r&   test_strptime_scalarr  :  s>    (K,--Kk#677Ar(   c                      ddgddgg} t          j        |           } t          ddgddgg          }t          j        | d	          }t          j        ||k              sJ |j        | j        k    sJ d
S )r  z1998-Jan-01 00:00:01z1998-Jan-01 00:00:02z1998-Jan-01 00:00:03z1998-Jan-01 00:00:04r  r  r  1998-01-01 00:00:04r  Nr;   r<   r   r  rm   rR   r  r  rF   s      r&   test_strptime_arrayr  C  s     
 !78	!78H x!!H"$9:"$9:	
 K 	h 344A6!{"#####7hn$$$$$$r(   c                      g d} t          j        t                    5  t          j        | d           d d d            d S # 1 swxY w Y   d S )Nr  z%S)r   r   r  r   r  )r  s    r&   test_strptime_badinputr  W  s    yyH	y	!	! & &h%%%& & & & & & & & & & & & & & & & & &s   AAAc                  b    d} t          d          }t          j        | d          }||k    sJ d S )Ns   2007-May-04 21:08:12r  r  r  r  s      r&    test_strptime_input_bytes_scalarr  ]  s>    )K,--Kk#677Ar(   c                      ddgddgg} t          j        |           } t          ddgddgg          }t          j        | d	          }t          j        ||k              sJ |j        | j        k    sJ d S )
Ns   1998-Jan-01 00:00:01s   1998-Jan-01 00:00:02s   1998-Jan-01 00:00:03s   1998-Jan-01 00:00:04r  r  r  r  r  r  r  s      r&   test_strptime_input_bytes_arrayr  e  s    	 "9:	 "9:H x!!H"$9:"$9:	
 K 	h 344A6!{"#####7hn$$$$$$r(   c                  b    t          dd          } t          j        dd          }| |k    sJ d S )Nz1995-12-31T23:59:60r   rK   z1995-Dec-31 23:59:60r  r  	time_obj1	time_obj2s     r&   test_strptime_leapsecondr  x  s?    *6:::I46IJJI	!!!!!!r(   c                  h    t          ddd          } t          j        ddd          }| |k    sJ d S )Nz0995-12-31T00:00:00r   r?   r4   z0995-Dec-31 00:00:00r  r   r  r  s     r&   test_strptime_3_digit_yearr    sG    *6GGGI46IQVWWWI	!!!!!!r(   c                  b    d} t          d          }t          j        | d          }||k    sJ d S )Nz2007-May-04 21:08:12.123z2007-05-04 21:08:12.123%Y-%b-%d %H:%M:%S.%fr  r  s      r&   test_strptime_fracsec_scalarr    s>    ,K011Kk#9::Ar(   c                      ddgddgg} t          j        |           } t          ddgddgg          }t          j        | d	          }t          j        ||k              sJ |j        | j        k    sJ d
S )r  z1998-Jan-01 00:00:01.123z1998-Jan-01 00:00:02.000001z1998-Jan-01 00:00:03.000900z1998-Jan-01 00:00:04.123456z1998-01-01 00:00:01.123z1998-01-01 00:00:02.000001z1998-01-01 00:00:03.000900z1998-01-01 00:00:04.123456r  Nr  r  s      r&   test_strptime_fracsec_arrayr    s     
$%BC	&(EFH x!!H&(DE)+GH	
 K 	h 677A6!{"#####7hn$$$$$$r(   c                      d} t          |           }|j        D ]$}||_        |                    d          | k    sJ %dS )r  2010-09-03 06:00:00.123%Y-%m-%d %H:%M:%S.%fNr  r  s      r&   test_strftime_scalar_fracsecr
    s[    +K[A) A Azz011[@@@@@A Ar(   c                      d} t          |           }|                    d          dk    sJ d|_        |                    d          dk    sJ d S )Nz2010-09-03 06:00:00.123123123r	  r  r   )r   r  ri   )r  rF   s     r&   &test_strftime_scalar_fracsec_precisionr    s_    1K[A::,--1JJJJJAK::,--1PPPPPPPr(   c                      g d} t          |           }d|_        |j        D ]6}||_        |                    d                                          | k    sJ 7d S )N)z2010-09-03 00:00:00.123000z2005-09-03 06:00:00.000001z1995-12-31 23:59:60.000900rz   r	  )r   ri   r"   r5   r  r  r  s      r&   test_strftime_array_fracsecr    sz      H
 	XAAK) G Gzz01188::hFFFFFG Gr(   c                  p   t          ddgd          } |                     dd          }t          j        |t          g dd          k              sJ |                     dt          d                    }t          j        |t          g dd          k              sJ |                     dt          d          g          }t          j        |t          g dd          k              sJ |                     dddgd	
          }t          j        |t          g dd          k              sJ |                     dt          j        ddg                    }t          j        |t          g dd          k              sJ |                     dt          j        ddg                    }t          j        |t          g dd          k              sJ |                     dt          j        ddg                    }t          j        |t          g dd          k              sJ d S )NrP   r   r   rK   z1970-01-01 00:01:00)rP   <   r   r   r  r   axis)rP   r   r  r   )rP   r   r   r  r  )r   r  rP   r   )r   insertr;   rm   r<   r  r  s     r&   test_insert_timer    s-   	q!fV	$	$	$B ))A,
-
-C6#jjj888899999 ))At122
3
3C6#jjj888899999 ))A2334
5
5C6#jjj888899999 ))ABxa)
(
(C6#nnnV<<<<===== ))ArxR))
*
*C6#nnnV<<<<===== ))ArxR))
*
*C6#nnnV<<<<===== ))B"b**
+
+C6#nnnV<<<<=======r(   c                  "   t          ddgd          } |                     d| d                   } | j        dk    sJ | d         | d         k    sJ |                     dd          } | j        dk    sJ t          | d                   dk    sJ d S )Nz
1999-01-01z
1999-01-02rj   r  r   rP   z
1999-01-03)r   r  rl   r  )Ts    r&   test_insert_time_out_subfmtr    s    lL)f===A	AaDA<6!!!!Q41Q4<<<<	L!!A<6!!!!qt99$$$$$$r(   c                  d   t          dd          } t          j        t                    5 }|                     dd           d d d            n# 1 swxY w Y   dt          |j                  v sJ t          ddgd          } t          j        t                    5 }|                     ddd           d d d            n# 1 swxY w Y   d	t          |j                  v sJ t          j        t                    5 }|                     t          d           d           d d d            n# 1 swxY w Y   d
t          |j                  v sJ t          j        t                    5 }|                     dd           d d d            n# 1 swxY w Y   dt          |j                  v sJ d S )NrP   r   rK   r   2   zcannot insert into scalarr   r  zaxis must be 0zobj arg must be an integeriz2index -100 is out of bounds for axis 0 with size 2)
r   r   r   r  r  r  rb   r   slicer  )r  rA  s     r&   test_insert_exceptionsr    sv   	a			B	y	!	! S
		!R              &#ci..8888	q!fV	$	$	$B	z	"	" !c
		!Ra	   ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s39~~----	y	!	! #S
		%++r"""# # # # # # # # # # # # # # #'3sy>>9999	z	"	" c
		$              ?3sy>>QQQQQQsG   AAACC	C>$D..D25D2*FFFc                      t          j        d          } t          | dd          }|j        dk    sJ |j        | k    sJ |j        | k    sJ d S )Nr  r3   r   r   r  )r;   r   r   r2   rb   )r   rF   s     r&   test_datetime64_no_formatr  	  s`    =899DT!,,,A533333<47d??????r(   c                     t          dt          j        z  dt          j        z  dt          j        z            } d | fD ]0}t          g dd|          }t          j        j        |d<   t          |d                   }t          |d                   }t          |d                   }||k    sJ ||k    sJ t          j	        t                    5 }t          |           d d d            n# 1 swxY w Y   |j        j        d         dk    sJ t          j	        t                    5 }t          |d                    d d d            n# 1 swxY w Y   |j        j        d         d	k    sJ 2t          dd|          }t          dd
          }t          |          t          |          k    sJ t          dd          }t          |d          }||k    sJ t          |          t          |          k    sJ d S )NrP   r   rx   rP   rP   r   rx   rB   r  r   z(unhashable type: 'Time' (must be scalar)z)unhashable type: 'Time' (value is masked)rK   z2000:180r3   r   r?   )r
   r   r   r   r;   mamaskedhashr   r   r  rb   args)loc1r  rF   h1h2h3excrY   s           r&   test_hash_timer*  	  sT   QS!ac'1qs733DTz P Ph===u|!!A$ZZ!A$ZZ!A$ZZRxxxxRxxxx]9%% 	GGG	 	 	 	 	 	 	 	 	 	 	 	 	 	 	y~a $NNNNN]9%% 	1JJJ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	y~a $OOOOOOQx#...A	a	!	!	!B77d2hhZu%%%A	au			B777777d2hhs$   C,,C0	3C0	(E

E	E	c                  ^   t          g dd          } t          j        j        | d<   t	          | d                   }t	          | d                   }t	          | d                   }||k    sJ ||k    sJ t          j        t                    5 }t	          |            d d d            n# 1 swxY w Y   |j        j	        d         dk    sJ t          j        t                    5 }t	          | d                    d d d            n# 1 swxY w Y   |j        j	        d         d	k    sJ d S )
Nr   r  rK   rx   r   rP   r   z-unhashable type: 'TimeDelta' (must be scalar)z.unhashable type: 'TimeDelta' (value is masked))
r   r;   r!  r"  r#  r   r   r  rb   r$  )rF   r&  r'  r(  r)  s        r&   test_hash_time_deltar,  )	  s   ,,,u---A5<AaD	adB	adB	adB88888888	y	!	! SQ              9>! OOOOO	y	!	! SQqT


              9>! PPPPPPPs$   B,,B03B0(D

DDc                     t          j        t                    5 } t          d           d d d            n# 1 swxY w Y   dt	          | j                  v sJ t          j        t                    5 } t          dd           d d d            n# 1 swxY w Y   dt	          | j                  v sJ t          j        t                    5 } t          d           d d d            n# 1 swxY w Y   dt	          | j                  v sJ t          j        t                    5 } t          dd	           d d d            n# 1 swxY w Y   d
t          j        z   dz   t	          | j                  k    sJ t          j        t                    5 } t          dd	           d d d            n# 1 swxY w Y   d
t          j        z   dz   t	          | j                  k    sJ d S )Nr   z*No time format was given, and the input isr  znot-a-formatrK   z/Format 'not-a-format' is not one of the allowed200z3Input values did not match any of the formats wherer2   z0Input values did not match the format class iso:z.ValueError: Time 200 does not match iso formatr  z5TypeError: Input values for iso class must be strings)r   r   r   r   r  rb   oslinesep)rA  s    r&   $test_get_time_fmt_exception_messagesr1  ;	  s   	z	"	" cR              73sy>>IIII	z	"	" 0cZ////0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<CINNNN	z	"	" cU              @C	NNRRRR	z	"	" "cU5!!!!" " " " " " " " " " " " " " " 	;
*	
:	; 
SY	    
z	"	"  cS                              	;
*	
A	B 
SY	     sT   6::2BBBC((C,/C,$EE	EF..F25F2c                  V    t          ddid          } | t          d          k    sJ d S )Nr  r   ymdhmsrK   r  )r   )rX   s    r&   test_ymdhms_defaultsr4  Y	  s7    	vtnX	.	.	.Bl########r(   r   rY  r   rx   ry   rO   rz   r   r  r   r      r5  tm_inputkwargsr5   r3  as_rowFTc                     t          ddg          }|r| d         } |d         }t          | fi |}t          j        ||k              sJ |j        j        j        t          k    sJ d S )Nz2001-02-04 06:08:10z2002-03-05 07:09:11r   )r   r;   rm   rb   r|   namesymdhms_names)r6  r7  r8  time_nsr  s        r&    test_ymdhms_init_from_table_liker=  l	  s     )+@ABBG A;!*	h	!	!&	!	!B6"-     8><//////r(   c                      ddgddggddgdd} t          d	d
gddgg          }t          | d          }t          j        ||k              sJ |j        j        |j        k    sJ d S )Nr   rY  i  i  r   rx   ry   )r  r  r  z
2001-02-04z
2002-03-04z
2003-02-04z
2004-03-04r3  rK   )r   r;   rm   r3  rR   )times_dict_shape
time_shaper  s      r&    test_ymdhms_init_from_dict_arrayrA  z	  s    "&d| <1vVWXXl3lL5QRSSJ 222D6$*$%%%%%;
 0000000r(   c                    ddddddd}t          |fi | }|t          d          k    sJ |D ]T}|j        |         t          |j        |          fD ]/}|d	k    rt          ||         |          sJ !||         |k    sJ 0Ut          |          }||k    sJ |j        d
k    sJ t          |j                  }||k    sJ |j        d
k    sJ dS )z
    Test YMDHMS functionality for a dict input. This includes ensuring that
    key and attribute access work.  For extra fun use a time within a leap
    second.
    r  r   r     ;   gnN@r5  z2016-12-31T23:59:60.123456789r8  r3  N)r   rb   r   rA   r5   r3  )r7  	time_dictr  attrrb   tm_rts         r&   !test_ymdhms_init_from_dict_scalarrH  	  s/     I 
i	"	"6	"	"B5666666 0 0htngbh&=&=> 	0 	0Ex#IdOU;;;;;; %/////		0 HHEB;;;;<8#### OOEB;;;;<8######r(   c                     t          j        t          d          5  t          dd           d d d            n# 1 swxY w Y   d} t          j        t                    5 }t          ddd	d           d d d            n# 1 swxY w Y   | t	          |j                  v sJ d
} t          j        t          |           5  t          dddd           d d d            d S # 1 swxY w Y   d S )Nz input must be dict or table-liker   r   r3  rK   z)'wrong' not allowed as YMDHMS key name(s)i  rP   )r  wrongz5for 2 input key names you must supply 'year', 'month')r  r7  )r   r   r   r   r  rb   )r   rA  s     r&   test_ymdhms_exceptionsrK  	  s   	z)K	L	L	L " "R!!!!" " " " " " " " " " " " " " " 8E 
z	"	" :cdQ''9999: : : : : : : : : : : : : : :C	NN""""CE	z	/	/	/ ; ;da((::::; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;s1   :>> BBBC##C'*C'c                     t          dddgid          } t          j        j        | d<   t	          | j        d         t          j        j        j                  sJ t          D ](}| j        d         |         t          j        j        u sJ )d S )Nr  r   r   r3  rK   r   )	r   r;   r!  r"  r   rb   coremvoidr;  )r  r`  s     r&   test_ymdhms_maskedrO  	  s    	vd|$X	6	6	6BELBqEbhqk25:#344444 1 1x{4 BEL000001 1r(   c            	      Z    t          dddddddd	          } | j        j        dk    sJ d S )
Nr2  r   rx   r   r3  r4  r5  r3   r   )r   r3  r  r0  s    r&   test_ymdhms_outputrQ  	  sT    	
 	
 
	 
	 
	A 8=D      r(   r  c                    t                      }t          d          ddgddggt          j        z  z   }| |_        ||d<   t                      }|                    |d           t          j        |                                d          }|d         j        |d         j        k    sJ t          j
        |d         |d         k              rJ t          j
        |d         j        |d         j        k              sJ d	S )
7Test special-case serialization of certain Time formatsrh  rP   $I$I?rx         @az
ascii.ecsvrK   N)r   r   r   r  r5   r   writereadgetvaluer;   rm   rb   )r  rF   r  outrY   s        r&   test_write_every_format_to_ecsvr[  	  s     	A	l		5zAs84qs:	:BBIAcF
**CGGCG%%%	CLLNN<	8	8	8BS6=BsGN****vaf3'(((((6!C&,"S'-/0000000r(   c                    t                      }t          d          ddgddggt          j        z  z   }| |_        ||d<   |dz  }|                    |d	           t          j        |dd
          }| |d         _        t          j        |d         |d         k              sJ t          j        |d         j	        |d         j	        k              sJ dS )rS  rh  rP   rT  rx   rU  rV  zout.fitsr   rK   T)r5   astropy_nativeN)
r   r   r   r  r5   rW  rX  r;   rm   rb   r  tmp_pathrF   r  rZ  rY   s         r&   test_write_every_format_to_fitsr`  	  s     	A	l		5zAs84qs:	:BBIAcF
Z
CGGCG	Ct	<	<	<BBsGN6!C&BsG#$$$$$6!C&,"S'-/0000000r(   z
Needs h5pyc                 
   t                      }t          d          ddgddggt          j        z  z   }| |_        ||d<   |dz  }|                    t          |          dd	d
           t          j        t          |          dd	          }|d         j        |d         j        k    sJ t          j	        |d         |d         k              sJ t          j	        |d         j
        |d         j
        k              sJ dS )rS  rh  rP   rT  rx   rU  rV  zout.h5hdf5rootT)r5   pathserialize_meta)r5   rd  N)r   r   r   r  r5   rW  r  rX  r;   rm   rb   r^  s         r&   test_write_every_format_to_hdf5rf  	  s     	A	l		5zAs84qs:	:BBIAcF
X
CGGCHHV&GFFF	CHHV&	9	9	9BS6=BsGN****6!C&BsG#$$$$$6!C&,"S'-/0000000r(   c                      t          d          t          j        ddd          t          j        z  z   } t          dd          | d<   d S )	NJ2015r}   rP   r   r  rs   rK   r   )r   r;   rK  r   r  r0  s    r&   test_broadcasting_writeableri  
  sA    WB2..66Ae$$$AaDDDr(   c                     t          dd          } | j        dk    sJ | j        dk    sJ |                     d          }|j        dk    sJ |                     d          }|j        dk    sJ t          | d          }|j        dk    sJ |                     d	          }|j        dk    sJ |j        dk    sJ d	| _        | j        dk    sJ | j        dk    sJ t          dd
          } | j        dk    sJ | j        dk    sJ dS )zYTest that changing format with out_subfmt defined is not a problem.
    See #9812, #9810.z
2019-12-20zdate_??r  g    @z2019:354:00:00rs   rK   rs  r   rj   z2019:354N)r   rs   r   r  rl   rg   rb   r5   r  s     r&   #test_format_subformat_compatibilityrk  
  sT    	\i000A5G6%%%%%	
E	"	"B=C	
u		B=C	a			B=C	
v		B=I%%%%8'''''AH7&&&&&<9$$$$\f---A5G6Zr(   use_fast_parserforceFalsec                     t          j        t          d          5  t          j        d|           5  t          dd           ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )zXTest that string like "2022-08-01.123" does not parse as ISO.
    See #6476 and the fix.z/Input values did not match the format class isor   rl  z2022-08-01.123r2   rK   N)r   r   r   r   r   r   )rl  s    r&   %test_format_fractional_string_parsingrp  2
  s    
L
 
 
 1 1 ],o>> 	1 	1!%0000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1s4   A(AA(A	A(A	A((A,/A,zfmt_name,fmt_classc                     t          d          }t          d |j        D                       ddgz   }|D ]}|                    | |           dS )z|From a starting Time value, test that every valid combination of
    to_value(format, subfmt) works.  See #9812, #9361.
    rX  c              3   &   K   | ]}|d          V  dS )r   NrL   )r  r  s     r&   	<genexpr>z=test_to_value_with_subfmt_for_every_format.<locals>.<genexpr>C
  s&      ==6!9======r(   Nrs  )r   listra  r  )fmt_name	fmt_classrF   ra  r  s        r&   *test_to_value_with_subfmt_for_every_formatrw  =
  si    
 	\A==9+<=====sKG % %	

8V$$$$% %r(   rw   -   ry  c                 h   t          d|           }t          |          }t          j        |j        |j        k              sJ t	          |j                  t	          |j                  u sJ t          ||g          }| 
|j        J n|j        D ]}||j        k    sJ t	          |j                  t	          |j                  u sJ t          ||gg          d         }| 
|j        J n|j        D ]}||j        k    sJ t	          |j                  t	          |j                  u sJ dS )zTest fix in #9969 for issue #9962 where the location attribute is
    lost when initializing Time from an existing Time instance of list of
    Time instances.
    J2010rw   Ncol0)r   r;   rm   rw   typer   )rw   r  r  r  s       r&   test_location_initr  H
  s^    
g	)	)	)B r((C6"+-.....S\ 2 22222 Bx..C|####< 	& 	&C"+%%%%%S\ 2 22222 "b


F
#C|####< 	& 	&C"+%%%%%S\ 2 2222222r(   c                      t          dd          } t          d          }t          j        t          d          5  t          | |g           ddd           dS # 1 swxY w Y   dS )zTest fix in #9969 for issue #9962 where the location attribute is
    lost when initializing Time from an existing Time instance of list of
    Time instances.  Make sure exception is correct.
    r{  rx  r|  z-cannot concatenate times unless all locationsr   N)r   r   r   r   r  s     r&   test_location_init_failr  i
  s    
 
g	)	)	)B
w--C	I
 
 
   	b#Y                 s   AA"Ac                     t          ddg          } t          ddg          }dt          j        t                    j        z  t          | |z
                                            z  }t          j        | d         |d         d          }|d                             t          d          |          sJ |d	                             t          d
          |          sJ |d                             t          d          |          sJ t          j        | |d         dd          }|j	        dk    sJ t          |d                             t          ddg          |                    sJ t          |d	                             t          d
dg          |                    sJ t          j        | |d          }|j	        dk    sJ t          |d                             t          ddg          |                    sJ t          |d	                             t          ddg          |                    sJ t          |d                             t          ddg          |                    sJ t          |d                             t          ddg          |                    sJ dS )zITest `np.linspace` `__array_func__` implementation for scalar and arrays.2021-01-01 00:00:002021-01-02 00:00:00z2021-01-01 01:00:00z2021-12-28 00:00:00r   r   rx   r   rP   z2021-01-01 00:30:00FrC  )r   r   z2021-01-01 12:30:00r   r   r   z2021-01-01 00:10:00z2021-03-03 00:00:00rO   z2021-01-01 00:50:00z2021-10-29 00:00:00rz   N)r   r;   r  r  r  r  r  rK  iscloserR   rm   )rX   rY   r   tss       r&   test_linspacer  w
  s   	$&;<	=	=B	$&;<	=	=Brx""Sb\\%5%5%7%77D	RUBqE1	%	%Ba5==3444=@@@@@a5==3444=@@@@@a5==3444=@@@@@	RAE	2	2	2B8v
1d13HIJJQUVV     
1d13HIJJQUVV     
RQ		B8v
1d13HIJJQUVV     
1d13HIJJQUVV     
1d13HIJJQUVV     
1d13HIJJQUVV      r(   c                     t          ddg          } t          d          }dt          j        t                    j        z  t          | |z
                                            z  }t          j        | |dd          \  }}|j        dk    sJ |j        d	k    sJ t          |d
         
                    |d         |z   |                    sJ t          |d         
                    |d         d|z  z   |                    sJ t          |
                    t          ddgd          |                    sJ dS )z$Test `np.linspace` `retstep` option.r  z2021-01-01 12:00:00r  r   r   T)retstepr  )r   rP   r   r  rz   i@8  i   r  rK   N)r   r;   r  r  r  r  r  rK  rR   rm   r  r   )rX   rY   r   r  sts        r&   test_linspace_stepsr  
  s5   	$&;<	=	=B	#	$	$Brx""Sb\\%5%5%7%77D[RD111FB8v8tr!u}}RURZd}3344444r!u}}RUQV^$}7788888rzz)UDM%@@@tzLLMMMMMMMr(   c                     t          ddg          } t          dd          }t          dd          }dt          j        t                    j        z  t          | t          ||g          z
                                            z  }t          j        | |d	          }|j        d
k    sJ t          |d         
                    t          ddg          |                    sJ t          |d         
                    t          ddg          |                    sJ t          |d         
                    t          ddg          |                    sJ t          j        | t          ||g          d	          }|j        d
k    sJ t          |d         
                    t          ddg          |                    sJ t          |d         
                    t          ddg          |                    sJ t          |d         
                    t          ddg          |                    sJ dS )zoTest `np.linspace` `__array_func__` implementation for start/endpoints
    from different formats/systems.
    z2020-01-01 00:00:00z2020-01-02 00:00:00i% rJ   rK   i ^r   r   rx   )rx   r   r   r  rP   z2020-01-01 06:00:00z2020-01-01 18:00:00z2020-01-01 12:00:00z2020-01-02 12:00:00z2020-01-03 00:00:00N)r   r;   r  r  r  r  r  rK  rR   rm   r  )rX   rY   r[   r   r  s        r&   test_linspace_fmtsr  
  su    
$&;<	=	=B	gd	#	#	#B	j	(	(	(Brx""SdB8nn)<%=%=%A%A%C%CCD	RQ		B8v
1d13HIJJQUVV     
1d13HIJJQUVV     
1d13HIJJQUVV     
Rr2h	+	+B8v
1d13HIJJQUVV     
1d13HIJJQUVV     
1d13HIJJQUVV      r(   c                     g d} t          j        t          j        |                                         |           }t	          dd          |t
          j        z  z   }g d}d                    |          }t          j        ddd	
          5  t          |          }t          |          }d d d            n# 1 swxY w Y   ||k    sJ d| d}||k    sJ d S )N)r  r   r  rh  rj   r  )z;[[['2020-01-01' '2020-01-02' ... '2020-01-07' '2020-01-08']z<  ['2020-01-09' '2020-01-10' ... '2020-01-15' '2020-01-16']] z; [['2020-01-17' '2020-01-18' ... '2020-01-23' '2020-01-24']z<  ['2020-01-25' '2020-01-26' ... '2020-01-31' '2020-02-01']]r  z ...r  z; [['2020-04-06' '2020-04-07' ... '2020-04-12' '2020-04-13']z<  ['2020-04-14' '2020-04-15' ... '2020-04-20' '2020-04-21']]r  z; [['2020-04-22' '2020-04-23' ... '2020-04-28' '2020-04-29']z=  ['2020-04-30' '2020-05-01' ... '2020-05-06' '2020-05-07']]]
r  r   K   )	threshold	edgeitems	linewidthz-<Time object: scale='utc' format='iso' value=>)r;   rS   prodrT   r   r   r  joinprintoptionsr  r8   )dimsdxr  	exp_linesexp_strout_strout_reprexp_reprs           r&   test_to_stringr  
  s-   99D	274==	!	!	)	)$	/	/B	lv	.	.	.ae	;B  I ii	""G	3!r	B	B	B  b''88               gIwIIIHxs   B::B>B>)rg   r   	functoolsr/  r   r  r   r   ior   r  numpyr;   r   r   numpy.testingr   astropyr	   r   astropy.coordinatesr
   astropy.tabler   r   astropy.timer   r   r   r   r   r   r   r   r   astropy.utilsr   r   "astropy.utils.compat.optional_depsr   r   astropy.utils.exceptionsr   partialr  r  r  r  r9   r=   rA   r  r'   r,   r.   r.  rT  r  r  r   r  r  r%  r*  r-  r1  r3  r6  r<  r?  rB  rD  r+  remote_datarH  rP  r[  rd  rf  rj  rn  rq  ru  rx  rz  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
  r  r  r  r  r  r  r*  r,  r1  r4  times_dict_nstable_nsas_arraystruct_array_nsr   recarrayrec_array_nsr;  r,  r=  rA  rH  rK  rO  rQ  r[  r`  rf  ri  rk  rp  itemsrw  r  r  r  r  r  r  rL   r(   r&   <module>r     s
         				       ) ) ) ) ) ) ) )                   ) ) ) ) ) )       - - - - - - ' ' ' ' ' ' ' '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 + * * * * * * * A A A A A A A A > > > > > >i("(5//2EANNN y Khbhuoo)0C   !y Khbhuoo)0Cb0H40O   "	!Khbhuoo)  
/ / /+ + +
e
$ e
$ e
$ e
$ e
$ e
$ e
$ e
$PC7 C7 C7 C7 C7 C7 C7 C7LO@ O@ O@ O@ O@ O@ O@ O@dI& I& I& I& I& I& I& I&X+ + + + + + + +0B' B' B' B' B' B' B' B'J" " " " " " " ".  $ $ $0
A 
A 
A2 2 2
1 1 1/ / /  
( ( ($     $ $ $($ $ $ : : :	+ 	+ 	+> > >) ) )(+ + +(: : :  "0 0 05 5 5	5 	5 	5  &2 2 2(4 4 4( L992 2 :92(' ' '4   6 6 6N N N(
 
 
G G G>,5 ,5 ,5^(P (P (PV' ' '  , , ,  > > >D D DG G G> > >  % % %(& & &  % % %&" " "" " "  % % %(A A AQ Q QG G G> > >D% % %R R R(    <Q Q Q$  <$ $ $ 4LVq6F!f2h  5##%%##BK00C h%NOOB8(<#=>>E4=110 0 21 ?> PO01 1 1 B8(<#=>>"$ "$ ?>"$J; ; ; 1 1 1! ! !" --1 1 .-1" --1 1 .-1" L66--1 1 .- 761.% % %
     : *Wg,>??1 1 @?1 -/A|/A/C/CDD% % ED% dH%5663 3 763@  ! ! !HN N N  D         r(   