special case of the co_moving2angle definition at the source redshift

        :param x:
        :param y:
        :return:
16191
def _co_moving2angle_source(self, x, y):
        
        T_z = self._T_z_source
        theta_x = x / T_z
        theta_y = y / T_z
        return theta_x, theta_y
689425
def xyz2angle(x, y, z):
    """"""
    azi = xu.rad2deg(xu.arctan2(x, y))
    zen = 90 - xu.rad2deg(xu.arctan2(z, xu.sqrt(x**2 + y**2)))
    return azi, zen
56848
def xy_round(data,x0,y0,skymode,ker2d,xsigsq,ysigsq,datamin=None,datamax=None):
    
    nyk,nxk = ker2d.shape
    if datamin is None:
        datamin = data.min()
    if datamax is None:
        datamax = data.max()

    # call C function for speed now...
    xy_val = cdriz.arrxyround(data,x0,y0,skymode,ker2d,xsigsq,ysigsq,datamin,datamax)
    if xy_val is None:
        x = None
        y = None
        round = None
    else:
        x = xy_val[0]
        y = xy_val[1]
        round = xy_val[2]

    return x,y,round
814682
def xstep(self):
        """

        self.YU[:] = self.Y - self.U
        Zf = sl.rfftn(self.YU, None, self.cri.axisN)
        ZfQ = sl.dot(self.Q.T, Zf, axis=self.cri.axisC)
        b = self.DSfBQ + self.rho * ZfQ

        Xh = sl.solvedbi_sm(self.gDf, self.rho, b, self.c,
                            axis=self.cri.axisM)
        self.Xf[:] = sl.dot(self.Q, Xh, axis=self.cri.axisC)
        self.X = sl.irfftn(self.Xf, self.cri.Nv, self.cri.axisN)

        if self.opt['LinSolveCheck']:
            DDXf = np.conj(self.Df) *  sl.inner(self.Df, self.Xf,
                                                axis=self.cri.axisM)
            DDXfBB = sl.dot(self.B.T.dot(self.B), DDXf, axis=self.cri.axisC)
            ax = DDXfBB + self.rho * self.Xf
            b = sl.dot(self.B.T, self.DSf, axis=self.cri.axisC) + \
                self.rho * Zf
            self.xrrs = sl.rrs(ax, b)
        else:
            self.xrrs = None
46044
def moveToPoint(self, xxx_todo_changeme1):
        
        (x,y) = xxx_todo_changeme1
        self.set_cx(float(self.get_cx()) + float(x))
        self.set_cy(float(self.get_cy()) + float(y))
324726
def xstep(self):
        """

        self.X = sl.idctii(self.Gamma*sl.dctii(self.Y + self.S - self.U,
                                               axes=self.axes), axes=self.axes)
        if self.opt['LinSolveCheck']:
            self.xrrs = sl.rrs(
                self.X + (self.lmbda/self.rho) *
                sl.idctii((self.Alpha**2) *
                          sl.dctii(self.X, axes=self.axes),
                          axes=self.axes), self.Y + self.S - self.U)
        else:
            self.xrrs = None
584947
function XYZToLngLat([x, y, z]) {
  const lat = Math.atan2(z, Math.sqrt(x * x + y * y));
  const lng = Math.atan2(y, x);

  return [lng * RADIAN_TO_DEGREE, lat * RADIAN_TO_DEGREE];
}
142622
def stSpectralFlux(X, X_prev):
    
    # compute the spectral flux as the sum of square distances:
    sumX = numpy.sum(X + eps)
    sumPrevX = numpy.sum(X_prev + eps)
    F = numpy.sum((X / sumX - X_prev/sumPrevX) ** 2)

    return F
242834
def _shift_wavelengths(model1, model2):
    
    if isinstance(model1, _models.RedshiftScaleFactor):
        val = _get_sampleset(model2)
        if val is None:
            w = val
        else:
            w = model1.inverse(val)
    elif isinstance(model1, _models.Scale):
        w = _get_sampleset(model2)
    else:
        w = _get_sampleset(model1)
    return w
443947
def C(w, Xs):
    '''
    '''
    n = len(Xs)
    P = projection_matrix(w)
    Ys = [np.dot(P, X) for X in Xs]
    A = calc_A(Ys)
    A_hat = calc_A_hat(A, skew_matrix(w))

    return np.dot(A_hat, sum(np.dot(Y, Y) * Y for Y in Ys)) / np.trace(np.dot(A_hat, A))
231558
def xyz2lonlat(x, y, z):
    """"""
    lon = xu.rad2deg(xu.arctan2(y, x))
    lat = xu.rad2deg(xu.arctan2(z, xu.sqrt(x**2 + y**2)))
    return lon, lat
1340618
def ccmodmd_ystep():
    

    mAXU = np.mean(mp_D_X + mp_D_U0, axis=0)
    mp_D_Y0[:] = mp_dprox(mAXU)
    AXU1 = mp_DX - mp_S + mp_D_U1
    mp_D_Y1[:] = mp_drho*AXU1 / (mp_W**2 + mp_drho)
133569
def yAxisIsMajor(self):
        '''
        
        '''
        return max(self.radius.x, self.radius.y) == self.radius.y
1074259
def xyz2lonlat(x__, y__, z__):
    
    R = 6370997.0
    lons = da.rad2deg(da.arccos(x__ / da.sqrt(x__ ** 2 + y__ ** 2))) * da.sign(y__)
    lats = da.sign(z__) * (90 - da.rad2deg(da.arcsin(da.sqrt(x__ ** 2 + y__ ** 2) / R)))

    return lons, lats
485434
def function(self, x, y, amp, alpha, beta, center_x, center_y):
        
        x_shift = x - center_x
        y_shift = y - center_y
        return amp * (1. + (x_shift**2+y_shift**2)/alpha**2)**(-beta)
415193
def D_dt(self, z_lens, z_source):
        
        return self.D_xy(0, z_lens) * self.D_xy(0, z_source) / self.D_xy(z_lens, z_source) * (1 + z_lens)
941270
def skew_y(self, y):
        
        self.root.set("transform", "%s skewY(%f)" %
                      (self.root.get("transform") or '', y))
        return self