ó _Û3Lc@s„dZddlZddljZddljZddljj Z ddl m Z dgZ dd„Zdejfd„ƒYZdS(s:UnitDblConverter module containing class UnitDblConverter.iÿÿÿÿN(titerabletUnitDblConvertercCst|tjddƒ}|dkr1t|ƒS|dkrAdS|dkrQdS|ddkrpd|dfSd |fSd S( sRadian function formatter.g@gÐ?iis$\pi/2$is$\pi$s$%s\pi$s $%s\pi/2$N(tinttnptpitstr(txtpostn((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pytrad_fns    cBsVeZdZidd6dd6dd6Zed„ƒZed„ƒZed „ƒZRS( sv: A matplotlib converter class. Provides matplotlib conversion functionality for the Monte UnitDbl class. tkmtdistancetdegtangletsecttimecCs¾ddljj}|r?t|tƒr0|}qE|jƒ}nd}|dkrctjt ƒ}nE|dkr–t|j t j ƒr–t j j ƒ}n|jdtƒ}tjd|d|ƒS(sV: Returns information on how to handle an axis that has Epoch data. = INPUT VARIABLES - unit The units to use for a axis with Epoch data. = RETURN VALUE - Returns a matplotlib AxisInfo data structure that contains minor/major formatters, major/minor locators, and default label information. iÿÿÿÿNtradR t useOffsettmajfmttlabel(tmatplotlib.testing.jpl_unitsttestingt jpl_unitst isinstanceRRtNonettickert FuncFormatterR taxestpolart PolarAxestThetaFormattertUnitDblFormattertFalsetunitstAxisInfo(tunittaxistURR((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pytaxisinfo8s   !cCs ddljj}t}t|ƒrst|tƒ rst|ƒdkrJgSg|D]}tj |||ƒ^qQSnt||j ƒrŽt }n|rªt j j|ƒrª|S|dkrËtj||ƒ}nt|jtjƒrÿ|jƒdkrÿ|j dƒS|j |ƒS(sW: Convert value using unit to a float. If value is a sequence, return the converted sequence. = INPUT VARIABLES - value The value or list of values that need to be converted. - unit The units to use for a axis with Epoch data. = RETURN VALUE - Returns the value parameter converted to floats. iÿÿÿÿNiR R(RRRtTrueRRRtlenRtconverttUnitDblR R!tConversionInterfacet is_numlikeRt default_unitsRRRttype(tvalueR#R$R%t isNotUnitDblR((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pyR)_s )  ' cCsEt|ƒr0t|tƒ r0tj|d|ƒStj|jƒSdS(s: Return the default unit for value, or None. = INPUT VARIABLES - value The value or list of values that need units. = RETURN VALUE - Returns the default units to use for value. Return the default unit for value, or None. iN(RRRRR-tdefaultsR.(R/R$((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pyR-s(t__name__t __module__t__doc__R1t staticmethodR&R)R-(((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pyR+s '.(R4tnumpyRtmatplotlib.unitsR!tmatplotlib.tickerRtmatplotlib.projections.polart projectionsRtmatplotlib.cbookRt__all__RR R+R(((s`/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblConverter.pyts