HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyc
�
_�3Lc@sdZddd��YZdS(sUnitDbl module.tUnitDblcBseZdZid#d6d$d6d%d6d&d6d'd	6d(d
6d)d6d*d6Zidd6dd6dd
6Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd+d �Zee�Zd!�Zd"�ZRS(,s!Class UnitDbl in development.
   g����MbP?tkmtmig�8�~߿�?tmiletradg:�R�Fߑ?tdegtsecgN@tminithourtdistancetanglettimecCsB|j|�|j|}t||d�|_|d|_dS(s8Create a new UnitDbl object.
      
      Units are internally converted to km, rad, and sec.  The only
      valid inputs for units are [ m, km, mile, rad, deg, sec, min, hour ].

      The field UnitDbl.value will contain the converted value.  Use
      the convert() method to get a specific type of units back.
      
      = ERROR CONDITIONS
      - If the input units are not in the allowed list, an error is thrown.

      = INPUT VARIABLES
      - value    The numeric value of the UnitDbl.
      - units    The string name of the units the value is in.
      iiN(t
checkUnitstallowedtfloatt_valuet_units(tselftvaluetunitstdata((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__init__/s

cCsw|j|kr|jS|j|�|j|}|j|dkrhdt|�|f}t|��n|j|dS(slConvert the UnitDbl to a specific set of units.

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

      = INPUT VARIABLES
      - units    The string name of the units to convert to.

      = RETURN VALUE
      - Returns the value of the UnitDbl in the requested units as a floating
        point number.
      iskError trying to convert to different units.
   Invalid conversion requested.
   UnitDbl: %s
   Units:   %s
i(RRRR
tstrt
ValueError(RRRtmsg((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pytconvertFs


cCstt|j�|j�S(s*Return the absolute value of this UnitDbl.(RtabsRR(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__abs__cscCst|j|j�S(s*Return the negative value of this UnitDbl.(RRR(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__neg__hscCs
|jj�S(spTest a UnitDbl for a non-zero value.

      = RETURN VALUE
      - Returns true if the value is non-zero.
      (Rt__nonzero__(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyRmscCs#|j|d�t|j|j�S(s5Compare two UnitDbl's.

      = ERROR CONDITIONS
      - If the input rhs units are not the same as our units,
        an error is thrown.

      = INPUT VARIABLES
      - rhs    The UnitDbl to compare against.

      = RETURN VALUE
      - Returns -1 if self < rhs, 0 if self == rhs, +1 if self > rhs.
      tcompare(tcheckSameUnitstcmpR(Rtrhs((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__cmp__vs
cCs*|j|d�t|j|j|j�S(sAdd two UnitDbl's.

      = ERROR CONDITIONS
      - If the input rhs units are not the same as our units,
        an error is thrown.

      = INPUT VARIABLES
      - rhs    The UnitDbl to add.

      = RETURN VALUE
      - Returns the sum of ourselves and the input UnitDbl.
      tadd(RRRR(RR!((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__add__�s
cCs*|j|d�t|j|j|j�S(s,Subtract two UnitDbl's.

      = ERROR CONDITIONS
      - If the input rhs units are not the same as our units,
        an error is thrown.

      = INPUT VARIABLES
      - rhs    The UnitDbl to subtract.

      = RETURN VALUE
      - Returns the difference of ourselves and the input UnitDbl.
      tsubtract(RRRR(RR!((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__sub__�s
cCst|j||j�S(s�Scale a UnitDbl by a value.

      = INPUT VARIABLES
      - rhs    The scalar to multiply by.

      = RETURN VALUE
      - Returns the scaled UnitDbl.
      (RRR(RR!((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__mul__�s	cCst|j||j�S(s�Scale a UnitDbl by a value.

      = INPUT VARIABLES
      - lhs    The scalar to multiply by.

      = RETURN VALUE
      - Returns the scaled UnitDbl.
      (RRR(Rtlhs((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__rmul__�s	cCst|j||j�S(s�Divide a UnitDbl by a value.

      = INPUT VARIABLES
      - rhs    The scalar to divide by.

      = RETURN VALUE
      - Returns the scaled UnitDbl.
      (RRR(RR!((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__div__�s	cCsd|j|jfS(sPrint the UnitDbl.s%g *%s(RR(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__str__�scCsd|j|jfS(sPrint the UnitDbl.sUnitDbl( %g, '%s' )(RR(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt__repr__�scCs|j|jS(s Return the type of UnitDbl data.(t_typesR(R((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyttype�scCss|dkr!td|j�}ng}d}x?trn|||}||krTPn|j|�|d7}q0W|S(s6Generate a range of UnitDbl objects.

      Similar to the Python range() method.  Returns the range [
      start, stop ) at the requested step.  Each element will be a
      UnitDbl object.
      
      = INPUT VARIABLES
      - start    The starting value of the range.  
      - stop     The stop value of the range.  
      - step     Optional step to use.  If set to None, then a UnitDbl of
                 value 1 w/ the units of the start is used.
                 
      = RETURN VALUE
      - Returns a list contianing the requested UnitDbl values.
      iiN(tNoneRRtTruetappend(tstarttstoptsteptelemstitd((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pytrange�s	
cCsG||jj�krCd|t|jj��f}t|��ndS(s�Check to see if some units are valid.

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

      = INPUT VARIABLES
      - units    The string name of the units to check.
      s9Input units '%s' are not one of the supported types of %sN(R
tkeysRR(RRR((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyR�s	cCs>|j|jkr:d||j|jf}t|��ndS(s0Check to see if units are the same.

      = ERROR CONDITIONS
      - If the units of the rhs UnitDbl are not the same as our units,
        an error is thrown.

      = INPUT VARIABLES
      - rhs    The UnitDbl to check for the same units
      - func   The name of the function doing the check.
      s3Cannot %s units of different types.
LHS: %s
RHS: %sN(RR(RR!tfuncR((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyRs(g����MbP?R(iR(g�8�~߿�?R(iR(g:�R�Fߑ?R(iR(gN@R(iRN(t__name__t
__module__t__doc__R
R-RRRRRR"R$R&R'R)R*R+R,R.R/R8tstaticmethodRR(((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyRs@

															 	N((R=R(((sW/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDbl.pyt<module>s