Example #1
0
def parseLcalcfile_ver1(L, filecontents):
    """ Extracts informtion from the lcalcfile, version 1
    """

    lines = filecontents.split('\n', 6)
    L.coefficient_type = int(lines[0])
    # Rishi tells me that for his wrapper
    # 0 is for general, 1 is for periodic and 2 is for elliptic curves.
    # Mike seems to only use 0 and 1.
    # POD
    L.quasidegree = int(lines[4])
    lines = filecontents.split('\n', 8 + 2 * L.quasidegree)
    L.Q_fe = float(lines[5 + 2 * L.quasidegree])
    L.sign = pair2complex(lines[6 + 2 * L.quasidegree])

    L.kappa_fe = []
    L.lambda_fe = []
    L.mu_fe = []
    L.nu_fe = []

    for i in range(L.quasidegree):
        localdegree = float(lines[5 + 2 * i])
        L.kappa_fe.append(localdegree)
        locallambda = pair2complex(lines[6 + 2 * i])
        L.lambda_fe.append(locallambda)
        if math.fabs(localdegree - 0.5) < 0.00001:
            L.mu_fe.append(2 * locallambda)
        elif math.fabs(localdegree - 1) < 0.00001:
            L.nu_fe.append(locallambda)
        else:
            L.nu_fe.append(locallambda)
            L.langlands = False

    """ Do poles here later
    """

    L.degree = int(round(2 * sum(L.kappa_fe)))

    L.level = int(round(math.pi ** float(L.degree) * 4 ** len(L.nu_fe) * L.Q_fe ** 2))
    # note:  math.pi was not compatible with the sage type of degree

    L.dirichlet_coefficients = splitcoeff(lines[-1])
Example #2
0
def parseLcalcfile_ver1(L, filecontents):
    """ Extracts informtion from the lcalcfile, version 1
    """

    lines = filecontents.split('\n', 6)
    L.coefficient_type = int(lines[0])
    # Rishi tells me that for his wrapper
    # 0 is for general, 1 is for periodic and 2 is for elliptic curves.
    # Mike seems to only use 0 and 1.
    # POD
    L.quasidegree = int(lines[4])
    lines = filecontents.split('\n', 8 + 2 * L.quasidegree)
    L.Q_fe = float(lines[5 + 2 * L.quasidegree])
    L.sign = pair2complex(lines[6 + 2 * L.quasidegree])

    L.kappa_fe = []
    L.lambda_fe = []
    L.mu_fe = []
    L.nu_fe = []

    for i in range(L.quasidegree):
        localdegree = float(lines[5 + 2 * i])
        L.kappa_fe.append(localdegree)
        locallambda = pair2complex(lines[6 + 2 * i])
        L.lambda_fe.append(locallambda)
        if math.fabs(localdegree - 0.5) < 0.00001:
            L.mu_fe.append(2 * locallambda)
        elif math.fabs(localdegree - 1) < 0.00001:
            L.nu_fe.append(locallambda)
        else:
            L.nu_fe.append(locallambda)
            L.langlands = False
    """ Do poles here later
    """

    L.degree = int(round(2 * sum(L.kappa_fe)))

    L.level = int(round(math.pi**float(L.degree) * 4**len(L.nu_fe) *
                        L.Q_fe**2))
    # note:  math.pi was not compatible with the sage type of degree

    L.dirichlet_coefficients = splitcoeff(lines[-1])
Example #3
0
    def parseLcalcfile(self, filecontents):
        """ Extracts informtion from the lcalcfile
        """
        
        lines = filecontents.split('\n',6)
        self.coefficient_type = int(lines[0])
        self.quasidegree = int(lines[4])
        lines = self.lcalcfile.split('\n',8+2*self.quasidegree)
        self.Q_fe = float(lines[5+2*self.quasidegree])
        self.sign = pair2complex(lines[6+2*self.quasidegree])

        self.kappa_fe = []
        self.lambda_fe = []
        self.mu_fe = []
        self.nu_fe = []

        for i in range(self.quasidegree):
            localdegree = float(lines[5+2*i])
            self.kappa_fe.append(localdegree)
            locallambda = pair2complex(lines[6+2*i])
            self.lambda_fe.append(locallambda)
            if math.fabs(localdegree-0.5)<0.00001:
                self.mu_fe.append(2*locallambda)
            elif math.fabs(localdegree-1)<0.00001:
                self.nu_fe.append(locallambda)
            else:
                self.nu_fe.append(locallambda)
                self.langlands = False

        """ Do poles here later
        """
        
        self.degree = int(round(2*sum(self.kappa_fe)))

        self.level = int(round(math.pi**float(self.degree) * 4**len(self.nu_fe) * self.Q_fe**2 ))
        # note:  math.pi was not compatible with the sage type of degree

        self.dirichlet_coefficients = splitcoeff(lines[-1])