예제 #1
0
def get_cip(jd1, jd2):
    """
    Find the X, Y coordinates of the CIP and the CIO locator, s.

    Parameters
    ----------
    jd1 : float or `np.ndarray`
        First part of two part Julian date (TDB)
    jd2 : float or `np.ndarray`
        Second part of two part Julian date (TDB)

    Returns
    --------
    x : float or `np.ndarray`
        x coordinate of the CIP
    y : float or `np.ndarray`
        y coordinate of the CIP
    s : float or `np.ndarray`
        CIO locator, s
    """
    # classical NPB matrix, IAU 2006/2000A
    rpnb = erfa.pnm06a(jd1, jd2)
    # CIP X, Y coordinates from array
    x, y = erfa.bpn2xy(rpnb)
    # CIO locator, s
    s = erfa.s06(jd1, jd2, x, y)
    return x, y, s
예제 #2
0
파일: ex_ast.py 프로젝트: nirinA/erfa_numpy
# SOFA heliocentric Earth ephemeris.
pvh, pvb = erfa.epv00(tt1, tt2)

# JPL DE405 barycentric Earth ephemeris.
pvb = np.array(
    [
        (
            (-0.9741704366519668, -0.2115201000882231, -0.0917583114068277),
            (0.0036436589347388, -0.0154287318503146, -0.0066892203821059),
        )
    ]
)

# era 2000A CIP.
r = erfa.pnm00a(tt1, tt2)
x, y = erfa.bpn2xy(r)

# Apply IERS corrections.
x += dx
y += dy
# SOFA CIO locator. */
s = erfa.s06(tt1, tt2, x, y)

# Populate the context.
astrom = erfa.apci(tt1, tt2, pvb, pvh, x, y, s)

# Carry out the transformation and report the results.
ri, di = erfa.atciq(rc, dc, pr, pd, px, rv, astrom)
reprd("ICRS -> CIRS (JPL, IERS):", ri, di)

# The same but with Saturn then Jupiter then Sun light deflection.
예제 #3
0
aob, zob, hob, dob, rob, eo = erfa.atco13(rc, dc, pr, pd, px, rv, utc1, utc2,
                                          dut1, elong, phi, hm, xp, yp, phpa,
                                          tc, rh, wl)
reprd("ICRS -> observed:", rob, dob)

# ICRS to CIRS using some user-supplied parameters.
# SOFA heliocentric Earth ephemeris.
pvh, pvb = erfa.epv00(tt1, tt2)

# JPL DE405 barycentric Earth ephemeris.
pvb = ((-0.9741704366519668, -0.2115201000882231, -0.0917583114068277),
       (0.0036436589347388, -0.0154287318503146, -0.0066892203821059))

# era 2000A CIP.
r = erfa.pnm00a(tt1, tt2)
x, y = erfa.bpn2xy(r)

# Apply IERS corrections.
x += dx
y += dy
# SOFA CIO locator. */
s = erfa.s06(tt1, tt2, x, y)

# Populate the context.
astrom = erfa.apci(tt1, tt2, pvb, pvh[0], x, y, s)

# Carry out the transformation and report the results.
ri, di = erfa.atciq(rc, dc, pr, pd, px, rv, *astrom)
reprd("ICRS -> CIRS (JPL, IERS):", ri, di)

# The same but with Saturn then Jupiter then Sun light deflection.