Esempio n. 1
0
def lea406_full(jd, ignorenutation=False):
    ''' compute moon ecliptic longitude using lea406
    numpy is used
    '''

    t = (jd - J2000) / 36525.0
    t2 = t * t
    t3 = t2 * t
    t4 = t3 * t

    tm = t / 10.0
    tm2 = tm * tm

    V = FRM[0] + (((FRM[4] * t + FRM[3]) * t + FRM[2]) * t + FRM[1]) * t

    # numpy array operation
    ARGS = ne.evaluate('''( F0_V
                          + F1_V * t
                          + F2_V * t2
                          + F3_V * t3
                          + F4_V * t4) * ASEC2RAD''')

    P = ne.evaluate('''(  A_V   * sin(ARGS + C_V)
                        + AT_V  * sin(ARGS + CT_V)  * tm
                        + ATT_V * sin(ARGS + CTT_V) * tm2)''')
    V += sum(P)
    V = V * ASEC2RAD

    if not ignorenutation:
        V += nutation(jd)
    return normrad(V)
Esempio n. 2
0
def lea406_full(jd, ignorenutation=False):
    ''' compute moon ecliptic longitude using lea406
    numpy is used
    '''

    t = (jd - J2000) / 36525.0
    t2 = t * t
    t3 = t2 * t
    t4 = t3 * t

    tm = t / 10.0
    tm2 = tm * tm

    V = FRM[0] + (((FRM[4] * t + FRM[3]) * t + FRM[2]) * t + FRM[1]) * t

    # numpy array operation
    ARGS = ne.evaluate('''( F0_V
                          + F1_V * t
                          + F2_V * t2
                          + F3_V * t3
                          + F4_V * t4) * ASEC2RAD''')

    P = ne.evaluate('''(  A_V   * sin(ARGS + C_V)
                        + AT_V  * sin(ARGS + CT_V)  * tm
                        + ATT_V * sin(ARGS + CTT_V) * tm2)''')
    V += sum(P)
    V = V * ASEC2RAD

    if not ignorenutation:
        V += nutation(jd)
    return normrad(V)
Esempio n. 3
0
def apparentsun(jde, ignorenutation=False):
    ''' calculate the apprent place of the Sun.
    Arg:
        jde as jde
    Return:
        geocentric longitude in radians, 0 - 2pi

        '''
    heliolong = vsop(jde)
    geolong = heliolong + PI

    # compensate nutation
    if not ignorenutation:
        geolong += nutation(jde)

    labbr = lightabbr_high(jde)
    geolong += labbr

    return normrad(geolong)
Esempio n. 4
0
def apparentsun(jde, ignorenutation=False):
    ''' calculate the apprent place of the Sun.
    Arg:
        jde as jde
    Return:
        geocentric longitude in radians, 0 - 2pi

        '''
    heliolong = vsop(jde)
    geolong = heliolong + PI

    # compensate nutation
    if not ignorenutation:
        geolong += nutation(jde)

    labbr = lightabbr_high(jde)
    geolong += labbr

    return normrad(geolong)