@@ -330,6 +330,7 class Experiment(models.Model): | |||||
330 | template = models.BooleanField(default=False) |
|
330 | template = models.BooleanField(default=False) | |
331 | name = models.CharField(max_length=40, default='', unique=True) |
|
331 | name = models.CharField(max_length=40, default='', unique=True) | |
332 | location = models.ForeignKey('Location', null=True, blank=True, on_delete=models.CASCADE) |
|
332 | location = models.ForeignKey('Location', null=True, blank=True, on_delete=models.CASCADE) | |
|
333 | freq = models.FloatField(verbose_name='Operating Freq. (MHz)', validators=[MinValueValidator(1), MaxValueValidator(10000)], default=49.9200) | |||
333 | start_time = models.TimeField(default='00:00:00') |
|
334 | start_time = models.TimeField(default='00:00:00') | |
334 | end_time = models.TimeField(default='23:59:59') |
|
335 | end_time = models.TimeField(default='23:59:59') | |
335 | status = models.PositiveSmallIntegerField(default=4, choices=EXP_STATES) |
|
336 | status = models.PositiveSmallIntegerField(default=4, choices=EXP_STATES) | |
@@ -657,6 +658,7 class Configuration(PolymorphicModel): | |||||
657 |
|
658 | |||
658 | self.save() |
|
659 | self.save() | |
659 |
|
660 | |||
|
661 | ||||
660 |
|
|
662 | def export_to_file(self, format="json"): | |
661 |
|
663 | |||
662 | content_type = '' |
|
664 | content_type = '' |
@@ -17,6 +17,7 | |||||
17 | {% for key in experiment_keys %} |
|
17 | {% for key in experiment_keys %} | |
18 | <tr><th>{{key|title}}</th><td>{{experiment|attr:key}}</td></tr> |
|
18 | <tr><th>{{key|title}}</th><td>{{experiment|attr:key}}</td></tr> | |
19 | {% endfor %} |
|
19 | {% endfor %} | |
|
20 | <tr><th>Lambda (m)</th><td>{{radar_lambda}}</td></tr> | |||
20 | </table> |
|
21 | </table> | |
21 |
|
22 | |||
22 |
|
23 | |||
@@ -40,6 +41,7 | |||||
40 | <!--<h4 class="panel-title"> </h4>--> |
|
41 | <!--<h4 class="panel-title"> </h4>--> | |
41 | <tr><th>NTXs</th><td>{{configuration.ntx}}</td></tr> |
|
42 | <tr><th>NTXs</th><td>{{configuration.ntx}}</td></tr> | |
42 | <tr><th>IPP(km)</th><td>{{configuration.ipp}}</td></tr> |
|
43 | <tr><th>IPP(km)</th><td>{{configuration.ipp}}</td></tr> | |
|
44 | <tr><th>DC</th><td>{{duty_cycle}}%</td></tr> | |||
43 |
|
45 | |||
44 | {% for tx_line in configuration.tx_lines %} |
|
46 | {% for tx_line in configuration.tx_lines %} | |
45 | <tr><th colspan="2">{{tx_line.name}}</th></tr> |
|
47 | <tr><th colspan="2">{{tx_line.name}}</th></tr> | |
@@ -67,7 +69,11 | |||||
67 | <tr><th>Acq Prof</th><td>{{configuration.acq_profiles}}</td></tr> |
|
69 | <tr><th>Acq Prof</th><td>{{configuration.acq_profiles}}</td></tr> | |
68 | <tr><th>Prof x Block</th><td>{{configuration.profiles_block}}</td></tr> |
|
70 | <tr><th>Prof x Block</th><td>{{configuration.profiles_block}}</td></tr> | |
69 | <tr><th>Block x File</th><td>{{ configuration.raw_data_blocks }}</td></tr> |
|
71 | <tr><th>Block x File</th><td>{{ configuration.raw_data_blocks }}</td></tr> | |
70 |
<tr><th> |
|
72 | <tr><th>Time per Block (s)</th><td>{{ time_per_block }}</td></tr> | |
|
73 | <tr><th>Acqtime (s)</th><td>{{ acqtime }}</td></tr> | |||
|
74 | <tr><th>Rate </th><td>{{ rate_bh }} || {{ rate_gh }}</td></tr> | |||
|
75 | <tr><th>Va (m/s)</th><td>{{ va }}</td></tr> | |||
|
76 | <tr><th>Vrange (m/s)</th><td>{{ vrange }}</td></tr> | |||
71 | </table> |
|
77 | </table> | |
72 | {% endif %} |
|
78 | {% endif %} | |
73 |
|
79 |
@@ -698,8 +698,6 def experiment_import(request, id_exp): | |||||
698 | @user_passes_test(lambda u:u.is_staff) |
|
698 | @user_passes_test(lambda u:u.is_staff) | |
699 | def experiment_start(request, id_exp): |
|
699 | def experiment_start(request, id_exp): | |
700 |
|
700 | |||
701 | def experiment_start(request, id_exp): |
|
|||
702 |
|
||||
703 | exp = get_object_or_404(Experiment, pk=id_exp) |
|
701 | exp = get_object_or_404(Experiment, pk=id_exp) | |
704 |
|
702 | |||
705 | if exp.status == 2: |
|
703 | if exp.status == 2: |
General Comments 0
You need to be logged in to leave comments.
Login now