Esempio n. 1
0
def index(request):
    ctx = RequestContext(request)
    try:
        ctx.update(get_context(project))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())
Esempio n. 2
0
def index(request):
    ctx = RequestContext(request)
    try:
        columns = ['phase', 'ΔH', 'ΔH|hyd', 'GS?', 'CIF']
        ctx.update(get_context(project, columns))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())
Esempio n. 3
0
def index(request):
    ctx = RequestContext(request)
    try:
        columns = ['Co', 'Fe', 'V', 'thickness', 'BH|max', 'Hc|MOKE', 'Hc|VSM']
        ctx.update(get_context(project, columns=columns))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())
Esempio n. 4
0
def index(request):
    ctx = RequestContext(request)
    try:
        keys, subkeys = ['mₑᶜᵒⁿᵈ', 'S', 'σ', 'S²σ'], ['n.<ε>', 'p.<ε>']
        columns = ['.'.join([k, sk]) for k in keys for sk in subkeys]
        ctx.update(get_context(project, columns=columns))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())
Esempio n. 5
0
def index(request):
    ctx = RequestContext(request)
    try:
        keys, subkeys = ['NUS', 'JARVIS'], ['id', 'Eₓ', 'CIF']
        columns = ['.'.join([k, sk]) for k in keys for sk in subkeys]
        extra_keys = ['E', 'ΔE|optB88vdW']#, 'ΔE|mbj']
        columns += [f'JARVIS.{k}' for k in extra_keys]
        ctx.update(get_context(project, columns=sorted(columns)))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())
Esempio n. 6
0
def index(request):
    ctx = RequestContext(request)
    try:
        #columns = ['formula', 'cid']
        #keys = RecursiveDict([
        #    ('composition', ['Co', 'Cu', 'Ce']),
        #    #('position', ['x', 'y']),
        #    ('XAS', ['min', 'max']),
        #    ('XMCD', ['min', 'max'])
        #])
        #columns += ['##'.join([k, sk]) for k, subkeys in keys.items() for sk in subkeys]
        ctx.update(get_context(project))
    except Exception as ex:
        ctx['alert'] = str(ex)
    return render(request, "explorer_index.html", ctx.flatten())