##// END OF EJS Templates
Fix bugs and plots
jespinoza -
r6:7771bbd8f772
parent child
Show More
@@ -5,17 +5,17 upstream djangomad {
5 }
5 }
6
6
7 server {
7 server {
8 listen 80;
8 listen 8080;
9
9
10 location / {
10 location /madrigal {
11 proxy_http_version 1.1;
11 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12 proxy_set_header Upgrade $http_upgrade;
12 proxy_set_header Host $host;
13 proxy_set_header Connection "upgrade";
14 proxy_redirect off;
13 proxy_redirect off;
14 proxy_set_header X-Script-Name /madrigal;
15 proxy_pass http://djangomad;
15 proxy_pass http://djangomad;
16 }
16 }
17
17
18 location /static/ {
18 location /madrigal/static/ {
19 alias /static/;
19 alias /static/;
20 }
20 }
21 } No newline at end of file
21 }
@@ -12,7 +12,7 import madrigal.metadata
12 import madrigal.ui.web
12 import madrigal.ui.web
13 import madrigal.admin
13 import madrigal.admin
14
14
15 @login_required
15 @login_required(login_url='/madrigal/accounts/login/')
16 def index(request):
16 def index(request):
17 '''
17 '''
18 Uploading experiments data view. Allows user to upload experiment files
18 Uploading experiments data view. Allows user to upload experiment files
@@ -22,7 +22,7 SECRET_KEY = '^c1l3d35+q28^66d2pc1qlu(k$wmw^*gg3rfitz^s)t=9eu1ui'
22 DEBUG = True
22 DEBUG = True
23
23
24
24
25 ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost']
25 ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost', '10.10.120.60']
26
26
27 ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
27 ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
28
28
@@ -129,10 +129,10 MEDIA_URL = '/media/'
129
129
130 # URL prefix for static files.
130 # URL prefix for static files.
131 # Example: "http://media.lawrence.com/static/"
131 # Example: "http://media.lawrence.com/static/"
132 STATIC_URL = '/static/'
132 STATIC_URL = '/madrigal/static/'
133
133
134 BOOTSTRAP3 = {
134 BOOTSTRAP3 = {
135 # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
135 # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
136 'jquery_url': '/static/jquery.min.js',
136 'jquery_url': '/madrigal/static/jquery.min.js',
137 'include_jquery': True,
137 'include_jquery': True,
138 }
138 }
@@ -3,9 +3,10 from django.contrib import admin
3 import madweb.views
3 import madweb.views
4
4
5 urlpatterns = [
5 urlpatterns = [
6 url(r'^', include('madweb.urls')),
6 url(r'^madrigal/', include('madweb.urls')),
7 url(r'^$', madweb.views.index),
7 url(r'^$', madweb.views.index),
8 url(r'^updata/', include('apps.updata.urls', namespace="updata")),
8 url(r'^madrigal/updata/', include('apps.updata.urls', namespace="updata")),
9 url(r'^accounts/', include('apps.login.urls', namespace="login")),
9 url(r'^madrigal/accounts/', include('apps.login.urls', namespace="login")),
10 url(r'^admin/', admin.site.urls),
10 url(r'^madrigal/admin/', admin.site.urls),
11 # url(r'^madrigal/register/?$', madweb.views.view_registration, name='view_registration'),
11 ]
12 ]
@@ -642,6 +642,18 class SingleExpPlotsForm(django.forms.Form):
642
642
643 def check_mnemonic(s):
643 def check_mnemonic(s):
644
644
645 s.replace('vipe1', 'vipe')
646 s.replace('vipe2', 'vipe')
647 s.replace('vipn1', 'vipn')
648 s.replace('vipn2', 'vipn')
649 s.replace('vi72', 'vi7')
650 s.replace('vi82', 'vi8')
651 s.replace('dvipe1', 'dvipe')
652 s.replace('dvipe2', 'dvipe')
653 s.replace('dvipn1', 'dvipn')
654 s.replace('dvipn2', 'dvipn')
655 s.replace('dvi72', 'dvi7')
656 s.replace('dvi82', 'dvi8')
645 return s.replace('+', '%2b')
657 return s.replace('+', '%2b')
646
658
647 def get_params1(args, kwargs, madExpObj, madWebObj):
659 def get_params1(args, kwargs, madExpObj, madWebObj):
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -7,7 +7,7
7 <!-- InstanceBeginEditable name="doctitle" -->
7 <!-- InstanceBeginEditable name="doctitle" -->
8 <title>Madrigal administrator's guide</title>
8 <title>Madrigal administrator's guide</title>
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
10 <link href="/static/madrigal.css" rel="stylesheet" type="text/css" />
10 <link href="/madrigal/static/madrigal.css" rel="stylesheet" type="text/css" />
11 <style type="text/css">
11 <style type="text/css">
12 html body {
12 html body {
13 background-color: {{bg_color}};
13 background-color: {{bg_color}};
@@ -19,9 +19,9
19 <body>
19 <body>
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
21 <tr>
21 <tr>
22 <td width="5%"><a href="{% url 'docs' 'rr_fortran95.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
22 <td width="5%"><a href="{% url 'docs' 'rr_fortran95.html' %}"><img src="{% static 'previous.png' %}" alt="previous" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="{% static 'up.png' %}" alt="up" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'ad_appropriate.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'ad_appropriate.html' %}"><img src="{% static 'next.png' %}" alt="next" width="32" height="32" /></a></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -54,9 +54,9
54 <!-- InstanceEndEditable -->
54 <!-- InstanceEndEditable -->
55 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
55 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
56 <tr>
56 <tr>
57 <td width="5%"><a href="{% url 'docs' 'rr_fortran95.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
57 <td width="5%"><a href="{% url 'docs' 'rr_fortran95.html' %}"><img src="{% static 'previous.png' %}" alt="previous" width="32" height="32" /></a></td>
58 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
58 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="{% static 'up.png' %}" alt="up" width="32" height="32" /></a></td>
59 <td width="5%"><a href="{% url 'docs' 'ad_appropriate.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
59 <td width="5%"><a href="{% url 'docs' 'ad_appropriate.html' %}"><img src="{% static 'next.png' %}" alt="next" width="32" height="32" /></a></td>
60 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td>
60 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td>
61 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
61 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
62 <td width="18%"><a href="/">Madrigal home</a></td>
62 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -7,7 +7,7
7 <!-- InstanceBeginEditable name="doctitle" -->
7 <!-- InstanceBeginEditable name="doctitle" -->
8 <title>Madrigal developer's guide</title>
8 <title>Madrigal developer's guide</title>
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
10 <link href="/static/madrigal.css" rel="stylesheet" type="text/css" />
10 <link href="{% static 'madrigal.css' %}" rel="stylesheet" type="text/css" />
11 <style type="text/css">
11 <style type="text/css">
12 html body {
12 html body {
13 background-color: {{bg_color}};
13 background-color: {{bg_color}};
@@ -19,9 +19,9
19 <body>
19 <body>
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
21 <tr>
21 <tr>
22 <td width="5%"><a href="{% url 'docs' 'ad_isprint.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
22 <td width="5%"><a href="{% url 'docs' 'ad_isprint.html' %}"><img src="{% static 'previous.png' %}" alt="previous" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="{% static 'up.png' %}" alt="up" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'madrigal/index.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'madrigal/index.html' %}"><img src="{% static 'next.png' %}" alt="next" width="32" height="32" /></a></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal developer's guide <!-- InstanceEndEditable --></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal developer's guide <!-- InstanceEndEditable --></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -66,9 +66,9
66 <!-- InstanceEndEditable -->
66 <!-- InstanceEndEditable -->
67 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
67 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
68 <tr>
68 <tr>
69 <td width="5%"><a href="{% url 'docs' 'ad_isprint.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
69 <td width="5%"><a href="{% url 'docs' 'ad_isprint.html' %}"><img src="{% static 'previous.png' %}" alt="previous" width="32" height="32" /></a></td>
70 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
70 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="{% static 'up.png' %}" alt="up" width="32" height="32" /></a></td>
71 <td width="5%"><a href="{% url 'docs' 'madrigal/index.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
71 <td width="5%"><a href="{% url 'docs' 'madrigal/index.html' %}"><img src="{% static 'next.png' %}" alt="next" width="32" height="32" /></a></td>
72 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal developer's guide<!-- InstanceEndEditable --></td>
72 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal developer's guide<!-- InstanceEndEditable --></td>
73 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
73 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
74 <td width="18%"><a href="/">Madrigal home</a></td>
74 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -3,7 +3,7
3 <head>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5 <title>Madrigal documentation - v3.0</title>
5 <title>Madrigal documentation - v3.0</title>
6 <link href="/static/madrigal.css" rel="stylesheet" type="text/css" />
6 <link href="/madrigal/static/madrigal.css" rel="stylesheet" type="text/css" />
7 <style type="text/css">
7 <style type="text/css">
8 html body {
8 html body {
9 background-color: {{bg_color}};
9 background-color: {{bg_color}};
@@ -8,7 +8,7
8 <title>Madrigal history</title>
8 <title>Madrigal history</title>
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" -->
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" -->
10 <!-- InstanceEndEditable -->
10 <!-- InstanceEndEditable -->
11 <link href="/static/madrigal.css" rel="stylesheet" type="text/css" />
11 <link href="/madrigal/static/madrigal.css" rel="stylesheet" type="text/css" />
12 <style type="text/css">
12 <style type="text/css">
13 html body {
13 html body {
14 background-color: {{bg_color}};
14 background-color: {{bg_color}};
@@ -20,9 +20,9
20 <body>
20 <body>
21 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
21 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
22 <tr>
22 <tr>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/previous.png" alt="previous" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/up.png" alt="up" width="32" height="32" /></a></td>
25 <td width="5%"><a href="{% url 'docs' 'whatsNew.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
25 <td width="5%"><a href="{% url 'docs' 'whatsNew.html' %}"><img src="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td>
26 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Brief history of Madrigal <!-- InstanceEndEditable --></td>
26 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Brief history of Madrigal <!-- InstanceEndEditable --></td>
27 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
27 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
28 <td width="18%"><a href="/">Madrigal home</a></td>
28 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -42,7 +42,7
42 </center>
42 </center>
43 <p>Madrigal is a database of ground-based measurements and models of the Earth's upper atmosphere and ionosphere. It is the community database of the Coupling, Energetics and Dynamics of Atmospheric Regions (<a href="http://cedarweb.vsp.ucar.edu/wiki/index.php/Main_Page">CEDAR</a>) program, which is devoted to the characterization and understanding of the atmosphere above about 60 km, with emphasis on the various processes that determine the basic structure and composition of the atmosphere, and on the mechanisms that couple different atmospheric regions. Instruments developed or upgraded under CEDAR include interferometers, spectrometers, imagers, lidars and medium, high-frequency and incoherent scatter radars. The success of CEDAR has been due, in large measure, to its ability to encourage collaborative efforts coalescing observations, theory and modeling. The CEDAR community includes about 800 scientists and students from around the world.</p>
43 <p>Madrigal is a database of ground-based measurements and models of the Earth's upper atmosphere and ionosphere. It is the community database of the Coupling, Energetics and Dynamics of Atmospheric Regions (<a href="http://cedarweb.vsp.ucar.edu/wiki/index.php/Main_Page">CEDAR</a>) program, which is devoted to the characterization and understanding of the atmosphere above about 60 km, with emphasis on the various processes that determine the basic structure and composition of the atmosphere, and on the mechanisms that couple different atmospheric regions. Instruments developed or upgraded under CEDAR include interferometers, spectrometers, imagers, lidars and medium, high-frequency and incoherent scatter radars. The success of CEDAR has been due, in large measure, to its ability to encourage collaborative efforts coalescing observations, theory and modeling. The CEDAR community includes about 800 scientists and students from around the world.</p>
44 <p>From the inception of the CEDAR program in 1988, there has been a great concern among the members of the CEDAR community to make the data collected by the CEDAR instruments easily accessible for joint studies. Consequently, a high priority was placed on establishing a repository for CEDAR data and model results. An incoherent scatter radar database had been established at the National Center for Atmospheric Research (NCAR) in 1985, and this evolved into the CEDAR Database in 1989. By the end of 1997, it had grown to include data from 44 instruments and 16 models. Over 200 users have requested information from the Database. In 2012, the Madrigal database and the CEDAR database were combined into a single database system, the Madrigal CEDAR database, based at MIT Haystack Observatory.</p>
44 <p>From the inception of the CEDAR program in 1988, there has been a great concern among the members of the CEDAR community to make the data collected by the CEDAR instruments easily accessible for joint studies. Consequently, a high priority was placed on establishing a repository for CEDAR data and model results. An incoherent scatter radar database had been established at the National Center for Atmospheric Research (NCAR) in 1985, and this evolved into the CEDAR Database in 1989. By the end of 1997, it had grown to include data from 44 instruments and 16 models. Over 200 users have requested information from the Database. In 2012, the Madrigal database and the CEDAR database were combined into a single database system, the Madrigal CEDAR database, based at MIT Haystack Observatory.</p>
45 <p>A central element of the CEDAR Database is a standard data format. With Madrigal 3.0 the file format is now Hdf5, with a well-defined layout and parameters. This new CEDAR Hdf5 format is described <a href="/static/CEDARMadrigalHdf5Format.pdf" target="_blank">here</a>. This format replaced the old <a href="/static/cedarFormat.pdf">16 bit integer based format</a> that evolved from the format used by the earlier incoherent scatter database, which in turn evolved from an earlier version of Madrigal developed at the MIT Haystack Observatory in 1980. </p>
45 <p>A central element of the CEDAR Database is a standard data format. With Madrigal 3.0 the file format is now Hdf5, with a well-defined layout and parameters. This new CEDAR Hdf5 format is described <a href="/madrigal/static/CEDARMadrigalHdf5Format.pdf" target="_blank">here</a>. This format replaced the old <a href="/madrigal/static/cedarFormat.pdf">16 bit integer based format</a> that evolved from the format used by the earlier incoherent scatter database, which in turn evolved from an earlier version of Madrigal developed at the MIT Haystack Observatory in 1980. </p>
46 <p>Haystack maintains and develops the Madrigal CEDAR database as an open-source project with community contributions. With the Madrigal CEDAR database, the site owner stores only their own data, which they can add to or update at any time. However, because the Madrigal database shares its metadata with all other Madrigal sites, users browsing any Madrigal site can search for data at any other Madrigal site. In addition, a central archival Madrigal site (<a href="http://cedar.openmadrigal.org" target="_self">cedar.openmadrigal.org</a>) archives all Madrigal sites and stores data not stored at other Madrigal sites.</p>
46 <p>Haystack maintains and develops the Madrigal CEDAR database as an open-source project with community contributions. With the Madrigal CEDAR database, the site owner stores only their own data, which they can add to or update at any time. However, because the Madrigal database shares its metadata with all other Madrigal sites, users browsing any Madrigal site can search for data at any other Madrigal site. In addition, a central archival Madrigal site (<a href="http://cedar.openmadrigal.org" target="_self">cedar.openmadrigal.org</a>) archives all Madrigal sites and stores data not stored at other Madrigal sites.</p>
47 <p>Madrigal data are arranged into &quot;experiments&quot;, which may contain data files, images, documentation, links, etc. A key feature of Madrigal is its seamless integration of archival and real-time data. A realtime file on Madrigal is accessed in exactly the same way as any archival file.</p>
47 <p>Madrigal data are arranged into &quot;experiments&quot;, which may contain data files, images, documentation, links, etc. A key feature of Madrigal is its seamless integration of archival and real-time data. A realtime file on Madrigal is accessed in exactly the same way as any archival file.</p>
48 <p>Madrigal has been installed at numerous locations in addition to Millstone Hill, including EISCAT, SRI International, and Jicamarca. The inventories of experiments available at each installation are available to the other installations through shared metadata. New Madrigal sites can be automatically added at any time.</p>
48 <p>Madrigal has been installed at numerous locations in addition to Millstone Hill, including EISCAT, SRI International, and Jicamarca. The inventories of experiments available at each installation are available to the other installations through shared metadata. New Madrigal sites can be automatically added at any time.</p>
@@ -50,9 +50,9
50 <!-- InstanceEndEditable -->
50 <!-- InstanceEndEditable -->
51 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
51 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
52 <tr>
52 <tr>
53 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
53 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/previous.png" alt="previous" width="32" height="32" /></a></td>
54 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
54 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/up.png" alt="up" width="32" height="32" /></a></td>
55 <td width="5%"><a href="{% url 'docs' 'whatsNew.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
55 <td width="5%"><a href="{% url 'docs' 'whatsNew.html' %}"><img src="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td>
56 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Brief overview of Madrigal <!-- InstanceEndEditable --></td>
56 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Brief overview of Madrigal <!-- InstanceEndEditable --></td>
57 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
57 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
58 <td width="18%"><a href="/">Madrigal home</a></td>
58 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -13,7 +13,7
13 $('#id_param_list2d').bind('change', function (e) {
13 $('#id_param_list2d').bind('change', function (e) {
14 var expID = '{{ expID }}';
14 var expID = '{{ expID }}';
15 var param = $(this).val();
15 var param = $(this).val();
16 var url = '{% url 'plot' %}' + '?expID=' + expID + '&param2d=' + param;
16 var url = '{% url 'plot' %}' + '?expID=' + expID + '&param2d=' + param + '&filename=' + $('#id_file_list').val();
17 console.log(url)
17 console.log(url)
18 // first delete all forms that are now out of date
18 // first delete all forms that are now out of date
19 divIndex = $(".single_form").index($( "#file_plot" ))
19 divIndex = $(".single_form").index($( "#file_plot" ))
@@ -26,7 +26,7
26 $('#id_param_list1d').bind('change', function (e) {
26 $('#id_param_list1d').bind('change', function (e) {
27 var expID = '{{ expID }}';
27 var expID = '{{ expID }}';
28 var param = $(this).val();
28 var param = $(this).val();
29 var url = '{% url 'plot' %}' + '?expID=' + expID + '&param1d=' + param;
29 var url = '{% url 'plot' %}' + '?expID=' + expID + '&param1d=' + param + '&filename=' + $('#id_file_list').val();
30 console.log(url)
30 console.log(url)
31 // first delete all forms that are now out of date
31 // first delete all forms that are now out of date
32 divIndex = $(".single_form").index($( "#file_plot" ))
32 divIndex = $(".single_form").index($( "#file_plot" ))
@@ -47,4 +47,4
47 width: 4%;
47 width: 4%;
48 align-items: center;
48 align-items: center;
49 }
49 }
50 </style> No newline at end of file
50 </style>
@@ -7,7 +7,7
7 <!-- InstanceBeginEditable name="doctitle" -->
7 <!-- InstanceBeginEditable name="doctitle" -->
8 <title>What's new in Madrigal 3.2?</title>
8 <title>What's new in Madrigal 3.2?</title>
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
9 <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
10 <link href="/static/madrigal.css" rel="stylesheet" type="text/css" />
10 <link href="/madrigal/static/madrigal.css" rel="stylesheet" type="text/css" />
11 <style type="text/css">
11 <style type="text/css">
12 html body {
12 html body {
13 background-color: {{bg_color}};
13 background-color: {{bg_color}};
@@ -19,9 +19,9
19 <body>
19 <body>
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
20 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
21 <tr>
21 <tr>
22 <td width="5%"><a href="{% url 'docs' 'madIntroduction.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
22 <td width="5%"><a href="{% url 'docs' 'madIntroduction.html' %}"><img src="/madrigal/static/previous.png" alt="previous" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
23 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/up.png" alt="up" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'wt_usersGuide.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
24 <td width="5%"><a href="{% url 'docs' 'wt_usersGuide.html' %}"><img src="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->What's new in Madrigal 3.0? <!-- InstanceEndEditable --></td>
25 <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->What's new in Madrigal 3.0? <!-- InstanceEndEditable --></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
26 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
27 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -342,9 +342,9 Madrigal 2.2 Release - Feb 2003</h1>
342 <!-- InstanceEndEditable -->
342 <!-- InstanceEndEditable -->
343 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
343 <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation">
344 <tr>
344 <tr>
345 <td width="5%"><a href="{% url 'docs' 'madIntroduction.html' %}"><img src="/static/previous.png" alt="previous" width="32" height="32" /></a></td>
345 <td width="5%"><a href="{% url 'docs' 'madIntroduction.html' %}"><img src="/madrigal/static/previous.png" alt="previous" width="32" height="32" /></a></td>
346 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/static/up.png" alt="up" width="32" height="32" /></a></td>
346 <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/madrigal/static/up.png" alt="up" width="32" height="32" /></a></td>
347 <td width="5%"><a href="{% url 'docs' 'wt_usersGuide.html' %}"><img src="/static/next.png" alt="next" width="32" height="32" /></a></td>
347 <td width="5%"><a href="{% url 'docs' 'wt_usersGuide.html' %}"><img src="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td>
348 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->What's new in Madrigal 3.0?<!-- InstanceEndEditable --></td>
348 <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->What's new in Madrigal 3.0?<!-- InstanceEndEditable --></td>
349 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
349 <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td>
350 <td width="18%"><a href="/">Madrigal home</a></td>
350 <td width="18%"><a href="/">Madrigal home</a></td>
@@ -239,4 +239,3 urlpatterns = [ url(r'^$',
239 name='docs'),
239 name='docs'),
240
240
241 ]
241 ]
242
@@ -375,9 +375,9 def view_plot(request):
375 if expDir is None:
375 if expDir is None:
376 raise ValueError('No expDir found for exp_id %i' % (int(expID)))
376 raise ValueError('No expDir found for exp_id %i' % (int(expID)))
377
377
378 fileList = madWebObj.getFileFromExpID(expID, False)
378 # fileList = madWebObj.getFileFromExpID(expID, False)
379 firsttuple = [a_tuple[0] for a_tuple in fileList]
379 # firsttuple = [a_tuple[0] for a_tuple in fileList]
380 basename = firsttuple[0]
380 basename = request.GET['filename']#firsttuple[0]
381 fullFilename = os.path.join(expDir, basename)
381 fullFilename = os.path.join(expDir, basename)
382
382
383 with h5py.File(fullFilename, "r") as f:
383 with h5py.File(fullFilename, "r") as f:
@@ -388,11 +388,20 def view_plot(request):
388
388
389 if 'Array Layout' in data:
389 if 'Array Layout' in data:
390 array = data['Array Layout']
390 array = data['Array Layout']
391 datatime = [datetime.datetime.fromtimestamp(t) for t in array['timestamps']]
391 datatime = [datetime.datetime.utcfromtimestamp(t-5*60*60) for t in array['timestamps']]
392 yrange = array['gdalt']
392 if 'gdalt' in array:
393 yrange = array['gdalt']
394 elif 'range' in array:
395 yrange = array['range']
396 else:
397 return HttpResponse("There is no valid data for this plot: gdalt and/or range missing")
393
398
394 if param1d==0:
399 if param1d==0:
395 plot = plot_heatmap(datatime, yrange, array['2D Parameters'][param2d], param2d)
400 kindat = data['Table Layout']['kindat'][0]
401 if kindat in (1950, 1911, 1913):
402 plot = plot_scatter(datatime, array['2D Parameters'][param2d][0], param2d, array['2D Parameters']['d'+param2d][0])
403 else:
404 plot = plot_heatmap(datatime, yrange, array['2D Parameters'][param2d], param2d)
396 else:
405 else:
397 plot = plot_scatter(datatime, array['1D Parameters'][param1d], param1d)
406 plot = plot_scatter(datatime, array['1D Parameters'][param1d], param1d)
398
407
@@ -403,14 +412,16 def view_plot(request):
403
412
404 return HttpResponse(plot)
413 return HttpResponse(plot)
405
414
406 def plot_scatter(datatime,dataparam,paramname):
415 def plot_scatter(datatime,dataparam,paramname, error=[]):
407 if (numpy.isnan(dataparam).all()):
416 if (numpy.isnan(dataparam).all()):
408 plot = "There is no valid data available for this plot"
417 plot = "There is no valid data available for this plot: Empty array"
409
418
410 else:
419 else:
420 mode = 'markers' if len(error)>0 else 'lines'
411 fig = go.Figure()
421 fig = go.Figure()
412 fig.add_trace(go.Scatter(x=datatime, y=dataparam))
422 fig.add_trace(go.Scatter(x=datatime, y=dataparam, mode=mode, error_y={'type':'data', 'array':error, 'visible':True, 'color':'rgba(255, 144, 14, 0.7)'}))
413 fig.update_yaxes(title_text=paramname)
423 fig.update_yaxes(title_text=paramname)
424 fig.update_xaxes(title_text='Time [LT]')
414
425
415 delta = datatime[-1] - datatime[1]
426 delta = datatime[-1] - datatime[1]
416
427
@@ -451,11 +462,12 def plot_scatter(datatime,dataparam,paramname):
451
462
452 def plot_heatmap(datatime,datarange,dataparam,paramname):
463 def plot_heatmap(datatime,datarange,dataparam,paramname):
453 if (numpy.all(numpy.isnan(dataparam))):
464 if (numpy.all(numpy.isnan(dataparam))):
454 plot = "There is no valid data available for this plot"
465 plot = "There is no valid data available for this plot: Empty array"
455 else:
466 else:
456 fig = go.Figure()
467 fig = go.Figure()
457 fig.add_trace(go.Heatmap(x=datatime,y=datarange,z= dataparam,colorscale='Jet',colorbar={"title":paramname}))
468 fig.add_trace(go.Heatmap(x=datatime,y=datarange,z= dataparam,colorscale='Jet',colorbar={"title":paramname}))
458 fig.update_yaxes(title_text="range")
469 fig.update_yaxes(title_text="range")
470 fig.update_xaxes(title_text="Time [LT]")
459 fig.update_layout(
471 fig.update_layout(
460 updatemenus=[
472 updatemenus=[
461 dict(
473 dict(
@@ -3515,4 +3527,4 def docs(request, name):
3515 return render(request, 'madweb/%s' % (name), {'bg_color': bg_color, 'siteSpecific': siteSpecific,
3527 return render(request, 'madweb/%s' % (name), {'bg_color': bg_color, 'siteSpecific': siteSpecific,
3516 'openmadrigal': openmadrigal})
3528 'openmadrigal': openmadrigal})
3517
3529
3518 No newline at end of file
3530
General Comments 0
You need to be logged in to leave comments. Login now