@@ -20,7 +20,7 | |||||
20 | <li><a href="{% url 'url_edit_experiment' experiment.id %}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li> |
|
20 | <li><a href="{% url 'url_edit_experiment' experiment.id %}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li> | |
21 | <li><a href="{% url 'url_delete_experiment' experiment.id %}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a></li> |
|
21 | <li><a href="{% url 'url_delete_experiment' experiment.id %}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a></li> | |
22 | <li><a href="{{ experiment.get_absolute_url_import }}"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Import </a></li> |
|
22 | <li><a href="{{ experiment.get_absolute_url_import }}"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Import </a></li> | |
23 |
<li><a href="{{ experiment.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> |
|
23 | <li><a href="{{ experiment.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> | |
24 | {% block extra-menu-actions %} |
|
24 | {% block extra-menu-actions %} | |
25 | {% endblock %} |
|
25 | {% endblock %} | |
26 | <li><a>----------------</a></li> |
|
26 | <li><a>----------------</a></li> | |
@@ -28,7 +28,7 | |||||
28 | <li><a href="{% url 'url_add_dev_conf' experiment.id %}"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add Configuration</a></li> |
|
28 | <li><a href="{% url 'url_add_dev_conf' experiment.id %}"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add Configuration</a></li> | |
29 | <li><a href=#><span class="glyphicon glyphicon-check" aria-hidden="true"></span> Verify Parameters</a></li> |
|
29 | <li><a href=#><span class="glyphicon glyphicon-check" aria-hidden="true"></span> Verify Parameters</a></li> | |
30 |
|
30 | |||
31 | </ul> |
|
31 | </ul> | |
32 | </span> --> |
|
32 | </span> --> | |
33 | {% endblock %} |
|
33 | {% endblock %} | |
34 |
|
34 | |||
@@ -52,29 +52,47 | |||||
52 | <tr><th>dds</th><td>(=</td></tr> |
|
52 | <tr><th>dds</th><td>(=</td></tr> | |
53 | </table> |
|
53 | </table> | |
54 | {% endif %} |
|
54 | {% endif %} | |
55 |
|
55 | |||
56 | {% if configuration.device.device_type.name == 'rc' %} |
|
56 | {% if configuration.device.device_type.name == 'rc' %} | |
57 | <div class=""> |
|
57 | <div class=""> | |
58 | <h4 class="panel-title"><b> CR </b></h4> |
|
58 | <h4 class="panel-title"><b> CR </b></h4> | |
59 | <br> |
|
59 | <br> | |
60 | </div> |
|
60 | </div> | |
61 |
|
61 | |||
62 | <table class="table table-bordered"> |
|
62 | <table class="table table-bordered"> | |
63 | <!--<h4 class="panel-title"> </h4>--> |
|
63 | <!--<h4 class="panel-title"> </h4>--> | |
64 | <tr><th>IPP(km)</th><td>{{experiment_data.configurations.rc.ipp}}</td></tr> |
|
64 | <tr><th>IPP(km)</th><td>{{experiment_data.configurations.rc.ipp}}</td></tr> | |
65 | <tr><th>NTX</th><td>{{experiment_data.configurations.rc.ntx}}</td></tr> |
|
65 | <tr><th>NTX</th><td>{{experiment_data.configurations.rc.ntx}}</td></tr> | |
66 | <tr><th>TX</th><td>{{tx}}</td></tr> |
|
|||
67 | <tr><th>Code</th><td>{{code}}</td></tr> |
|
66 | <tr><th>Code</th><td>{{code}}</td></tr> | |
68 | <tr><th>Sampling Window</th><td>{{window|linebreaks}}</td></tr> |
|
67 | ||
|
68 | <!--Jueves 01-12-2016--> | |||
|
69 | {% if lines %} | |||
|
70 | ||||
|
71 | <tr><th>TAU</th><td>{{rc_delays_num}} taus (km): {{rc_delays|linebreaks}}</td></tr> | |||
|
72 | {% for tx_line in tx_lines %} | |||
|
73 | <tr><th>{{tx_line.name}}</th><td>{{tx_line.parameters.pulse_width}}km</td></tr> | |||
|
74 | {% endfor %} | |||
|
75 | {% for windows_line in windows_lines%} | |||
|
76 | <tr><th>{{windows_line.name}}</th><td>{{windows_line.parameters|linebreaks}}</td></tr> | |||
|
77 | {% endfor %} | |||
|
78 | {% for code_line in code_lines%} | |||
|
79 | <tr><th>{{code_line.name}}</th><td>{{code_line.code_name}}</td></tr> | |||
|
80 | {% endfor %} | |||
|
81 | {% for progpulses_line in progpulses_lines%} | |||
|
82 | <tr><th>{{progpulses_line.name}}</th><td>{{progpulses_line.parameters|linebreaks}}</td></tr> | |||
|
83 | {% endfor %} | |||
|
84 | ||||
|
85 | {% endif %} | |||
|
86 | <!--FIN--> | |||
69 | </table> |
|
87 | </table> | |
70 | {% endif %} |
|
88 | {% endif %} | |
71 |
|
89 | |||
72 | {% if configuration.device.device_type.name == 'jars' %} |
|
90 | {% if configuration.device.device_type.name == 'jars' %} | |
73 | <div class=""> |
|
91 | <div class=""> | |
74 | <h4 class="panel-title"><b> JARS </b></h4> |
|
92 | <h4 class="panel-title"><b> JARS </b></h4> | |
75 | <br> |
|
93 | <br> | |
76 | </div> |
|
94 | </div> | |
77 |
|
95 | |||
78 | <table class="table table-bordered"> |
|
96 | <table class="table table-bordered"> | |
79 | <!--<h4 class="panel-title"> JARS </h4>--> |
|
97 | <!--<h4 class="panel-title"> JARS </h4>--> | |
80 | <tr><th>Data Type</th><td>{{exp_type}}</td></tr> |
|
98 | <tr><th>Data Type</th><td>{{exp_type}}</td></tr> | |
@@ -90,7 +108,7 | |||||
90 | <tr><th>Block x File</th><td>{{ configuration.raw_data_blocks }}</td></tr> |
|
108 | <tr><th>Block x File</th><td>{{ configuration.raw_data_blocks }}</td></tr> | |
91 | </table> |
|
109 | </table> | |
92 | {% endif %} |
|
110 | {% endif %} | |
93 |
|
111 | |||
94 | {% endfor %} |
|
112 | {% endfor %} | |
95 |
|
113 | |||
96 |
|
114 | |||
@@ -122,18 +140,18 | |||||
122 |
|
140 | |||
123 | {% block extra-js%} |
|
141 | {% block extra-js%} | |
124 | <script type="text/javascript"> |
|
142 | <script type="text/javascript"> | |
125 |
|
143 | |||
126 | $(".clickable-row").click(function() { |
|
144 | $(".clickable-row").click(function() { | |
127 | document.location = $(this).data("href"); |
|
145 | document.location = $(this).data("href"); | |
128 | }); |
|
146 | }); | |
129 |
|
147 | |||
130 | $("#bt_back").click(function() { |
|
148 | $("#bt_back").click(function() { | |
131 | document.location = "{% url 'url_experiment' experiment.id%}"; |
|
149 | document.location = "{% url 'url_experiment' experiment.id%}"; | |
132 | }); |
|
150 | }); | |
133 |
|
151 | |||
134 | $("#bt_verify").click(function() { |
|
152 | $("#bt_verify").click(function() { | |
135 | document.location = "{% url 'url_verify_experiment' experiment.id%}"; |
|
153 | document.location = "{% url 'url_verify_experiment' experiment.id%}"; | |
136 | }); |
|
154 | }); | |
137 |
|
155 | |||
138 | </script> |
|
156 | </script> | |
139 | {% endblock %} No newline at end of file |
|
157 | {% endblock %} |
@@ -19,7 +19,7 from .forms import OperationSearchForm, FilterForm, ChangeIpForm | |||||
19 |
|
19 | |||
20 | from .tasks import task_start, task_stop |
|
20 | from .tasks import task_start, task_stop | |
21 |
|
21 | |||
22 | from apps.rc.forms import RCConfigurationForm |
|
22 | from apps.rc.forms import RCConfigurationForm, RCLineCode | |
23 | from apps.dds.forms import DDSConfigurationForm |
|
23 | from apps.dds.forms import DDSConfigurationForm | |
24 | from apps.jars.forms import JARSConfigurationForm |
|
24 | from apps.jars.forms import JARSConfigurationForm | |
25 | from apps.cgs.forms import CGSConfigurationForm |
|
25 | from apps.cgs.forms import CGSConfigurationForm | |
@@ -38,7 +38,7 from django.contrib.auth.decorators import login_required | |||||
38 | from django.contrib.auth.decorators import user_passes_test |
|
38 | from django.contrib.auth.decorators import user_passes_test | |
39 | from django.contrib.admin.views.decorators import staff_member_required |
|
39 | from django.contrib.admin.views.decorators import staff_member_required | |
40 |
|
40 | |||
41 |
|
41 | import ast | ||
42 |
|
42 | |||
43 | CONF_FORMS = { |
|
43 | CONF_FORMS = { | |
44 | 'rc': RCConfigurationForm, |
|
44 | 'rc': RCConfigurationForm, | |
@@ -70,7 +70,6 MIX_OPERATIONS = { | |||||
70 | '3': 'NAND', |
|
70 | '3': 'NAND', | |
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 |
|
||||
74 | def index(request): |
|
73 | def index(request): | |
75 | kwargs = {'no_sidebar':True} |
|
74 | kwargs = {'no_sidebar':True} | |
76 |
|
75 | |||
@@ -827,7 +826,7 def experiment_summary(request, id_exp): | |||||
827 |
|
826 | |||
828 | kwargs = {} |
|
827 | kwargs = {} | |
829 |
|
828 | |||
830 |
kwargs['experiment_keys'] = [ |
|
829 | kwargs['experiment_keys'] = ['radar_system', 'name', 'start_time', 'end_time'] | |
831 | kwargs['experiment'] = experiment |
|
830 | kwargs['experiment'] = experiment | |
832 |
|
831 | |||
833 | kwargs['configuration_keys'] = ['name', 'device__ip_address', 'device__port_address', 'device__status'] |
|
832 | kwargs['configuration_keys'] = ['name', 'device__ip_address', 'device__port_address', 'device__status'] | |
@@ -862,29 +861,86 def experiment_summary(request, id_exp): | |||||
862 | rc_lines = experiment_data['configurations']['rc']['lines'] |
|
861 | rc_lines = experiment_data['configurations']['rc']['lines'] | |
863 | ipp = configuration.ipp |
|
862 | ipp = configuration.ipp | |
864 | if experiment_data['configurations']['rc']['mix'] == 'True': |
|
863 | if experiment_data['configurations']['rc']['mix'] == 'True': | |
865 | tx = '' |
|
|||
866 | code = '' |
|
864 | code = '' | |
867 | window = '' |
|
|||
868 | else: |
|
865 | else: | |
869 | code = rc_lines[3]['code'] |
|
866 | code = rc_lines[3]['code'] | |
870 |
|
867 | |||
871 | window_data = rc_lines[6]['params'][0] |
|
|||
872 | h0 = str(window_data['first_height']) |
|
|||
873 | dh = str(window_data['resolution']) |
|
|||
874 | nsa = str(window_data['number_of_samples']) |
|
|||
875 | window = 'Ho='+h0+'km\nDH='+dh+'km\nNSA='+nsa |
|
|||
876 |
|
||||
877 | tx = '' |
|
|||
878 | if float(rc_lines[1]['delays']) == 0: |
|
|||
879 | tx = rc_lines[2]['pulse_width'] |
|
|||
880 | elif float(rc_lines[2]['delays']) == 0: |
|
|||
881 | tx = rc_lines[1]['pulse_width'] |
|
|||
882 | else: |
|
|||
883 | tx = rc_lines[1]['pulse_width']+' | '+rc_lines[2]['pulse_width'] |
|
|||
884 |
|
||||
885 | kwargs['tx'] = tx |
|
|||
886 | kwargs['code'] = code |
|
868 | kwargs['code'] = code | |
887 | kwargs['window'] = window |
|
869 | ||
|
870 | #---Jueves 01-12-2016--- | |||
|
871 | ||||
|
872 | lines = configuration.get_lines() | |||
|
873 | ||||
|
874 | if lines: | |||
|
875 | ||||
|
876 | #TX Delays (TAU) | |||
|
877 | rc_delays_num = 0 | |||
|
878 | rc_delays = '' | |||
|
879 | tx_lines = configuration.get_lines(line_type__name='tx') | |||
|
880 | for tx_line in tx_lines: | |||
|
881 | if len(tx_lines) < 2: | |||
|
882 | rc_delay = json.loads(tx_line.params) | |||
|
883 | rc_delays = rc_delays+tx_line.get_name()+': '+rc_delay['delays']+'\n' | |||
|
884 | delay = ast.literal_eval(rc_delay['delays']) | |||
|
885 | if isinstance(delay,int): | |||
|
886 | rc_delays_num += 1 | |||
|
887 | else: | |||
|
888 | rc_delays_num += len(delay) | |||
|
889 | else: | |||
|
890 | rc_delay = json.loads(tx_line.params) | |||
|
891 | rc_delays = rc_delays+tx_line.get_name()+': '+rc_delay['delays']+'\n' | |||
|
892 | delay = ast.literal_eval(rc_delay['delays']) | |||
|
893 | if isinstance(delay,int): | |||
|
894 | rc_delays_num += 1 | |||
|
895 | else: | |||
|
896 | rc_delays_num += len(delay) | |||
|
897 | ||||
|
898 | #TX: TXA - TXB... | |||
|
899 | for tx_line in tx_lines: | |||
|
900 | tx_line.name = tx_line.get_name() | |||
|
901 | tx_line_parameters = json.loads(tx_line.params) | |||
|
902 | tx_line.parameters = tx_line_parameters | |||
|
903 | ||||
|
904 | #WINDOWS | |||
|
905 | windows_lines = configuration.get_lines(line_type__name='windows') | |||
|
906 | for windows_line in windows_lines: | |||
|
907 | windows_line.name = windows_line.get_name() | |||
|
908 | windows_data = json.loads(windows_line.params) | |||
|
909 | windows_params = windows_data['params'][0] | |||
|
910 | h0 = str(windows_params['first_height']) | |||
|
911 | dh = str(windows_params['resolution']) | |||
|
912 | nsa = str(windows_params['number_of_samples']) | |||
|
913 | windows_line.parameters = 'Ho=' + h0 +'km\nDH=' + dh +'km\nNSA=' + nsa | |||
|
914 | ||||
|
915 | #CODES | |||
|
916 | code_lines = configuration.get_lines(line_type__name='codes') | |||
|
917 | for code_line in code_lines: | |||
|
918 | code_line.name = code_line.get_name() | |||
|
919 | line_params = json.loads(code_line.params) | |||
|
920 | rccode = RCLineCode.objects.get(pk=int(line_params['code'])) | |||
|
921 | code_line.code_name = rccode.name | |||
|
922 | ||||
|
923 | #PROG_PULSES | |||
|
924 | progpulses_lines = configuration.get_lines(line_type__name='prog_pulses') | |||
|
925 | for progpulses_line in progpulses_lines: | |||
|
926 | progpulses_line.name = progpulses_line.get_name() | |||
|
927 | progpulses_parameters = json.loads(progpulses_line.params) | |||
|
928 | progpulses_parameters = progpulses_parameters['params'][0] | |||
|
929 | progpulses_line.parameters = 'Begin: '+str(progpulses_parameters['begin'])+' (Units)\nEnd: '+str(progpulses_parameters['end'])+' (Units)' | |||
|
930 | ||||
|
931 | ||||
|
932 | ||||
|
933 | #kwargs['kwargs_channels'] = sorted(kwargs_channels, reverse=True) | |||
|
934 | kwargs['lines'] = sorted(lines, reverse=True) | |||
|
935 | kwargs['rc_delays'] = rc_delays | |||
|
936 | kwargs['rc_delays_num'] = rc_delays_num | |||
|
937 | kwargs['tx_lines'] = tx_lines | |||
|
938 | kwargs['windows_lines'] = windows_lines | |||
|
939 | kwargs['code_lines'] = code_lines | |||
|
940 | kwargs['progpulses_lines'] = progpulses_lines | |||
|
941 | ||||
|
942 | ||||
|
943 | #--FIN: Jueves 01-12-2016--- | |||
888 |
|
944 | |||
889 | #-------------------- DDS -----------------------: |
|
945 | #-------------------- DDS -----------------------: | |
890 | if configuration.device.device_type.name == 'dds': |
|
946 | if configuration.device.device_type.name == 'dds': |
General Comments 0
You need to be logged in to leave comments.
Login now