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