##// END OF EJS Templates
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
lgonzales -
r338:7377db7c77e8
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
@@ -0,0 +1,6
1 from django.contrib import admin
2 from .models import DDSRestConfiguration
3
4 # Register your models here.
5
6 admin.site.register(DDSRestConfiguration)
@@ -0,0 +1,27
1 from django import forms
2 from apps.main.models import Device
3 from .models import DDSRestConfiguration
4
5 # from django.core.validators import MinValueValidator, MaxValueValidator
6
7 class DDSRestConfigurationForm(forms.ModelForm):
8
9 def __init__(self, *args, **kwargs):
10
11 super(DDSRestConfigurationForm, self).__init__(*args, **kwargs)
12
13 instance = getattr(self, 'instance', None)
14
15 if instance and instance.pk:
16
17 devices = Device.objects.filter(device_type__name='dds_rest')
18
19 #if instance.experiment:
20 # self.fields['experiment'].widget.attrs['disabled'] = 'disabled'
21
22 self.fields['device'].widget.choices = [(device.id, device) for device in devices]
23
24
25 class Meta:
26 model = DDSRestConfiguration
27 exclude = ('type', 'parameters', 'status', 'author', 'hash')
@@ -0,0 +1,238
1 import ast
2 import json
3 import requests
4 import numpy as np
5 from base64 import b64encode
6 from struct import pack
7
8 from django.urls import reverse
9 from django.db import models
10 from apps.main.models import Configuration
11 from apps.main.utils import Params
12 # Create your models here.
13
14 from django.core.validators import MinValueValidator, MaxValueValidator
15 from django.core.exceptions import ValidationError
16
17 from devices.dds_rest import api, data
18
19 ENABLE_TYPE = (
20 (False, 'Disabled'),
21 (True, 'Enabled'),
22 )
23 MOD_TYPES = (
24 (0, 'Single Tone'),
25 (1, 'FSK'),
26 (2, 'Ramped FSK'),
27 (3, 'Chirp'),
28 (4, 'BPSK'),
29 )
30
31 class DDSRestConfiguration(Configuration):
32
33 DDS_NBITS = 48
34
35 clock = models.FloatField(verbose_name='Clock In (MHz)',validators=[MinValueValidator(5), MaxValueValidator(75)], null=True, default=60)
36 multiplier = models.PositiveIntegerField(verbose_name='Multiplier',validators=[MinValueValidator(1), MaxValueValidator(20)], default=4)
37
38 frequencyA_Mhz = models.DecimalField(verbose_name='Frequency A (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, null=True, default=49.9200)
39 frequencyA = models.BigIntegerField(verbose_name='Frequency A (Decimal)',validators=[MinValueValidator(0), MaxValueValidator(2**DDS_NBITS-1)], blank=True, null=True)
40
41 frequencyB_Mhz = models.DecimalField(verbose_name='Frequency B (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, blank=True, null=True)
42 frequencyB = models.BigIntegerField(verbose_name='Frequency B (Decimal)',validators=[MinValueValidator(0), MaxValueValidator(2**DDS_NBITS-1)], blank=True, null=True)
43
44 delta_frequency_Mhz = models.DecimalField(verbose_name='Delta frequency (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, blank=True, null=True)
45 delta_frequency = models.BigIntegerField(verbose_name='Delta frequency (Decimal)',validators=[MinValueValidator(0), MaxValueValidator(2**DDS_NBITS-1)], blank=True, null=True)
46
47 update_clock_Mhz = models.DecimalField(verbose_name='Update clock (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, blank=True, null=True)
48 update_clock = models.BigIntegerField(verbose_name='Update clock (Decimal)',validators=[MinValueValidator(0), MaxValueValidator(2**32-1)], blank=True, null=True)
49
50 ramp_rate_clock_Mhz = models.DecimalField(verbose_name='Ramp rate clock (MHz)', validators=[MinValueValidator(0), MaxValueValidator(150)], max_digits=19, decimal_places=16, blank=True, null=True)
51 ramp_rate_clock = models.BigIntegerField(verbose_name='Ramp rate clock (Decimal)',validators=[MinValueValidator(0), MaxValueValidator(2**18-1)], blank=True, null=True)
52
53 phaseA_degrees = models.FloatField(verbose_name='Phase A (Degrees)', validators=[MinValueValidator(0), MaxValueValidator(360)], default=0)
54
55 phaseB_degrees = models.FloatField(verbose_name='Phase B (Degrees)', validators=[MinValueValidator(0), MaxValueValidator(360)], blank=True, null=True)
56
57 modulation = models.PositiveIntegerField(verbose_name='Modulation Type', choices = MOD_TYPES, default = 0)
58
59 amplitude_enabled = models.BooleanField(verbose_name='Amplitude Control', choices=ENABLE_TYPE, default=False)
60
61 amplitudeI = models.PositiveIntegerField(verbose_name='Amplitude CH1',validators=[MinValueValidator(0), MaxValueValidator(2**12-1)], blank=True, null=True)
62 amplitudeQ = models.PositiveIntegerField(verbose_name='Amplitude CH2',validators=[MinValueValidator(0), MaxValueValidator(2**12-1)], blank=True, null=True)
63
64
65 def get_nbits(self):
66
67 return self.DDS_NBITS
68
69 def clean(self):
70
71 if self.modulation in [1,2,3]:
72 if self.frequencyB is None or self.frequencyB_Mhz is None:
73 raise ValidationError({
74 'frequencyB': 'Frequency modulation has to be defined when FSK or Chirp modulation is selected'
75 })
76
77 if self.modulation in [4,]:
78 if self.phaseB_degrees is None:
79 raise ValidationError({
80 'phaseB': 'Phase modulation has to be defined when BPSK modulation is selected'
81 })
82
83 self.frequencyA_Mhz = data.binary_to_freq(self.frequencyA, self.clock*self.multiplier)
84 self.frequencyB_Mhz = data.binary_to_freq(self.frequencyB, self.clock*self.multiplier)
85
86 def verify_frequencies(self):
87
88 return True
89
90 def parms_to_text(self):
91
92 my_dict = self.parms_to_dict()['configurations']['byId'][str(self.id)]
93
94 text = data.dict_to_text(my_dict)
95
96 return text
97
98 def status_device(self):
99 print("Status ")
100 try:
101 answer = api.status(ip = self.device.ip_address,
102 port = self.device.port_address)
103 if 'clock' in answer:
104 self.device.status = 1
105 else:
106 self.device.status = answer[0]
107 self.message = 'DDS - {}'.format(answer[2:])
108 except Exception as e:
109 self.message = str(e)
110 self.device.status = 0
111
112 self.device.save()
113
114 if self.device.status in (0, '0'):
115 return False
116 else:
117 return True
118
119 def reset_device(self):
120
121 answer = api.reset(ip = self.device.ip_address,
122 port = self.device.port_address)
123
124 if answer[0] != "1":
125 self.message = 'DDS - {}'.format(answer[2:])
126 return 0
127
128 self.message = 'DDS - {}'.format(answer[2:])
129 return 1
130
131 def stop_device(self):
132
133 try:
134 answer = api.disable_rf(ip = self.device.ip_address,
135 port = self.device.port_address)
136
137 return self.status_device()
138
139 except Exception as e:
140 self.message = str(e)
141 return False
142
143 def start_device(self):
144
145 try:
146 answer = api.enable_rf(ip = self.device.ip_address,
147 port = self.device.port_address)
148
149 return self.status_device()
150
151 except Exception as e:
152 self.message = str(e)
153 return False
154
155 def read_device(self):
156
157 parms = api.read_config(ip = self.device.ip_address,
158 port = self.device.port_address)
159 if not parms:
160 self.message = "Could not read DDS parameters from this device"
161 return parms
162
163 self.message = ""
164 return parms
165
166 def arma_data_write(self):
167 #clock = RCClock.objects.get(rc_configuration=self)
168 clock = self.clock
169 print(clock)
170 multiplier = self.multiplier
171 print(multiplier)
172 frequencyA_Mhz = self.frequencyA_Mhz
173 print(frequencyA_Mhz)
174 frequencyA = self.frequencyA
175 print(frequencyA)
176 frequencyB_Mhz = self.frequencyB_Mhz
177 print(frequencyB_Mhz)
178 frequencyB = self.frequencyB
179 print(frequencyB)
180 phaseA_degrees = self.phaseA_degrees
181 print(phaseA_degrees)
182 phaseB_degrees = self.phaseB_degrees
183 print(phaseB_degrees)
184 modulation = self.modulation
185 print(modulation)
186 amplitude_enabled = self.amplitude_enabled
187 print(amplitude_enabled)
188 amplitudeI = self.amplitudeI
189 print(amplitudeI)
190 amplitudeQ = self.amplitudeQ
191 print(amplitudeQ)
192
193 cadena_json = {'clock': (b64encode(pack('<f',clock))).decode("UTF-8"),\
194 'multiplier': (b64encode(pack('<B',multiplier))).decode("UTF-8"),\
195 'frequencyA': (b64encode(pack('<6B',frequencyA))).decode("UTF-8"),\
196 'frequencyB': (b64encode(pack('<6B',frequencyB))).decode("UTF-8")\
197
198 }
199 return cadena_json
200
201 def write_device(self, raw=False):
202 print("Ingreso a write")
203 try:
204
205 if not raw:
206 data = self.arma_data_write()
207 print(data)
208 payload = self.request('write', 'post', data=json.dumps(data))
209 if payload['command'] != 'ok':
210 self.message = 'DDS Rest write: {}'.format(payload['command'])
211 else:
212 self.message = payload['programming']
213 if payload['programming'] == 'fail':
214 self.message = 'DDS Rest write: error programming DDS chip'
215 if raw:
216 return b64encode(data)
217
218
219 except Exception as e:
220 if 'No route to host' not in str(e):
221 self.device.status = 4
222 else:
223 self.device.status = 0
224 self.message = 'DDS Rest write: {}'.format(str(e))
225 self.device.save()
226 return False
227
228 return True
229
230 def request(self, cmd, method='get', **kwargs):
231 print("Ingreso a request")
232 req = getattr(requests, method)(self.device.url(cmd), **kwargs)
233 payload = req.json()
234
235 return payload
236
237 class Meta:
238 db_table = 'ddsrest_configurations'
@@ -0,0 +1,20
1
2 function freq2Binary(mclock, frequency) {
3
4 var freq_bin = parseInt(frequency * (Math.pow(2,48)/mclock));
5 return freq_bin;
6
7 }
8
9 function binary2Freq(mclock, binary) {
10
11 var frequency = (1.0*binary) / (Math.pow(2,48)/mclock);
12 return frequency;
13 }
14
15
16 function binary2FreqDelta(mclock, binary) {
17
18 var frequency = (1.0*binary) / (Math.pow(2,48)/mclock);
19 return frequency;
20 } No newline at end of file
@@ -0,0 +1,1
1 {% extends "dev_conf.html" %} No newline at end of file
@@ -0,0 +1,93
1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap4 %}
3 {% load static %}
4 {% load main_tags %}
5
6 {% block extra-js%}
7 <script src="{% static 'js/dds_conversion.js' %}"></script>
8 <script type="text/javascript">
9
10 $("#id_clock").on('change', function() {
11 updateFrequencies();
12 });
13
14 $("#id_multiplier").on('change', function() {
15 updateFrequencies();
16 });
17
18 $("#id_frequencyA_Mhz").on('change', function() {
19 updateBinaryFrequencies();
20 });
21
22 $("#id_frequencyA").on('change', function() {
23 updateFrequencies();
24 });
25
26 $("#id_frequencyB_Mhz").on('change', function() {
27 updateBinaryFrequencies();
28 });
29
30 $("#id_frequencyB").on('change', function() {
31 updateFrequencies();
32 });
33
34 $("#id_delta_frequency").on('change', function() {
35 updateFrequencyDelta();
36 });
37
38 function updateBinaryFrequencies() {
39
40 var clock = $("#id_clock").val();
41 var multiplier = $("#id_multiplier").val();
42 var freq = $("#id_frequencyA_Mhz").val();
43 var freq_mod = $("#id_frequencyB_Mhz").val();
44
45 var mclock = clock*multiplier;
46
47 var freq_bin = freq2Binary(mclock, freq);
48 var freq_mod_bin = freq2Binary(mclock, freq_mod);
49
50 $("#id_frequencyA").val(freq_bin);
51 $("#id_frequencyB").val(freq_mod_bin);
52
53 freq = binary2Freq(mclock, freq_bin);
54 freq_mod = binary2Freq(mclock, freq_mod_bin);
55
56 $("#id_frequencyA_Mhz").val(freq);
57 $("#id_frequencyB_Mhz").val(freq_mod);
58
59 }
60
61 function updateFrequencies() {
62 console.log("Ingreso a updateFrequencies");
63 var clock = $("#id_clock").val();
64 var multiplier = $("#id_multiplier").val();
65 var freq_bin = $("#id_frequencyA").val();
66 var freq_mod_bin = $("#id_frequencyB").val();
67
68 var mclock = clock*multiplier;
69
70 var freq = binary2Freq(mclock, freq_bin);
71 var freq_mod = binary2Freq(mclock, freq_mod_bin);
72
73 $("#id_frequencyA_Mhz").val(freq);
74 $("#id_frequencyB_Mhz").val(freq_mod);
75
76 }
77
78 function updateFrequencyDelta() {
79 console.log("Ingreso a updateFrequencyDelta");
80 var clock = $("#id_clock").val();
81 var multiplier = $("#id_multiplier").val();
82 var freq_bin = $("#id_delta_frequency").val();
83
84 var mclock = clock*multiplier;
85
86 var freq = binary2Freq(mclock, freq_bin);
87 console.log(freq);
88 $("#id_delta_frequency_Mhz").val(freq);
89 }
90
91
92 </script>
93 {% endblock %} No newline at end of file
@@ -0,0 +1,7
1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap4 %}
3 {% load static %}
4 {% load main_tags %}
5
6 {% block extra-js%}
7 {% endblock %} No newline at end of file
@@ -0,0 +1,3
1 from django.test import TestCase
2
3 # Create your tests here.
@@ -0,0 +1,9
1 from django.urls import path
2
3 from . import views
4
5 urlpatterns = (
6 path('<int:id_conf>/', views.dds_rest_conf, name='url_dds_rest_conf'),
7 path('<int:id_conf>/<int:message>/', views.dds_rest_conf, name='url_dds_rest_conf'),
8 path('<int:id_conf>/edit/', views.dds_rest_conf_edit, name='url_edit_dds_rest_conf'),
9 )
@@ -0,0 +1,80
1 # Create your views here.
2 from django.shortcuts import redirect, render, get_object_or_404
3
4 # from apps.main.models import Experiment, Configuration
5 from apps.main.views import sidebar
6
7 from .models import DDSRestConfiguration
8 from .forms import DDSRestConfigurationForm
9 # Create your views here.
10
11 def dds_rest_conf(request, id_conf):
12
13 conf = get_object_or_404(DDSRestConfiguration, pk=id_conf)
14
15 kwargs = {}
16
17 kwargs['status'] = conf.device.get_status_display()
18
19 # if not kwargs['connected']:
20 # messages.error(request, message=answer)
21
22 kwargs['dev_conf'] = conf
23 kwargs['dev_conf_keys'] = [
24 'clock',
25 'multiplier',
26 'frequencyA_Mhz',
27 'frequencyA',
28 'frequencyB_Mhz',
29 'frequencyB',
30 'delta_frequency_Mhz',
31 'delta_frequency',
32 'update_clock_Mhz',
33 'update_clock',
34 'ramp_rate_clock_Mhz',
35 'ramp_rate_clock',
36 'phaseA_degrees',
37 'phaseB_degrees',
38 'modulation',
39 'amplitude_enabled',
40 'amplitudeI',
41 'amplitudeQ']
42
43 kwargs['title'] = 'DDS Rest Configuration'
44 kwargs['suptitle'] = 'Details'
45
46 kwargs['button'] = 'Edit Configuration'
47
48 ###### SIDEBAR ######
49 kwargs.update(sidebar(conf=conf))
50
51 return render(request, 'dds_rest_conf.html', kwargs)
52
53 def dds_rest_conf_edit(request, id_conf):
54
55 conf = get_object_or_404(DDSRestConfiguration, pk=id_conf)
56
57 if request.method=='GET':
58 form = DDSRestConfigurationForm(instance=conf)
59
60 if request.method=='POST':
61 form = DDSRestConfigurationForm(request.POST, instance=conf)
62
63 if form.is_valid():
64 conf = form.save(commit=False)
65
66 if conf.verify_frequencies():
67
68 conf.save()
69 return redirect('url_dds_rest_conf', id_conf=conf.id)
70
71 ##ERRORS
72
73 kwargs = {}
74 kwargs['id_dev'] = conf.id
75 kwargs['form'] = form
76 kwargs['title'] = 'Device Configuration'
77 kwargs['suptitle'] = 'Edit'
78 kwargs['button'] = 'Save'
79
80 return render(request, 'dds_rest_conf_edit.html', kwargs)
@@ -0,0 +1,5
1 /*!
2 * Datetimepicker for Bootstrap 3
3 * version : 4.17.47
4 * https://github.com/Eonasdan/bootstrap-datetimepicker/
5 */.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{display:block;margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0} No newline at end of file
@@ -0,0 +1,5
1 /*!
2 * Datetimepicker for Bootstrap v3
3 * https://github.com/Eonasdan/bootstrap-datetimepicker/
4 */
5 .bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} No newline at end of file
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
@@ -10,7 +10,7 class ABSConfigurationForm(forms.ModelForm):
10 10
11 11 class Meta:
12 12 model = ABSConfiguration
13 exclude = ('type', 'status', 'parameters', 'active_beam',
13 exclude = ('type', 'status', 'parameters', 'active_beam',
14 14 'module_status', 'module_messages', 'module_mode',
15 15 'author', 'hash')
16 16
@@ -1,6 +1,6
1 1 from django.db import models
2 from apps.main.models import Configuration, User
3 from django.core.urlresolvers import reverse
2 from apps.main.models import Configuration , User
3 from django.urls import reverse
4 4 from celery.execute import send_task
5 5 from datetime import datetime
6 6 import ast
@@ -203,7 +203,6 OPERATION_MODES = (
203 203 (1, 'Automatic'),
204 204 )
205 205
206
207 206 class ABSConfiguration(Configuration):
208 207 active_beam = models.PositiveSmallIntegerField(verbose_name='Active Beam', default=0)
209 208 module_status = models.CharField(verbose_name='Module Status', max_length=10000, default=status_default)
@@ -365,13 +364,45 class ABSConfiguration(Configuration):
365 364 This function sends the beams list to every abs module.
366 365 It needs 'module_conf' function
367 366 """
368
367 print("Write")
369 368 beams = ABSBeam.objects.filter(abs_conf=self)
370 369 nbeams = len(beams)
370
371 # Se manda a cero RC para poder realizar cambio de beam
372 if self.experiment is None:
373 confs = []
374 else:
375 confs = Configuration.objects.filter(experiment = self.experiment).filter(type=0)
376 confdds = ''
377 confjars = ''
378 confrc = ''
379 #TO STOP DEVICES: DDS-JARS-RC
380 for i in range(0,len(confs)):
381 if i==0:
382 for conf in confs:
383 if conf.device.device_type.name == 'dds':
384 confdds = conf
385 confdds.stop_device()
386 break
387 if i==1:
388 for conf in confs:
389 if conf.device.device_type.name == 'jars':
390 confjars = conf
391 confjars.stop_device()
392 break
393 if i==2:
394 for conf in confs:
395 if conf.device.device_type.name == 'rc':
396 confrc = conf
397 confrc.stop_device()
398 break
399
400 '''
371 401 if self.connected_modules() == 0 :
402 print("No encuentra modulos")
372 403 self.message = "No ABS Module detected."
373 404 return False
374
405 '''
375 406 #-------------Write each abs module-----------
376 407
377 408 if beams:
@@ -381,23 +412,36 class ABSConfiguration(Configuration):
381 412 message += ''.join([fromBinary2Char(beam.module_6bits(i)) for beam in beams])
382 413 status = ['0'] * 64
383 414 n = 0
384
415 print("Llega una antes entrar a multicast")
385 416 sock = self.send_multicast(message)
386 417
387 for i in range(32):
418 while True:
419 #for i in range(32):
388 420 try:
389 421 data, address = sock.recvfrom(1024)
390 print address, data
422 print (address, data)
423
391 424 if data == '1':
392 425 status[int(address[0][10:])-1] = '3'
393 426 elif data == '0':
394 427 status[int(address[0][10:])-1] = '1'
428 except socket.timeout:
429 print('Timeout')
430 break
395 431 except Exception as e:
396 print 'Error {}'.format(e)
432 print ('Error {}'.format(e))
397 433 n += 1
398 434 sock.close()
399 435 else:
400 436 self.message = "ABS Configuration does not have beams"
437 #Start DDS-RC-JARS
438 if confdds:
439 confdds.start_device()
440 if confrc:
441 #print confrc
442 confrc.start_device()
443 if confjars:
444 confjars.start_device()
401 445 return False
402 446
403 447 if n == 64:
@@ -405,15 +449,34 class ABSConfiguration(Configuration):
405 449 self.device.status = 0
406 450 self.module_status = ''.join(status)
407 451 self.save()
452 #Start DDS-RC-JARS
453 if confdds:
454 confdds.start_device()
455 if confrc:
456 #print confrc
457 confrc.start_device()
458 if confjars:
459 confjars.start_device()
408 460 return False
409 461 else:
410 462 self.message = "ABS Beams List have been sent to ABS Modules"
411 463 self.active_beam = beams[0].pk
412 464
465 #Start DDS-RC-JARS
466 if confdds:
467 confdds.start_device()
468 if confrc:
469 #print confrc
470 confrc.start_device()
471 if confjars:
472 confjars.start_device()
473
413 474 self.device.status = 3
414 475 self.module_status = ''.join(status)
415 476 self.save()
416
477 conf_active = ABSActive.objects.get(pk=1)
478 conf_active.conf = self
479 conf_active.save()
417 480 return True
418 481
419 482
@@ -486,14 +549,14 class ABSConfiguration(Configuration):
486 549 return num
487 550
488 551 def send_multicast(self, message):
489
552 #print("Send multicast")
490 553 multicast_group = ('224.3.29.71', 10000)
491 554 # Create the datagram socket
492 555 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
493 556 sock.settimeout(1)
494 local_ip = os.environ.get('LOCAL_IP', '192.168.1.128')
557 local_ip = os.environ.get('LOCAL_IP', '192.168.2.128')
495 558 sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(local_ip))
496 sock.sendto(message, multicast_group)
559 sock.sendto(message.encode(), multicast_group)
497 560 print('Sending ' + message)
498 561 return sock
499 562
@@ -502,34 +565,72 class ABSConfiguration(Configuration):
502 565 This function returns the status of all abs-modules as one.
503 566 If at least one module is connected, its answer is "1"
504 567 """
505
568 print ('Status device')
569 print (self.active_beam)
570 beams = ABSBeam.objects.filter(abs_conf=self)
571 #print beams[self.active_beam-1].module_6bits(0)
572 active = ABSActive.objects.get(pk=1)
573 if active.conf != self:
574 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_url()
575 self.message += "\n"
576 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
577
578 return False
579
506 580 sock = self.send_multicast('MNTR')
507
581
508 582 n = 0
509 583 status = ['0'] * 64
510 for i in range(32):
584
585 while True:
586 #for i in range(32):
511 587 #if True:
512 588 try:
589 print("Recibiendo")
513 590 address = None
514 data, address = sock.recvfrom(1024)
515 x = int(address[0][10:])-1
591 data, address = sock.recvfrom(2)
592 print (address, data)
593 print("!!!!")
594 data = data.decode()
595 aux_mon = "1"
596 aux_expected = aux_mon
597 if(len(data)==2):
598 print ("data[1]: ")
599 print (data[1])
600 aux_mon = fromChar2Binary(data[1])
601 print (aux_mon)
602 aux_i = (str(address[0]).split('.'))[3]
603 print (aux_i)
604 print ('Active beam')
605 beam_active = ABSBeam.objects.get(pk=self.active_beam)
606 print (beam_active)
607 aux_expected = beam_active.module_6bits(int(aux_i)-1)
608 print (aux_expected)
609
610 print ("data[0]: ")
611 print (data[0])
612
516 613 if data[0] == '1':
517 remote = fromChar2Binary(data[1])
518 local = ABSBeam.objects.get(pk=self.active_beam).module_6bits(x)
519 if local == remote:
520 status[x] = '3'
521 print('Module: {} connected...igual'.format(address))
614 status[int(address[0][10:])-1] = '3'
615 if aux_mon == aux_expected:
616 print ('Es igual')
522 617 else:
523 status[x] = '2'
524 print('Module: {} connected...diferente'.format(address))
618 print ('Es diferente')
619 status[int(address[0][10:])-1] = '2'
620
525 621 elif data[0] == '0':
526 status[x] = '1'
622 status[int(address[0][10:])-1] = '1'
527 623 n += 1
624 print('Module: {} connected'.format(address))
625 except socket.timeout:
626 print('Timeout')
627 break
528 628 except:
529 629 print('Module: {} error'.format(address))
530 630 pass
631
531 632 sock.close()
532
633
533 634 if n > 0:
534 635 self.message = 'ABS modules Status have been updated.'
535 636 self.device.status = 1
@@ -547,6 +648,17 class ABSConfiguration(Configuration):
547 648 This function connects to a multicast group and sends the beam number
548 649 to all abs modules.
549 650 """
651 print ('Send beam')
652 print (self.active_beam)
653 beams = ABSBeam.objects.filter(abs_conf=self)
654 #print beams[self.active_beam-1].module_6bits(0)
655 active = ABSActive.objects.get(pk=1)
656 if active.conf != self:
657 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_url()
658 self.message += "\n"
659 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
660
661 return False
550 662
551 663 # Se manda a cero RC para poder realizar cambio de beam
552 664 if self.experiment is None:
@@ -584,18 +696,23 class ABSConfiguration(Configuration):
584 696 #El indice del apunte debe ser menor que el numero total de apuntes
585 697 #El servidor tcp en el embebido comienza a contar desde 0
586 698 status = ['0'] * 64
587 message = 'CHGB{}'.format(beam_pos)
699 message = 'CHGB{}'.format(beam_pos)
588 700 sock = self.send_multicast(message)
589 for i in range(32):
701 while True:
702 #for i in range(32):
590 703 try:
591 704 data, address = sock.recvfrom(1024)
592 print address, data
705 print (address, data)
706 data = data.decode()
593 707 if data == '1':
594 708 status[int(address[0][10:])-1] = '3'
595 709 elif data == '0':
596 710 status[int(address[0][10:])-1] = '1'
711 except socket.timeout:
712 print('Timeout')
713 break
597 714 except Exception as e:
598 print 'Error {}'.format(e)
715 print ('Error {}'.format(e))
599 716 pass
600 717
601 718 sock.close()
@@ -617,13 +734,15 class ABSConfiguration(Configuration):
617 734
618 735 def get_absolute_url_import(self):
619 736 return reverse('url_import_abs_conf', args=[str(self.id)])
620
737 class ABSActive(models.Model):
738 conf = models.ForeignKey(ABSConfiguration, null=True, verbose_name='ABS Configuration', on_delete=models.CASCADE)
621 739
622 740 class ABSBeam(models.Model):
623 741
624 742 name = models.CharField(max_length=60, default='Beam')
625 743 antenna = models.CharField(verbose_name='Antenna', max_length=1000, default=antenna_default)
626 abs_conf = models.ForeignKey(ABSConfiguration, null=True, verbose_name='ABS Configuration')
744 abs_conf = models.ForeignKey('ABSConfiguration', null=True,
745 verbose_name='ABS Configuration', on_delete=models.CASCADE)
627 746 tx = models.CharField(verbose_name='Tx', max_length=1000, default=tx_default)
628 747 rx = models.CharField(verbose_name='Rx', max_length=1000, default=rx_default)
629 748 s_time = models.TimeField(verbose_name='Star Time', default='00:00:00')
@@ -1,9 +1,11
1 1 {% extends "dev_conf_edit.html" %}
2 2
3 {% load bootstrap3 %}
3 {% load bootstrap4 %}
4 4 {% load static %}
5 5 {% load main_tags %}
6 6
7
8
7 9 {% block content %}
8 10 <form class="form" method="post">
9 11 {% csrf_token %}
@@ -1,5 +1,5
1 1 {% load static %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load main_tags %}
4 4
5 5 {% block content %}
@@ -104,7 +104,7
104 104 }
105 105
106 106
107 }
107
108 108 .abs_tx tr:nth-last-child(1){
109 109 border-bottom: 0px solid #00334d;
110 110 }
@@ -123,7 +123,7
123 123 }
124 124
125 125
126 }
126
127 127 .abs_rx tr:nth-last-child(1){
128 128 border-bottom: 0px solid #00334d;
129 129 }
@@ -1,4 +1,4
1 {% load bootstrap3 %}
1 {% load bootstrap4 %}
2 2
3 3 {% if abs_beams %}
4 4
@@ -17,8 +17,8
17 17 #{{forloop.counter}}: {{beam.name}}
18 18 </a>
19 19 {% if edit %}
20 <button id="bt_remove_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_remove_beam" value="{{beam.pk}}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
21 <button id="bt_edit_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_edit_beam" value="{{beam.pk}}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></button>
20 <button id="bt_remove_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_remove_beam" value="{{beam.pk}}"><span class="far fa-trash-alt" aria-hidden="true"></span></button>
21 <button id="bt_edit_beam-{{ beam.id }}" type="button" class="btn-xs btn-default pull-right" name="bt_edit_beam" value="{{beam.pk}}"><span class="fa fa-pencil" aria-hidden="true"></span></button>
22 22 {% endif %}
23 23 </h4>
24 24 </div>
@@ -1,4 +1,4
1 {% extends "dev_conf.html" %} {% load static %} {% load bootstrap3 %} {% load main_tags %}
1 {% extends "dev_conf.html" %} {% load static %} {% load bootstrap4 %} {% load main_tags %}
2 2 {% block extra-head %}
3 3 <style>
4 4 .abs {
@@ -42,7 +42,7
42 42 {% block extra-menu-actions %}
43 43 <li>
44 44 <a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank">
45 <span class="glyphicon glyphicon-picture" aria-hidden="true"></span> View Patterns </a>
45 <span class="far fa-image" aria-hidden="true"></span> View Patterns </a>
46 46 </li>
47 47 {% endblock %}
48 48 {% block extra-content %}
@@ -51,15 +51,15
51 51 <div class="container">
52 52 <ul class="nav nav-pills">
53 53 {% for beam in beams %}
54 <li {%if beam.pk == active_beam %} class="active" {% endif %}>
55 <a data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
54 <li class="nav-item">
55 <a {%if beam.pk == active_beam %} class="nav-link active" {% else %} class="nav-link" {% endif %} data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
56 56 </li>
57 57 {% endfor %}
58 58 </ul>
59 59
60 60 <div class="tab-content">
61 61 {% for beam in beams %}
62 <div id="menu{{forloop.counter}}" class="tab-pane fade {%if beam.pk == active_beam %}active in{% endif %}">
62 <div id="menu{{forloop.counter}}" class="tab-pane fade {%if beam.pk == active_beam %}in active show{% endif %}">
63 63 <h3>{%if beam.pk == active_beam %}Active Beam: {%endif%}{{beam.name}}</h3>
64 64 <table id="abs_pattern{{forloop.counter}}" class="abs">
65 65 <tr>
@@ -301,7 +301,7
301 301 {% else %}
302 302 <div style="vertical-align: top; display:inline-block;">
303 303 <button id="send_beam{{forloop.counter}}" type="button" class="btn btn-default">
304 <span class="glyphicon glyphicon-export" aria-hidden="true"></span>
304 <span class="fas fa-external-link-square-alt" aria-hidden="true"></span>
305 305 Change Beam</button>
306 306 </div>
307 307 {% endif %}
@@ -315,22 +315,25
315 315 <p style="color:#b4bcc2; margin-left: 5%;">
316 316 <i>No Beams...</i>
317 317 </p>
318 {% endif %} {% endblock extra-content %} {% block extra-js%}
318 {% endif %}
319 {% endblock extra-content %}
320 {% block extra-js%}
319 321 <script>
320 322 $(document).ready(function () {
321 323
322 324 {% for beam in beams %}
323 325
324 {% if dev_conf.operation_mode == 1 %}
325 $("#send_beam{{forloop.counter}}").prop('disabled', true)
326 {% else %}
327 $("#send_beam{{forloop.counter}}").click(function () {
328 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
329 });
330 {% endif %}
326 {% if dev_conf.operation_mode == 1 %}
327 $("#send_beam{{forloop.counter}}").prop('disabled', true)
328 {% else %}
329 $("#send_beam{{forloop.counter}}").click(function () {
330 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
331 });
332 {% endif %}
331 333
332 334 {% endfor %}
333 335
334 336
335 337 });
336 </script> {% endblock %} No newline at end of file
338 </script>
339 {% endblock %}
@@ -1,5 +1,5
1 1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load static %}
4 4
5 5 {% block extra-head %}
@@ -7,7 +7,7
7 7 /* show the move cursor as the user moves the mouse over the panel header.*/
8 8 .panel-default { cursor: move; }
9 9 </style>
10 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
10
11 11
12 12 {% endblock %}
13 13
@@ -1,5 +1,5
1 1 {% load static %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load main_tags %}
4 4
5 5 {% block content %}
@@ -1,6 +1,6
1 1 {% extends "dev_conf_edit.html" %}
2 2
3 {% load bootstrap3 %}
3 {% load bootstrap4 %}
4 4 {% load static %}
5 5 {% load main_tags %}
6 6
@@ -1,5 +1,5
1 1 {% load static %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load main_tags %}
4 4
5 5 {% block content %}
@@ -104,7 +104,7
104 104 }
105 105
106 106
107 }
107
108 108 .abs_tx tr:nth-last-child(1){
109 109 border-bottom: 0px solid #00334d;
110 110 }
@@ -123,7 +123,7
123 123 }
124 124
125 125
126 }
126
127 127 .abs_rx tr:nth-last-child(1){
128 128 border-bottom: 0px solid #00334d;
129 129 }
@@ -1,6 +1,6
1 1 {% extends "dev_conf.html" %}
2 2 {% load static %}
3 {% load bootstrap3 %}
3 {% load bootstrap4 %}
4 4 {% load main_tags %}
5 5
6 6 {% block content %}
@@ -1,5 +1,5
1 1 {% load static %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load main_tags %}
4 4
5 5 {% block content %}
@@ -1,18 +1,18
1 from django.conf.urls import url
1 from django.urls import path
2 2
3 3 from apps.abs import views
4 4
5 5 urlpatterns = (
6 url(r'^(?P<id_conf>-?\d+)/$', views.abs_conf, name='url_abs_conf'),
7 url(r'^(?P<id_conf>-?\d+)/edit/$', views.abs_conf_edit, name='url_edit_abs_conf'),
8 url(r'^alert/$', views.abs_conf_alert, name='url_alert_abs_conf'),
9 url(r'^(?P<id_conf>-?\d+)/import/$', views.import_file, name='url_import_abs_conf'),
6 path('<int:id_conf>/', views.abs_conf, name='url_abs_conf'),
7 path('<int:id_conf>/edit/', views.abs_conf_edit, name='url_edit_abs_conf'),
8 path('alert/', views.abs_conf_alert, name='url_alert_abs_conf'),
9 path('<int:id_conf>/import/', views.import_file, name='url_import_abs_conf'),
10 10 #url(r'^(?P<id_conf>-?\d+)/status/', views.abs_conf, {'status_request':True},name='url_status_abs_conf'),
11 url(r'^(?P<id_conf>-?\d+)/change_beam/(?P<id_beam>-?\d+)/$', views.send_beam, name='url_send_beam'),
12 url(r'^(?P<id_conf>-?\d+)/plot/$', views.plot_patterns, name='url_plot_abs_patterns'),
13 url(r'^(?P<id_conf>-?\d+)/plot/(?P<id_beam>-?\d+)/$', views.plot_patterns, name='url_plot_abs_patterns'),
14 url(r'^(?P<id_conf>-?\d+)/plot/(?P<id_beam>-?\d+)/(?P<antenna>[\w\-]+)/pattern.png$', views.plot_pattern, name='url_plot_beam'),
15 url(r'^(?P<id_conf>-?\d+)/add_beam/$', views.add_beam, name='url_add_abs_beam'),
16 url(r'^(?P<id_conf>-?\d+)/beam/(?P<id_beam>-?\d+)/delete/$', views.remove_beam, name='url_remove_abs_beam'),
17 url(r'^(?P<id_conf>-?\d+)/beam/(?P<id_beam>-?\d+)/edit/$', views.edit_beam, name='url_edit_abs_beam'),
11 path('<int:id_conf>/change_beam/<int:id_beam>/', views.send_beam, name='url_send_beam'),
12 path('<int:id_conf>/plot/', views.plot_patterns, name='url_plot_abs_patterns'),
13 path('<int:id_conf>/plot/<int:id_beam>/', views.plot_patterns, name='url_plot_abs_patterns'),
14 path('<int:id_conf>/plot/<int:id_beam>/<int:antenna>/pattern.png', views.plot_pattern, name='url_plot_beam'),
15 path('<int:id_conf>/add_beam/', views.add_beam, name='url_add_abs_beam'),
16 path('<int:id_conf>/beam/<int:id_beam>/delete/', views.remove_beam, name='url_remove_abs_beam'),
17 path('<int:id_conf>/beam/<int:id_beam>/edit/', views.edit_beam, name='url_edit_abs_beam'),
18 18 )
@@ -16,8 +16,8 import numpy
16 16 import scipy.interpolate
17 17 import os
18 18 import sys
19 import TimeTools
20 import Misc_Routines
19 from .TimeTools import Julian , Time
20 from .Misc_Routines import CoFactors
21 21
22 22 class EquatorialCorrections():
23 23 def __init__(self):
@@ -81,21 +81,21 class EquatorialCorrections():
81 81
82 82 eps0 = (23.4392911*3600.) - (46.8150*T) - (0.00059*T**2) + (0.001813*T**3)
83 83 # True obliquity of the ecliptic in radians
84 eps = (eps0 + d_eps)/3600.*Misc_Routines.CoFactors.d2r
84 eps = (eps0 + d_eps)/3600.*CoFactors.d2r
85 85
86 86 # Useful numbers
87 87 ce = numpy.cos(eps)
88 88 se = numpy.sin(eps)
89 89
90 90 # Convert Ra-Dec to equatorial rectangular coordinates
91 x = numpy.cos(ra*Misc_Routines.CoFactors.d2r)*numpy.cos(dec*Misc_Routines.CoFactors.d2r)
92 y = numpy.sin(ra*Misc_Routines.CoFactors.d2r)*numpy.cos(dec*Misc_Routines.CoFactors.d2r)
93 z = numpy.sin(dec*Misc_Routines.CoFactors.d2r)
91 x = numpy.cos(ra*CoFactors.d2r)*numpy.cos(dec*CoFactors.d2r)
92 y = numpy.sin(ra*CoFactors.d2r)*numpy.cos(dec*CoFactors.d2r)
93 z = numpy.sin(dec*CoFactors.d2r)
94 94
95 95 # Apply corrections to each rectangular coordinate
96 x2 = x - (y*ce + z*se)*d_psi*Misc_Routines.CoFactors.s2r
97 y2 = y + (x*ce*d_psi - z*d_eps)*Misc_Routines.CoFactors.s2r
98 z2 = z + (x*se*d_psi + y*d_eps)*Misc_Routines.CoFactors.s2r
96 x2 = x - (y*ce + z*se)*d_psi*CoFactors.s2r
97 y2 = y + (x*ce*d_psi - z*d_eps)*CoFactors.s2r
98 z2 = z + (x*se*d_psi + y*d_eps)*CoFactors.s2r
99 99
100 100 # Convert bask to equatorial spherical coordinates
101 101 r = numpy.sqrt(x2**2. + y2**2. + z2**2.)
@@ -128,8 +128,8 class EquatorialCorrections():
128 128 dec2[w2] = numpy.arcsin(z2[w2]/r[w2])
129 129
130 130 # Converting to degree
131 ra2 = ra2/Misc_Routines.CoFactors.d2r
132 dec2 = dec2/Misc_Routines.CoFactors.d2r
131 ra2 = ra2/CoFactors.d2r
132 dec2 = dec2/CoFactors.d2r
133 133
134 134 w = numpy.where(ra2<0.)
135 135 if w[0].size>0:
@@ -178,32 +178,32 class EquatorialCorrections():
178 178 # Mean elongation of the moon
179 179 coeff1 = numpy.array([1/189474.0,-0.0019142,445267.111480,297.85036])
180 180 d = numpy.poly1d(coeff1)
181 d = d(t)*Misc_Routines.CoFactors.d2r
181 d = d(t)*CoFactors.d2r
182 182 d = self.cirrange(d,rad=1)
183 183
184 184 # Sun's mean elongation
185 185 coeff2 = numpy.array([-1./3e5,-0.0001603,35999.050340,357.52772])
186 186 m = numpy.poly1d(coeff2)
187 m = m(t)*Misc_Routines.CoFactors.d2r
187 m = m(t)*CoFactors.d2r
188 188 m = self.cirrange(m,rad=1)
189 189
190 190 # Moon's mean elongation
191 191 coeff3 = numpy.array([1.0/5.625e4,0.0086972,477198.867398,134.96298])
192 192 mprime = numpy.poly1d(coeff3)
193 mprime = mprime(t)*Misc_Routines.CoFactors.d2r
193 mprime = mprime(t)*CoFactors.d2r
194 194 mprime = self.cirrange(mprime,rad=1)
195 195
196 196 # Moon's argument of latitude
197 197 coeff4 = numpy.array([-1.0/3.27270e5,-0.0036825,483202.017538,93.27191])
198 198 f = numpy.poly1d(coeff4)
199 f = f(t)*Misc_Routines.CoFactors.d2r
199 f = f(t)*CoFactors.d2r
200 200 f = self.cirrange(f,rad=1)
201 201
202 202 # Longitude fo the ascending node of the Moon's mean orbit on the ecliptic, measu-
203 203 # red from the mean equinox of the date.
204 204 coeff5 = numpy.array([1.0/4.5e5,0.0020708,-1934.136261,125.04452])
205 205 omega = numpy.poly1d(coeff5)
206 omega = omega(t)*Misc_Routines.CoFactors.d2r
206 omega = omega(t)*CoFactors.d2r
207 207 omega = self.cirrange(omega,rad=1)
208 208
209 209 d_lng = numpy.array([0,-2,0,0,0,0,-2,0,0,-2,-2,-2,0,2,0,2,0,0,-2,0,2,0,0,-2,0,-2,0,0,\
@@ -335,7 +335,7 class EquatorialCorrections():
335 335 coeff = 23 + 26/60. + 21.488/3600.
336 336 eps0 = coeff*3600. - 46.8150*T - 0.00059*T**2. + 0.001813*T**3.
337 337 # True obliquity of the ecliptic in radians
338 eps = (eps0 + d_epsilon)/3600*Misc_Routines.CoFactors.d2r
338 eps = (eps0 + d_epsilon)/3600*CoFactors.d2r
339 339
340 340 celestialbodies = CelestialBodies()
341 341 [sunra,sundec,sunlon,sunobliq] = celestialbodies.sunpos(jd)
@@ -349,11 +349,11 class EquatorialCorrections():
349 349 # Constant of aberration, in arcseconds
350 350 k = 20.49552
351 351
352 cd = numpy.cos(dec*Misc_Routines.CoFactors.d2r) ; sd = numpy.sin(dec*Misc_Routines.CoFactors.d2r)
352 cd = numpy.cos(dec*CoFactors.d2r) ; sd = numpy.sin(dec*CoFactors.d2r)
353 353 ce = numpy.cos(eps) ; te = numpy.tan(eps)
354 cp = numpy.cos(pi*Misc_Routines.CoFactors.d2r) ; sp = numpy.sin(pi*Misc_Routines.CoFactors.d2r)
355 cs = numpy.cos(sunlon*Misc_Routines.CoFactors.d2r) ; ss = numpy.sin(sunlon*Misc_Routines.CoFactors.d2r)
356 ca = numpy.cos(ra*Misc_Routines.CoFactors.d2r) ; sa = numpy.sin(ra*Misc_Routines.CoFactors.d2r)
354 cp = numpy.cos(pi*CoFactors.d2r) ; sp = numpy.sin(pi*CoFactors.d2r)
355 cs = numpy.cos(sunlon*CoFactors.d2r) ; ss = numpy.sin(sunlon*CoFactors.d2r)
356 ca = numpy.cos(ra*CoFactors.d2r) ; sa = numpy.sin(ra*CoFactors.d2r)
357 357
358 358 term1 = (ca*cs*ce + sa*ss)/cd
359 359 term2 = (ca*cp*ce + sa*sp)/cd
@@ -407,8 +407,8 class EquatorialCorrections():
407 407 dec = numpy.atleast_1d(dec)
408 408
409 409 if rad==0:
410 ra_rad = ra*Misc_Routines.CoFactors.d2r
411 dec_rad = dec*Misc_Routines.CoFactors.d2r
410 ra_rad = ra*CoFactors.d2r
411 dec_rad = dec*CoFactors.d2r
412 412 else:
413 413 ra_rad = ra
414 414 dec_rad = dec
@@ -427,9 +427,9 class EquatorialCorrections():
427 427 dec_rad = numpy.arcsin(x2[2,:])
428 428
429 429 if rad==0:
430 ra = ra_rad/Misc_Routines.CoFactors.d2r
430 ra = ra_rad/CoFactors.d2r
431 431 ra = ra + (ra<0)*360.
432 dec = dec_rad/Misc_Routines.CoFactors.d2r
432 dec = dec_rad/CoFactors.d2r
433 433 else:
434 434 ra = ra_rad
435 435 ra = ra + (ra<0)*numpy.pi*2.
@@ -472,15 +472,15 class EquatorialCorrections():
472 472 if FK4==0:
473 473 st=0.001*(equinox1 - 2000.)
474 474 # Computing 3 rotation angles.
475 A=Misc_Routines.CoFactors.s2r*t*(23062.181+st*(139.656+0.0139*st)+t*(30.188-0.344*st+17.998*t))
476 B=Misc_Routines.CoFactors.s2r*t*t*(79.280+0.410*st+0.205*t)+A
477 C=Misc_Routines.CoFactors.s2r*t*(20043.109-st*(85.33+0.217*st)+ t*(-42.665-0.217*st-41.833*t))
475 A=CoFactors.s2r*t*(23062.181+st*(139.656+0.0139*st)+t*(30.188-0.344*st+17.998*t))
476 B=CoFactors.s2r*t*t*(79.280+0.410*st+0.205*t)+A
477 C=CoFactors.s2r*t*(20043.109-st*(85.33+0.217*st)+ t*(-42.665-0.217*st-41.833*t))
478 478 else:
479 479 st=0.001*(equinox1 - 1900)
480 480 # Computing 3 rotation angles
481 A=Misc_Routines.CoFactors.s2r*t*(23042.53+st*(139.75+0.06*st)+t*(30.23-0.27*st+18.0*t))
482 B=Misc_Routines.CoFactors.s2r*t*t*(79.27+0.66*st+0.32*t)+A
483 C=Misc_Routines.CoFactors.s2r*t*(20046.85-st*(85.33+0.37*st)+t*(-42.67-0.37*st-41.8*t))
481 A=CoFactors.s2r*t*(23042.53+st*(139.75+0.06*st)+t*(30.23-0.27*st+18.0*t))
482 B=CoFactors.s2r*t*t*(79.27+0.66*st+0.32*t)+A
483 C=CoFactors.s2r*t*(20046.85-st*(85.33+0.37*st)+t*(-42.67-0.37*st-41.8*t))
484 484
485 485 sina = numpy.sin(A); sinb = numpy.sin(B); sinc = numpy.sin(C)
486 486 cosa = numpy.cos(A); cosb = numpy.cos(B); cosc = numpy.cos(C)
@@ -595,39 +595,39 class CelestialBodies(EquatorialCorrections):
595 595 # Allow for ellipticity of the orbit (equation of centre) using the Earth's mean
596 596 # anomoly ME
597 597 me = 358.475844 + ((35999.049750*t) % 360.0)
598 ellcor = (6910.1 - 17.2*t)*numpy.sin(me*Misc_Routines.CoFactors.d2r) + 72.3*numpy.sin(2.0*me*Misc_Routines.CoFactors.d2r)
598 ellcor = (6910.1 - 17.2*t)*numpy.sin(me*CoFactors.d2r) + 72.3*numpy.sin(2.0*me*CoFactors.d2r)
599 599 l = l + ellcor
600 600
601 601 # Allow for the Venus perturbations using the mean anomaly of Venus MV
602 602 mv = 212.603219 + ((58517.803875*t) % 360.0)
603 vencorr = 4.8*numpy.cos((299.1017 + mv - me)*Misc_Routines.CoFactors.d2r) + \
604 5.5*numpy.cos((148.3133 + 2.0*mv - 2.0*me )*Misc_Routines.CoFactors.d2r) + \
605 2.5*numpy.cos((315.9433 + 2.0*mv - 3.0*me )*Misc_Routines.CoFactors.d2r) + \
606 1.6*numpy.cos((345.2533 + 3.0*mv - 4.0*me )*Misc_Routines.CoFactors.d2r) + \
607 1.0*numpy.cos((318.15 + 3.0*mv - 5.0*me )*Misc_Routines.CoFactors.d2r)
603 vencorr = 4.8*numpy.cos((299.1017 + mv - me)*CoFactors.d2r) + \
604 5.5*numpy.cos((148.3133 + 2.0*mv - 2.0*me )*CoFactors.d2r) + \
605 2.5*numpy.cos((315.9433 + 2.0*mv - 3.0*me )*CoFactors.d2r) + \
606 1.6*numpy.cos((345.2533 + 3.0*mv - 4.0*me )*CoFactors.d2r) + \
607 1.0*numpy.cos((318.15 + 3.0*mv - 5.0*me )*CoFactors.d2r)
608 608 l = l + vencorr
609 609
610 610 # Allow for the Mars perturbations using the mean anomaly of Mars MM
611 611 mm = 319.529425 + ((19139.858500*t) % 360.0)
612 marscorr = 2.0*numpy.cos((343.8883 - 2.0*mm + 2.0*me)*Misc_Routines.CoFactors.d2r ) + \
613 1.8*numpy.cos((200.4017 - 2.0*mm + me)*Misc_Routines.CoFactors.d2r)
612 marscorr = 2.0*numpy.cos((343.8883 - 2.0*mm + 2.0*me)*CoFactors.d2r ) + \
613 1.8*numpy.cos((200.4017 - 2.0*mm + me)*CoFactors.d2r)
614 614 l = l + marscorr
615 615
616 616 # Allow for the Jupiter perturbations using the mean anomaly of Jupiter MJ
617 617 mj = 225.328328 + ((3034.6920239*t) % 360.0)
618 jupcorr = 7.2*numpy.cos((179.5317 - mj + me )*Misc_Routines.CoFactors.d2r) + \
619 2.6*numpy.cos((263.2167 - mj)*Misc_Routines.CoFactors.d2r) + \
620 2.7*numpy.cos((87.1450 - 2.0*mj + 2.0*me)*Misc_Routines.CoFactors.d2r) + \
621 1.6*numpy.cos((109.4933 - 2.0*mj + me)*Misc_Routines.CoFactors.d2r)
618 jupcorr = 7.2*numpy.cos((179.5317 - mj + me )*CoFactors.d2r) + \
619 2.6*numpy.cos((263.2167 - mj)*CoFactors.d2r) + \
620 2.7*numpy.cos((87.1450 - 2.0*mj + 2.0*me)*CoFactors.d2r) + \
621 1.6*numpy.cos((109.4933 - 2.0*mj + me)*CoFactors.d2r)
622 622 l = l + jupcorr
623 623
624 624 # Allow for Moons perturbations using mean elongation of the Moon from the Sun D
625 625 d = 350.7376814 + ((445267.11422*t) % 360.0)
626 mooncorr = 6.5*numpy.sin(d*Misc_Routines.CoFactors.d2r)
626 mooncorr = 6.5*numpy.sin(d*CoFactors.d2r)
627 627 l = l + mooncorr
628 628
629 629 # Allow for long period terms
630 longterm = + 6.4*numpy.sin((231.19 + 20.20*t)*Misc_Routines.CoFactors.d2r)
630 longterm = + 6.4*numpy.sin((231.19 + 20.20*t)*CoFactors.d2r)
631 631 l = l + longterm
632 632 l = (l + 2592000.0) % 1296000.0
633 633 longmed = l/3600.0
@@ -637,26 +637,26 class CelestialBodies(EquatorialCorrections):
637 637
638 638 # Allow for Nutation using the longitude of the Moons mean node OMEGA
639 639 omega = 259.183275 - ((1934.142008*t) % 360.0)
640 l = l - 17.2*numpy.sin(omega*Misc_Routines.CoFactors.d2r)
640 l = l - 17.2*numpy.sin(omega*CoFactors.d2r)
641 641
642 642 # Form the True Obliquity
643 oblt = 23.452294 - 0.0130125*t + (9.2*numpy.cos(omega*Misc_Routines.CoFactors.d2r))/3600.0
643 oblt = 23.452294 - 0.0130125*t + (9.2*numpy.cos(omega*CoFactors.d2r))/3600.0
644 644
645 645 # Form Right Ascension and Declination
646 646 l = l/3600.0
647 ra = numpy.arctan2((numpy.sin(l*Misc_Routines.CoFactors.d2r)*numpy.cos(oblt*Misc_Routines.CoFactors.d2r)),numpy.cos(l*Misc_Routines.CoFactors.d2r))
647 ra = numpy.arctan2((numpy.sin(l*CoFactors.d2r)*numpy.cos(oblt*CoFactors.d2r)),numpy.cos(l*CoFactors.d2r))
648 648
649 649 neg = numpy.where(ra < 0.0)
650 650 if neg[0].size > 0: ra[neg] = ra[neg] + 2.0*numpy.pi
651 651
652 dec = numpy.arcsin(numpy.sin(l*Misc_Routines.CoFactors.d2r)*numpy.sin(oblt*Misc_Routines.CoFactors.d2r))
652 dec = numpy.arcsin(numpy.sin(l*CoFactors.d2r)*numpy.sin(oblt*CoFactors.d2r))
653 653
654 654 if rad==1:
655 oblt = oblt*Misc_Routines.CoFactors.d2r
656 longmed = longmed*Misc_Routines.CoFactors.d2r
655 oblt = oblt*CoFactors.d2r
656 longmed = longmed*CoFactors.d2r
657 657 else:
658 ra = ra/Misc_Routines.CoFactors.d2r
659 dec = dec/Misc_Routines.CoFactors.d2r
658 ra = ra/CoFactors.d2r
659 dec = dec/CoFactors.d2r
660 660
661 661 return ra, dec, longmed, oblt
662 662
@@ -754,30 +754,30 class CelestialBodies(EquatorialCorrections):
754 754 lprimed = numpy.poly1d(coeff0)
755 755 lprimed = lprimed(t)
756 756 lprimed = self.cirrange(lprimed,rad=0)
757 lprime = lprimed*Misc_Routines.CoFactors.d2r
757 lprime = lprimed*CoFactors.d2r
758 758
759 759 # Mean elongation of the moon
760 760 coeff1 = numpy.array([-1./1.13065e8,1./545868.,-0.0018819,445267.1114034,297.8501921])
761 761 d = numpy.poly1d(coeff1)
762 d = d(t)*Misc_Routines.CoFactors.d2r
762 d = d(t)*CoFactors.d2r
763 763 d = self.cirrange(d,rad=1)
764 764
765 765 # Sun's mean anomaly
766 766 coeff2 = numpy.array([1.0/2.449e7,-0.0001536,35999.0502909,357.5291092])
767 767 M = numpy.poly1d(coeff2)
768 M = M(t)*Misc_Routines.CoFactors.d2r
768 M = M(t)*CoFactors.d2r
769 769 M = self.cirrange(M,rad=1)
770 770
771 771 # Moon's mean anomaly
772 772 coeff3 = numpy.array([-1.0/1.4712e7,1.0/6.9699e4,0.0087414,477198.8675055,134.9633964])
773 773 Mprime = numpy.poly1d(coeff3)
774 Mprime = Mprime(t)*Misc_Routines.CoFactors.d2r
774 Mprime = Mprime(t)*CoFactors.d2r
775 775 Mprime = self.cirrange(Mprime,rad=1)
776 776
777 777 # Moon's argument of latitude
778 778 coeff4 = numpy.array([1.0/8.6331e8,-1.0/3.526e7,-0.0036539,483202.0175233,93.2720950])
779 779 F = numpy.poly1d(coeff4)
780 F = F(t)*Misc_Routines.CoFactors.d2r
780 F = F(t)*CoFactors.d2r
781 781 F = self.cirrange(F,rad=1)
782 782
783 783 # Eccentricity of Earth's orbit around the sun
@@ -790,9 +790,9 class CelestialBodies(EquatorialCorrections):
790 790 ecorr4 = numpy.where((numpy.abs(m_lat))==2)
791 791
792 792 # Additional arguments.
793 A1 = (119.75 + 131.849*t)*Misc_Routines.CoFactors.d2r
794 A2 = (53.09 + 479264.290*t)*Misc_Routines.CoFactors.d2r
795 A3 = (313.45 + 481266.484*t)*Misc_Routines.CoFactors.d2r
793 A1 = (119.75 + 131.849*t)*CoFactors.d2r
794 A2 = (53.09 + 479264.290*t)*CoFactors.d2r
795 A3 = (313.45 + 481266.484*t)*CoFactors.d2r
796 796 suml_add = 3958.*numpy.sin(A1) + 1962.*numpy.sin(lprime - F) + 318*numpy.sin(A2)
797 797 sumb_add = -2235.*numpy.sin(lprime) + 382.*numpy.sin(A3) + 175.*numpy.sin(A1-F) + \
798 798 175.*numpy.sin(A1 + F) + 127.*numpy.sin(lprime - Mprime) - 115.*numpy.sin(lprime + Mprime)
@@ -823,8 +823,8 class CelestialBodies(EquatorialCorrections):
823 823 [nlon, elon] = self.nutate(jd)
824 824 geolon = geolon + nlon/3.6e3
825 825 geolon = self.cirrange(geolon,rad=0)
826 lamb = geolon*Misc_Routines.CoFactors.d2r
827 beta = geolat*Misc_Routines.CoFactors.d2r
826 lamb = geolon*CoFactors.d2r
827 beta = geolat*CoFactors.d2r
828 828
829 829 # Find mean obliquity and convert lamb, beta to RA, Dec
830 830 c = numpy.array([2.45,5.79,27.87,7.12,-39.05,-249.67,-51.38,1999.25,-1.55,-4680.93, \
@@ -832,7 +832,7 class CelestialBodies(EquatorialCorrections):
832 832 junk = numpy.poly1d(c);
833 833 epsilon = 23. + (26./60.) + (junk(t/1.e2)/3600.)
834 834 # True obliquity in radians
835 eps = (epsilon + elon/3600. )*Misc_Routines.CoFactors.d2r
835 eps = (epsilon + elon/3600. )*CoFactors.d2r
836 836
837 837 ra = numpy.arctan2(numpy.sin(lamb)*numpy.cos(eps)-numpy.tan(beta)*numpy.sin(eps),numpy.cos(lamb))
838 838 ra = self.cirrange(ra,rad=1)
@@ -843,8 +843,8 class CelestialBodies(EquatorialCorrections):
843 843 geolon = lamb
844 844 geolat = beta
845 845 else:
846 ra = ra/Misc_Routines.CoFactors.d2r
847 dec = dec/Misc_Routines.CoFactors.d2r
846 ra = ra/CoFactors.d2r
847 dec = dec/CoFactors.d2r
848 848
849 849 return ra, dec, dist, geolon, geolat
850 850
@@ -962,11 +962,11 class CelestialBodies(EquatorialCorrections):
962 962 """
963 963
964 964 # Defining date to compute SkyNoise.
965 [year, month, dom, hour, mis, secs] = TimeTools.Julian(jd).change2time()
965 [year, month, dom, hour, mis, secs] = Julian(jd).change2time()
966 966 is_dom = (month==9) & (dom==21)
967 967 if is_dom:
968 968 tmp = jd
969 jd = TimeTools.Time(year,9,22).change2julian()
969 jd = Time(year,9,22).change2julian()
970 970 dom = 22
971 971
972 972 # Reading SkyNoise
@@ -990,9 +990,9 class CelestialBodies(EquatorialCorrections):
990 990 hour = numpy.array([0,23]);
991 991 mins = numpy.array([0,59]);
992 992 secs = numpy.array([0,59]);
993 LTrange = TimeTools.Time(year,month,dom,hour,mins,secs).change2julday()
993 LTrange = Time(year,month,dom,hour,mins,secs).change2julday()
994 994 LTtime = LTrange[0] + numpy.arange(1440)*((LTrange[1] - LTrange[0])/(1440.-1))
995 lst = TimeTools.Julian(LTtime + (-3600.*ut/86400.)).change2lst()
995 lst = Julian(LTtime + (-3600.*ut/86400.)).change2lst()
996 996
997 997 ipowr = lst*0.0
998 998 # Interpolating using scipy (inside max and min "x")
@@ -1098,8 +1098,8 class AltAz(EquatorialCorrections):
1098 1098 [dra1,ddec1,eps,d_psi,d_eps] = self.co_nutate(self.jd,ra_tmp, dec_tmp)
1099 1099
1100 1100 # Getting local mean sidereal time (lmst)
1101 lmst = TimeTools.Julian(self.jd[0]).change2lst()
1102 lmst = lmst*Misc_Routines.CoFactors.h2d
1101 lmst = Julian(self.jd[0]).change2lst()
1102 lmst = lmst*CoFactors.h2d
1103 1103 # Getting local apparent sidereal time (last)
1104 1104 last = lmst + d_psi*numpy.cos(eps)/3600.
1105 1105
@@ -1165,16 +1165,16 class AltAz(EquatorialCorrections):
1165 1165 Converted to Python by Freddy R. Galindo, ROJ, 26 September 2009.
1166 1166 """
1167 1167
1168 alt_r = numpy.atleast_1d(self.alt*Misc_Routines.CoFactors.d2r)
1169 az_r = numpy.atleast_1d(self.az*Misc_Routines.CoFactors.d2r)
1170 lat_r = numpy.atleast_1d(self.lat*Misc_Routines.CoFactors.d2r)
1168 alt_r = numpy.atleast_1d(self.alt*CoFactors.d2r)
1169 az_r = numpy.atleast_1d(self.az*CoFactors.d2r)
1170 lat_r = numpy.atleast_1d(self.lat*CoFactors.d2r)
1171 1171
1172 1172 # Find local hour angle (in degrees, from 0 to 360.)
1173 1173 y_ha = -1*numpy.sin(az_r)*numpy.cos(alt_r)
1174 1174 x_ha = -1*numpy.cos(az_r)*numpy.sin(lat_r)*numpy.cos(alt_r) + numpy.sin(alt_r)*numpy.cos(lat_r)
1175 1175
1176 1176 ha = numpy.arctan2(y_ha,x_ha)
1177 ha = ha/Misc_Routines.CoFactors.d2r
1177 ha = ha/CoFactors.d2r
1178 1178
1179 1179 w = numpy.where(ha<0.)
1180 1180 if w[0].size>0:ha[w] = ha[w] + 360.
@@ -1182,7 +1182,7 class AltAz(EquatorialCorrections):
1182 1182
1183 1183 # Find declination (positive if north of celestial equatorial, negative if south)
1184 1184 sindec = numpy.sin(lat_r)*numpy.sin(alt_r) + numpy.cos(lat_r)*numpy.cos(alt_r)*numpy.cos(az_r)
1185 dec = numpy.arcsin(sindec)/Misc_Routines.CoFactors.d2r
1185 dec = numpy.arcsin(sindec)/CoFactors.d2r
1186 1186
1187 1187 return ha, dec
1188 1188
@@ -1289,9 +1289,9 class Equatorial(EquatorialCorrections):
1289 1289 dec = dec + (ddec1*self.nutate_ + ddec2*self.aberration_)/3600.
1290 1290
1291 1291 # Getting local mean sidereal time (lmst)
1292 lmst = TimeTools.Julian(self.jd).change2lst()
1292 lmst = Julian(self.jd).change2lst()
1293 1293
1294 lmst = lmst*Misc_Routines.CoFactors.h2d
1294 lmst = lmst*CoFactors.h2d
1295 1295 # Getting local apparent sidereal time (last)
1296 1296 last = lmst + d_psi*numpy.cos(eps)/3600.
1297 1297
@@ -1327,17 +1327,17 class Equatorial(EquatorialCorrections):
1327 1327 Converted to Python by Freddy R. Galindo, ROJ, 26 September 2009.
1328 1328 """
1329 1329
1330 sh = numpy.sin(ha*Misc_Routines.CoFactors.d2r) ; ch = numpy.cos(ha*Misc_Routines.CoFactors.d2r)
1331 sd = numpy.sin(dec*Misc_Routines.CoFactors.d2r) ; cd = numpy.cos(dec*Misc_Routines.CoFactors.d2r)
1332 sl = numpy.sin(self.lat*Misc_Routines.CoFactors.d2r) ; cl = numpy.cos(self.lat*Misc_Routines.CoFactors.d2r)
1330 sh = numpy.sin(ha*CoFactors.d2r) ; ch = numpy.cos(ha*CoFactors.d2r)
1331 sd = numpy.sin(dec*CoFactors.d2r) ; cd = numpy.cos(dec*CoFactors.d2r)
1332 sl = numpy.sin(self.lat*CoFactors.d2r) ; cl = numpy.cos(self.lat*CoFactors.d2r)
1333 1333
1334 1334 x = -1*ch*cd*sl + sd*cl
1335 1335 y = -1*sh*cd
1336 1336 z = ch*cd*cl + sd*sl
1337 1337 r = numpy.sqrt(x**2. + y**2.)
1338 1338
1339 az = numpy.arctan2(y,x)/Misc_Routines.CoFactors.d2r
1340 alt = numpy.arctan2(z,r)/Misc_Routines.CoFactors.d2r
1339 az = numpy.arctan2(y,x)/CoFactors.d2r
1340 alt = numpy.arctan2(z,r)/CoFactors.d2r
1341 1341
1342 1342 # correct for negative az.
1343 1343 w = numpy.where(az<0.)
@@ -1396,7 +1396,7 class Geodetic():
1396 1396 Converted to Python by Freddy R. Galindo, ROJ, 02 October 2009.
1397 1397 """
1398 1398
1399 gdl = self.lat*Misc_Routines.CoFactors.d2r
1399 gdl = self.lat*CoFactors.d2r
1400 1400 slat = numpy.sin(gdl)
1401 1401 clat = numpy.cos(gdl)
1402 1402 slat2 = slat**2.
@@ -1414,6 +1414,6 class Geodetic():
1414 1414 y = rgeoid*sbet + self.alt*slat
1415 1415
1416 1416 gcalt = numpy.sqrt(x**2. + y**2.)
1417 gclat = numpy.arctan2(y,x)/Misc_Routines.CoFactors.d2r
1417 gclat = numpy.arctan2(y,x)/CoFactors.d2r
1418 1418
1419 1419 return gclat, gcalt
@@ -32,11 +32,10 import matplotlib.pyplot
32 32 #import scipy
33 33 import scipy.interpolate
34 34
35 import Astro_Coords
36 import TimeTools
37 import Graphics_Miscens
38
39 import Misc_Routines
35 from .Astro_Coords import Equatorial , CelestialBodies
36 from .TimeTools import Time , Julian
37 from .Graphics_Miscens import ColorTable
38 from .Misc_Routines import CoFactors,Vector
40 39
41 40 class AntPatternPlot:
42 41 def __init__(self):
@@ -79,8 +78,8 class AntPatternPlot:
79 78
80 79 levels = numpy.array([1e-3,1e-2,1e-1,0.5,1.0])
81 80 tmp = numpy.round(10*numpy.log10(levels),decimals=1)
82 labels = range(5)
83 for i in numpy.arange(5):labels[i] = str(numpy.int(tmp[i]))
81 labels = []
82 for i in numpy.arange(5):labels.append(str(numpy.int(tmp[i])))
84 83
85 84
86 85 colors = ((0,0,1.),(0,170/255.,0),(127/255.,1.,0),(1.,109/255.,0),(128/255.,0,0))
@@ -156,11 +155,11 class AntPatternPlot:
156 155 dec_axes = numpy.dot(ones_ra,dec_axes.transpose())
157 156 dec_axes2 = numpy.array(dec_axes)
158 157
159 ObjHor = Astro_Coords.Equatorial(ha_axes2,dec_axes2,jd)
158 ObjHor = Equatorial(ha_axes2,dec_axes2,jd)
160 159 [alt,az,ha] = ObjHor.change2AltAz()
161 160
162 z = numpy.transpose(alt)*Misc_Routines.CoFactors.d2r ; z = z.flatten()
163 az = numpy.transpose(az)*Misc_Routines.CoFactors.d2r ; az = az.flatten()
161 z = numpy.transpose(alt)*CoFactors.d2r ; z = z.flatten()
162 az = numpy.transpose(az)*CoFactors.d2r ; az = az.flatten()
164 163
165 164 vect = numpy.array([numpy.cos(z)*numpy.sin(az),numpy.cos(z)*numpy.cos(az),numpy.sin(z)])
166 165
@@ -400,11 +399,11 class CelestialObjectsPlot:
400 399 marker = ['--^','--s','--*','--o']
401 400
402 401 # Getting RGB table to plot celestial object over Jicamarca
403 colortable = Graphics_Miscens.ColorTable(table=1).readTable()
402 colortable = ColorTable(table=1).readTable()
404 403
405 404 for io in (numpy.arange(4)+1):
406 405 if self.show_object[io]!=0:
407 ObjBodies = Astro_Coords.CelestialBodies()
406 ObjBodies = CelestialBodies()
408 407 if io==1:
409 408 [ra,dec,sunlon,sunobliq] = ObjBodies.sunpos(jd)
410 409 elif io==2:
@@ -416,10 +415,10 class CelestialObjectsPlot:
416 415 ra = maxra*15.
417 416 dec = main_dec
418 417
419 ObjEq = Astro_Coords.Equatorial(ra,dec,jd,lat=glat,lon=glon)
418 ObjEq = Equatorial(ra,dec,jd,lat=glat,lon=glon)
420 419 [alt, az, ha] = ObjEq.change2AltAz()
421 420 vect = numpy.array([az,alt]).transpose()
422 vect = Misc_Routines.Vector(vect,direction=0).Polar2Rect()
421 vect = Vector(vect,direction=0).Polar2Rect()
423 422
424 423 dcosx = numpy.array(numpy.dot(vect,xg))
425 424 dcosy = numpy.array(numpy.dot(vect,yg))
@@ -12,7 +12,7 Created by Ing. Freddy Galindo (frederickgalindo@gmail.com). ROJ, 21 October 200
12 12 import numpy
13 13 import sys
14 14
15 class CoFactors():
15 class CoFactors(object):
16 16 """
17 17 CoFactor class used to call pre-defined conversion factor (e.g. degree to radian). The cu-
18 18 The current available factor are:
@@ -28,14 +28,14 class CoFactors():
28 28 h2r = numpy.pi/12.
29 29 h2d = 15.
30 30
31 class Redirect:
32 def __init__(self,stdout):
31 class Redirect(object):
32 def __init__(self,stdout=None):
33 33 self.stdout = stdout
34 34
35 35 def write(self,message):
36 36 self.stdout.insertPlainText(message)
37 37
38 class WidgetPrint:
38 class WidgetPrint(object):
39 39 """
40 40 WidgetPrint class allows to define the standard output.
41 41 """
@@ -49,11 +49,11 class WidgetPrint:
49 49 if self.textid != None: sys.stdout = Redirect(self.textid)
50 50 print ("")
51 51
52 class Vector:
52 class Vector(object):
53 53 """
54 54 direction = 0 Polar to rectangular; direction=1 rectangular to polar
55 55 """
56 def __init__(self,vect,direction=0):
56 def __init__(self,vect=numpy.array([]),direction=0):
57 57 nsize = numpy.size(vect)
58 58 if nsize <= 3:
59 59 vect = vect.reshape(1,nsize)
@@ -77,5 +77,10 class Vector:
77 77
78 78 return mm
79 79
80
81
80 if __name__ == "__main__":
81
82 a=CoFactors()
83 a=Redirect()
84 a=WidgetPrint()
85 a=WidgetPrint()
86 a=Vector()
@@ -27,7 +27,7 class OverJRO(Files):
27 27 def saveFile(self, contentFile):
28 28 filename = self.setFilename()
29 29 finalpath = os.path.join(self.path, self.setFileExtension(filename))
30 print "HAHAH"
30 print ("HAHAH")
31 31 finalpath = "apps/abs/static/data/"+finalpath
32 32 self.save(finalpath, contentFile)
33 33 return finalpath
@@ -1,23 +1,28
1 1 #!/usr/bin/python
2
3
4 2 import sys, os, os.path
5 3 import traceback
6 import cgi, Cookie
4 import cgi
5 from http import cookies
6
7 7 import time, datetime
8 8 import types
9 9 import numpy
10 10 import numpy.fft
11 11 import scipy.linalg
12 12 import scipy.special
13 from StringIO import StringIO
14 #import Numeric
13 from io import StringIO
15 14
16 import Misc_Routines
17 import TimeTools
18 import JroAntSetup
19 import Graphics_OverJro
20 import Astro_Coords
15
16 #import Misc_Routines
17 from .Misc_Routines import CoFactors
18 #import TimeTools
19 from .TimeTools import Time , Julian ,Doy2Date
20 #import JroAntSetup
21 from .JroAntSetup import ReturnSetup
22 #import Graphics_OverJro
23 from .Graphics_OverJro import AntPatternPlot ,BFieldPlot,CelestialObjectsPlot,PatternCutPlot,SkyNoisePlot
24 #import Astro_Coords
25 from .Astro_Coords import Geodetic ,AltAz ,CelestialBodies
21 26
22 27 class JroPattern():
23 28 def __init__(self,pattern=0,path=None,filename=None,nptsx=101,nptsy=101,maxphi=5,fftopt=0, \
@@ -62,7 +67,7 class JroPattern():
62 67
63 68 # Getting antenna configuration.
64 69 if filename:
65 setup = JroAntSetup.ReturnSetup(path=path,filename=filename,pattern=pattern)
70 setup = ReturnSetup(path=path,filename=filename,pattern=pattern)
66 71
67 72 ues = setup["ues"]
68 73 phase = setup["phase"]
@@ -98,7 +103,7 class JroPattern():
98 103 # To get a cut of the pattern.
99 104 self.getcut = getcut
100 105
101 maxdcos = numpy.sin(maxphi*Misc_Routines.CoFactors.d2r)
106 maxdcos = numpy.sin(maxphi*CoFactors.d2r)
102 107 if dcosx==None:dcosx = ((numpy.arange(nptsx,dtype=float)/(nptsx-1))-0.5)*2*maxdcos
103 108 if dcosy==None:dcosy = ((numpy.arange(nptsy,dtype=float)/(nptsy-1))-0.5)*2*maxdcos
104 109 self.dcosx = dcosx
@@ -283,7 +288,7 class JroPattern():
283 288 fft_phase[ix1:ix1+ndx-1,iy1:iy1+ndy-1] = phase[ix,ny-1-iy]
284 289
285 290
286 fft_phase = fft_phase*Misc_Routines.CoFactors.d2r
291 fft_phase = fft_phase*CoFactors.d2r
287 292
288 293 pattern = numpy.abs(numpy.fft.fft2(fft_gain*numpy.exp(numpy.complex(0,1)*fft_phase)))**2
289 294 pattern = numpy.fft.fftshift(pattern)
@@ -310,16 +315,33 class JroPattern():
310 315 Converted to Python by Freddy R. Galindo, ROJ, 20 September 2009.
311 316 """
312 317
313 attenuation = None
314 # foldr = sys.path[-1] + os.sep + "resource" + os.sep
315 base_path = os.path.dirname(os.path.abspath(__file__))
316 #foldr = './resource'
317 #filen = "attenuation.txt"
318 attenuationFile = os.path.join(base_path,"resource","attenuation.txt")
319 #ff = open(os.path.join(foldr,filen),'r')
320 ff = open(attenuationFile,'r')
321 exec(ff.read())
322 ff.close()
318 # attenuation = None
319 # # foldr = sys.path[-1] + os.sep + "resource" + os.sep
320 # base_path = os.path.dirname(os.path.abspath(__file__))
321 # #foldr = './resource'
322 # #filen = "attenuation.txt"
323 # attenuationFile = os.path.join(base_path,"resource","attenuation.txt")
324 # #ff = open(os.path.join(foldr,filen),'r')
325 # ff = open(attenuationFile,'r')
326 # print(ff.read())
327 # exec(ff.read())
328 # ff.close()
329 attenuation = numpy.array([[[-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
330 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
331 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
332 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
333 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
334 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
335 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
336 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25]],
337 [[21.25,21.25,21.25,21.25,21.25,21.25,21.25,21.25],
338 [15.25,15.25,15.25,15.25,15.25,15.25,15.25,15.25],
339 [09.25,09.25,09.25,09.25,09.25,09.25,09.25,09.25],
340 [03.25,03.25,03.25,03.25,03.25,03.25,03.25,03.25],
341 [-03.25,-03.25,-03.25,-03.25,-03.25,-03.25,-03.25,-03.25],
342 [-09.25,-09.25,-09.25,-09.25,-09.25,-09.25,-09.25,-09.25],
343 [-15.25,-15.25,-15.25,-15.25,-15.25,-15.25,-15.25,-15.25],
344 [-21.25,-21.25,-21.25,-21.25,-21.25,-21.25,-21.25,-21.25]]])
323 345
324 346 return attenuation
325 347
@@ -396,11 +418,11 class JroPattern():
396 418 Converted to Python by Freddy R. Galindo, ROJ, 20 September 2009.
397 419 """
398 420
399 pos = self.eomwl*self.__readAttenuation()
421 pos = self.eomwl*self.__readAttenuation()
400 422 posx = pos[0,:,:]
401 423 posy = pos[1,:,:]
402 424
403 phase = phase*Misc_Routines.CoFactors.d2r
425 phase = phase*CoFactors.d2r
404 426 module = numpy.zeros((self.nx,self.ny),dtype=complex)
405 427 for iy in range(self.ny):
406 428 for ix in range(self.nx):
@@ -452,8 +474,8 class JroPattern():
452 474 # Tranforming from indexes to axis' values
453 475 xcenter = xx1[0] + (((xx1[xx1.size-1] - xx1[0])/(xx1.size -1))*(params[1]))
454 476 ycenter = yy1[0] + (((yy1[yy1.size-1] - yy1[0])/(yy1.size -1))*(params[2]))
455 xwidth = ((xx1[xx1.size-1] - xx1[0])/(xx1.size-1))*(params[3])*(1/Misc_Routines.CoFactors.d2r)
456 ywidth = ((yy1[yy1.size-1] - yy1[0])/(yy1.size-1))*(params[4])*(1/Misc_Routines.CoFactors.d2r)
477 xwidth = ((xx1[xx1.size-1] - xx1[0])/(xx1.size-1))*(params[3])*(1/CoFactors.d2r)
478 ywidth = ((yy1[yy1.size-1] - yy1[0])/(yy1.size-1))*(params[4])*(1/CoFactors.d2r)
457 479 meanwx = (xwidth*ywidth)
458 480 meanpos = numpy.array([xcenter,ycenter])
459 481
@@ -1057,14 +1079,14 class overJroShow:
1057 1079 self.path = self.madForm.getvalue('path') #path donde se encuentra el archivo: patron de radiacion del usuario
1058 1080
1059 1081 else:
1060 print "Content-Type: text/html\n"
1061 print '<h3> This cgi plot script was called without the proper arguments.</h3>'
1062 print '<p> This is a script used to plot Antenna Cuts over Jicamarca Antenna</p>'
1063 print '<p> Required arguments:</p>'
1064 print '<p> pattern - chekbox indicating objects over jicamarca antenna</p>'
1065 print '<p> or'
1066 print '<p> filename - The pattern defined by users is a file text'
1067 print '<p> path - folder with pattern files'
1082 print ("Content-Type: text/html\n")
1083 print ('<h3> This cgi plot script was called without the proper arguments.</h3>')
1084 print ('<p> This is a script used to plot Antenna Cuts over Jicamarca Antenna</p>')
1085 print ('<p> Required arguments:</p>')
1086 print ('<p> pattern - chekbox indicating objects over jicamarca antenna</p>')
1087 print ('<p> or')
1088 print ('<p> filename - The pattern defined by users is a file text')
1089 print ('<p> path - folder with pattern files')
1068 1090 sys.exit(0)
1069 1091
1070 1092
@@ -1094,12 +1116,12 class overJroShow:
1094 1116 if self.showType == 1:
1095 1117 if numpy.sum(self.objects) == 0:
1096 1118 if self.scriptHeaders == 0:
1097 print "Content-Type: text/html\n"
1098 print '<h3> This cgi plot script was called without the proper arguments.</h3>'
1099 print '<p> This is a script used to plot Antenna Cuts over Jicamarca Antenna</p>'
1100 print '<p> Required arguments:</p>'
1101 print '<p> objects - chekbox indicating objects over jicamarca antenna</p>'
1102 print '<p> Please, options in "Select Object" must be checked'
1119 print ("Content-Type: text/html\n")
1120 print ('<h3> This cgi plot script was called without the proper arguments.</h3>')
1121 print ('<p> This is a script used to plot Antenna Cuts over Jicamarca Antenna</p>')
1122 print ('<p> Required arguments:</p>')
1123 print ('<p> objects - chekbox indicating objects over jicamarca antenna</p>')
1124 print ('<p> Please, options in "Select Object" must be checked')
1103 1125 sys.exit(0)
1104 1126
1105 1127 #considerar para futura implementacion
@@ -1112,19 +1134,19 class overJroShow:
1112 1134
1113 1135 else:
1114 1136 if self.scriptHeaders == 0:
1115 print "Content-Type: text/html\n"
1116
1117 print '<h3> This cgi plot script was called without the proper arguments.</h3>'
1118 print '<p> This is a script used to plot Pattern Field and Celestial Objects over Jicamarca Antenna</p>'
1119 print '<p> Required arguments:</p>'
1120 print '<p> year - year of event</p>'
1121 print '<p> month - month of event</p>'
1122 print '<p> dom - day of month</p>'
1123 print '<p> pattern - pattern is defined by "Select an Experiment" list box</p>'
1124 print '<p> maxphi - maxphi is defined by "Max Angle" text box</p>'
1125 print '<p> objects - objects is a list defined by checkbox in "Select Object"</p>'
1126 print '<p> heights - heights is defined by "Heights" text box, for default heights=[100,500,1000]</p>'
1127 print '<p> showType - showType is a hidden element for show plot of Pattern&Object or Antenna Cuts or Sky Noise</p>'
1137 print ("Content-Type: text/html\n")
1138
1139 print ('<h3> This cgi plot script was called without the proper arguments.</h3>')
1140 print ('<p> This is a script used to plot Pattern Field and Celestial Objects over Jicamarca Antenna</p>')
1141 print ('<p> Required arguments:</p>')
1142 print ('<p> year - year of event</p>')
1143 print ('<p> month - month of event</p>')
1144 print ('<p> dom - day of month</p>')
1145 print ('<p> pattern - pattern is defined by "Select an Experiment" list box</p>')
1146 print ('<p> maxphi - maxphi is defined by "Max Angle" text box</p>')
1147 print ('<p> objects - objects is a list defined by checkbox in "Select Object"</p>')
1148 print ('<p> heights - heights is defined by "Heights" text box, for default heights=[100,500,1000]</p>')
1149 print ('<p> showType - showType is a hidden element for show plot of Pattern&Object or Antenna Cuts or Sky Noise</p>')
1128 1150
1129 1151 sys.exit(0)
1130 1152
@@ -1139,13 +1161,13 class overJroShow:
1139 1161
1140 1162 else:
1141 1163 if self.scriptHeaders == 0:
1142 print "Content-Type: text/html\n"
1143 print '<h3> This cgi plot script was called without the proper arguments.</h3>'
1144 print '<p> This is a script used to plot Sky Noise over Jicamarca Antenna</p>'
1145 print '<p> Required arguments:</p>'
1146 print '<p> year - year of event</p>'
1147 print '<p> month - month of event</p>'
1148 print '<p> dom - day of month</p>'
1164 print ("Content-Type: text/html\n")
1165 print ('<h3> This cgi plot script was called without the proper arguments.</h3>')
1166 print ('<p> This is a script used to plot Sky Noise over Jicamarca Antenna</p>')
1167 print ('<p> Required arguments:</p>')
1168 print ('<p> year - year of event</p>')
1169 print ('<p> month - month of event</p>')
1170 print ('<p> dom - day of month</p>')
1149 1171
1150 1172 sys.exit(0)
1151 1173
@@ -1193,11 +1215,11 class overJroShow:
1193 1215 self.glon = -76.874383
1194 1216
1195 1217
1196 self.junkjd = TimeTools.Time(self.year,self.month,self.dom).change2julday()
1197 self.junklst = TimeTools.Julian(self.junkjd).change2lst(longitude=self.glon)
1218 self.junkjd = Time(self.year,self.month,self.dom).change2julday()
1219 self.junklst = Julian(self.junkjd).change2lst(longitude=self.glon)
1198 1220
1199 1221 # Finding RA of observatory for a specific date
1200 self.ra_obs = self.junklst*Misc_Routines.CoFactors.h2d
1222 self.ra_obs = self.junklst*CoFactors.h2d
1201 1223
1202 1224 def initParameters(self):
1203 1225
@@ -1211,9 +1233,9 class overJroShow:
1211 1233 # alfa = 1.46*Misc_Routines.CoFactors.d2r
1212 1234 # theta = 51.01*Misc_Routines.CoFactors.d2r
1213 1235
1214 alfa = 1.488312*Misc_Routines.CoFactors.d2r
1236 alfa = 1.488312*CoFactors.d2r
1215 1237 th = 6.166710 + 45.0
1216 theta = th*Misc_Routines.CoFactors.d2r
1238 theta = th*CoFactors.d2r
1217 1239
1218 1240 sina = numpy.sin(alfa)
1219 1241 cosa = numpy.cos(alfa)
@@ -1232,11 +1254,11 class overJroShow:
1232 1254
1233 1255 self.initParameters()
1234 1256 self.doy = datetime.datetime(date.year,date.month,date.day).timetuple().tm_yday
1235 self.junkjd = TimeTools.Time(self.year,self.month,self.dom).change2julday()
1236 self.junklst = TimeTools.Julian(self.junkjd).change2lst(longitude=self.glon)
1237 self.ra_obs = self.junklst*Misc_Routines.CoFactors.h2d
1257 self.junkjd = Time(self.year,self.month,self.dom).change2julday()
1258 self.junklst = Julian(self.junkjd).change2lst(longitude=self.glon)
1259 self.ra_obs = self.junklst*CoFactors.h2d
1238 1260
1239 date = TimeTools.Time(date.year,date.month,date.day).change2strdate(mode=2)
1261 date = Time(date.year,date.month,date.day).change2strdate(mode=2)
1240 1262
1241 1263 mesg = 'Over Jicamarca: ' + date[0]
1242 1264
@@ -1254,7 +1276,7 class overJroShow:
1254 1276 just_rx=just_rx
1255 1277 )
1256 1278
1257 dum = Graphics_OverJro.AntPatternPlot()
1279 dum = AntPatternPlot()
1258 1280
1259 1281 dum.contPattern(iplot=0,
1260 1282 gpath=self.path4plotname,
@@ -1317,7 +1339,7 class overJroShow:
1317 1339 # Plotting Contour Map
1318 1340
1319 1341 self.path4plotname = '/home/jespinoza/workspace/radarsys/trunk/webapp/apps/abs/static/images'
1320 dum = Graphics_OverJro.AntPatternPlot()
1342 dum = AntPatternPlot()
1321 1343 dum.contPattern(iplot=ii,
1322 1344 gpath=self.path4plotname,
1323 1345 filename=self.plotname0,
@@ -1342,13 +1364,13 class overJroShow:
1342 1364
1343 1365 [ra,dec,ha] = Astro_Coords.AltAz(vect_polar[1],vect_polar[0],self.junkjd).change2equatorial()
1344 1366
1345 print'Main beam position (HA(min), DEC(degrees)): %f %f'%(ha*4.,dec)
1367 print('Main beam position (HA(min), DEC(degrees)): %f %f')%(ha*4.,dec)
1346 1368
1347 1369 self.main_dec = dec
1348 1370
1349 1371 self.ptitle = title
1350 1372
1351 Graphics_OverJro.AntPatternPlot().plotRaDec(gpath=self.path4plotname,
1373 AntPatternPlot().plotRaDec(gpath=self.path4plotname,
1352 1374 filename=self.plotname0,
1353 1375 jd=self.junkjd,
1354 1376 ra_obs=self.ra_obs,
@@ -1377,7 +1399,7 class overJroShow:
1377 1399 # Plotting B field.
1378 1400 # print "Drawing magnetic field over Observatory"
1379 1401
1380 Obj = Graphics_OverJro.BFieldPlot()
1402 Obj = BFieldPlot()
1381 1403
1382 1404 Obj.plotBField(self.path4plotname,self.plotname0,dcos,alpha,nlon,nlat,self.dcosxrange,self.dcosyrange,ObjB.heights,ObjB.alpha_i)
1383 1405
@@ -1423,13 +1445,13 class overJroShow:
1423 1445
1424 1446 tod = numpy.arange(ntod)/ntod*24.
1425 1447
1426 [month,dom] = TimeTools.Doy2Date(self.year,self.doy).change2date()
1448 [month,dom] = Doy2Date(self.year,self.doy).change2date()
1427 1449
1428 jd = TimeTools.Time(self.year,month,dom,tod+self.UT).change2julday()
1450 jd = Time(self.year,month,dom,tod+self.UT).change2julday()
1429 1451
1430 1452 if numpy.sum(self.show_object[1:]>0)!=0:
1431 1453
1432 self.ObjC = Graphics_OverJro.CelestialObjectsPlot(jd,self.main_dec,tod,self.maxha_min,self.show_object)
1454 self.ObjC = CelestialObjectsPlot(jd,self.main_dec,tod,self.maxha_min,self.show_object)
1433 1455
1434 1456 self.ObjC.drawObject(self.glat,
1435 1457 self.glon,
@@ -1452,7 +1474,7 class overJroShow:
1452 1474 #Init ObjCut for PatternCutPlot()
1453 1475 view_objects = numpy.where(self.show_object>0)
1454 1476 subplots = len(view_objects[0])
1455 ObjCut = Graphics_OverJro.PatternCutPlot(subplots)
1477 ObjCut = PatternCutPlot(subplots)
1456 1478
1457 1479 for io in (numpy.arange(5)):
1458 1480 if self.show_object[io]==2:
@@ -1512,7 +1534,7 class overJroShow:
1512 1534 m_distance = 404114.6 # distance to the Earth in km
1513 1535 m_diameter = 1734.4 # diameter in km.
1514 1536 width_star = numpy.arctan(m_distance/m_diameter)
1515 width_star = width_star/2./Misc_Routines.CoFactors.d2r*4.
1537 width_star = width_star/2./CoFactors.d2r*4.
1516 1538 otitle = 'Moon cut'
1517 1539 # else:
1518 1540 # print "Moon is not passing over Observatory"
@@ -1544,7 +1566,7 class overJroShow:
1544 1566 mins = numpy.int32((time - hour)*60.)
1545 1567 secs = numpy.int32(((time - hour)*60. - mins)*60.)
1546 1568
1547 ObjT = TimeTools.Time(self.year,self.month,self.dom,hour,mins,secs)
1569 ObjT = Time(self.year,self.month,self.dom,hour,mins,secs)
1548 1570 subtitle = ObjT.change2strdate()
1549 1571
1550 1572 star_cut = numpy.exp(-(star_ha/width_star)**2./2.)
@@ -1585,46 +1607,45 class overJroShow:
1585 1607 month = self.month
1586 1608 year = self.year
1587 1609
1588 julian = TimeTools.Time(year,month,dom).change2julday()
1610 julian = Time(year,month,dom).change2julday()
1589 1611
1590 1612 [powr,time, lst] = Astro_Coords.CelestialBodies().skyNoise(julian)
1591 1613
1592 Graphics_OverJro.SkyNoisePlot([year,month,dom],powr,time,lst).getPlot(self.path4plotname,self.plotname2)
1614 SkyNoisePlot([year,month,dom],powr,time,lst).getPlot(self.path4plotname,self.plotname2)
1593 1615
1594 1616
1595 1617 def outputHead(self,title):
1596 print "Content-Type: text/html"
1597 print
1598 self.scriptHeaders = 1
1599 print '<html>'
1600 print '<head>'
1601 print '\t<title>' + title + '</title>'
1602 print '<style type="text/css">'
1603 print 'body'
1604 print '{'
1605 print 'background-color:#ffffff;'
1606 print '}'
1607 print 'h1'
1608 print '{'
1609 print 'color:black;'
1610 print 'font-size:18px;'
1611 print 'text-align:center;'
1612 print '}'
1613 print 'p'
1614 print '{'
1615 print 'font-family:"Arial";'
1616 print 'font-size:16px;'
1617 print 'color:black;'
1618 print '}'
1619 print '</style>'
1618 print ("Content-Type: text/html")
1619 print (self).scriptHeaders = 1
1620 print ('<html>')
1621 print ('<head>')
1622 print ('\t<title>' + title + '</title>')
1623 print ('<style type="text/css">')
1624 print ('body')
1625 print ('{')
1626 print ('background-color:#ffffff;')
1627 print ('}')
1628 print ('h1')
1629 print ('{')
1630 print ('color:black;')
1631 print ('font-size:18px;')
1632 print ('text-align:center;')
1633 print ('}')
1634 print ('p')
1635 print ('{')
1636 print ('font-family:"Arial";')
1637 print ('font-size:16px;')
1638 print ('color:black;')
1639 print ('}')
1640 print ('</style>')
1620 1641 # self.printJavaScript()
1621 print '</head>'
1642 print ('</head>')
1622 1643
1623 1644 def printJavaScript(self):
1624 1645 print
1625 1646
1626 1647 def printBody(self):
1627 print '<body>'
1648 print ('<body>')
1628 1649 # print '<h1>Test Input Parms</h1>'
1629 1650 # for key in self.madForm.keys():
1630 1651 # #print '<p> name=' + str(key)
@@ -1636,25 +1657,25 class overJroShow:
1636 1657 # print '<p> name=' + str(key) + \
1637 1658 # ' value=' + str(cgi.escape(self.madForm.getvalue(key))) + ''
1638 1659
1639 print '<form name="form1" method="post" target="showFrame">'
1640 print ' <div align="center">'
1641 print ' <table width=98% border="1" cellpadding="1">'
1642 print ' <tr>'
1643 print ' <td colspan="2" align="center">'
1660 print ('<form name="form1" method="post" target="showFrame">')
1661 print (' <div align="center">')
1662 print (' <table width=98% border="1" cellpadding="1">')
1663 print (' <tr>')
1664 print (' <td colspan="2" align="center">')
1644 1665 if self.showType == 0:
1645 print ' <IMG SRC="%s" BORDER="0" >'%(os.path.join(os.sep + self.__tmpDir,self.plotname0))
1666 print (' <IMG SRC="%s" BORDER="0" >')%(os.path.join(os.sep + self.__tmpDir,self.plotname0))
1646 1667 if self.showType == 1:
1647 print ' <IMG SRC="%s" BORDER="0" >'%(os.path.join(os.sep + self.__tmpDir,self.plotname1))
1668 print (' <IMG SRC="%s" BORDER="0" >')%(os.path.join(os.sep + self.__tmpDir,self.plotname1))
1648 1669 if self.showType == 2:
1649 print ' <IMG SRC="%s" BORDER="0" >'%(os.path.join(os.sep + self.__tmpDir,self.plotname2))
1650 print ' </td>'
1651 print ' </tr>'
1652 print ' </table>'
1653 print ' </div>'
1654 print '</form>'
1655
1656 print '</body>'
1657 print '</html>'
1670 print (' <IMG SRC="%s" BORDER="0" >')%(os.path.join(os.sep + self.__tmpDir,self.plotname2))
1671 print (' </td>')
1672 print (' </tr>')
1673 print (' </table>')
1674 print (' </div>')
1675 print ('</form>')
1676
1677 print ('</body>')
1678 print ('</html>')
1658 1679
1659 1680 #def execute(self, serverdocspath, tmpdir, currentdate, finalpath, showType=0, maxphi=5.0, objects="[1,1]", heights="[150,500,1000]"):
1660 1681 def setInputParameters(self, serverpath, currentdate, finalpath, showType=0, maxphi=5.0, objects="[1,1]", heights="[150,500,1000]"):
@@ -1,3 +1,4
1
1 2 attenuation = numpy.array([[[-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
2 3 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
3 4 [-21.25,-15.25,-9.25,-3.25,03.25,09.25,15.25,21.25],
@@ -4,7 +4,7 from django.shortcuts import redirect, render, get_object_or_404
4 4 from django.contrib import messages
5 5 from django.conf import settings
6 6 from django.http import HttpResponse
7 from django.core.urlresolvers import reverse
7 from django.urls import reverse
8 8 from django.views.decorators.csrf import csrf_exempt
9 9 from django.utils.safestring import mark_safe
10 10
@@ -20,7 +20,7 from .models import ABSConfiguration, ABSBeam
20 20 from .forms import ABSConfigurationForm, ABSBeamEditForm, ABSBeamAddForm, ABSImportForm
21 21
22 22 from .utils.overJroShow import overJroShow
23 from .utils.OverJRO import OverJRO
23 #from .utils.OverJRO import OverJRO
24 24 # Create your views here.
25 25 import json, ast
26 26
@@ -209,7 +209,7 def abs_conf_edit(request, id_conf):
209 209 def abs_conf_alert(request):
210 210
211 211 if request.method == 'POST':
212 print request.POST
212 print (request.POST)
213 213 return HttpResponse(json.dumps({'result':1}), content_type='application/json')
214 214 else:
215 215 return redirect('index')
@@ -251,7 +251,7 def send_beam(request, id_conf, id_beam):
251 251 conf = get_object_or_404(ABSConfiguration, pk=id_conf)
252 252
253 253 abs = Configuration.objects.filter(pk=conf.device.conf_active).first()
254 if abs<>conf:
254 if abs!=conf:
255 255 url = '#' if abs is None else abs.get_absolute_url()
256 256 label = 'None' if abs is None else abs.label
257 257 messages.warning(
@@ -277,7 +277,7 def send_beam(request, id_conf, id_beam):
277 277 else:
278 278 i += 1
279 279 beam_pos = i + 1 #Estandarizar
280 print '%s Position: %s' % (beam.name, str(beam_pos))
280 print ('%s Position: %s') % (beam.name, str(beam_pos))
281 281 conf.send_beam(beam_pos)
282 282
283 283 return redirect('url_abs_conf', conf.id)
@@ -322,7 +322,7 style = """<style>
322 322
323 323 class EditUpDataWidget(forms.widgets.TextInput):
324 324
325 def render(self, label, value, attrs=None):
325 def render(self, name, value, attrs=None, renderer=None):
326 326
327 327 try:
328 328 beam = attrs.get('beam', value)
@@ -794,7 +794,7 class EditUpDataWidget(forms.widgets.TextInput):
794 794
795 795 class EditDownDataWidget(forms.widgets.TextInput):
796 796
797 def render(self, label, value, attrs=None):
797 def render(self, name, value, attrs=None, renderer=None):
798 798
799 799 try:
800 800 beam = attrs.get('beam', value)
@@ -1247,7 +1247,7 class EditDownDataWidget(forms.widgets.TextInput):
1247 1247
1248 1248 class UpDataWidget(forms.widgets.TextInput):
1249 1249
1250 def render(self, label, value, attrs=None):
1250 def render(self, name, value, attrs=None, renderer=None):
1251 1251
1252 1252
1253 1253 html = '''
@@ -1639,17 +1639,19 class UpDataWidget(forms.widgets.TextInput):
1639 1639
1640 1640 <div id="id_ues_up" class="container">
1641 1641 <h5>Ues</h5>
1642 <div class="col-xs-2">
1643 <input name="ues_up1" value="0" class="form-control" id="input1" type="number" step="any">
1644 </div>
1645 <div class="col-xs-2">
1646 <input name="ues_up2" value="0" class="form-control" id="input2" type="number" step="any">
1647 </div>
1648 <div class="col-xs-2">
1649 <input name="ues_up3" value="0" class="form-control" id="input3" type="number" step="any">
1650 </div>
1651 <div class="col-xs-2">
1652 <input name="ues_up4" value="0" class="form-control" id="input4" type="number" step="any">
1642 <div class="row">
1643 <div class="col-xs-2">
1644 <input name="ues_up1" value="0" class="form-control" id="input1" type="number" step="any">
1645 </div>
1646 <div class="col-xs-2">
1647 <input name="ues_up2" value="0" class="form-control" id="input2" type="number" step="any">
1648 </div>
1649 <div class="col-xs-2">
1650 <input name="ues_up3" value="0" class="form-control" id="input3" type="number" step="any">
1651 </div>
1652 <div class="col-xs-2">
1653 <input name="ues_up4" value="0" class="form-control" id="input4" type="number" step="any">
1654 </div>
1653 1655 </div>
1654 1656 <div style="vertical-align:center; margin-top:20px;">
1655 1657 <label class="checkbox-inline"><input name="onlyrx" style="vertical-align:bottom" id="onlyrx_up" type="checkbox" value=1>Only RX</label>
@@ -1673,7 +1675,7 class UpDataWidget(forms.widgets.TextInput):
1673 1675
1674 1676 class DownDataWidget(forms.widgets.TextInput):
1675 1677
1676 def render(self, label, value, attrs=None):
1678 def render(self, name, value, attrs=None, renderer=None):
1677 1679
1678 1680 html = '''
1679 1681 <br>
@@ -1,5 +1,5
1 1 {% extends "base.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% block mainactive %}active{% endblock %}
4 4
5 5 {% block content-title %}SIR{% endblock %}
@@ -1,7 +1,8
1 from django.conf.urls import url
1 from django.urls import path
2 2 from django.contrib.auth import views as auth_views
3 3
4
4 5 urlpatterns = (
5 url(r'^logout/$', auth_views.logout, {'next_page': '/'}, name='url_logout'),
6 url(r'^login/$', auth_views.login, {'template_name': 'login.html'}, name='url_login'),
6 path('logout/', auth_views.LogoutView.as_view(next_page='/'), name='url_logout'),
7 path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='url_login'),
7 8 )
@@ -160,7 +160,7 class CGSConfiguration(Configuration):
160 160 post_data[data] = frequencies[data]
161 161
162 162 route = "http://" + str(ip) + ":" + str(port) + "/write/"
163 print post_data
163 print (post_data)
164 164 try:
165 165 r = requests.post(route, post_data, timeout=0.7)
166 166 except:
@@ -1,5 +1,5
1 1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load static %}
4 4 {% load main_tags %}
5 5
@@ -1,5 +1,5
1 1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load static %}
4 4 {% load main_tags %}
5 5
@@ -1,5 +1,5
1 1 {% extends "base.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% block mainactive %}active{% endblock %}
4 4
5 5 {% block content-title %}DEVICE CGS{% endblock %}
@@ -1,8 +1,8
1 from django.conf.urls import url
1 from django.urls import path
2 2
3 from apps.cgs import views
3 from . import views
4 4
5 5 urlpatterns = (
6 url(r'^(?P<id_conf>-?\d+)/$', views.cgs_conf, name='url_cgs_conf'),
7 url(r'^(?P<id_conf>-?\d+)/edit/$', views.cgs_conf_edit, name='url_edit_cgs_conf'),
6 path('<int:id_conf>/', views.cgs_conf, name='url_cgs_conf'),
7 path('<int:id_conf>/edit/', views.cgs_conf_edit, name='url_edit_cgs_conf'),
8 8 )
@@ -1,5 +1,5
1 1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load static %}
4 4 {% load main_tags %}
5 5
@@ -1,5 +1,5
1 1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
2 {% load bootstrap4 %}
3 3 {% load static %}
4 4 {% load main_tags %}
5 5
@@ -1,9 +1,9
1 from django.conf.urls import url
1 from django.urls import path
2 2
3 from apps.dds import views
3 from . import views
4 4
5 5 urlpatterns = (
6 url(r'^(?P<id_conf>-?\d+)/$', views.dds_conf, name='url_dds_conf'),
7 url(r'^(?P<id_conf>-?\d+)/(?P<message>-?\d+)/$', views.dds_conf, name='url_dds_conf'),
8 url(r'^(?P<id_conf>-?\d+)/edit/$', views.dds_conf_edit, name='url_edit_dds_conf'),
6 path('<int:id_conf>/', views.dds_conf, name='url_dds_conf'),
7 path('<int:id_conf>/<int:message>/', views.dds_conf, name='url_dds_conf'),
8 path('<int:id_conf>/edit/', views.dds_conf_edit, name='url_edit_dds_conf'),
9 9 )
@@ -3,7 +3,7 import requests
3 3
4 4 from django.db import models
5 5 from django.core.validators import MinValueValidator, MaxValueValidator
6 from django.core.urlresolvers import reverse
6 from django.urls import reverse
7 7
8 8 from apps.main.models import Configuration
9 9 from apps.main.utils import Params
@@ -4,7 +4,7
4 4 {% load main_tags %}
5 5
6 6 {% block extra-menu-actions %}
7 <li><a href="{{ dev_conf.get_absolute_url_log }}"><span class="glyphicon glyphicon-save-file" aria-hidden="true"></span>
7 <li><a href="{{ dev_conf.get_absolute_url_log }}"><span class="fas fa-save" aria-hidden="true"></span>
8 8 Get Log File</a></li>
9 9 {% endblock %}
10 10
@@ -1,13 +1,13
1 from django.conf.urls import url
1 from django.urls import path
2 2
3 from apps.jars import views
3 from . import views
4 4
5 5 urlpatterns = (
6 url(r'^(?P<id_conf>-?\d+)/$', views.jars_conf, name='url_jars_conf'),
7 url(r'^(?P<id_conf>-?\d+)/edit/$', views.jars_conf_edit, name='url_edit_jars_conf'),
8 url(r'^(?P<conf_id>-?\d+)/change_filter/$', views.change_filter, name='url_change_jars_filter'),
9 url(r'^(?P<conf_id>-?\d+)/change_filter/(?P<filter_id>-?\d+)/$', views.change_filter, name='url_change_jars_filter'),
10 url(r'^(?P<conf_id>-?\d+)/import/$', views.import_file, name='url_import_jars_conf'),
11 url(r'^(?P<conf_id>-?\d+)/read/$', views.read_conf, name='url_read_jars_conf'),
12 url(r'^(?P<conf_id>-?\d+)/get_log/$', views.get_log, name='url_get_jars_log'),
6 path('<int:id_conf>/', views.jars_conf, name='url_jars_conf'),
7 path('<int:id_conf>/edit/', views.jars_conf_edit, name='url_edit_jars_conf'),
8 path('<int:conf_id>/change_filter/', views.change_filter, name='url_change_jars_filter'),
9 path('<int:conf_id>/change_filter/<int:filter_id>/', views.change_filter, name='url_change_jars_filter'),
10 path('<int:conf_id>/import/', views.import_file, name='url_import_jars_conf'),
11 path('<int:conf_id>/read/', views.read_conf, name='url_read_jars_conf'),
12 path('<int:conf_id>/get_log/', views.get_log, name='url_get_jars_log'),
13 13 )
@@ -524,7 +524,7 def create_jarsfiles(json_data):
524 524 racp_text += 'Pulse selection_TR={}\n'.format(
525 525 data['lines']['byId'][idTR]['name'][-1]
526 526 )
527 print 'TR OK'
527 print ('TR OK')
528 528
529 529 rangeTXA = data['lines']['byId'][rc['lines'][1]]['params']['range']
530 530 if rangeTXA != '0':
@@ -532,7 +532,7 def create_jarsfiles(json_data):
532 532 rangeTXB = data['lines']['byId'][rc['lines'][2]]['params']['range']
533 533 if rangeTXB != '0': #if rangeTXB == '0':
534 534 racp_text += 'Pulse selection_TXB={}\n'.format(rangeTXB)
535 print 'Pulse selection OK'
535 print ('Pulse selection OK')
536 536
537 537 for n in range(3, 6):
538 538 racp_text += parse_line(n, data, rc['lines'])
@@ -543,7 +543,7 def create_jarsfiles(json_data):
543 543 racp_text += 'Number of Taus={}\n'.format(len(taus))
544 544 for n, tau in enumerate(taus):
545 545 racp_text += 'TAU({})={}\n'.format(n, tau)
546 print 'Taus OK'
546 print ('Taus OK')
547 547
548 548 racp_text += parse_line(6, data, rc['lines'])
549 549 racp_text += 'SAMPLING REFERENCE=MIDDLE OF FIRST SUB-BAUD\n'
@@ -564,7 +564,7 def create_jarsfiles(json_data):
564 564 racp_text += 'Number of Channels={}\n'.format(len(channels))
565 565 for i, channel in enumerate(channels):
566 566 racp_text += 'Channel({})={}\n'.format(i, channel)
567 print 'Channels OK'
567 print ('Channels OK')
568 568
569 569 if exp_type == 'EXP_RAW_DATA':
570 570 racp_text += 'RAW DATA DIRECTORY={}\n'.format(os.path.join(folder_name, 'DATA'))
@@ -616,7 +616,7 def create_jarsfiles(json_data):
616 616 racp_text += 'DATATYPE=SHORT\n'
617 617 elif data_type == 1:
618 618 racp_text += 'DATATYPE=FLOAT\n'
619 print 'Datatype OK'
619 print ('Datatype OK')
620 620
621 621 racp_text += 'DATA ARRANGE=CONTIGUOUS_CH\n'
622 622
@@ -631,7 +631,7 def create_jarsfiles(json_data):
631 631 if jars['post_coh_int'] == True:
632 632 decode_text += 'POST COHERENT INTEGRATIONS=YES\n'
633 633 decode_text += '------------------------------------------\n'
634 print 'Decode OK'
634 print ('Decode OK')
635 635
636 636 racp_text += 'COHERENT INTEGRATION STRIDE={}\n'.format(jars['cohe_integr_str'])
637 637 racp_text += '------------------------------------------\n'
@@ -672,7 +672,7 def create_jarsfiles(json_data):
672 672 filter_parms = eval(filter_parms)
673 673 if filter_parms.__class__.__name__ == 'str':
674 674 filter_parms = eval(filter_parms)
675 print 'Filter loaded OK'
675 print ('Filter loaded OK')
676 676 try:
677 677 fclock = float(filter_parms['clock'])
678 678 fch = float(filter_parms['fch'])
@@ -680,7 +680,7 def create_jarsfiles(json_data):
680 680 M_CIC2 = float(filter_parms['filter_2'])
681 681 M_CIC5 = float(filter_parms['filter_5'])
682 682 M_RCF = float(filter_parms['filter_fir'])
683 print 'Filter parameters float OK'
683 print ('Filter parameters float OK')
684 684 except:
685 685 fclock = eval(filter_parms['clock'])
686 686 fch = eval(filter_parms['fch'])
@@ -688,7 +688,7 def create_jarsfiles(json_data):
688 688 M_CIC2 = eval(filter_parms['filter_2'])
689 689 M_CIC5 = eval(filter_parms['filter_5'])
690 690 M_RCF = eval(filter_parms['filter_fir'])
691 print 'Filter parameters eval OK'
691 print ('Filter parameters eval OK')
692 692
693 693 filter_text = 'Loading\n'
694 694 filter_text += 'Impulse file found -> C:\jars\F1MHZ_8_MATCH.imp\n'
@@ -773,7 +773,7 def create_jarsfiles(json_data):
773 773 #jars_file = open(os.path.join(folder_name, filter_name), 'wb')
774 774 #jars_file.write(filter_text)
775 775 #jars_file.close()
776 print 'Filter .jars has been created'
776 print ('Filter .jars has been created')
777 777 racp_text += 'JARS_FILTER={}\n'.format(os.path.join(folder_name, filter_name))
778 778 racp_text += 'MARK WIDTH=2\n'
779 779 racp_text += 'GENERATE OWN SAMPLING WINDOW=NO\n'
@@ -127,4 +127,4
127 127 "model": "main.profile",
128 128 "pk": 1
129 129 }
130 ] No newline at end of file
130 ]
@@ -33,29 +33,31 def add_empty_choice(choices, pos=0, label='-----'):
33 33 return [(0, label)]
34 34
35 35 class DatepickerWidget(forms.widgets.TextInput):
36 def render(self, name, value, attrs=None):
36 def render(self, name, value, attrs=None, renderer=None):
37 37 input_html = super(DatepickerWidget, self).render(name, value, attrs)
38 html = '<div class="input-group date">'+input_html+'<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span></div>'
38
39 html = '<div class="input-group date">'+input_html+'<span class="input-group-addon"><i class="far fa-calendar-alt"></i></span></div>'
39 40 return mark_safe(html)
40 41
41 42 class DateRangepickerWidget(forms.widgets.TextInput):
42 def render(self, name, value, attrs=None):
43 def render(self, name, value, attrs=None, renderer=None):
43 44 start = attrs['start_date']
44 45 end = attrs['end_date']
45 46 html = '''<div class="col-md-6 input-group date" style="float:inherit">
46 47 <input class="form-control" id="id_start_date" name="start_date" placeholder="Start" title="" type="text" value="{}">
47 <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
48 <span class="input-group-addon"><i class="far fa-calendar-alt"></i></span>
48 49 </div>
49 50 <div class="col-md-6 input-group date" style="float:inherit">
50 51 <input class="form-control" id="id_end_date" name="end_date" placeholder="End" title="" type="text" value="{}">
51 <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
52 <span class="input-group-addon"><i class="far fa-calendar-alt"></i></span>
52 53 </div>'''.format(start, end)
53 54 return mark_safe(html)
54 55
55 56 class TimepickerWidget(forms.widgets.TextInput):
56 def render(self, name, value, attrs=None):
57 def render(self, name, value, attrs=None, renderer=None):
57 58 input_html = super(TimepickerWidget, self).render(name, value, attrs)
58 html = '<div class="input-group time">'+input_html+'<span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span></div>'
59
60 html = '<div class="input-group time">'+input_html+'<span class="input-group-addon"><i class="far fa-clock"></i></span></div>'
59 61 return mark_safe(html)
60 62
61 63 class CampaignForm(forms.ModelForm):
@@ -134,6 +136,9 class DownloadFileForm(forms.Form):
134 136 if device_type == 'dds':
135 137 self.fields['format'].choices = DDS_FILE_FORMAT
136 138
139 if device_type == 'dds_rest':
140 self.fields['format'].choices = DDS_FILE_FORMAT
141
137 142 if device_type == 'rc':
138 143 self.fields['format'].choices = RC_FILE_FORMAT
139 144
@@ -199,4 +204,3 class ChangeIpForm(forms.Form):
199 204 mask = forms.GenericIPAddressField(initial='255.255.255.0')
200 205 gateway = forms.GenericIPAddressField(initial='0.0.0.0')
201 206 dns = forms.GenericIPAddressField(initial='0.0.0.0')
202
@@ -12,7 +12,7 except:
12 12
13 13 from django.template.base import kwarg_re
14 14 from django.db import models
15 from django.core.urlresolvers import reverse
15 from django.urls import reverse
16 16 from django.core.validators import MinValueValidator, MaxValueValidator
17 17 from django.shortcuts import get_object_or_404
18 18 from django.contrib.auth.models import User
@@ -32,7 +32,8 DEV_PORTS = {
32 32 'jars' : 2000,
33 33 'usrp' : 2000,
34 34 'cgs' : 8080,
35 'abs' : 8080
35 'abs' : 8080,
36 'dds_rest': 80
36 37 }
37 38
38 39 RADAR_STATES = (
@@ -71,6 +72,7 DEV_TYPES = (
71 72 ('usrp', 'Universal Software Radio Peripheral'),
72 73 ('cgs', 'Clock Generator System'),
73 74 ('abs', 'Automatic Beam Switching'),
75 ('dds_rest', 'Direct Digital Synthesizer_REST'),
74 76 )
75 77
76 78 EXP_STATES = (
@@ -118,8 +120,8 class Location(models.Model):
118 120
119 121 class DeviceType(models.Model):
120 122
121 name = models.CharField(max_length = 10, choices = DEV_TYPES, default = 'rc')
122 sequence = models.PositiveSmallIntegerField(default=1000)
123 name = models.CharField(max_length = 10, choices = DEV_TYPES, default = 'dds_rest')
124 sequence = models.PositiveSmallIntegerField(default=55)
123 125 description = models.TextField(blank=True, null=True)
124 126
125 127 class Meta:
@@ -130,8 +132,8 class DeviceType(models.Model):
130 132
131 133 class Device(models.Model):
132 134
133 device_type = models.ForeignKey(DeviceType, on_delete=models.CASCADE)
134 location = models.ForeignKey(Location, on_delete=models.CASCADE)
135 device_type = models.ForeignKey('DeviceType', on_delete=models.CASCADE)
136 location = models.ForeignKey('Location', on_delete=models.CASCADE)
135 137 ip_address = models.GenericIPAddressField(protocol='IPv4', default='0.0.0.0')
136 138 port_address = models.PositiveSmallIntegerField(default=2000)
137 139 description = models.TextField(blank=True, null=True)
@@ -143,7 +145,7 class Device(models.Model):
143 145
144 146 def __str__(self):
145 147 ret = u'{} [{}]'.format(self.device_type.name.upper(), self.location.name)
146
148
147 149 return ret
148 150
149 151 @property
@@ -246,8 +248,8 class Campaign(models.Model):
246 248 tags = models.CharField(max_length=40, blank=True, null=True)
247 249 description = models.TextField(blank=True, null=True)
248 250 experiments = models.ManyToManyField('Experiment', blank=True)
249 author = models.ForeignKey(User, null=True, blank=True)
250
251 author = models.ForeignKey(User, null=True, blank=True,on_delete=models.CASCADE)
252
251 253 class Meta:
252 254 db_table = 'db_campaigns'
253 255 ordering = ('name',)
@@ -366,7 +368,7 class Experiment(models.Model):
366 368 end_time = models.TimeField(default='23:59:59')
367 369 task = models.CharField(max_length=36, default='', blank=True, null=True)
368 370 status = models.PositiveSmallIntegerField(default=4, choices=EXP_STATES)
369 author = models.ForeignKey(User, null=True, blank=True)
371 author = models.ForeignKey(User, null=True, blank=True,on_delete=models.CASCADE)
370 372 hash = models.CharField(default='', max_length=64, null=True, blank=True)
371 373
372 374 class Meta:
@@ -433,7 +435,7 class Experiment(models.Model):
433 435 confs.append(conf)
434 436 else:
435 437 confs = allconfs
436
438
437 439 try:
438 440 for conf in confs:
439 441 conf.stop_device()
@@ -572,13 +574,13 class Configuration(PolymorphicModel):
572 574 template = models.BooleanField(default=False)
573 575 # name = models.CharField(verbose_name="Configuration Name", max_length=40, default='')
574 576 device = models.ForeignKey('Device', verbose_name='Device', null=True, on_delete=models.CASCADE)
575 label = models.CharField(verbose_name="Label", max_length=40, default='', blank=True, null=True)
577 label = models.CharField(verbose_name="Label", max_length=40, default='', blank=True, null=True)
576 578 experiment = models.ForeignKey('Experiment', verbose_name='Experiment', null=True, blank=True, on_delete=models.CASCADE)
577 579 type = models.PositiveSmallIntegerField(default=0, choices=CONF_TYPES)
578 580 created_date = models.DateTimeField(auto_now_add=True)
579 581 programmed_date = models.DateTimeField(auto_now=True)
580 582 parameters = models.TextField(default='{}')
581 author = models.ForeignKey(User, null=True, blank=True)
583 author = models.ForeignKey(User, null=True, blank=True,on_delete=models.CASCADE)
582 584 hash = models.CharField(default='', max_length=64, null=True, blank=True)
583 585 message = ""
584 586
@@ -593,13 +595,13 class Configuration(PolymorphicModel):
593 595 if 'mix' in [f.name for f in self._meta.get_fields()]:
594 596 if self.mix:
595 597 ret = '{} MIX '.format(self.device.device_type.name.upper())
596
598
597 599 if 'label' in [f.name for f in self._meta.get_fields()]:
598 600 ret += '{}'.format(self.label)
599 601
600 602 if self.template:
601 603 ret += ' (template)'
602
604
603 605 return ret
604 606
605 607 @property
@@ -783,7 +785,7 class Configuration(PolymorphicModel):
783 785
784 786 def get_absolute_url_delete(self):
785 787 return reverse('url_delete_dev_conf', args=[str(self.id)])
786
788
787 789 def get_absolute_url_import(self):
788 790 return reverse('url_import_dev_conf', args=[str(self.id)])
789 791
@@ -1,5 +1,5
1 1 /*!
2 * Datetimepicker for Bootstrap v3
2 * Datetimepicker for Bootstrap 3
3 * version : 4.17.47
3 4 * https://github.com/Eonasdan/bootstrap-datetimepicker/
4 */
5 .bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important} No newline at end of file
5 */.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{display:block;margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0} No newline at end of file
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now