NAME:
       FRStaeckel
    PURPOSE:
       return the radial force
    INPUT:
       u - confocal u
       v - confocal v
       pot - potential
       delta - focus
    OUTPUT:
       FR(u,v)
    HISTORY:
       2012-11-30 - Written - Bovy (IAS)
964255
def FRStaeckel(u,v,pot,delta): #pragma: no cover because unused
    
    R,z= bovy_coords.uv_to_Rz(u,v,delta=delta)
    return _evaluateRforces(pot,R,z)
111780
def singleFactor(factors, chart, factor, obj, aspect=None):
    "
    
    objID = obj if type(obj) == str else obj.id
    res = {
        'factor': factor,
        'objID': objID,
        'aspect': aspect
    }
    
    # For signs (obj as string) return sign element
    if type(obj) == str:
        res['element'] = props.sign.element[obj]
        
    # For Sun return sign and sunseason element
    elif objID == const.SUN:
        sunseason = props.sign.sunseason[obj.sign]
        res['sign'] = obj.sign
        res['sunseason'] = sunseason
        res['element'] = props.base.sunseasonElement[sunseason]
        
    # For Moon return phase and phase element
    elif objID == const.MOON:
        phase = chart.getMoonPhase()
        res['phase'] = phase
        res['element'] = props.base.moonphaseElement[phase]
        
    # For regular planets return element or sign/sign element
    # if there's an aspect involved
    elif objID in const.LIST_SEVEN_PLANETS:
        if aspect:
            res['sign'] = obj.sign
            res['element'] = props.sign.element[obj.sign]
        else:
            res['element'] = obj.element()
            
    try:
        # If there's element, insert into list
        res['element']
        factors.append(res)
    except KeyError:
        pass
    
    return res
997185
double psfunc2(double x, double t1, int dim, int type, int css) {
    // type:  the type of curve 
    // css:   the class of index
    double beta;
    beta = 0.0;

    dim++;

    if (type == 21) {
      double xy = 2 * (x - 0.5);
      beta = xy - Math.pow(t1, 0.5 * (nvar + 3 * dim - 8) / (nvar - 2));
    }

    if (type == 22) {
      double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
      double xy = 2 * (x - 0.5);
      beta = xy - Math.sin(theta);
    }

    if (type == 23) {
      double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
      double ra = 0.8 * t1;
      double xy = 2 * (x - 0.5);
      if (css == 1) {
        beta = xy - ra * Math.cos(theta);
      } else {
        beta = xy - ra * Math.sin(theta);
      }
    }

    if (type == 24) {
      double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
      double xy = 2 * (x - 0.5);
      double ra = 0.8 * t1;
      if (css == 1) {
        beta = xy - ra * Math.cos(theta / 3);
      } else {
        beta = xy - ra * Math.sin(theta);
      }
    }

    if (type == 25) {
      double rho = 0.8;
      double phi = Math.PI * t1;
      double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
      double xy = 2 * (x - 0.5);
      if (css == 1) {
        beta = xy - rho * Math.sin(phi) * Math.sin(theta);
      } else if (css == 2) {
        beta = xy - rho * Math.sin(phi) * Math.cos(theta);
      } else {
        beta = xy - rho * Math.cos(phi);
      }
    }

    if (type == 26) {
      double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
      double ra = 0.3 * t1 * (t1 * Math.cos(4 * theta) + 2);
      double xy = 2 * (x - 0.5);
      if (css == 1) {
        beta = xy - ra * Math.cos(theta);
      } else {
        beta = xy - ra * Math.sin(theta);
      }
    }

    return beta;
  }
1335550
def example_ylm(m=0, n=2, shape=128, limits=[-4, 4], draw=True, show=True, **kwargs):
    """"""
    import ipyvolume.pylab as p3

    __, __, __, r, theta, phi = xyz(shape=shape, limits=limits, spherical=True)
    radial = np.exp(-(r - 2) ** 2)
    data = np.abs(scipy.special.sph_harm(m, n, theta, phi) ** 2) * radial  # pylint: disable=no-member
    if draw:
        vol = p3.volshow(data=data, **kwargs)
        if show:
            p3.show()
        return vol
    else:
        return data
649172
function _fnRemoveFocus( nTarget )
	{
		$(nTarget).removeClass( _sFocusClass );
		$(nTarget).parent().removeClass( _sFocusClass );
		_fnEventFire( "blur", _iOldX, _iOldY );
	}
756483
def potentialStaeckel(u,v,pot,delta):
    
    R,z= bovy_coords.uv_to_Rz(u,v,delta=delta)
    return _evaluatePotentials(pot,R,z)
457888
def multi_gaussian_lens(self, kwargs_lens, model_bool_list=None, e1=0, e2=0, n_comp=20):
        
        if 'center_x' in kwargs_lens[0]:
            center_x = kwargs_lens[0]['center_x']
            center_y = kwargs_lens[0]['center_y']
        else:
            raise ValueError('no keyword center_x defined!')
        theta_E = self._lensModelExtensions.effective_einstein_radius(kwargs_lens)
        r_array = np.logspace(-4, 2, 200) * theta_E
        x_coords, y_coords = param_util.transform_e1e2(r_array, np.zeros_like(r_array), e1=-e1, e2=-e2)
        x_coords += center_x
        y_coords += center_y
        #r_array = np.logspace(-2, 1, 50) * theta_E
        if model_bool_list is None:
            model_bool_list = [True] * len(kwargs_lens)
        kappa_s = np.zeros_like(r_array)
        for i in range(len(kwargs_lens)):
            if model_bool_list[i] is True:
                kappa_s += self.LensModel.kappa(x_coords, y_coords, kwargs_lens, k=i)
        amplitudes, sigmas, norm = mge.mge_1d(r_array, kappa_s, N=n_comp)
        return amplitudes, sigmas, center_x, center_y
1303007
function _findFocusCell($newTable, $startContainer) {
  const elementRowIndex = dataHandler.findElementRowIndex($startContainer);
  const elementColIndex = dataHandler.findElementColIndex($startContainer);

  return $newTable.find('tr').eq(elementRowIndex).find('td, th')[elementColIndex];
}
810327
def section_bif_radial_distances(neurites, neurite_type=NeuriteType.all, origin=None):
    ''''''
    return section_radial_distances(neurites, neurite_type=neurite_type, origin=origin,
                                    iterator_type=Tree.ibifurcation_point)
1352850
def _phiforce(self,R,phi=0.,t=0.):
        
        return self._Pot.phiforce(R,0.,phi=phi,t=t,use_physical=False)
630082
def strel_disk(radius):
    
    iradius = int(radius)
    x,y     = np.mgrid[-iradius:iradius+1,-iradius:iradius+1]
    radius2 = radius * radius
    strel   = np.zeros(x.shape)
    strel[x*x+y*y <= radius2] = 1
    return strel
434647
def pot_to_rpole_aligned(pot, sma, q, F, d, component=1):
    
    q = q_for_component(q, component=component)
    Phi = pot_for_component(pot, q, component=component)
    logger.debug("libphobe.roche_pole(q={}, F={}, d={}, Omega={})".format(q, F, d, pot))
    return libphoebe.roche_pole(q, F, d, pot) * sma
1167736
def calcEL(self,**kwargs):
                                   
        E,L= calcELAxi(self._R,self._vR,self._vT,self._pot)
        if self._gamma != 0.:
            #Adjust E
            E-= self._vT**2./2.
            L= m.fabs(L)+self._gamma*self.Jz(**kwargs)
            E+= L**2./2./self._R**2.
        return (E,L)
784751
def beta_r(self, r, kwargs):
        
        if self._type == 'const':
            return self.const_beta(kwargs)
        elif self._type == 'OsipkovMerritt':
            return self.ospikov_meritt(r, kwargs)
        elif self._type == 'Colin':
            return self.colin(r, kwargs)
        elif self._type == 'isotropic':
            return self.isotropic()
        elif self._type == 'radial':
            return self.radial()
        else:
            raise ValueError('anisotropy type %s not supported!' % self._type)
49317
def _Rforce(self,R,phi=0.,t=0.):
        
        return self._Pot.Rforce(R,0.,t=t,use_physical=False)
1284112
def fnc(ra, *args):
    
    #
    # epicentral distance
    repi = args[0]
    #
    # azimuth
    theta = args[1]
    #
    # magnitude
    mag = args[2]
    #
    # coefficients
    coeff = args[3]
    #
    # compute the difference between epicentral distances
    rb = rbf(ra, coeff, mag)
    t1 = ra**2 * (np.sin(np.radians(theta)))**2
    t2 = rb**2 * (np.cos(np.radians(theta)))**2
    xx = ra * rb / (t1+t2)**0.5
    return xx-repi
1261544
def flux_components(self, kwargs_light, n_grid=400, delta_grid=0.01, deltaPix=0.05, type="lens"):
        
        flux_list = []
        R_h_list = []
        x_grid, y_grid = util.make_grid(numPix=n_grid, deltapix=delta_grid)
        kwargs_copy = copy.deepcopy(kwargs_light)
        for k, kwargs in enumerate(kwargs_light):
            if 'center_x' in kwargs_copy[k]:
                kwargs_copy[k]['center_x'] = 0
                kwargs_copy[k]['center_y'] = 0
            if type == 'lens':
                light = self.LensLightModel.surface_brightness(x_grid, y_grid, kwargs_copy, k=k)
            elif type == 'source':
                light = self.SourceModel.surface_brightness(x_grid, y_grid, kwargs_copy, k=k)
            else:
                raise ValueError("type %s not supported!" % type)
            flux = np.sum(light)*delta_grid**2 / deltaPix**2
            R_h = analysis_util.half_light_radius(light, x_grid, y_grid)
            flux_list.append(flux)
            R_h_list.append(R_h)
        return flux_list, R_h_list