-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
64 lines (60 loc) · 3.16 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import dash
import os
import dash_bootstrap_components as dbc
from dash import dcc
app_dict = {'transmission': {'name': 'Neutron transmission',
'url': '/transmission'},
'resonance': {'name': 'Neutron resonance',
'url': '/resonance'},
'converter': {'name': 'Composition converter',
'url': '/converter'},
'tof_plotter': {'name': 'Time-of-flight plotter (under testing)',
'url': '/tof_plotter'},
'bragg': {'name': 'Bragg-edge simulator (under testing)',
'url': '/bragg'},
'golden_angles': {'name': 'Golden Angles',
'url': '/golden_angles'}
}
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
external_stylesheets = [dbc.themes.COSMO,
'https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
server = app.server
server.secret_key = os.environ.get('secret_key', 'secret')
app.config.suppress_callback_exceptions = True
app.title = 'iNEUIT'
app_info_markdown_dict = {
'transmission': dcc.Markdown("""
This tool estimates the neutron transmission/attenuation signals and contrast,
by defining the sample information such as density, thickness in the neutron beam path.
Multiple samples or complex compounds can be added as layers in such calculation.
Estimating the contrast by changing isotopic ratios is also supported.
An example is shown by default to demonstrate its usage.
"""),
'resonance': dcc.Markdown("""
This tool estimates the energy dependent neutron imaging signals and contrasts,
specifically for *resonances* in the *epithermal* range.
Similar to the transmission tool, sample/samples can be entered as layers in such calculation.
Estimating the contrast by changing isotopic ratios is also supported.
An example is shown by default to demonstrate its usage.
"""),
'converter': dcc.Markdown("""
This tool helps the conversion between wt.% and at.%. And it populates
an equivalent chemical formula to represent a complex mixture. Such formula
can be used as '{}' in other tools available in NEUIT.
An example is shown by default to demonstrate its usage.
""".format("Chemical formula")),
'tof_plotter': dcc.Markdown("""
This tool helps plotting data acquired from Timepix2 MCP detector. By dragging and dropping
spectra files and data files, one can quickly verify if expected resonances or Bragg-edges
have been captured or not. Optional background file can also be added if normalization is needed.
"""),
'bragg': dcc.Markdown("""
This tool estimates the energy dependent neutron imaging signals and contrasts,
specifically for *Bragg-edges* in the *cold* or *thermal* range. You can either drag&drop a
.cif file, a configuration you previously loaded in this tool or edit manually the tables.
"""),
'golden_angles': dcc.Markdown("""
This tool calculates and exports golden angles for CT scans.
"""),
}