Given phase -pi < psi <= pi,
        returns the t value such that
        exp(1j*psi) = self.u1transform(self.point(t)).
188894
def phase2t(self, psi):
        
        def _deg(rads, domain_lower_limit):
            # Convert rads to degrees in [0, 360) domain
            degs = degrees(rads % (2*pi))

            # Convert to [domain_lower_limit, domain_lower_limit + 360) domain
            k = domain_lower_limit // 360
            degs += k * 360
            if degs < domain_lower_limit:
                degs += 360
            return degs

        if self.delta > 0:
            degs = _deg(psi, domain_lower_limit=self.theta)
        else:
            degs = _deg(psi, domain_lower_limit=self.theta)
        return (degs - self.theta)/self.delta
500190
def _J(self):
        
        pd = self.particle_distribution(self._Ep * u.GeV)
        return pd.to("1/GeV").value
603282
def function(self,p):
        
        return np.around(
            0.5 +
            0.5*np.sin(pi*(p.duty_cycle-0.5)) +
            0.5*np.sin(p.frequency*2*pi*self.pattern_y + p.phase))
470394
def expm1(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_expm1,
        (BigFloat._implicit_convert(x),),
        context,
    )
579159
def crt(self, mp, mq):
        
        u = (mq - mp) * self.p_inverse % self.q
        return mp + (u * self.p)
91289
def _potInt(x,y,z,psi,b2,c2,glx=None,glw=None):
    """"""
    def integrand(s):
        t= 1/s**2.-1.
        return psi(numpy.sqrt(x**2./(1.+t)+y**2./(b2+t)+z**2./(c2+t)))\
            /numpy.sqrt((1.+(b2-1.)*s**2.)*(1.+(c2-1.)*s**2.))
    if glx is None:
        return integrate.quad(integrand,0.,1.)[0]                              
    else:
        return numpy.sum(glw*integrand(glx))
173261
private Coordinate p( int i, double t ) {
        double px = 0;
        double py = 0;
        for( int j = -2; j <= 1; j++ ) {
            Coordinate coordinate = pts.get(i + j);
            px += b(j, t) * coordinate.x;
            py += b(j, t) * coordinate.y;
        }
        return new Coordinate(px, py);
    }
371737
def _bubbleP(cls, T):
        """"""
        c = cls._blend["bubble"]
        Tj = cls._blend["Tj"]
        Pj = cls._blend["Pj"]
        Tita = 1-T/Tj

        suma = 0
        for i, n in zip(c["i"], c["n"]):
            suma += n*Tita**(i/2.)
        P = Pj*exp(Tj/T*suma)
        return P
1304977
def spin1y_from_xi1_phi_a_phi_s(xi1, phi_a, phi_s):
    
    phi1 = phi1_from_phi_a_phi_s(phi_s, phi_a)
    return xi1 * numpy.sin(phi1)
454310
private int dpToPx(float dp) {
        final DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
        float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, displayMetrics);
        return Math.round(px);
    }
166040
def _t_of_e(self, a0=None, t_start=None, f0=None, ef=None, t_obs=5.0):
        
        if ef is None:
            ef = np.ones_like(self.e0)*0.0000001

        beta = 64.0/5.0*self.m1*self.m2*(self.m1+self.m2)

        e_vals = np.asarray([np.linspace(ef[i], self.e0[i], self.num_points)
                            for i in range(len(self.e0))])
        integrand = self._find_integrand(e_vals)
        integral = np.asarray([np.trapz(integrand[:, i:], x=e_vals[:, i:])
                              for i in range(e_vals.shape[1])]).T

        if a0 is None and f0 is None:

            a0 = (19./12.*t_start*beta*1/integral[:, 0])**(1./4.) * self._f_e(e_vals[:, -1])

        elif a0 is None:
            a0 = ((self.m1 + self.m2)/self.f0**2)**(1./3.)

        c0 = self._c0_func(a0, self.e0)

        a_vals = c0[:, np.newaxis]*self._f_e(e_vals)

        delta_t = 12./19*c0[:, np.newaxis]**4/beta[:, np.newaxis]*integral

        return e_vals, a_vals, delta_t
1167254
def vp(self):
        
        return np.sqrt(self.mu * (2 / (self.rp) - 1 / self.kep.a))
643812
function getSetJ(h, lw, phi, dec, n, M, L) {

    var w = hourAngle(h, phi, dec),
        a = approxTransit(w, lw, n);
    return solarTransitJ(a, M, L);
}
635361
def par_y1step(i):
    
    """

    global mp_Y1
    grpind = slice(mp_grp[i], mp_grp[i+1])
    XU1 = mp_X[grpind] + 1/mp_alpha*mp_U1[grpind]
    if mp_wl1.shape[mp_axisM] is 1:
        gamma = mp_lmbda/(mp_alpha**2*mp_rho)*mp_wl1
    else:
        gamma = mp_lmbda/(mp_alpha**2*mp_rho)*mp_wl1[grpind]
    Y1 = sp.prox_l1(XU1, gamma)
    if mp_NonNegCoef:
        Y1[Y1 < 0.0] = 0.0
    if mp_NoBndryCross:
        for n in range(len(mp_Nv)):
            Y1[(slice(None),) + (slice(None),)*n +
               (slice(1-mp_Dshp[n], None),)] = 0.0
    mp_Y1[mp_grp[i]:mp_grp[i+1]] = Y1
708748
private double dpVap( double T, double P ) {
        double A = 6.1121 * (1.0007 + 3.46E-6 * P);
        double b = 17.502;
        double c = 240.97;
        double De = (A * exp(b * T / (c + T))) * (b / (c + T) - b * T / pow(c + T, 2.0));

        return De;
    }
1180377
def function(self,p):
        """"""
        return 0.5 + 0.5*np.sin(p.frequency*2*pi*self.pattern_y + p.phase)
294042
def C(self):
        '''
        

        '''
        try:
            return self._C
        except AttributeError:
            pass
        self._C = Point(0, 1)
        return self._C