Beispiel #1
0
    def __call__(self, angpos, zenith, wavelength, feed, pol_index):

        seps = separations(angpos, zenith)
        x = np.pi*self.diameter/wavelength*np.sin(seps)
        out = (2*bessel_j1(x)/x)  # (Voltage Beam)
        out[np.degrees(seps) > self.sep_limit] = 0.
        return out
Beispiel #2
0
    def solve(self):

        dist = self.rr.reshape((-1,1,1))
        time = self.tt.reshape((1,-1,1))
        beta = self.beta_n.reshape((1,1,-1))

        term1 = 2/(self.RR**2-1)*((dist[:,:,0]**2)/4.+time[:,:,0])
        term2 = self.RR**2/(self.RR**2-1)*np.log(dist[:,:,0])
        term3 = 3*self.RR**4-4*self.RR**4*np.log(self.RR)-2*self.RR**2-1
        term4 = 4*(self.RR**2-1)**2

        term5 = (bessel_j1(beta*self.RR))**2*np.exp(-(beta**2)*time)
        term6 = bessel_j1(beta)*bessel_y0(beta*dist)-bessel_y1(beta)*bessel_j0(beta*dist)
        term7 = beta*((bessel_j1(beta*self.RR))**2-(bessel_j1(beta))**2)

        term8 = term5*term6/term7

        self.PP = term1-term2-term3/term4+np.pi*term8.sum(axis=2)
Beispiel #3
0
    def root_function_first_derivative(self, beta):
        """
        it needs a treshold value of beta and two functions to calculate analytical values,
        one close to singularity \beta=0, the other at larger values of \betta
        """

        J1B = bessel_j1(beta)
        Y1B = bessel_y1(beta)

        J1BR = bessel_j1(beta * self.RR)
        Y1BR = bessel_y1(beta * self.RR)

        J1B_prime = bessel_jvp(1, beta)
        Y1B_prime = bessel_yvp(1, beta)

        J1BR_prime = self.RR * bessel_jvp(1, beta * self.RR)
        Y1BR_prime = self.RR * bessel_yvp(1, beta * self.RR)

        return J1BR_prime * Y1B + J1BR * Y1B_prime - J1B_prime * Y1BR - J1B * Y1BR_prime
Beispiel #4
0
    def root_function(self, beta):
        """
        This is the function that outputs values of root function 
        defined in Everdingen solution. At singularity point of \beta = 0,
        it outputs its value at limit.
        """

        beta = toarray(beta)

        res = np.empty(beta.shape)

        res[beta == 0] = -self.RR / np.pi + 1 / (np.pi * self.RR)

        J1B = bessel_j1(beta[beta > 0])
        Y1B = bessel_y1(beta[beta > 0])

        J1BR = bessel_j1(beta[beta > 0] * self.RR)
        Y1BR = bessel_y1(beta[beta > 0] * self.RR)

        res[beta > 0] = J1BR * Y1B - J1B * Y1BR

        return res
Beispiel #5
0
def calcPcs(u):
    if u <= 0.0:
        return 1.0
    res = 2. * bessel_j1(u) / u
    return res