├── README.md ├── img ├── image_31.png ├── image_32.png ├── image_33.png ├── image_34.png └── image_35.png └── scripts ├── main_antenna_gui.py └── main_antenna_gui.ui /README.md: -------------------------------------------------------------------------------- 1 | # Radiation Pattern of Antennas Using GUI Python 2 | Plot of Radiation Pattern of Different Antennas with the number of side lobes and their amplitudes 3 | 4 | This is a Graphical user interface built using python, which gives the plot of different antennas with the amplitudes of sidelobes and the angles at which sidelobes occurs. 5 | 6 | ## Requirments (if any changes required or to do any changes) 7 | Python: 8 | 1. PyQt5: `pip install PyQt5` 9 | 2. pyqtgraph: `pip install pyqtgraph` 10 | 3. Numpy: `pip install numpy` 11 | 12 | ## Procedure to plot pattern 13 | 1. Run main_antenna_gui.py (if using python file to plot and vary). 14 | 2. Run Radiation Pattern.exe file to directly execute without any necessary installation of packages. 15 | 3. Select the number of antennas by varying the slider. 16 | 4. Select the type of antenna (eg. lambda/2 ==> lambda/x, select x), by varying the slider. 17 | 5. Select the type of Array 18 | Broad-side Array: Maximum radiation in y direction 19 | End-fire Array : Maximum radiation in x direction 20 | Scanning Array : Maximum radiation in the required direction 21 | 6. If Scanning Array is selected, Enter the direction at which maximum radiation is required, Press enter to access the value. 22 | 7. Click on Plot to plot the radiation pattern of the details provided. 23 | 8. Click on Clear to clear the plot and values. 24 | 9. Check the null angles, sidelobe angles and corresponding sidelobe amplitude. 25 | 26 | ## Screenshots of the Graphical User Interface of Radiation pattern 27 | 28 | ![Image of GUI](https://github.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/blob/master/img/image_33.png) 29 | ![Broad-Side array pattern](https://github.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/blob/master/img/image_31.png) 30 | ![End-fire array pattern](https://github.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/blob/master/img/image_35.png) 31 | ![Scanning array pattern](https://github.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/blob/master/img/image_32.png) 32 | -------------------------------------------------------------------------------- /img/image_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/d29d688c635155c61588975c068cd01969139a34/img/image_31.png -------------------------------------------------------------------------------- /img/image_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/d29d688c635155c61588975c068cd01969139a34/img/image_32.png -------------------------------------------------------------------------------- /img/image_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/d29d688c635155c61588975c068cd01969139a34/img/image_33.png -------------------------------------------------------------------------------- /img/image_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/d29d688c635155c61588975c068cd01969139a34/img/image_34.png -------------------------------------------------------------------------------- /img/image_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Karthik-S-EC/Radiation-Pattern-of-Antennas-GUI-Python/d29d688c635155c61588975c068cd01969139a34/img/image_35.png -------------------------------------------------------------------------------- /scripts/main_antenna_gui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'C:\Users\Karthik S\Desktop\AP GUI\main_antenna_gui.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.10.1 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | import numpy as np 10 | from PyQt5 import QtCore, QtGui, QtWidgets 11 | from pyqtgraph.Qt import QtGui, QtCore 12 | import pyqtgraph as pg 13 | 14 | class Ui_MainWindow(object): 15 | def setupUi(self, MainWindow): 16 | MainWindow.setObjectName("MainWindow") 17 | MainWindow.resize(1261, 691) 18 | self.centralwidget = QtWidgets.QWidget(MainWindow) 19 | self.centralwidget.setObjectName("centralwidget") 20 | self.horizontalSlider = QtWidgets.QSlider(self.centralwidget) 21 | self.horizontalSlider.setGeometry(QtCore.QRect(540, 120, 621, 22)) 22 | self.horizontalSlider.setMinimum(2) 23 | self.horizontalSlider.setMaximum(100) 24 | self.horizontalSlider.setSingleStep(1) 25 | self.horizontalSlider.setPageStep(1) 26 | self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) 27 | self.horizontalSlider.setObjectName("horizontalSlider") 28 | self.horizontalSlider_2 = QtWidgets.QSlider(self.centralwidget) 29 | self.horizontalSlider_2.setGeometry(QtCore.QRect(540, 190, 621, 22)) 30 | font = QtGui.QFont() 31 | font.setFamily("MS Shell Dlg 2") 32 | self.horizontalSlider_2.setFont(font) 33 | self.horizontalSlider_2.setMinimum(2) 34 | self.horizontalSlider_2.setMaximum(100) 35 | self.horizontalSlider_2.setSingleStep(1) 36 | self.horizontalSlider_2.setPageStep(1) 37 | self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal) 38 | self.horizontalSlider_2.setObjectName("horizontalSlider_2") 39 | self.lineEdit_3 = QtWidgets.QLineEdit(self.centralwidget) 40 | self.lineEdit_3.setGeometry(QtCore.QRect(870, 150, 61, 31)) 41 | self.lineEdit_3.setObjectName("lineEdit_3") 42 | self.label_2 = QtWidgets.QLabel(self.centralwidget) 43 | self.label_2.setGeometry(QtCore.QRect(540, 80, 211, 31)) 44 | font = QtGui.QFont() 45 | font.setFamily("Cambria Math") 46 | font.setPointSize(12) 47 | font.setBold(True) 48 | font.setWeight(75) 49 | self.label_2.setFont(font) 50 | self.label_2.setObjectName("label_2") 51 | self.radioButton_3 = QtWidgets.QRadioButton(self.centralwidget) 52 | self.radioButton_3.setEnabled(True) 53 | self.radioButton_3.setGeometry(QtCore.QRect(920, 220, 181, 31)) 54 | font = QtGui.QFont() 55 | font.setFamily("Cambria Math") 56 | font.setPointSize(12) 57 | font.setBold(True) 58 | font.setWeight(75) 59 | self.radioButton_3.setFont(font) 60 | self.radioButton_3.setCheckable(True) 61 | self.radioButton_3.setChecked(False) 62 | self.radioButton_3.setObjectName("radioButton_3") 63 | self.radioButton = QtWidgets.QRadioButton(self.centralwidget) 64 | self.radioButton.setGeometry(QtCore.QRect(540, 220, 181, 31)) 65 | font = QtGui.QFont() 66 | font.setFamily("Cambria Math") 67 | font.setPointSize(12) 68 | font.setBold(True) 69 | font.setWeight(75) 70 | self.radioButton.setFont(font) 71 | self.radioButton.setChecked(False) 72 | self.radioButton.setObjectName("radioButton") 73 | self.label_5 = QtWidgets.QLabel(self.centralwidget) 74 | self.label_5.setGeometry(QtCore.QRect(910, 260, 31, 31)) 75 | font = QtGui.QFont() 76 | font.setFamily("Cambria Math") 77 | font.setPointSize(12) 78 | font.setBold(True) 79 | font.setWeight(75) 80 | self.label_5.setFont(font) 81 | self.label_5.setText("") 82 | self.label_5.setObjectName("label_5") 83 | self.label_4 = QtWidgets.QLabel(self.centralwidget) 84 | self.label_4.setGeometry(QtCore.QRect(540, 260, 381, 31)) 85 | font = QtGui.QFont() 86 | font.setFamily("Cambria Math") 87 | font.setPointSize(12) 88 | font.setBold(True) 89 | font.setWeight(75) 90 | self.label_4.setFont(font) 91 | self.label_4.setObjectName("label_4") 92 | self.radioButton_2 = QtWidgets.QRadioButton(self.centralwidget) 93 | self.radioButton_2.setGeometry(QtCore.QRect(740, 220, 181, 31)) 94 | font = QtGui.QFont() 95 | font.setFamily("Cambria Math") 96 | font.setPointSize(12) 97 | font.setBold(True) 98 | font.setWeight(75) 99 | self.radioButton_2.setFont(font) 100 | self.radioButton_2.setChecked(False) 101 | self.radioButton_2.setObjectName("radioButton_2") 102 | self.label_6 = QtWidgets.QLabel(self.centralwidget) 103 | self.label_6.setGeometry(QtCore.QRect(580, 310, 51, 21)) 104 | font = QtGui.QFont() 105 | font.setFamily("Cambria Math") 106 | font.setPointSize(12) 107 | font.setBold(True) 108 | font.setWeight(75) 109 | self.label_6.setFont(font) 110 | self.label_6.setObjectName("label_6") 111 | self.label_7 = QtWidgets.QLabel(self.centralwidget) 112 | self.label_7.setGeometry(QtCore.QRect(780, 310, 81, 21)) 113 | font = QtGui.QFont() 114 | font.setFamily("Cambria Math") 115 | font.setPointSize(12) 116 | font.setBold(True) 117 | font.setWeight(75) 118 | self.label_7.setFont(font) 119 | self.label_7.setObjectName("label_7") 120 | self.label = QtWidgets.QLabel(self.centralwidget) 121 | self.label.setGeometry(QtCore.QRect(230, 10, 781, 31)) 122 | font = QtGui.QFont() 123 | font.setFamily("OCR A Std") 124 | font.setPointSize(15) 125 | font.setBold(True) 126 | font.setItalic(False) 127 | font.setWeight(75) 128 | self.label.setFont(font) 129 | self.label.setObjectName("label") 130 | self.label_3 = QtWidgets.QLabel(self.centralwidget) 131 | self.label_3.setGeometry(QtCore.QRect(540, 150, 331, 31)) 132 | font = QtGui.QFont() 133 | font.setFamily("Cambria Math") 134 | font.setPointSize(12) 135 | font.setBold(True) 136 | font.setWeight(75) 137 | self.label_3.setFont(font) 138 | self.label_3.setObjectName("label_3") 139 | self.graphicsView = pg.PlotWidget(self.centralwidget) 140 | self.graphicsView.setGeometry(QtCore.QRect(20, 90, 491, 551)) 141 | #self.graphicsView.setObjectName("graphicsView") 142 | self.label_8 = QtWidgets.QLabel(self.centralwidget) 143 | self.label_8.setGeometry(QtCore.QRect(990, 310, 201, 21)) 144 | font = QtGui.QFont() 145 | font.setFamily("Cambria Math") 146 | font.setPointSize(12) 147 | font.setBold(True) 148 | font.setWeight(75) 149 | self.label_8.setFont(font) 150 | self.label_8.setObjectName("label_8") 151 | self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) 152 | self.lineEdit_2.setGeometry(QtCore.QRect(750, 80, 61, 31)) 153 | self.lineEdit_2.setObjectName("lineEdit_2") 154 | self.pushButton = QtWidgets.QPushButton(self.centralwidget) 155 | self.pushButton.setGeometry(QtCore.QRect(724, 592, 81, 41)) 156 | self.pushButton.setObjectName("pushButton") 157 | self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) 158 | self.pushButton_2.setGeometry(QtCore.QRect(840, 592, 71, 41)) 159 | self.pushButton_2.setObjectName("pushButton_2") 160 | self.listWidget_2 = QtWidgets.QListWidget(self.centralwidget) 161 | self.listWidget_2.setGeometry(QtCore.QRect(530, 340, 161, 211)) 162 | self.listWidget_2.setObjectName("listWidget_2") 163 | self.listWidget = QtWidgets.QListWidget(self.centralwidget) 164 | self.listWidget.setGeometry(QtCore.QRect(740, 340, 161, 211)) 165 | self.listWidget.setObjectName("listWidget") 166 | self.listWidget_3 = QtWidgets.QListWidget(self.centralwidget) 167 | self.listWidget_3.setGeometry(QtCore.QRect(950, 340, 256, 211)) 168 | self.listWidget_3.setObjectName("listWidget_3") 169 | self.label_9 = QtWidgets.QLabel(self.centralwidget) 170 | self.label_9.setGeometry(QtCore.QRect(940, 260, 71, 31)) 171 | font = QtGui.QFont() 172 | font.setFamily("Cambria Math") 173 | font.setPointSize(12) 174 | font.setBold(True) 175 | font.setWeight(75) 176 | self.label_9.setFont(font) 177 | self.label_9.setObjectName("label_9") 178 | self.lineEdit_4 = QtWidgets.QLineEdit(self.centralwidget) 179 | self.lineEdit_4.setEnabled(False) 180 | self.lineEdit_4.setGeometry(QtCore.QRect(1070, 220, 61, 31)) 181 | self.lineEdit_4.setClearButtonEnabled(False) 182 | self.lineEdit_4.setObjectName("lineEdit_4") 183 | self.label_10 = QtWidgets.QLabel(self.centralwidget) 184 | self.label_10.setGeometry(QtCore.QRect(160, 50, 151, 31)) 185 | self.label_10.setMinimumSize(QtCore.QSize(151, 31)) 186 | self.label_10.setMaximumSize(QtCore.QSize(151, 16777215)) 187 | font = QtGui.QFont() 188 | font.setFamily("Cambria Math") 189 | font.setPointSize(12) 190 | font.setBold(True) 191 | font.setWeight(75) 192 | self.label_10.setFont(font) 193 | self.label_10.setObjectName("label_10") 194 | MainWindow.setCentralWidget(self.centralwidget) 195 | self.menubar = QtWidgets.QMenuBar(MainWindow) 196 | self.menubar.setGeometry(QtCore.QRect(0, 0, 1261, 21)) 197 | self.menubar.setObjectName("menubar") 198 | MainWindow.setMenuBar(self.menubar) 199 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 200 | self.statusbar.setObjectName("statusbar") 201 | MainWindow.setStatusBar(self.statusbar) 202 | 203 | self.retranslateUi(MainWindow) 204 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 205 | 206 | self.horizontalSlider.valueChanged.connect(self.value_changed_N) 207 | self.horizontalSlider_2.valueChanged.connect(self.value_changed_dipole) 208 | 209 | self.radioButton.toggled.connect(lambda:self.onClicked(self.radioButton)) 210 | self.radioButton_2.toggled.connect(lambda:self.onClicked(self.radioButton_2)) 211 | self.radioButton_3.toggled.connect(lambda:self.onClicked(self.radioButton_3)) 212 | 213 | self.pushButton.clicked.connect(self.calculate_and_plot) 214 | 215 | self.pushButton_2.clicked.connect(self.clear_all) 216 | 217 | self.lineEdit_4.returnPressed.connect(self.onClick_label) 218 | 219 | def retranslateUi(self, MainWindow): 220 | _translate = QtCore.QCoreApplication.translate 221 | MainWindow.setWindowTitle(_translate("MainWindow", "Radiation Pattern of Linear Isotropic Antennas")) 222 | self.label_2.setText(_translate("MainWindow", "Number of Antennas (N):")) 223 | self.radioButton_3.setText(_translate("MainWindow", "Scanning Array")) 224 | self.radioButton.setText(_translate("MainWindow", "Broadside Array")) 225 | self.label_4.setText(_translate("MainWindow", "Maximum Radiation (Main lobe) direction is in")) 226 | self.radioButton_2.setText(_translate("MainWindow", "End-fire Array")) 227 | self.label_6.setText(_translate("MainWindow", "Nullls")) 228 | self.label_7.setText(_translate("MainWindow", "Sidelobes")) 229 | self.label.setText(_translate("MainWindow", "Radiation Pattern of Linear Isotropic Point sources")) 230 | self.label_3.setText(_translate("MainWindow", "Type of dipole Antenna (lambda/x) : x =")) 231 | self.label_8.setText(_translate("MainWindow", "Amplitude of Sidelobes")) 232 | self.pushButton.setText(_translate("MainWindow", "Plot")) 233 | self.pushButton_2.setText(_translate("MainWindow", "Clear")) 234 | self.label_9.setText(_translate("MainWindow", "Degree")) 235 | self.label_10.setText(_translate("MainWindow", "Radiation Pattern")) 236 | 237 | def onClick_label(self): 238 | self.label_5.setText(self.lineEdit_4.text()) 239 | global deg 240 | deg = int(self.label_5.text()) 241 | 242 | def value_changed_N(self): 243 | value = str(self.horizontalSlider.value()) 244 | self.lineEdit_2.setText(value) 245 | 246 | def value_changed_dipole(self): 247 | value = str(self.horizontalSlider_2.value()) 248 | self.lineEdit_3.setText(value) 249 | 250 | def clear_all(self): 251 | self.label_5.clear() 252 | self.radioButton.setChecked(False) 253 | self.radioButton_2.setChecked(False) 254 | self.radioButton_3.setChecked(False) 255 | self.horizontalSlider.setValue(0) 256 | self.horizontalSlider_2.setValue(0) 257 | self.graphicsView.clear() 258 | self.lineEdit_4.clear() 259 | self.listWidget.clear() 260 | self.listWidget_2.clear() 261 | self.listWidget_3.clear() 262 | 263 | def onClicked(self,button): 264 | 265 | if button.text() == "Broadside Array": 266 | if button.isChecked() == True: 267 | self.lineEdit_4.setEnabled(False) 268 | self.label_5.setText("90") 269 | global deg 270 | deg = 90 271 | if button.text() == "End-fire Array": 272 | if button.isChecked() == True: 273 | self.lineEdit_4.setEnabled(False) 274 | self.label_5.setText("180") 275 | #global deg 276 | deg = 180 277 | if button.text() == "Scanning Array": 278 | if button.isChecked() == True: 279 | self.lineEdit_4.setEnabled(True) 280 | 281 | def calculate_and_plot(self): 282 | 283 | self.listWidget.clear() 284 | self.listWidget_2.clear() 285 | self.listWidget_3.clear() 286 | 287 | N = int(str(self.horizontalSlider.value())) 288 | degs = deg*np.pi/180 289 | freq = 1 290 | lamda = 3e8/freq 291 | d = lamda/eval(str(self.horizontalSlider_2.value())) 292 | dr = 2*np.pi*d/lamda 293 | delta = -1*dr*np.cos(degs) 294 | phi = np.arange(0,2*np.pi,0.01) 295 | sci = dr*np.cos(phi) + delta 296 | 297 | #plotting 298 | E = list() 299 | for rad in phi: 300 | sci = dr*np.cos(rad) + delta 301 | num = np.sin(N*sci/2) 302 | den = np.sin(sci/2) 303 | 304 | E.append(np.abs(num/den)) 305 | ''' 306 | plot = pg.plot() 307 | plot.setAspectLocked() 308 | 309 | # Add polar grid lines 310 | 311 | plot.addLine(x=0, pen=0.2) 312 | plot.addLine(y=0, pen=0.2) 313 | for r in range(2, N, 2): 314 | circle = pg.QtGui.QGraphicsEllipseItem(-r, -r, r * 2, r * 2) 315 | circle.setPen(pg.mkPen(0.2)) 316 | plot.addItem(circle) 317 | ''' 318 | x = E * np.cos(phi) 319 | y = E * np.sin(phi) 320 | self.graphicsView.plot(x,y) 321 | 322 | #To find Nulls 323 | k = 0 324 | val = ((2*k*np.pi/N) - delta)/dr 325 | nulls = list() 326 | while (val <=1): 327 | rad = np.arccos(val) 328 | deg1 = rad*180/np.pi 329 | if deg1 == deg: 330 | print() 331 | else: 332 | nulls.append(deg1) 333 | nulls.append(180-deg1) 334 | 335 | k = k + 1 336 | val = ((2*k*np.pi/N) - delta)/dr 337 | 338 | k = 0 339 | val = ((2*k*np.pi/N) - delta)/dr 340 | nulls_k = list() 341 | while (np.abs(val) <=1): 342 | rad = np.arccos(val) 343 | deg1 = rad*180/np.pi 344 | if deg1 == deg: 345 | print() 346 | else: 347 | nulls_k.append(deg1) 348 | nulls_k.append(180-deg1) 349 | 350 | k = k - 1 351 | val = ((2*k*np.pi/N) - delta)/dr 352 | 353 | for i in nulls_k: 354 | nulls.append(i) 355 | nulls = [round(null,2) for null in nulls] 356 | 357 | new_nulls = list() 358 | for new_null in nulls: 359 | if new_null not in new_nulls: 360 | new_nulls.append(new_null) 361 | 362 | if self.radioButton_3.text() == "Scanning Array": 363 | if self.radioButton_3.isChecked() == True: 364 | new_nulls.remove(deg) 365 | 366 | if self.radioButton_2.text() == "End-fire Array" or self.radioButton.text() =="Broadside Array": 367 | if self.radioButton.isChecked() == True or self.radioButton_2.isChecked() == True: 368 | if deg in new_nulls: 369 | new_nulls.remove(deg) 370 | if (180-deg) in new_nulls: 371 | new_nulls.remove(180-deg) 372 | 373 | 374 | #To find Sidelobes 375 | k = 0 376 | val = (((2*k + 1)*np.pi/N) - delta)/dr 377 | sidelobe = list() 378 | while (val <=1): 379 | rad = np.arccos(val) 380 | deg1 = rad*180/np.pi 381 | if deg1 == deg: 382 | print(deg1) 383 | else: 384 | sidelobe.append(deg1) 385 | sidelobe.append(180-deg1) 386 | 387 | k = k + 1 388 | val = round((((2*k + 1)*np.pi/N) - delta)/dr,2) 389 | 390 | k = 0 391 | val = (((2*k + 1)*np.pi/N) - delta)/dr 392 | sidelobe_k = list() 393 | while (np.abs(val) <=1): 394 | rad = np.arccos(val) 395 | deg1 = rad*180/np.pi 396 | if deg1 == deg: 397 | print(deg1) 398 | else: 399 | sidelobe_k.append(deg1) 400 | sidelobe_k.append(180-deg1) 401 | 402 | k = k - 1 403 | val = round((((2*k + 1)*np.pi/N) - delta)/dr,2) 404 | 405 | for i in sidelobe_k: 406 | sidelobe.append(i) 407 | sidelobe = [round(side,2) for side in sidelobe] 408 | sidelobe_copy = list() 409 | ''' 410 | for i in sidelobe: 411 | if (not(i > nulls[0] and i < nulls[1])): 412 | sidelobe_copy.append(i) 413 | ''' 414 | #sidelobe_copy = [round(sidec) for sidec in sidelobe_copy] 415 | new_sidelobe_copy = list() 416 | for new_side in sidelobe: 417 | if new_side not in new_sidelobe_copy: 418 | new_sidelobe_copy.append(new_side) 419 | 420 | sidelobe_amp = list() 421 | update_sidelobe_copy = list() 422 | for i in new_sidelobe_copy: 423 | numer = np.sin(N*(dr*np.cos(i*np.pi/180) + delta)/2) 424 | den = np.sin((dr*np.cos(i*np.pi/180) + delta)/2) 425 | if (np.abs(numer/den) > N//2): 426 | pass 427 | else: 428 | update_sidelobe_copy.append(i) 429 | 430 | for i in update_sidelobe_copy: 431 | numer = np.sin(N*(dr*np.cos(i*np.pi/180) + delta)/2) 432 | den = np.sin((dr*np.cos(i*np.pi/180) + delta)/2) 433 | sidelobe_amp.append(np.abs(numer/den)) 434 | 435 | 436 | # self.graphicsView.polar(rad,E,'.') 437 | 438 | for i in new_nulls: 439 | self.listWidget_2.addItem(str(i)) 440 | 441 | for i in update_sidelobe_copy: 442 | self.listWidget.addItem(str(i)) 443 | 444 | for i in sidelobe_amp: 445 | self.listWidget_3.addItem(str(i)) 446 | 447 | if __name__ == "__main__": 448 | import sys 449 | app = QtWidgets.QApplication(sys.argv) 450 | MainWindow = QtWidgets.QMainWindow() 451 | ui = Ui_MainWindow() 452 | ui.setupUi(MainWindow) 453 | MainWindow.show() 454 | sys.exit(app.exec_()) 455 | if (sys.flags.interactive != 1) or not hasattr(QtCore, "PYQT_VERSION"): 456 | QtGui.QApplication.instance().exec_() 457 | 458 | -------------------------------------------------------------------------------- /scripts/main_antenna_gui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1261 10 | 691 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 540 21 | 120 22 | 621 23 | 22 24 | 25 | 26 | 27 | 2 28 | 29 | 30 | 100 31 | 32 | 33 | 1 34 | 35 | 36 | 1 37 | 38 | 39 | Qt::Horizontal 40 | 41 | 42 | 43 | 44 | 45 | 540 46 | 190 47 | 621 48 | 22 49 | 50 | 51 | 52 | 53 | MS Shell Dlg 2 54 | 55 | 56 | 57 | 2 58 | 59 | 60 | 100 61 | 62 | 63 | 1 64 | 65 | 66 | Qt::Horizontal 67 | 68 | 69 | 70 | 71 | 72 | 870 73 | 150 74 | 61 75 | 31 76 | 77 | 78 | 79 | 80 | 81 | 82 | 540 83 | 80 84 | 211 85 | 31 86 | 87 | 88 | 89 | 90 | Cambria Math 91 | 12 92 | 75 93 | true 94 | 95 | 96 | 97 | Number of Antennas (N): 98 | 99 | 100 | 101 | 102 | true 103 | 104 | 105 | 106 | 920 107 | 220 108 | 181 109 | 31 110 | 111 | 112 | 113 | 114 | Cambria Math 115 | 12 116 | 75 117 | true 118 | 119 | 120 | 121 | Scanning Array 122 | 123 | 124 | true 125 | 126 | 127 | false 128 | 129 | 130 | 131 | 132 | 133 | 540 134 | 220 135 | 181 136 | 31 137 | 138 | 139 | 140 | 141 | Cambria Math 142 | 12 143 | 75 144 | true 145 | 146 | 147 | 148 | Broadside Array 149 | 150 | 151 | false 152 | 153 | 154 | 155 | 156 | 157 | 910 158 | 260 159 | 31 160 | 31 161 | 162 | 163 | 164 | 165 | Cambria Math 166 | 12 167 | 75 168 | true 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 540 179 | 260 180 | 381 181 | 31 182 | 183 | 184 | 185 | 186 | Cambria Math 187 | 12 188 | 75 189 | true 190 | 191 | 192 | 193 | Maximum Radiation (Main lobe) direction is in 194 | 195 | 196 | 197 | 198 | 199 | 740 200 | 220 201 | 181 202 | 31 203 | 204 | 205 | 206 | 207 | Cambria Math 208 | 12 209 | 75 210 | true 211 | 212 | 213 | 214 | End-fire Array 215 | 216 | 217 | false 218 | 219 | 220 | 221 | 222 | 223 | 580 224 | 310 225 | 51 226 | 21 227 | 228 | 229 | 230 | 231 | Cambria Math 232 | 12 233 | 75 234 | true 235 | 236 | 237 | 238 | Nullls 239 | 240 | 241 | 242 | 243 | 244 | 780 245 | 310 246 | 81 247 | 21 248 | 249 | 250 | 251 | 252 | Cambria Math 253 | 12 254 | 75 255 | true 256 | 257 | 258 | 259 | Sidelobes 260 | 261 | 262 | 263 | 264 | 265 | 230 266 | 10 267 | 781 268 | 31 269 | 270 | 271 | 272 | 273 | OCR A Std 274 | 15 275 | 75 276 | false 277 | true 278 | 279 | 280 | 281 | Radiation Pattern of Linear Isotropic Point sources 282 | 283 | 284 | 285 | 286 | 287 | 540 288 | 150 289 | 331 290 | 31 291 | 292 | 293 | 294 | 295 | Cambria Math 296 | 12 297 | 75 298 | true 299 | 300 | 301 | 302 | Type of dipole Antenna (lambda/x) : x = 303 | 304 | 305 | 306 | 307 | 308 | 20 309 | 90 310 | 491 311 | 551 312 | 313 | 314 | 315 | 316 | 317 | 318 | 990 319 | 310 320 | 201 321 | 21 322 | 323 | 324 | 325 | 326 | Cambria Math 327 | 12 328 | 75 329 | true 330 | 331 | 332 | 333 | Amplitude of Sidelobes 334 | 335 | 336 | 337 | 338 | 339 | 750 340 | 80 341 | 61 342 | 31 343 | 344 | 345 | 346 | 347 | 348 | 349 | 724 350 | 592 351 | 81 352 | 41 353 | 354 | 355 | 356 | Plot 357 | 358 | 359 | 360 | 361 | 362 | 840 363 | 592 364 | 71 365 | 41 366 | 367 | 368 | 369 | Clear 370 | 371 | 372 | 373 | 374 | 375 | 530 376 | 340 377 | 161 378 | 211 379 | 380 | 381 | 382 | 383 | 384 | 385 | 740 386 | 340 387 | 161 388 | 211 389 | 390 | 391 | 392 | 393 | 394 | 395 | 950 396 | 340 397 | 256 398 | 211 399 | 400 | 401 | 402 | 403 | 404 | 405 | 940 406 | 260 407 | 71 408 | 31 409 | 410 | 411 | 412 | 413 | Cambria Math 414 | 12 415 | 75 416 | true 417 | 418 | 419 | 420 | Degree 421 | 422 | 423 | 424 | 425 | false 426 | 427 | 428 | 429 | 1070 430 | 220 431 | 61 432 | 31 433 | 434 | 435 | 436 | false 437 | 438 | 439 | 440 | 441 | 442 | 160 443 | 50 444 | 151 445 | 31 446 | 447 | 448 | 449 | 450 | 151 451 | 31 452 | 453 | 454 | 455 | 456 | 151 457 | 16777215 458 | 459 | 460 | 461 | 462 | Cambria Math 463 | 12 464 | 75 465 | true 466 | 467 | 468 | 469 | Radiation Pattern 470 | 471 | 472 | 473 | 474 | 475 | 476 | 0 477 | 0 478 | 1261 479 | 21 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | --------------------------------------------------------------------------------