##// END OF EJS Templates
Main files have been fixed...
Fiorella Quino -
r267:8b30609ce30a
parent child
Show More
@@ -288,7 +288,7 class Campaign(models.Model):
288
288
289 return self
289 return self
290
290
291 def get_experiments_by_radar(self, radar=None):
291 def get_experiments_by_radar(self, radar=None):
292
292
293 ret = []
293 ret = []
294 if radar:
294 if radar:
@@ -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,7 +658,8 class Configuration(PolymorphicModel):
657
658
658 self.save()
659 self.save()
659
660
660 def export_to_file(self, format="json"):
661
662 def export_to_file(self, format="json"):
661
663
662 content_type = ''
664 content_type = ''
663
665
@@ -683,7 +685,7 class Configuration(PolymorphicModel):
683
685
684 return fields
686 return fields
685
687
686 def import_from_file(self, fp):
688 def import_from_file(self, fp):
687
689
688 parms = {}
690 parms = {}
689
691
@@ -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
@@ -26,33 +27,34
26 <h4 class="panel-title"><b> {{configuration}}</b></h4>
27 <h4 class="panel-title"><b> {{configuration}}</b></h4>
27 <br>
28 <br>
28 </div>
29 </div>
29
30
30 {% if configuration.device.device_type.name == 'dds' %}
31 {% if configuration.device.device_type.name == 'dds' %}
31 <table class="table table-bordered">
32 <table class="table table-bordered">
32 <tr><th>Frequency A (Mhz)</th><td>{{configuration.frequencyA_Mhz}}</td></tr>
33 <tr><th>Frequency A (Mhz)</th><td>{{configuration.frequencyA_Mhz}}</td></tr>
33 <tr><th>Multiplier</th><td>{{configuration.multiplier}}</td></tr>
34 <tr><th>Multiplier</th><td>{{configuration.multiplier}}</td></tr>
34 </table>
35 </table>
35 {% endif %}
36 {% endif %}
36
37
37 {% if configuration.device.device_type.name == 'rc' %}
38 {% if configuration.device.device_type.name == 'rc' %}
38
39
39 <table class="table table-bordered">
40 <table class="table table-bordered">
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>
43
44 <tr><th>DC</th><td>{{duty_cycle}}%</td></tr>
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>
46 <tr><th>Width(km)</th><td>{{tx_line.width}}</td></tr>
48 <tr><th>Width(km)</th><td>{{tx_line.width}}</td></tr>
47 <tr><th>Taus</th><td>{{tx_line.taus}}</td></tr>
49 <tr><th>Taus</th><td>{{tx_line.taus}}</td></tr>
48 <tr><th>codes</th><td>{{tx_line.codes}}</td></tr>
50 <tr><th>codes</th><td>{{tx_line.codes}}</td></tr>
49 <tr><th>Sample Windows</th><td>{{tx_line.windows}}</td></tr>
51 <tr><th>Sample Windows</th><td>{{tx_line.windows}}</td></tr>
50 {% endfor %}
52 {% endfor %}
51
53
52 </table>
54 </table>
53 {% endif %}
55 {% endif %}
54
56
55 {% if configuration.device.device_type.name == 'jars' %}
57 {% if configuration.device.device_type.name == 'jars' %}
56
58
57 <table class="table table-bordered">
59 <table class="table table-bordered">
58 <!--<h4 class="panel-title"> JARS </h4>-->
60 <!--<h4 class="panel-title"> JARS </h4>-->
@@ -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>Rate (MB/h)</th><td>{{ rate }}</td></tr>
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