def xieta_from_radecl(inra, indecl,<EOL>incenterra, incenterdecl,<EOL>deg=True):
if deg:<EOL><INDENT>ra = np.radians(inra)<EOL>decl = np.radians(indecl)<EOL>centerra = np.radians(incenterra)<EOL>centerdecl = np.radians(incenterdecl)<EOL><DEDENT>else:<EOL><INDENT>ra = inra<EOL>decl = indecl<EOL>centerra = incenterra<EOL>centerdecl = incenterdecl<EOL><DEDENT>cdecc = np.cos(centerdecl)<EOL>sdecc = np.sin(centerdecl)<EOL>crac = np.cos(centerra)<EOL>srac = np.sin(centerra)<EOL>uu = np.cos(decl)*np.cos(ra)<EOL>vv = np.cos(decl)*np.sin(ra)<EOL>ww = np.sin(decl)<EOL>uun = uu*cdecc*crac + vv*cdecc*srac + ww*sdecc<EOL>vvn = -uu*srac + vv*crac<EOL>wwn = -uu*sdecc*crac - vv*sdecc*srac + ww*cdecc<EOL>denom = vvn*vvn + wwn*wwn<EOL>aunn = np.zeros_like(uun)<EOL>aunn[uun >= <NUM_LIT:1.0>] = <NUM_LIT:0.0><EOL>aunn[uun < <NUM_LIT:1.0>] = np.arccos(uun)<EOL>xi, eta = np.zeros_like(aunn), np.zeros_like(aunn)<EOL>xi[(aunn <= <NUM_LIT:0.0>) | (denom <= <NUM_LIT:0.0>)] = <NUM_LIT:0.0><EOL>eta[(aunn <= <NUM_LIT:0.0>) | (denom <= <NUM_LIT:0.0>)] = <NUM_LIT:0.0><EOL>sdenom = np.sqrt(denom)<EOL>xi[(aunn > <NUM_LIT:0.0>) | (denom > <NUM_LIT:0.0>)] = aunn*vvn/sdenom<EOL>eta[(aunn > <NUM_LIT:0.0>) | (denom > <NUM_LIT:0.0>)] = aunn*wwn/sdenom<EOL>if deg:<EOL><INDENT>return np.degrees(xi), np.degrees(eta)<EOL><DEDENT>else:<EOL><INDENT>return xi, eta<EOL><DEDENT>
This returns the image-plane projected xi-eta coords for inra, indecl.

    Parameters
    ----------

    inra,indecl : array-like
        The equatorial coordinates to get the xi, eta coordinates for in decimal
        degrees or radians.

    incenterra,incenterdecl : float
        The center coordinate values to use to calculate the plane-projected
        coordinates around.

    deg : bool
        If this is True, the input angles are assumed to be in degrees and the
        output is in degrees as well.

    Returns
    -------

    tuple of np.arrays
        This is the (`xi`, `eta`) coordinate pairs corresponding to the
        image-plane projected coordinates for each pair of input equatorial
        coordinates in (`inra`, `indecl`).