diff --git a/config.yml b/config.yml
index 80b1df3..ab420af 100644
--- a/config.yml
+++ b/config.yml
@@ -35,6 +35,68 @@ authors:
role: Project Coordinator
mail: vincent.genot@irap.omp.eu
+# `slug` used internally, and should match [a-z0-9]+
+# `name` is displayed
+# `title` appears on mouse hover
+# `locked` is for sources that are "coming soon"
+# `default` sources are shown to incoming visitors, others need user activation
+sources:
+ - type: 'planet'
+ slug: 'mercury'
+ name: 'Mercury'
+ title: 'Mercury (coming soon)'
+ locked: true
+ default: true
+ - type: 'planet'
+ slug: 'venus'
+ name: 'Venus'
+ title: 'Venus (coming soon)'
+ locked: true
+ default: true
+ - type: 'planet'
+ slug: 'earth'
+ name: 'Earth'
+ title: 'Earth (coming soon)'
+ locked: true
+ default: true
+ - type: 'planet'
+ slug: 'mars'
+ name: 'Mars'
+ title: 'Mars (coming soon)'
+ locked: true
+ default: true
+ - type: 'planet'
+ slug: 'jupiter'
+ name: 'Jupiter'
+ title: 'Jupiter'
+ locked: false
+ default: true
+ - type: 'planet'
+ slug: 'saturn'
+ name: 'Saturn'
+ title: 'Saturn (coming soon)'
+ locked: true
+ default: true
+ - type: 'probe'
+ slug: 'rosetta'
+ name: 'Rosetta'
+ title: 'Rosetta (coming soon)'
+ locked: true
+ default: false
+ - type: 'probe'
+ slug: 'juno'
+ name: 'Juno'
+ title: 'Juno (coming soon)'
+ locked: true
+ default: false
+ - type: 'comet'
+ slug: 'tchouri'
+ name: 'Tchouri'
+ title: 'Tchouri (coming soon)'
+ locked: true
+ default: false
+
+
# Tao Model OMNI_input
#Rosetta tao_ros_sw 2014-01-01T00:00 2017-01-21T00:00
#Juno cruise tao_juno_sw 2012-01-01T00:00 2016-11-02T22:00
diff --git a/web/run.py b/web/run.py
index c19e396..2904f85 100755
--- a/web/run.py
+++ b/web/run.py
@@ -157,7 +157,12 @@ def favicon():
@app.route("/home.html")
@app.route("/index.html")
def home():
- return render_view('home.html.jinja2', {})
+ return render_view('home.html.jinja2', {
+ 'sources': config['sources'],
+ 'planets': [s for s in config['sources'] if s['type'] == 'planet'],
+ 'probes': [s for s in config['sources'] if s['type'] == 'probe'],
+ 'comets': [s for s in config['sources'] if s['type'] == 'comet'],
+ })
@app.route("/inspect")
@@ -194,19 +199,23 @@ def get_csv():
times = cdf_handle.variables['Time']
data_v = cdf_handle.variables['V']
data_b = cdf_handle.variables['B']
+ data_t = cdf_handle.variables['T']
+ data_n = cdf_handle.variables['N']
data_p = cdf_handle.variables['P_dyn']
+ data_a = cdf_handle.variables['Delta_angle']
cw.writerow((
'time',
'vrad', 'vtan', 'vlen',
- 'magn', 'pdyn'
+ 'magn', 'temp', 'pdyn', 'dens', 'angl'
))
- for time, datum_v, datum_b, datum_p in zip(times, data_v, data_b, data_p):
+ for time, datum_v, datum_b, datum_t, datum_p, datum_n, datum_a in \
+ zip(times, data_v, data_b, data_t, data_n, data_p, data_a):
vrad = datum_v[0]
vtan = datum_v[1]
cw.writerow((
datetime_from_list(time).strftime("%Y-%m-%dT%H:%M:%S+00:00"),
vrad, vtan, sqrt(vrad * vrad + vtan * vtan),
- datum_b, datum_p
+ datum_b, datum_t, datum_n, datum_p, datum_a
))
cdf_handle.close()
@@ -232,6 +241,7 @@ def get_orbiter_csv(orbiter):
abort(400, "Invalid stopped_at parameter : '%s'." % stopped_at)
# Grab the list of netCDF files from Myriam's API todo
+ #
si = StringIO.StringIO()
cw = csv_writer(si)
diff --git a/web/view/home.html.jinja2 b/web/view/home.html.jinja2
index 4abe682..6c7beb8 100755
--- a/web/view/home.html.jinja2
+++ b/web/view/home.html.jinja2
@@ -11,10 +11,33 @@
Planets
+