Ejemplo n.º 1
0
def render_browseGraph(args):
    # logger.debug(args)
    if 'sign' in args:
        data = LfunctionPlot.paintSvgFileAll([[args['group'], int(args['level']), args['sign']]])
    else:
        data = LfunctionPlot.paintSvgFileAll([[args['group'], int(args['level'])]])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 2
0
def render_browseGraph(args):
    # logger.debug(args)
    if 'sign' in args:
        data = LfunctionPlot.paintSvgFileAll([[args['group'], int(args['level']), args['sign']]])
    else:
        data = LfunctionPlot.paintSvgFileAll([[args['group'], int(args['level'])]])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 3
0
def render_webpage(request, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9):
    args = request.args
    temp_args = to_dict(args)
    
    if len(args) == 0:  #This ensures it's a navigation page 
        if not arg1: # this means we're at the start page
            info = set_info_for_start_page()
            return render_template("LfunctionNavigate.html", **info)
        
        elif arg1.startswith("degree"):
            degree = int(arg1[6:])
            info = { "degree" : degree }
            info["key"] = 777
            info["bread"] =  [('L-functions', url_for("render_Lfunction")), ('Degree '+str(degree), '/L/degree'+str(degree))]
            if degree == 1:
                info["contents"] = [LfunctionPlot.getOneGraphHtmlChar(1,35,1,13)]
                info['friends'] = [('Dirichlet Characters', '/Character/Dirichlet/')]
            elif degree == 2:
                info["contents"] = [processEllipticCurveNavigation(args), LfunctionPlot.getOneGraphHtmlHolo(1, 22, 2, 14)]
            elif degree == 3 or degree == 4:
                info["contents"] = LfunctionPlot.getAllMaassGraphHtml(degree)
                
            return render_template("DegreeNavigateL.html", info=info, title = 'Degree ' + str(degree)+ ' L-functions', bread = info["bread"])
            
        elif arg1 == 'custom': # need a better name
            return "not yet implemented"
        
    try:
        L = generateLfunctionFromUrl(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, temp_args)
        
    except Exception as inst:   # There was an exception when creating the page
        error_message = ('There was an error loading this page. Please report the ' +
                         'address of this page and the following error message: ' +
                         str(inst.args))
        if len(inst.args) >1:
            if inst.args[1]== "UserError":
                error_message = inst.args[0]
            
        
        info = { 'content': error_message, 'title': 'Error' }
        return render_template('LfunctionSimple.html', info=info, **info)


    try:
        logger.info(temp_args)
        if temp_args['download'] == 'lcalcfile':
            return render_lcalcfile(L, request.url)
    except:
        1
        #Do nothing

    info = initLfunction(L, temp_args, request)

    return render_template('Lfunction.html', **info)
Ejemplo n.º 4
0
def render_browseGraphHolo(args):
    logger.info(args)
    data = LfunctionPlot.paintSvgHolo(args['Nmin'], args['Nmax'], args['kmin'],
                                      args['kmax'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 5
0
def l_function_maass_gln_browse_page(degree):
    degree = int(degree[6:])
    info = {"bread": get_bread(degree, [("MaassForm", url_for('.l_function_maass_gln_browse_page',
                                                              degree='degree' + str(degree)))])}
    info["contents"] = LfunctionPlot.getAllMaassGraphHtml(degree)
    return render_template("MaassformGLn.html",
                           title='L-functions of GL(%s) Maass Forms' % degree, **info)
Ejemplo n.º 6
0
def l_function_maass_gln_browse_page(degree):
    degree = int(degree[6:])
    info = {"bread": get_bread(degree, [("MaassForm", url_for('.l_function_maass_gln_browse_page',
                                                              degree='degree' + str(degree)))])}
    info["contents"] = LfunctionPlot.getAllMaassGraphHtml(degree)
    return render_template("MaassformGLn.html",
                           title='L-functions of GL(%s) Maass Forms' % degree, **info)
Ejemplo n.º 7
0
def render_browseGraphChar(args):
    # logger.debug(args)
    data = LfunctionPlot.paintSvgChar(
        args['min_cond'], args['max_cond'], args['min_order'], args['max_order'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 8
0
def render_browseGraphTMP(args):
    # logger.debug(args)
    data = LfunctionPlot.paintSvgHoloGeneral(
        args['Nmin'], args['Nmax'], args['kmin'], args['kmax'], args['imagewidth'], args['imageheight'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 9
0
def render_browseGraphTMP(args):
    # logger.debug(args)
    data = LfunctionPlot.paintSvgHoloGeneral(
        args['Nmin'], args['Nmax'], args['kmin'], args['kmax'], args['imagewidth'], args['imageheight'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 10
0
def render_browseGraphChar(args):
    # logger.debug(args)
    data = LfunctionPlot.paintSvgChar(
        args['min_cond'], args['max_cond'], args['min_order'], args['max_order'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 11
0
def l_function_dirichlet_browse_page():
    info = {"bread": get_bread(1, [("Dirichlet", url_for('.l_function_dirichlet_browse_page'))])}
    info["minModDefault"] = 1
    info["maxModDefault"] = 20
    info["maxOrder"] = 14
    info["contents"] = [LfunctionPlot.getOneGraphHtmlChar(info["minModDefault"], info[
                                                          "maxModDefault"], 1, info["maxOrder"])]
    return render_template("Dirichlet.html", title='Dirichlet L-functions', **info)
Ejemplo n.º 12
0
def l_function_dirichlet_browse_page():
    info = {"bread": get_bread(1, [])}
    info["minModDefault"] = 1
    info["maxModDefault"] = 20
    info["maxOrder"] = 14
    info["contents"] = [LfunctionPlot.getOneGraphHtmlChar(info["minModDefault"], info[
                                                          "maxModDefault"], 1, info["maxOrder"])]
    return render_template("Degree1.html", title='Degree 1 L-functions', **info)
Ejemplo n.º 13
0
def l_function_maass_gln_browse_page(degree):
    degree = get_degree(degree)
    if degree < 0:
        return flask.abort(404)
    contents = LfunctionPlot.getAllMaassGraphHtml(degree)
    if not contents:
        return flask.abort(404)
    info = {"bread": get_bread(degree, [("Maass Form", url_for('.l_function_maass_gln_browse_page',
                                                              degree='degree' + str(degree)))])}
    info["contents"] = contents
    return render_template("MaassformGLn.html",
                           title='L-functions of GL(%s) Maass Forms' % degree, **info)
Ejemplo n.º 14
0
def l_function_cuspform_browse_page():
    info = {
        "bread":
        get_bread(2,
                  [("CuspForm", url_for('.l_function_cuspform_browse_page'))])
    }
    info["contents"] = [LfunctionPlot.getOneGraphHtmlHolo(1, 13, 2, 12)]
    return render_template(
        "cuspformGL2.html",
        title=
        'L-functions of Cusp Forms on \(\Gamma_0(N)\) with trivial character',
        **info)
Ejemplo n.º 15
0
def render_browseGraph(args):
    data = LfunctionPlot.paintSvgFileAll([[args['group'],
                                           int(args['level'])]])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 16
0
def l_function_cuspform_browse_page():
    info = {"bread": get_bread(2, [("CuspForm", url_for('.l_function_cuspform_browse_page'))])}
    info["contents"] = [LfunctionPlot.getOneGraphHtmlHolo(1, 13, 2, 12)]
    return render_template("cuspformGL2.html", title='L-functions of GL(2) Cusp Forms', **info)
Ejemplo n.º 17
0
def render_webpage(request, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8,
                   arg9):
    args = request.args
    temp_args = to_dict(args)

    if len(args) == 0:  #This ensures it's a navigation page
        if not arg1:  # this means we're at the start page
            info = set_info_for_start_page()
            return render_template("LfunctionNavigate.html", **info)

        elif arg1.startswith("degree"):
            degree = int(arg1[6:])
            info = {"degree": degree}
            info["key"] = 777
            info["bread"] = [('L-functions', url_for("render_Lfunction")),
                             ('Degree ' + str(degree),
                              '/L/degree' + str(degree))]
            if degree == 1:
                info["contents"] = [
                    LfunctionPlot.getOneGraphHtmlChar(1, 35, 1, 13)
                ]
                info['friends'] = [('Dirichlet Characters',
                                    '/Character/Dirichlet/')]
            elif degree == 2:
                info["contents"] = [
                    processEllipticCurveNavigation(args),
                    LfunctionPlot.getOneGraphHtmlHolo(1, 22, 2, 14)
                ]
            elif degree == 3 or degree == 4:
                info["contents"] = LfunctionPlot.getAllMaassGraphHtml(degree)

            return render_template("DegreeNavigateL.html",
                                   info=info,
                                   title='Degree ' + str(degree) +
                                   ' L-functions',
                                   bread=info["bread"])

        elif arg1 == 'custom':  # need a better name
            return "not yet implemented"

    try:
        L = generateLfunctionFromUrl(arg1, arg2, arg3, arg4, arg5, arg6, arg7,
                                     arg8, arg9, temp_args)

    except Exception as inst:  # There was an exception when creating the page
        error_message = (
            'There was an error loading this page. Please report the ' +
            'address of this page and the following error message: ' +
            str(inst.args))
        if len(inst.args) > 1:
            if inst.args[1] == "UserError":
                error_message = inst.args[0]

        info = {'content': error_message, 'title': 'Error'}
        return render_template('LfunctionSimple.html', info=info, **info)

    try:
        logger.info(temp_args)
        if temp_args['download'] == 'lcalcfile':
            return render_lcalcfile(L, request.url)
    except:
        1
        #Do nothing

    info = initLfunction(L, temp_args, request)

    return render_template('Lfunction.html', **info)
Ejemplo n.º 18
0
def render_browseGraphHolo(args):
    data = LfunctionPlot.paintSvgHolo(args['Nmin'], args['Nmax'], args['kmin'], args['kmax'])
    response = make_response(data)
    response.headers['Content-type'] = 'image/svg+xml'
    return response
Ejemplo n.º 19
0
def l_function_cuspform_browse_page():
    info = {"bread": get_bread(2, [("CuspForm", url_for('.l_function_cuspform_browse_page'))])}
    info["contents"] = [LfunctionPlot.getOneGraphHtmlHolo(1, 13, 2, 12)]
    return render_template("cuspformGL2.html", title='L-functions of Cusp Forms on \(\Gamma_0(N)\) with trivial character', **info)
Ejemplo n.º 20
0
def l_function_cuspform_browse_page():
    info = {"bread": get_bread(2, [("CuspForm", url_for('.l_function_cuspform_browse_page'))])}
    info["contents"] = [LfunctionPlot.getOneGraphHtmlHolo(1, 13, 2, 12)]
    return render_template("cuspformGL2.html", title='L-functions of GL(2) Cusp Forms', **info)