Exemple #1
0
def render_one_maass_waveform_wp(info):
    r"""
    Render the webpage of one Maass waveform.
    """
    info["check"]=[]
    #info["check"].append(["Hecke relation",url_for('not_yet_implemented')])
    #info["check"].append(["Ramanujan-Petersson conjecture",url_for('not_yet_implemented')])
    maass_id = info['id']
    mwf_logger.debug("id1={0}".format(id))
    info["friends"]= [("L-function","L/"+url_for('mwf.render_one_maass_waveform',id=maass_id))]
    info['bread']=[('Maass waveforms',url_for('.render_maass_waveforms'))]
    info["downloads"]= []
    #info["downloads"].append(["Maass form data",url_for('not_yet_implemented')])
    #data = get_maassform_by_id(maass_id)
    lenc = 20
    MWT = MaassFormTable(mwf_dbname,id=maass_id,skip=[0],limit=[20],keys=['Coefficient'],collection=info['db'])
    if MWT.table():
        info['table']=MWT.table()
    info['col_heads']=MWT.col_heads()
    info['row_heads']=MWT.row_heads()
    info['ncols']=MWT.ncols()
    info['nrows']=MWT.nrows()
    info['Eigenvalue']=MWT.prop('Eigenvalue')
    info['Symmetry']=MWT.prop('Symmetry')
    info['Weight']=MWT.prop('Weight')
    info['Character']=MWT.prop('Character')
    info['Level']=MWT.prop('Level')
    properties =    [('Level',[info['Level']]),('Symmetry',[info['Symmetry']])]
    properties.append(('Weight',[info['Weight']]))
    properties.append(('Character',[info['Character']]))
    info['title']="Maass waveforms on \(\Gamma_{0}( %s )\)" % (info['Level'])
    info['metadata']=MWT.prop('metadata')
    info['properties2']=properties
    return render_template("mwf_one_form.html",**info)
Exemple #2
0
def render_one_maass_waveform_wp(info):
    r"""
    Render the webpage of one Maass waveform.
    """
    info["check"] = []
    # info["check"].append(["Hecke relation",url_for('not_yet_implemented')])
    # info["check"].append(["Ramanujan-Petersson conjecture",url_for('not_yet_implemented')])
    maass_id = info["id"]
    mwf_logger.debug("id1={0}".format(id))
    info["friends"] = [("L-function", "L/" + url_for("mwf.render_one_maass_waveform", id=maass_id))]
    info["bread"] = [("Maass waveforms", url_for(".render_maass_waveforms"))]
    info["downloads"] = []
    # info["downloads"].append(["Maass form data",url_for('not_yet_implemented')])
    # data = get_maassform_by_id(maass_id)
    lenc = 20
    MWT = MaassFormTable(mwf_dbname, id=maass_id, skip=[0], limit=[20], keys=["Coefficient"], collection=info["db"])
    if MWT.table():
        info["table"] = MWT.table()
    info["col_heads"] = MWT.col_heads()
    info["row_heads"] = MWT.row_heads()
    info["ncols"] = MWT.ncols()
    info["nrows"] = MWT.nrows()
    info["Eigenvalue"] = MWT.prop("Eigenvalue")
    info["Symmetry"] = MWT.prop("Symmetry")
    info["Weight"] = MWT.prop("Weight")
    info["Character"] = MWT.prop("Character")
    info["Level"] = MWT.prop("Level")
    properties = [("Level", [info["Level"]]), ("Symmetry", [info["Symmetry"]])]
    properties.append(("Weight", [info["Weight"]]))
    properties.append(("Character", [info["Character"]]))
    info["title"] = "Maass waveforms on \(\Gamma_{0}( %s )\)" % (info["Level"])
    info["metadata"] = MWT.prop("metadata")
    info["properties2"] = properties
    return render_template("mwf_one_form.html", **info)
Exemple #3
0
def render_one_maass_waveform_wp_old(info):
    r"""
    Render the webpage of one Maass waveform.
    """
    info["check"]=[]
    #info["check"].append(["Hecke relation",url_for('not_yet_implemented')])
    #info["check"].append(["Ramanujan-Petersson conjecture",url_for('not_yet_implemented')])
    maass_id = info['maass_id']
    #dbname=info['db']
    info["friends"]= []
    info["friends"].append(["L-function","L/"+url_for('.render_one_maass_waveform',id=maass_id)])
    info["downloads"]= []
    #info["downloads"].append(["Maass form data",url_for('not_yet_implemented')])
    bread=[('Maass waveforms',url_for('.render_maass_waveforms'))]
    properties=[]
    data = get_maassform_by_id(maass_id)
    lenc = 20
    if not data.has_key('error'):
        [title,maass_info] =  set_info_for_maass_form(data)
        info["maass_data"] = maass_info
        #rint "data=",info["maass_data"]
        numc=data['num_coeffs']
        mwf_logger.debug("numc={0}".format(numc))
        if(numc>0):
            #if numc > 10:
                #largs = [{'maass_id':maass_id,'number':k} for k in range(10,numc,50)]
                #mwf_logger.debug("largs={0}".format(largs))
            info['coefficients']=make_table_of_coefficients(maass_id,len,offest) #,largs,text='more')
            #else:
            #    info['coefficients']=make_table_of_coefficients(maass_id)
        else:
            info["maass_data"].append(['Coefficients',''])
            
            s='No coefficients in the database for this form!'
            info['coefficients']=s
        #info['list_spaces']=ajax_once(make_table_of_spaces_fixed_level,*largs,text='more',maass_id=maass_id)
        #info["coefficients"]=table_of_coefficients(
        info["credit"] = GetNameOfPerson(data['dbname'])
        level = data['Level']
        R = data['Eigenvalue']
        title="Maass waveforms on \(\Gamma_{0}(%s)\) with R=%s" %(level,R)
        ## We see if there is a plot file associated to this waveform
        if data.has_key('plot'):
            mwf_logger.error("file={0}".format(data['plot']))
    else:
        print "data=",data
        title="Could not find Maass this waveform in the database!"
        info['error']=data['error']


    bread=[('Maass waveforms',url_for('.render_maass_waveforms'))]
    return render_template("mwf_one_maass_form.html", info=info,title=title,bread=bread,properties=properties)
Exemple #4
0
def render_one_maass_waveform_wp_old(info):
    r"""
    Render the webpage of one Maass waveform.
    """
    info["check"] = []
    # info["check"].append(["Hecke relation",url_for('not_yet_implemented')])
    # info["check"].append(["Ramanujan-Petersson conjecture",url_for('not_yet_implemented')])
    maass_id = info["maass_id"]
    # dbname=info['db']
    info["friends"] = []
    info["friends"].append(["L-function", "L/" + url_for(".render_one_maass_waveform", id=maass_id)])
    info["downloads"] = []
    # info["downloads"].append(["Maass form data",url_for('not_yet_implemented')])
    bread = [("Maass waveforms", url_for(".render_maass_waveforms"))]
    properties = []
    data = get_maassform_by_id(maass_id)
    lenc = 20
    if not data.has_key("error"):
        [title, maass_info] = set_info_for_maass_form(data)
        info["maass_data"] = maass_info
        # rint "data=",info["maass_data"]
        numc = data["num_coeffs"]
        mwf_logger.debug("numc={0}".format(numc))
        if numc > 0:
            # if numc > 10:
            # largs = [{'maass_id':maass_id,'number':k} for k in range(10,numc,50)]
            # mwf_logger.debug("largs={0}".format(largs))
            info["coefficients"] = make_table_of_coefficients(maass_id, len, offest)  # ,largs,text='more')
            # else:
            #    info['coefficients']=make_table_of_coefficients(maass_id)
        else:
            info["maass_data"].append(["Coefficients", ""])

            s = "No coefficients in the database for this form!"
            info["coefficients"] = s
        # info['list_spaces']=ajax_once(make_table_of_spaces_fixed_level,*largs,text='more',maass_id=maass_id)
        # info["coefficients"]=table_of_coefficients(
        info["credit"] = GetNameOfPerson(data["dbname"])
        level = data["Level"]
        R = data["Eigenvalue"]
        title = "Maass waveforms on \(\Gamma_{0}(%s)\) with R=%s" % (level, R)
        ## We see if there is a plot file associated to this waveform
        if data.has_key("plot"):
            mwf_logger.error("file={0}".format(data["plot"]))
    else:
        print "data=", data
        title = "Could not find Maass this waveform in the database!"
        info["error"] = data["error"]

    bread = [("Maass waveforms", url_for(".render_maass_waveforms"))]
    return render_template("mwf_one_maass_form.html", info=info, title=title, bread=bread, properties=properties)
Exemple #5
0
def render_one_maass_waveform(id):
    if id=='upload' or id=='Upload':
        title="Upload Maass waveforms"
        bread=[('Maass waveforms',url_for('render_maass_waveforms'))]
        if request.method <> "GET":
            info = get_args_upload()
            #file = request.files['file']
            print "INFO=",info
            info['allowed_entries']=allowed_entries
            remote_addr = request.remote_addr
            print "remote addr:",remote_addr
            check_data(info)
            print "check_data:"
            return render_template("mwf/mwf_upload_confirm.html", info=info,title=title,bread=bread)
        else:
            info = get_args_mwf()
            info['allowed_entries']=allowed_entries
            return render_template("mwf/mwf_upload.html", info=info,title=title,bread=bread)
        #return upload_maass_waveforms(info)
    else:
        info = get_args_mwf()
        info['id']=id
        mwf_logger.debug("id1={0}".format(id))
        return render_one_maass_waveform_wp(info)
Exemple #6
0
def render_one_maass_waveform(id):
    if id == "upload" or id == "Upload":
        title = "Upload Maass waveforms"
        bread = [("Maass waveforms", url_for("render_maass_waveforms"))]
        if request.method <> "GET":
            info = get_args_upload()
            # file = request.files['file']
            print "INFO=", info
            info["allowed_entries"] = allowed_entries
            remote_addr = request.remote_addr
            print "remote addr:", remote_addr
            check_data(info)
            print "check_data:"
            return render_template("mwf/mwf_upload_confirm.html", info=info, title=title, bread=bread)
        else:
            info = get_args_mwf()
            info["allowed_entries"] = allowed_entries
            return render_template("mwf/mwf_upload.html", info=info, title=title, bread=bread)
        # return upload_maass_waveforms(info)
    else:
        info = get_args_mwf()
        info["id"] = id
        mwf_logger.debug("id1={0}".format(id))
        return render_one_maass_waveform_wp(info)
Exemple #7
0
def render_maass_waveforms_for_one_group(level):
    DB = connect_db()
    res  = dict()
    info=dict()
    mwf_logger.debug("collections {0}".format(DB.collection_names()))
    for collection_name in DB.collection_names():
        res[collection_name] = list()
        C = pymongo.collection.Collection(DB,collection_name)
        mwf_logger.debug("Collection {0}".format(C))
        L = C.find({'Level':level,'Weight':0.0})
        for F in L:
            mwf_logger.debug("F: {0}".format(F))
            try:
                id = F['_id']
                R  =  F['Eigenvalue']
                k =   F['Weight']
                res[collection_name].append((R,k,id))
            except:
                pass
        res[collection_name].sort()
    # now we have all maass waveforms for this group
    
    s="<table><tr>"
    for name in res.keys():
        if(len(res[name])==0):
            continue
        s+="<td valign='top'>"
        s+="<table><thead>"
        s+=" <tr><td valign='top'>Collection:"+name
        s+="     </td></tr></thead>"
        s+="<tbody>"
        for (R,k,id) in res[name]:
            url = url_for('mwf.render_one_maass_waveform',objectid=str(id),db=name)
            s+="<tr><td><a href=\"%s\">%s</a></td></tr>" %(url,R)
        s+="</tbody>"
        s+="</table>"
        s+="</td>"
    s+="</tr></table>"
    #print "S=",s
    info['table_of_eigenvalues']=s
    title="Maass waveforms for \(\Gamma_{0}("+str(level)+")\)"
    bread=[('Maass waveforms',url_for('.render_maass_waveforms'))]
    return render_template("mwf_one_group.html", info=info,title=title)
Exemple #8
0
def render_maass_waveforms_for_one_group(level):
    DB = connect_db()
    res = dict()
    info = dict()
    mwf_logger.debug("collections {0}".format(DB.collection_names()))
    for collection_name in DB.collection_names():
        res[collection_name] = list()
        C = pymongo.collection.Collection(DB, collection_name)
        mwf_logger.debug("Collection {0}".format(C))
        L = C.find({"Level": level, "Weight": 0.0})
        for F in L:
            mwf_logger.debug("F: {0}".format(F))
            try:
                id = F["_id"]
                R = F["Eigenvalue"]
                k = F["Weight"]
                res[collection_name].append((R, k, id))
            except:
                pass
        res[collection_name].sort()
    # now we have all maass waveforms for this group

    s = "<table><tr>"
    for name in res.keys():
        if len(res[name]) == 0:
            continue
        s += "<td valign='top'>"
        s += "<table><thead>"
        s += " <tr><td valign='top'>Collection:" + name
        s += "     </td></tr></thead>"
        s += "<tbody>"
        for (R, k, id) in res[name]:
            url = url_for("mwf.render_one_maass_waveform", objectid=str(id), db=name)
            s += '<tr><td><a href="%s">%s</a></td></tr>' % (url, R)
        s += "</tbody>"
        s += "</table>"
        s += "</td>"
    s += "</tr></table>"
    # print "S=",s
    info["table_of_eigenvalues"] = s
    title = "Maass waveforms for \(\Gamma_{0}(" + str(level) + ")\)"
    bread = [("Maass waveforms", url_for(".render_maass_waveforms"))]
    return render_template("mwf_one_group.html", info=info, title=title)
Exemple #9
0
 def set_table(self):
     mwf_logger.debug("skip= {0}".format(self.skip))
     mwf_logger.debug("limit= {0}".format(self.limit))
     self.table = []
     level_ll = (self.skip[self.keys.index('Level')]
                 ) * self.limit[self.keys.index('Level')]
     level_ul = (self.skip[self.keys.index('Level')] +
                 1) * self.limit[self.keys.index('Level')]
     ev_limit = self.limit[self.keys.index('Eigenvalue')]
     ev_skip = self.skip[self.keys.index('Eigenvalue')] * ev_limit
     new_cols = []
     for N in get_all_levels():
         N = int(N)
         if N < level_ll:
             continue
         if N > level_ul:
             break
         evs = []
         for c in self.cols:
             finds = c.find({
                 'Level': N,
                 'Weight': self.wt
             }).sort('Eigenvalue', 1).skip(ev_skip).limit(ev_limit)
             i = 0
             for f in finds:
                 i = i + 1
                 _id = f['_id']
                 R = f['Eigenvalue']
                 url = url_for('mwf.render_one_maass_waveform',
                               id=str(_id),
                               db=c.name)
                 evs.append([R, url, c.name])
             if i > 0 and c not in new_cols:
                 new_cols.append(c)
         evs.sort()
         # If we have too many we delete the
         while len(evs) > ev_limit:
             t = evs.pop()
             mwf_logger.debug("removes {0}".format(t))
         #logger.debug("found eigenvalues in {0} is {1}".format(c.name,evs))
         if len(evs) > 0:
             self.table.append({'N': N, 'evs': evs})
     self.cols = new_cols
Exemple #10
0
 def set_table(self):
     mwf_logger.debug("skip= {0}".format(self.skip))
     mwf_logger.debug("limit= {0}".format(self.limit))
     self.table=[]
     level_ll=(self.skip[self.keys.index('Level')])*self.limit[self.keys.index('Level')]
     level_ul=(self.skip[self.keys.index('Level')]+1)*self.limit[self.keys.index('Level')]
     ev_limit=self.limit[self.keys.index('Eigenvalue')]
     ev_skip=self.skip[self.keys.index('Eigenvalue')]*ev_limit
     new_cols=[]
     for N in get_all_levels():
         N=int(N)
         if N<level_ll:
             continue
         if N>level_ul:
             break
         evs=[]
         for c in self.cols:
             finds=c.find({'Level':N,'Weight':self.wt}).sort('Eigenvalue',1).skip(ev_skip).limit(ev_limit);
             i=0
             for f in finds:
                 i=i+1
                 _id = f['_id']
                 R = f['Eigenvalue']
                 url = url_for('mwf.render_one_maass_waveform',id=str(_id),db=c.name)
                 evs.append([R,url,c.name])
             if i>0 and c not in new_cols:
                 new_cols.append(c)
         evs.sort()
         # If we have too many we delete the 
         while len(evs)>ev_limit:
             t=evs.pop()
             mwf_logger.debug("removes {0}".format(t))
         #logger.debug("found eigenvalues in {0} is {1}".format(c.name,evs))
         if len(evs)>0:
             self.table.append({'N':N,'evs':evs})
     self.cols=new_cols
Exemple #11
0
def render_maass_waveforms():
    info = get_args_mwf()
    print "INFO=",info
    info["credit"] = ""
    info["learnmore"]= []
    info["learnmore"].append(["Wiki","http://wiki.l-functions.org/ModularForms/MaassForms"])
    # if we submit a search we search the database:
    mwf_logger.debug("args=%s"%request.args)
    mwf_logger.debug("method=%s"%request.method)
    mwf_logger.debug("req.form=%s"%request.form)
    mwf_logger.debug("info=%s"%info)
    if info['browse']:
        return render_browse_maass_waveforms(info=info,title='Maass Forms')

    if info['search']:
        search = get_search_parameters(info)
        return render_search_results_wp(info,search)


    # If we have a fixed ID and Database we show that single Maass form      
    if info['maass_id'] and info['DBname']:
        return render_one_maass_waveform_wp(info)

    if not info['collection'] or info['collection']=='all':
      # list the collections
      md = get_collections_info()

    level = info['level']; weight=info['weight']; character=info['character']
    eigenvalue=info['eigenvalue']
    if level and weight and character and eigenvalue:
        return redirect(url_for('mwf.render_maass_waveform_space',level=level,weight=weight,character=character,eigenvalue=eigenvalue))
    #info['cur_character'] = character
        
    if level and weight and character:
      return redirect(url_for('mwf.render_maass_waveform_space',level=level,weight=weight,character=character,eigenvalue=eigenvalue))

    if level:
        mwf_logger.debug("info(level)=%s"%info)
        return redirect(url_for('mwf.render_maass_waveforms_for_one_group',level=level,weight=weight,character=character,eigenvalue=eigenvalue))

    info['cur_character'] = character
    #info["info1"] = MakeTitle(level,weight,character)  
    if level:
        info['maass_weight'] = getallweights(int(level))
        info['cur_level'] = level
        
    if level and weight:
        info['cur_weight'] = weight
        info['maass_character'] = getallcharacters(int(level),float(weight))
        
    if level and weight and character:
        info['cur_character'] = character
        
    if eigenvalue:
        index  = 0
        info["maass_eigenvalue"] = []                   
        info["search_for_ev"] = eigenvalue
        
        [Sym,EVFS] = searchforEV(eigenvalue,"FS")
        
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"),"FS",Sym,EVFS])      
            info["credit"] += GetNameOfPerson("FS")
            
            [Sym,EVHT] = searchforEV(eigenvalue,"HT")
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"),"HT",Sym,EVHT])
                info["credit"] += " "+GetNameOfPerson("HT")

    elif level and weight and character:
        index = 0
        info["maass_eigenvalue"] = []
        [Sym,EVFS] = getEigenvaluesFS(int(level),float(weight),int(character),index)
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"),"FS",Sym,EVFS])      
            info["credit"] += GetNameOfPerson("FS")
            [Sym2,EVHT] = getEigenvaluesHT(int(level),float(weight),int(character),index)
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"),"HT",Sym2,EVHT])
                info["credit"] += " and "+ GetNameOfPerson("HT")
                
                info['maass_group'] = getallgroupsLevel()
    title='Maass waveforms'
    info['list_of_levels']=get_all_levels()
    if info['list_of_levels']:
        info['max_level']=max(info['list_of_levels'])
    else:
        info['max_level']=0
    mwf_logger.debug("info3=%s"%info)
    #print_table_of_levels()
    #return render_template("mwf_browse.html", info=info,title=title)
    info['cur_character'] = character
    #info["info1"] = MakeTitle(level,weight,character)  
    if level:
        info['maass_weight'] = getallweights(int(level))
        info['cur_level'] = level
        
    if level and weight:
        info['cur_weight'] = weight
        info['maass_character'] = getallcharacters(int(level),float(weight))
        
    if level and weight and character:
        info['cur_character'] = character
        
    if eigenvalue:
        index  = 0
        info["maass_eigenvalue"] = []                   
        info["search_for_ev"] = eigenvalue
        
        [Sym,EVFS] = searchforEV(eigenvalue,"FS")
        
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"),"FS",Sym,EVFS])      
            info["credit"] += GetNameOfPerson("FS")
            
            [Sym,EVHT] = searchforEV(eigenvalue,"HT")
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"),"HT",Sym,EVHT])
                info["credit"] += " "+GetNameOfPerson("HT")
                
 


    elif level and weight and character:
        index = 0
        info["maass_eigenvalue"] = []
        [Sym,EVFS] = getEigenvaluesFS(int(level),float(weight),int(character),index)
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"),"FS",Sym,EVFS])      
            info["credit"] += GetNameOfPerson("FS")
            [Sym2,EVHT] = getEigenvaluesHT(int(level),float(weight),int(character),index)
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"),"HT",Sym2,EVHT])
                info["credit"] += " and "+ GetNameOfPerson("HT")
                
                info['maass_group'] = getallgroupsLevel()
    title='Maass waveforms'
    info['list_of_levels']=get_all_levels()
    if info['list_of_levels']:
        info['max_level']=max(info['list_of_levels'])
    else:
        info['max_level']=0
    mwf_logger.debug("info3=%s"%info)
    return render_template("mwf_navigate.html", info=info,title=title)
Exemple #12
0
def render_maass_waveforms():
    info = get_args_mwf()
    print "INFO=", info
    info["credit"] = ""
    info["learnmore"] = []
    info["learnmore"].append(["Wiki", "http://wiki.l-functions.org/ModularForms/MaassForms"])
    # if we submit a search we search the database:
    mwf_logger.debug("args=%s" % request.args)
    mwf_logger.debug("method=%s" % request.method)
    mwf_logger.debug("req.form=%s" % request.form)
    mwf_logger.debug("info=%s" % info)
    if info["browse"]:
        return render_browse_maass_waveforms(info=info, title="Maass Forms")

    if info["search"]:
        search = get_search_parameters(info)
        return render_search_results_wp(info, search)

    # If we have a fixed ID and Database we show that single Maass form
    if info["maass_id"] and info["DBname"]:
        return render_one_maass_waveform_wp(info)

    if not info["collection"] or info["collection"] == "all":
        # list the collections
        md = get_collections_info()

    level = info["level"]
    weight = info["weight"]
    character = info["character"]
    eigenvalue = info["eigenvalue"]
    if level and weight and character and eigenvalue:
        return redirect(
            url_for(
                "mwf.render_maass_waveform_space",
                level=level,
                weight=weight,
                character=character,
                eigenvalue=eigenvalue,
            )
        )
    # info['cur_character'] = character

    if level and weight and character:
        return redirect(
            url_for(
                "mwf.render_maass_waveform_space",
                level=level,
                weight=weight,
                character=character,
                eigenvalue=eigenvalue,
            )
        )

    if level:
        mwf_logger.debug("info(level)=%s" % info)
        return redirect(
            url_for(
                "mwf.render_maass_waveforms_for_one_group",
                level=level,
                weight=weight,
                character=character,
                eigenvalue=eigenvalue,
            )
        )

    info["cur_character"] = character
    # info["info1"] = MakeTitle(level,weight,character)
    if level:
        info["maass_weight"] = getallweights(int(level))
        info["cur_level"] = level

    if level and weight:
        info["cur_weight"] = weight
        info["maass_character"] = getallcharacters(int(level), float(weight))

    if level and weight and character:
        info["cur_character"] = character

    if eigenvalue:
        index = 0
        info["maass_eigenvalue"] = []
        info["search_for_ev"] = eigenvalue

        [Sym, EVFS] = searchforEV(eigenvalue, "FS")

        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"), "FS", Sym, EVFS])
            info["credit"] += GetNameOfPerson("FS")

            [Sym, EVHT] = searchforEV(eigenvalue, "HT")
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"), "HT", Sym, EVHT])
                info["credit"] += " " + GetNameOfPerson("HT")

    elif level and weight and character:
        index = 0
        info["maass_eigenvalue"] = []
        [Sym, EVFS] = getEigenvaluesFS(int(level), float(weight), int(character), index)
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"), "FS", Sym, EVFS])
            info["credit"] += GetNameOfPerson("FS")
            [Sym2, EVHT] = getEigenvaluesHT(int(level), float(weight), int(character), index)
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"), "HT", Sym2, EVHT])
                info["credit"] += " and " + GetNameOfPerson("HT")

                info["maass_group"] = getallgroupsLevel()
    title = "Maass waveforms"
    info["list_of_levels"] = get_all_levels()
    if info["list_of_levels"]:
        info["max_level"] = max(info["list_of_levels"])
    else:
        info["max_level"] = 0
    mwf_logger.debug("info3=%s" % info)
    # print_table_of_levels()
    # return render_template("mwf_browse.html", info=info,title=title)
    info["cur_character"] = character
    # info["info1"] = MakeTitle(level,weight,character)
    if level:
        info["maass_weight"] = getallweights(int(level))
        info["cur_level"] = level

    if level and weight:
        info["cur_weight"] = weight
        info["maass_character"] = getallcharacters(int(level), float(weight))

    if level and weight and character:
        info["cur_character"] = character

    if eigenvalue:
        index = 0
        info["maass_eigenvalue"] = []
        info["search_for_ev"] = eigenvalue

        [Sym, EVFS] = searchforEV(eigenvalue, "FS")

        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"), "FS", Sym, EVFS])
            info["credit"] += GetNameOfPerson("FS")

            [Sym, EVHT] = searchforEV(eigenvalue, "HT")
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"), "HT", Sym, EVHT])
                info["credit"] += " " + GetNameOfPerson("HT")

    elif level and weight and character:
        index = 0
        info["maass_eigenvalue"] = []
        [Sym, EVFS] = getEigenvaluesFS(int(level), float(weight), int(character), index)
        if EVFS:
            info["maass_eigenvalue"].append([GetNameOfPerson("FS"), "FS", Sym, EVFS])
            info["credit"] += GetNameOfPerson("FS")
            [Sym2, EVHT] = getEigenvaluesHT(int(level), float(weight), int(character), index)
            if EVHT:
                info["maass_eigenvalue"].append([GetNameOfPerson("HT"), "HT", Sym2, EVHT])
                info["credit"] += " and " + GetNameOfPerson("HT")

                info["maass_group"] = getallgroupsLevel()
    title = "Maass waveforms"
    info["list_of_levels"] = get_all_levels()
    if info["list_of_levels"]:
        info["max_level"] = max(info["list_of_levels"])
    else:
        info["max_level"] = 0
    mwf_logger.debug("info3=%s" % info)
    return render_template("mwf_navigate.html", info=info, title=title)
Exemple #13
0
def get_collections_info():
    db = connect_db()
    for c in db.collection_names():
        metadata=db.metadata[c]
        mwf_logger.debug("METADATA: {0}".format(metadata))
Exemple #14
0
def get_collections_info():
    db = connect_db()
    for c in db.collection_names():
        metadata = db.metadata[c]
        mwf_logger.debug("METADATA: {0}".format(metadata))