def aticq(ri, di, astrom):
 pos = erfa.s2c(ri, di)
 ppr = erfa.trxp(astrom[u'bpn'], pos)
 d = np.zeros_like(ppr)
 for j in range(2):
  before = norm((ppr - d))
  after = erfa.ab(before, astrom[u'v'], astrom[u'em'], astrom[u'bm1'])
  d = (after - before)
 pnat = norm((ppr - d))
 d = np.zeros_like(pnat)
 for j in range(5):
  before = norm((pnat - d))
  after = erfa.ld(1.0, before, before, astrom[u'eh'], astrom[u'em'], 5e-08)
  d = (after - before)
 pco = norm((pnat - d))
 (rc, dc) = erfa.c2s(pco)
 return (erfa.anp(rc), dc)

def aticq ( ri , di , astrom ) : pos = erfa . s2c ( ri , di ) ppr = erfa . trxp ( astrom [ u'bpn' ] , pos ) d = np . zeros_like ( ppr ) for j in range ( 2 ) : before = norm ( ( ppr - d ) ) after = erfa . ab ( before , astrom [ u'v' ] , astrom [ u'em' ] , astrom [ u'bm1' ] ) d = ( after - before ) pnat = norm ( ( ppr - d ) ) d = np . zeros_like ( pnat ) for j in range ( 5 ) : before = norm ( ( pnat - d ) ) after = erfa . ld ( 1.0 , before , before , astrom [ u'eh' ] , astrom [ u'em' ] , 5e-08 ) d = ( after - before ) pco = norm ( ( pnat - d ) ) ( rc , dc ) = erfa . c2s ( pco ) return ( erfa . anp ( rc ) , dc )
a slightly modified version of the erfa function eraaticq .