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/EpochConverter.pyc
�
_�3Lc@sZdZddljZddljZddlmZdgZdej	fd��YZ
dS(s6EpochConverter module containing class EpochConverter.i����N(titerabletEpochConvertercBsneZdZd	Zed��Zed��Zed��Zed��Zed��Z	ed��Z
RS(
s: A matplotlib converter class.  Provides matplotlib conversion
        functionality for Monte Epoch and Duration classes.
   g�QD:AicCs7tj�}tj|�}tjd|d|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.
      tmajloctmajfmttlabel(tdate_tickertAutoDateLocatortAutoDateFormattertunitstAxisInfo(tunittaxisRR((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pytaxisinfo s

cCsBddljj}|d|jdd�}|j||tj�S(sK: Convert a matplotlib floating-point date into an Epoch of the
           specified units.

      = INPUT VARIABLES
      - value    The matplotlib floating-point date.
      - unit     The unit system to use for the Epoch.

      = RETURN VALUE
      - Returns the value converted to an Epoch in the sepcified time system.
      i����Ng�@g�?tsec(tmatplotlib.testing.jpl_unitsttestingt	jpl_unitstUnitDbltEpochRtjdRef(tvalueR
tUt
secPastRef((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pytfloat2epoch5s
cCs|j|�tjS(sT: Convert an Epoch value to a float suitible for plotting as a
           python datetime object.

      = INPUT VARIABLES
      - value   An Epoch or list of Epochs that need to be converted.
      - unit    The units to use for an axis with Epoch data.

      = RETURN VALUE
      - Returns the value parameter converted to floats.
      (t
julianDateRR(RR
((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pytepoch2floatHscCs
|j�S(s: Convert a Duration value to a float suitible for plotting as a
           python datetime object.

      = INPUT VARIABLES
      - value   A Duration or list of Durations that need to be converted.

      = RETURN VALUE
      - Returns the value parameter converted to floats.
      (tdays(R((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pytduration2floatWscCsddljj}t}t}t|�ryt|t�ryt|�dkrPgSg|D]}t	j
|||�^qWSnt||j�r�t}nt||j�r�t}n|r�|r�t
jj|�r�|S|dkr�t	j||�}n|rt	j|�St	j||�SdS(sX: 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 an axis with Epoch data.

      = RETURN VALUE
      - Returns the value parameter converted to floats.
      i����Ni(RRRtTruetFalseRt
isinstancetstrtlenRtconvertRtDurationRtConversionInterfacet
is_numliketNonet
default_unitsRR(RR
RRt
isNotEpocht
isDurationtx((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pyR!es&
)		

cCsFd}t|�r6t|t�r6tj|d|�S|j�}|S(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.
      iN(R%RRRRR&tframe(RRR*((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pyR&�s

g�PD:A(t__name__t
__module__t__doc__RtstaticmethodRRRRR!R&(((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pyRs*(R-tmatplotlib.unitsRtmatplotlib.datestdatesRtmatplotlib.cbookRt__all__R#R(((s^/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/jpl_units/EpochConverter.pyt<module>s