##// 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 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 293 ret = []
294 294 if radar:
@@ -330,6 +330,7 class Experiment(models.Model):
330 330 template = models.BooleanField(default=False)
331 331 name = models.CharField(max_length=40, default='', unique=True)
332 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 334 start_time = models.TimeField(default='00:00:00')
334 335 end_time = models.TimeField(default='23:59:59')
335 336 status = models.PositiveSmallIntegerField(default=4, choices=EXP_STATES)
@@ -657,7 +658,8 class Configuration(PolymorphicModel):
657 658
658 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 664 content_type = ''
663 665
@@ -683,7 +685,7 class Configuration(PolymorphicModel):
683 685
684 686 return fields
685 687
686 def import_from_file(self, fp):
688 def import_from_file(self, fp):
687 689
688 690 parms = {}
689 691
@@ -17,6 +17,7
17 17 {% for key in experiment_keys %}
18 18 <tr><th>{{key|title}}</th><td>{{experiment|attr:key}}</td></tr>
19 19 {% endfor %}
20 <tr><th>Lambda (m)</th><td>{{radar_lambda}}</td></tr>
20 21 </table>
21 22
22 23
@@ -26,33 +27,34
26 27 <h4 class="panel-title"><b> {{configuration}}</b></h4>
27 28 <br>
28 29 </div>
29
30 {% if configuration.device.device_type.name == 'dds' %}
31 <table class="table table-bordered">
30
31 {% if configuration.device.device_type.name == 'dds' %}
32 <table class="table table-bordered">
32 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 35 </table>
35 36 {% endif %}
36 37
37 {% if configuration.device.device_type.name == 'rc' %}
38 {% if configuration.device.device_type.name == 'rc' %}
38 39
39 40 <table class="table table-bordered">
40 41 <!--<h4 class="panel-title"> </h4>-->
41 42 <tr><th>NTXs</th><td>{{configuration.ntx}}</td></tr>
42 43 <tr><th>IPP(km)</th><td>{{configuration.ipp}}</td></tr>
43
44 <tr><th>DC</th><td>{{duty_cycle}}%</td></tr>
45
44 46 {% for tx_line in configuration.tx_lines %}
45 47 <tr><th colspan="2">{{tx_line.name}}</th></tr>
46 48 <tr><th>Width(km)</th><td>{{tx_line.width}}</td></tr>
47 <tr><th>Taus</th><td>{{tx_line.taus}}</td></tr>
48 <tr><th>codes</th><td>{{tx_line.codes}}</td></tr>
49 <tr><th>Sample Windows</th><td>{{tx_line.windows}}</td></tr>
49 <tr><th>Taus</th><td>{{tx_line.taus}}</td></tr>
50 <tr><th>codes</th><td>{{tx_line.codes}}</td></tr>
51 <tr><th>Sample Windows</th><td>{{tx_line.windows}}</td></tr>
50 52 {% endfor %}
51
53
52 54 </table>
53 55 {% endif %}
54 56
55 {% if configuration.device.device_type.name == 'jars' %}
57 {% if configuration.device.device_type.name == 'jars' %}
56 58
57 59 <table class="table table-bordered">
58 60 <!--<h4 class="panel-title"> JARS </h4>-->
@@ -67,7 +69,11
67 69 <tr><th>Acq Prof</th><td>{{configuration.acq_profiles}}</td></tr>
68 70 <tr><th>Prof x Block</th><td>{{configuration.profiles_block}}</td></tr>
69 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 77 </table>
72 78 {% endif %}
73 79
@@ -698,8 +698,6 def experiment_import(request, id_exp):
698 698 @user_passes_test(lambda u:u.is_staff)
699 699 def experiment_start(request, id_exp):
700 700
701 def experiment_start(request, id_exp):
702
703 701 exp = get_object_or_404(Experiment, pk=id_exp)
704 702
705 703 if exp.status == 2:
General Comments 0
You need to be logged in to leave comments. Login now