How to use the quantities.unitquantity.UnitTime function in quantities

To help you get started, we’ve selected a few quantities examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-quantities / python-quantities / quantities / units / time.py View on Github external
synodic_month = lunar_month = UnitTime(
    'synodic_month',
    29.530589*day,
    aliases=['synodic_months', 'lunar_month', 'lunar_months'],
    doc='''
    long-term average. 

    http://en.wikipedia.org/wiki/Month#Synodic_month
    '''
)
common_year = UnitTime(
    'common_year',
    365*day,
    aliases=['common_years']
)
leap_year = UnitTime(
    'leap_year',
    366*day,
    aliases=['leap_years']
)
Julian_year = UnitTime(
    'Julian_year',
    365.25*day,
    aliases=['Julian_years']
)
Gregorian_year = UnitTime(
    'Gregorian_year',
    365.2425*day,
    aliases=['Gregorian_years']
)

millenium = UnitTime(
github python-quantities / python-quantities / quantities / units / time.py View on Github external
long-term average. 

    http://en.wikipedia.org/wiki/Month#Synodic_month
    '''
)
common_year = UnitTime(
    'common_year',
    365*day,
    aliases=['common_years']
)
leap_year = UnitTime(
    'leap_year',
    366*day,
    aliases=['leap_years']
)
Julian_year = UnitTime(
    'Julian_year',
    365.25*day,
    aliases=['Julian_years']
)
Gregorian_year = UnitTime(
    'Gregorian_year',
    365.2425*day,
    aliases=['Gregorian_years']
)

millenium = UnitTime(
    'millenium',
    1000*year,
    aliases=['millenia']
)
eon = UnitTime(
github python-quantities / python-quantities / quantities / units / time.py View on Github external
tropical_month = UnitTime(
    'tropical_month',
    27.321582*day,
    aliases=['tropical_months']
)
synodic_month = lunar_month = UnitTime(
    'synodic_month',
    29.530589*day,
    aliases=['synodic_months', 'lunar_month', 'lunar_months'],
    doc='''
    long-term average. 

    http://en.wikipedia.org/wiki/Month#Synodic_month
    '''
)
common_year = UnitTime(
    'common_year',
    365*day,
    aliases=['common_years']
)
leap_year = UnitTime(
    'leap_year',
    366*day,
    aliases=['leap_years']
)
Julian_year = UnitTime(
    'Julian_year',
    365.25*day,
    aliases=['Julian_years']
)
Gregorian_year = UnitTime(
    'Gregorian_year',
github python-quantities / python-quantities / quantities / units / time.py View on Github external
2*week,
    aliases=['fortnights']
)
yr = year = tropical_year = a = UnitTime(
    'year',
    31556925.9747*s,
    symbol='yr',
    aliases=['a', 'years', 'tropical_year', 'tropical_years'],
    doc='a is an acceptable alias for year, short for anno'
)
month = UnitTime(
    'month',
    yr/12,
    aliases=['months']
)
shake = UnitTime(
    'shake',
    1e-8*s,
    aliases=['shakes']
)

sidereal_day = UnitTime(
    'sidereal_day',
    day/1.00273790935079524,
    aliases=['sidereal_days'],
    doc='''
    approximate.

    http://en.wikipedia.org/wiki/Sidereal_time
    '''
)
sidereal_hour = UnitTime(
github python-quantities / python-quantities / quantities / units / time.py View on Github external
symbol='yr',
    aliases=['a', 'years', 'tropical_year', 'tropical_years'],
    doc='a is an acceptable alias for year, short for anno'
)
month = UnitTime(
    'month',
    yr/12,
    aliases=['months']
)
shake = UnitTime(
    'shake',
    1e-8*s,
    aliases=['shakes']
)

sidereal_day = UnitTime(
    'sidereal_day',
    day/1.00273790935079524,
    aliases=['sidereal_days'],
    doc='''
    approximate.

    http://en.wikipedia.org/wiki/Sidereal_time
    '''
)
sidereal_hour = UnitTime(
    'sidereal_hour',
    sidereal_day/24,
    aliases=['sidereal_hours']
)
sidereal_minute = UnitTime(
    'sidereal_minute',
github python-quantities / python-quantities / quantities / units / time.py View on Github external
aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
    'femtosecond',
    ps/1000,
    symbol='fs',
    aliases=['femtoseconds']
)
attosecond = UnitTime(
    'attosecond',
    fs/1000,
    symbol='as',
    aliases=['attoseconds']
) # as is a keyword in python2.6

min = minute = UnitTime(
    'minute',
    60*s,
    symbol='min',
    aliases=['minutes']
)
h = hr = hour = UnitTime(
    'hour',
    60*min,
    symbol='h',
    aliases=['hr', 'hours']
)
d = day = UnitTime(
    'day',
    24*hr,
    symbol='d',
    aliases=['days']
github python-quantities / python-quantities / quantities / units / time.py View on Github external
aliases=['megaseconds']
)
ms = millisecond = UnitTime(
    'millisecond',
    s/1000,
    'ms',
    aliases=['milliseconds']
)
us = microsecond = UnitTime(
    'microsecond',
    ms/1000,
    symbol='us',
    u_symbol='µs',
    aliases=['microseconds']
)
ns = nanosecond = UnitTime(
    'nanosecond',
    us/1000,
    symbol='ns',
    aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
    'picosecond',
    ns/1000,
    symbol='ps',
    aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
    'femtosecond',
    ps/1000,
    symbol='fs',
    aliases=['femtoseconds']
github python-quantities / python-quantities / quantities / units / time.py View on Github external
u_symbol='µs',
    aliases=['microseconds']
)
ns = nanosecond = UnitTime(
    'nanosecond',
    us/1000,
    symbol='ns',
    aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
    'picosecond',
    ns/1000,
    symbol='ps',
    aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
    'femtosecond',
    ps/1000,
    symbol='fs',
    aliases=['femtoseconds']
)
attosecond = UnitTime(
    'attosecond',
    fs/1000,
    symbol='as',
    aliases=['attoseconds']
) # as is a keyword in python2.6

min = minute = UnitTime(
    'minute',
    60*s,
    symbol='min',
github python-quantities / python-quantities / quantities / units / time.py View on Github external
symbol='s',
    aliases=['sec', 'seconds']
)
ks = kilosecond = UnitTime(
    'millisecond',
    s*1000,
    'ms',
    aliases=['kiloseconds']
)
Ms = megasecond = UnitTime(
    'megasecond',
    ks*1000,
    'Ms',
    aliases=['megaseconds']
)
ms = millisecond = UnitTime(
    'millisecond',
    s/1000,
    'ms',
    aliases=['milliseconds']
)
us = microsecond = UnitTime(
    'microsecond',
    ms/1000,
    symbol='us',
    u_symbol='µs',
    aliases=['microseconds']
)
ns = nanosecond = UnitTime(
    'nanosecond',
    us/1000,
    symbol='ns',
github python-quantities / python-quantities / quantities / units / time.py View on Github external
symbol='ns',
    aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
    'picosecond',
    ns/1000,
    symbol='ps',
    aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
    'femtosecond',
    ps/1000,
    symbol='fs',
    aliases=['femtoseconds']
)
attosecond = UnitTime(
    'attosecond',
    fs/1000,
    symbol='as',
    aliases=['attoseconds']
) # as is a keyword in python2.6

min = minute = UnitTime(
    'minute',
    60*s,
    symbol='min',
    aliases=['minutes']
)
h = hr = hour = UnitTime(
    'hour',
    60*min,
    symbol='h',