ó _Û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„Z d„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.pyts