def __init__(self, dimension, conductor, tim_index, **args): constructor_logger(self, args) from lmfdb.math_classes import ArtinRepresentation self.artin = ArtinRepresentation(dimension, conductor, tim_index) self.title = "L function for an Artin representation of dimension " + str(dimension) + \ ", conductor " + str(conductor) self.motivic_weight = 0 self.degree = self.artin.dimension() self.coefficient_type = 0 if self.degree == 1: self.coefficient_period = Integer(self.artin.conductor()) self.dirichlet_coefficients = self.artin.coefficients_list(upperbound=self.coefficient_period) else: self.coefficient_period = 0 self.dirichlet_coefficients = self.artin.coefficients_list(upperbound=1000) # self.Q_fe = Integer(self.artin.conductor())/float(math.pi)**int(self.degree) self.Q_fe = sqrt(Integer(self.artin.conductor()) * 1. / float(math.pi) ** int(self.degree)) self.sign = self.artin.root_number() self.kappa_fe = self.artin.kappa_fe() self.lambda_fe = self.artin.lambda_fe() self.poles_L = self.artin.poles() self.residues_L = self.artin.residues() self.poles = self.artin.completed_poles() self.residues = self.artin.completed_residues() self.level = self.artin.conductor() self.selfdual = self.artin.selfdual() self.primitive = self.artin.primitive() self.langlands = self.artin.langlands() self.mu_fe = self.artin.mu_fe() self.nu_fe = self.artin.nu_fe() self.credit = 'Sage, lcalc, and data precomputed in Magma by Tim Dokchitser' self.citation = '' self.support = "Support by Paul-Olivier Dehaye" self.texname = "L(s)" # default name. will be set later, for most L-functions self.texnamecompleteds = "\\Lambda(s)" # default name. will be set later, for most L-functions if self.selfdual: self.texnamecompleted1ms = "\\Lambda(1-s)" # default name. will be set later, for most L-functions else: self.texnamecompleted1ms = "\\overline{\\Lambda(1-\\overline{s})}" # default name. will be set later, for most L-functions self.generateSageLfunction()
# Adds a field called field_len to objects in the_collection. It is based on the field called field # It encodes the len of the string used import sys sys.path.append("../") import base base._init(37010, "") from lmfdb.math_classes import ArtinRepresentation the_collection = ArtinRepresentation.collection() print "Got", the_collection field = "Conductor" from utils import len_val_fn new_field = field + "_plus" for x in the_collection.find(): val = x[field] x[new_field] = len_val_fn(val) the_collection.save(x)
from lmfdb.math_classes import ArtinRepresentation from lmfdb.website import dbport import base base._init(dbport, "") # x is raw # a is of type ArtinRepresentation # all the artin reps that come out of this are safe to appear on the website # their L functions need to be fixed however # if you want to do complex queries, and sort using pymongo's interface: for x in ArtinRepresentation.collection().find(): a = ArtinRepresentation(data=x) print a try: print a.Lfunction() except NotImplementedError or SyntaxError: print "Need CYC types and sign" # if you want to list them all, using a wrapper to directly convert to ArtinRepresentation for a in ArtinRepresentation.find(): print a try: print a.Lfunction() except NotImplementedError or SyntaxError: print "Need CYC types"
# Adds a field called field_len to objects in the_collection. It is based on the field called field # It encodes the len of the string used # This is kind of a hack for mongodb, see lmfdb.utils.len_val_fn for explanation import sys LMFDB_FOLDER = "../../../" sys.path.append(LMFDB_FOLDER) import lmfdb.base as base base._init(dbport, "") from lmfdb.math_classes import ArtinRepresentation the_collection = ArtinRepresentation.collection() print "Got", the_collection field = "Conductor" from lmfdb.utils import len_val_fn new_field = field + "_plus" print "Updating" for x in the_collection.find(): val = x[field] x[new_field] = len_val_fn(val) the_collection.save(x)