@@ -5,17 +5,17 upstream djangomad { | |||
|
5 | 5 | } |
|
6 | 6 | |
|
7 | 7 | server { |
|
8 | listen 80; | |
|
8 | listen 8080; | |
|
9 | 9 | |
|
10 | location / { | |
|
11 | proxy_http_version 1.1; | |
|
12 |
proxy_set_header |
|
|
13 | proxy_set_header Connection "upgrade"; | |
|
10 | location /madrigal { | |
|
11 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
|
12 | proxy_set_header Host $host; | |
|
14 | 13 | proxy_redirect off; |
|
14 | proxy_set_header X-Script-Name /madrigal; | |
|
15 | 15 | proxy_pass http://djangomad; |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | location /static/ { | |
|
18 | location /madrigal/static/ { | |
|
19 | 19 | alias /static/; |
|
20 | 20 | } |
|
21 | 21 | } |
@@ -12,7 +12,7 import madrigal.metadata | |||
|
12 | 12 | import madrigal.ui.web |
|
13 | 13 | import madrigal.admin |
|
14 | 14 | |
|
15 | @login_required | |
|
15 | @login_required(login_url='/madrigal/accounts/login/') | |
|
16 | 16 | def index(request): |
|
17 | 17 | ''' |
|
18 | 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 | 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 | 27 | ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),) |
|
28 | 28 | |
@@ -129,10 +129,10 MEDIA_URL = '/media/' | |||
|
129 | 129 | |
|
130 | 130 | # URL prefix for static files. |
|
131 | 131 | # Example: "http://media.lawrence.com/static/" |
|
132 | STATIC_URL = '/static/' | |
|
132 | STATIC_URL = '/madrigal/static/' | |
|
133 | 133 | |
|
134 | 134 | BOOTSTRAP3 = { |
|
135 | 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 | 137 | 'include_jquery': True, |
|
138 | 138 | } |
@@ -3,9 +3,10 from django.contrib import admin | |||
|
3 | 3 | import madweb.views |
|
4 | 4 | |
|
5 | 5 | urlpatterns = [ |
|
6 | url(r'^', include('madweb.urls')), | |
|
6 | url(r'^madrigal/', include('madweb.urls')), | |
|
7 | 7 | url(r'^$', madweb.views.index), |
|
8 | url(r'^updata/', include('apps.updata.urls', namespace="updata")), | |
|
9 | url(r'^accounts/', include('apps.login.urls', namespace="login")), | |
|
10 | url(r'^admin/', admin.site.urls), | |
|
8 | url(r'^madrigal/updata/', include('apps.updata.urls', namespace="updata")), | |
|
9 | url(r'^madrigal/accounts/', include('apps.login.urls', namespace="login")), | |
|
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 | 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 | 657 | return s.replace('+', '%2b') |
|
646 | 658 | |
|
647 | 659 | def get_params1(args, kwargs, madExpObj, madWebObj): |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -7,7 +7,7 | |||
|
7 | 7 | <!-- InstanceBeginEditable name="doctitle" --> |
|
8 | 8 | <title>Madrigal administrator's guide</title> |
|
9 | 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 | 11 | <style type="text/css"> |
|
12 | 12 | html body { |
|
13 | 13 | background-color: {{bg_color}}; |
@@ -19,9 +19,9 | |||
|
19 | 19 | <body> |
|
20 | 20 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
21 | 21 | <tr> |
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
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> | |
|
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 | 25 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td> |
|
26 | 26 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
27 | 27 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -54,9 +54,9 | |||
|
54 | 54 | <!-- InstanceEndEditable --> |
|
55 | 55 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
56 | 56 | <tr> |
|
57 |
|
|
|
58 |
<td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src=" |
|
|
59 |
<td width="5%"><a href="{% url 'docs' 'ad_appropriate.html' %}"><img src=" |
|
|
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> | |
|
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 | 60 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal administrator's guide<!-- InstanceEndEditable --></td> |
|
61 | 61 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
62 | 62 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -7,7 +7,7 | |||
|
7 | 7 | <!-- InstanceBeginEditable name="doctitle" --> |
|
8 | 8 | <title>Madrigal developer's guide</title> |
|
9 | 9 | <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> |
|
10 |
<link href=" |
|
|
10 | <link href="{% static 'madrigal.css' %}" rel="stylesheet" type="text/css" /> | |
|
11 | 11 | <style type="text/css"> |
|
12 | 12 | html body { |
|
13 | 13 | background-color: {{bg_color}}; |
@@ -19,9 +19,9 | |||
|
19 | 19 | <body> |
|
20 | 20 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
21 | 21 | <tr> |
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
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> | |
|
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 | 25 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Madrigal developer's guide <!-- InstanceEndEditable --></td> |
|
26 | 26 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
27 | 27 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -66,9 +66,9 | |||
|
66 | 66 | <!-- InstanceEndEditable --> |
|
67 | 67 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
68 | 68 | <tr> |
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
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> | |
|
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 | 72 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Madrigal developer's guide<!-- InstanceEndEditable --></td> |
|
73 | 73 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
74 | 74 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -3,7 +3,7 | |||
|
3 | 3 | <head> |
|
4 | 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
|
5 | 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 | 7 | <style type="text/css"> |
|
8 | 8 | html body { |
|
9 | 9 | background-color: {{bg_color}}; |
@@ -8,7 +8,7 | |||
|
8 | 8 | <title>Madrigal history</title> |
|
9 | 9 | <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --> |
|
10 | 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 | 12 | <style type="text/css"> |
|
13 | 13 | html body { |
|
14 | 14 | background-color: {{bg_color}}; |
@@ -20,9 +20,9 | |||
|
20 | 20 | <body> |
|
21 | 21 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
22 | 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> | |
|
24 | <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/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> | |
|
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="/madrigal/static/up.png" alt="up" 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 | 26 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->Brief history of Madrigal <!-- InstanceEndEditable --></td> |
|
27 | 27 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
28 | 28 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -42,7 +42,7 | |||
|
42 | 42 | </center> |
|
43 | 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 | 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 | 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 | 47 | <p>Madrigal data are arranged into "experiments", 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 | 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 | 50 | <!-- InstanceEndEditable --> |
|
51 | 51 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
52 | 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> | |
|
54 | <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/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> | |
|
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="/madrigal/static/up.png" alt="up" 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 | 56 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->Brief overview of Madrigal <!-- InstanceEndEditable --></td> |
|
57 | 57 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
58 | 58 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -13,7 +13,7 | |||
|
13 | 13 | $('#id_param_list2d').bind('change', function (e) { |
|
14 | 14 | var expID = '{{ expID }}'; |
|
15 | 15 | var param = $(this).val(); |
|
16 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m2d=' + param; | |
|
16 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m2d=' + param + '&filename=' + $('#id_file_list').val(); | |
|
17 | 17 | console.log(url) |
|
18 | 18 | // first delete all forms that are now out of date |
|
19 | 19 | divIndex = $(".single_form").index($( "#file_plot" )) |
@@ -26,7 +26,7 | |||
|
26 | 26 | $('#id_param_list1d').bind('change', function (e) { |
|
27 | 27 | var expID = '{{ expID }}'; |
|
28 | 28 | var param = $(this).val(); |
|
29 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m1d=' + param; | |
|
29 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m1d=' + param + '&filename=' + $('#id_file_list').val(); | |
|
30 | 30 | console.log(url) |
|
31 | 31 | // first delete all forms that are now out of date |
|
32 | 32 | divIndex = $(".single_form").index($( "#file_plot" )) |
@@ -7,7 +7,7 | |||
|
7 | 7 | <!-- InstanceBeginEditable name="doctitle" --> |
|
8 | 8 | <title>What's new in Madrigal 3.2?</title> |
|
9 | 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 | 11 | <style type="text/css"> |
|
12 | 12 | html body { |
|
13 | 13 | background-color: {{bg_color}}; |
@@ -19,9 +19,9 | |||
|
19 | 19 | <body> |
|
20 | 20 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
21 | 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> | |
|
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' 'wt_usersGuide.html' %}"><img src="/static/next.png" alt="next" 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="/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="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td> | |
|
25 | 25 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleTop" -->What's new in Madrigal 3.0? <!-- InstanceEndEditable --></td> |
|
26 | 26 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
27 | 27 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -342,9 +342,9 Madrigal 2.2 Release - Feb 2003</h1> | |||
|
342 | 342 | <!-- InstanceEndEditable --> |
|
343 | 343 | <table width="100%" border="1" cellpadding="0" cellspacing="2" class="navigation"> |
|
344 | 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> | |
|
346 | <td width="5%"><a href="{% url 'docs' 'madContents.html' %}"><img src="/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> | |
|
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="/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="/madrigal/static/next.png" alt="next" width="32" height="32" /></a></td> | |
|
348 | 348 | <td width="54%"><!-- InstanceBeginEditable name="EditTitleBottom" -->What's new in Madrigal 3.0?<!-- InstanceEndEditable --></td> |
|
349 | 349 | <td width="13%"><a href="{% url 'docs' 'madContents.html' %}">Doc home </a></td> |
|
350 | 350 | <td width="18%"><a href="/">Madrigal home</a></td> |
@@ -375,9 +375,9 def view_plot(request): | |||
|
375 | 375 | if expDir is None: |
|
376 | 376 | raise ValueError('No expDir found for exp_id %i' % (int(expID))) |
|
377 | 377 | |
|
378 | fileList = madWebObj.getFileFromExpID(expID, False) | |
|
379 | firsttuple = [a_tuple[0] for a_tuple in fileList] | |
|
380 |
basename = |
|
|
378 | # fileList = madWebObj.getFileFromExpID(expID, False) | |
|
379 | # firsttuple = [a_tuple[0] for a_tuple in fileList] | |
|
380 | basename = request.GET['filename']#firsttuple[0] | |
|
381 | 381 | fullFilename = os.path.join(expDir, basename) |
|
382 | 382 | |
|
383 | 383 | with h5py.File(fullFilename, "r") as f: |
@@ -388,10 +388,19 def view_plot(request): | |||
|
388 | 388 | |
|
389 | 389 | if 'Array Layout' in data: |
|
390 | 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 | if 'gdalt' in array: | |
|
392 | 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 | 399 | if param1d==0: |
|
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: | |
|
395 | 404 | plot = plot_heatmap(datatime, yrange, array['2D Parameters'][param2d], param2d) |
|
396 | 405 | else: |
|
397 | 406 | plot = plot_scatter(datatime, array['1D Parameters'][param1d], param1d) |
@@ -403,14 +412,16 def view_plot(request): | |||
|
403 | 412 | |
|
404 | 413 | return HttpResponse(plot) |
|
405 | 414 | |
|
406 | def plot_scatter(datatime,dataparam,paramname): | |
|
415 | def plot_scatter(datatime,dataparam,paramname, error=[]): | |
|
407 | 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 | 419 | else: |
|
420 | mode = 'markers' if len(error)>0 else 'lines' | |
|
411 | 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 | 423 | fig.update_yaxes(title_text=paramname) |
|
424 | fig.update_xaxes(title_text='Time [LT]') | |
|
414 | 425 | |
|
415 | 426 | delta = datatime[-1] - datatime[1] |
|
416 | 427 | |
@@ -451,11 +462,12 def plot_scatter(datatime,dataparam,paramname): | |||
|
451 | 462 | |
|
452 | 463 | def plot_heatmap(datatime,datarange,dataparam,paramname): |
|
453 | 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 | 466 | else: |
|
456 | 467 | fig = go.Figure() |
|
457 | 468 | fig.add_trace(go.Heatmap(x=datatime,y=datarange,z= dataparam,colorscale='Jet',colorbar={"title":paramname})) |
|
458 | 469 | fig.update_yaxes(title_text="range") |
|
470 | fig.update_xaxes(title_text="Time [LT]") | |
|
459 | 471 | fig.update_layout( |
|
460 | 472 | updatemenus=[ |
|
461 | 473 | dict( |
General Comments 0
You need to be logged in to leave comments.
Login now