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
RPOM = erfa.pom00(XP, YP, erfa.sp00(DJMJD0, TT)) # Form celestial-terrestrial matrix (including polar motion). RC2IT = erfa.rxr(RPOM, RC2TI) print("celestial to terrestrial matrix (including polar motion)") pprint(RC2IT) print(''' =========================================== IAU 2006/2000A, CIO based, using X,Y series =========================================== ''') # CIP and CIO , IAU 2006/2000A X, Y = erfa.xy06(DJMJD0, TT) S = erfa.s06(DJMJD0, TT, X, Y) # Add CIP corrections. X = X + DX06 Y = Y + DY06 print("CIP corrections") print('X = %.17f\nY = %.17f\nS = %.17f' % (X, Y, S * R2AS)) # GCRS to CIRS matrix RC2I = erfa.c2ixys(X, Y, S) print("NPB matrix, CIO based") pprint(RC2I) # Earth rotation angle ERA = erfa.era00(DJMJD0 + DATE, TUT)
RPOM = erfa.pom00(XP, YP, erfa.sp00(DJMJD0,TT)) # Form celestial-terrestrial matrix (including polar motion). RC2IT = erfa.rxr(RPOM, RC2TI) print("celestial to terrestrial matrix (including polar motion)") pprint(RC2IT) print(''' =========================================== IAU 2006/2000A, CIO based, using X,Y series =========================================== ''') # CIP and CIO , IAU 2006/2000A X, Y = erfa.xy06(DJMJD0, TT) S = erfa.s06(DJMJD0, TT, X, Y) # Add CIP corrections. X = X + DX06 Y = Y + DY06 print("CIP corrections") print('X = %.17f\nY = %.17f\nS = %.17f'%(X, Y, S*R2AS)) # GCRS to CIRS matrix RC2I = erfa.c2ixys(X, Y, S) print("NPB matrix, CIO based") pprint(RC2I) # Earth rotation angle ERA = erfa.era00(DJMJD0+DATE, TUT)
( (-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. b0 = erfa.LDBODY( ( 0.00028574, 3e-10, np.array( (
# 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. b0 = erfa.LDBODY( (0.00028574, 3e-10, ((-7.8101442680818964, -5.6095668114887358, -1.9807981923749924), (0.0030723248971152, -0.0040699547707598, -0.0018133584165345)))) b1 = erfa.LDBODY( (0.00095435, 3e-9,