Commit 1608f7cb authored by marc's avatar marc
Browse files

initial init

parent 5b13c4ff
...@@ -19,12 +19,17 @@ class CreatePointings(Ui_FormCreatePoinings): ...@@ -19,12 +19,17 @@ class CreatePointings(Ui_FormCreatePoinings):
logging.info('CreatePointings Intialized') logging.info('CreatePointings Intialized')
Ui_FormCreatePoinings.__init__(self) Ui_FormCreatePoinings.__init__(self)
self.setupUi(formCreatePointings) self.setupUi(formCreatePointings)
self.target = SkyCoord.from_name(self.comboBox.currentText()) self.target = SkyCoord(0 * u.radian,0 * u.radian)
self.target = SkyCoord.from_name('M87') try:
(self.raStr, self.decStr) = self.target.to_string('hmsdms').split() #self.target = SkyCoord.from_name(self.comboBox.currentText())
self.lineEditRA.setText(self.raStr) (self.raStr, self.decStr) = self.target.to_string('hmsdms').split()
self.lineEditDec.setText(self.decStr) self.lineEditRA.setText(self.raStr)
self.lineEditDec.setText(self.decStr)
except socket.gaierror as e:
raise URLError("Could not connect to Internet" + str(e))
raise NameError("Could not connect to Internet" + str(e))
self.target = Null
''' '''
Define slot and connections for GUI Define slot and connections for GUI
''' '''
......
...@@ -11,17 +11,18 @@ from PyQt5 import QtCore, QtGui, QtWidgets ...@@ -11,17 +11,18 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_FormCreatePoinings(object): class Ui_FormCreatePoinings(object):
def setupUi(self, FormCreatePoinings): def setupUi(self, FormCreatePoinings):
FormCreatePoinings.setObjectName("FormCreatePoinings") FormCreatePoinings.setObjectName("FormCreatePoinings")
FormCreatePoinings.resize(482, 241) FormCreatePoinings.resize(590, 270)
self.widget = QtWidgets.QWidget(FormCreatePoinings) FormCreatePoinings.setMinimumSize(QtCore.QSize(590, 270))
self.widget.setGeometry(QtCore.QRect(10, 10, 463, 220)) FormCreatePoinings.setMaximumSize(QtCore.QSize(590, 270))
self.widget.setObjectName("widget") self.layoutWidget = QtWidgets.QWidget(FormCreatePoinings)
self.gridLayout = QtWidgets.QGridLayout(self.widget) self.layoutWidget.setGeometry(QtCore.QRect(11, 11, 571, 245))
self.layoutWidget.setObjectName("layoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget)
self.gridLayout.setObjectName("gridLayout") self.gridLayout.setObjectName("gridLayout")
self.label_6 = QtWidgets.QLabel(self.widget) self.comboBox = QtWidgets.QComboBox(self.layoutWidget)
self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.comboBox.setToolTip("")
self.label_6.setObjectName("label_6") self.comboBox.setLayoutDirection(QtCore.Qt.LeftToRight)
self.gridLayout.addWidget(self.label_6, 0, 0, 1, 1) self.comboBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContentsOnFirstShow)
self.comboBox = QtWidgets.QComboBox(self.widget)
self.comboBox.setObjectName("comboBox") self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("") self.comboBox.addItem("")
self.comboBox.addItem("") self.comboBox.addItem("")
...@@ -29,65 +30,90 @@ class Ui_FormCreatePoinings(object): ...@@ -29,65 +30,90 @@ class Ui_FormCreatePoinings(object):
self.comboBox.addItem("") self.comboBox.addItem("")
self.comboBox.addItem("") self.comboBox.addItem("")
self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1)
self.label = QtWidgets.QLabel(self.widget) self.label = QtWidgets.QLabel(self.layoutWidget)
self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label") self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1) self.gridLayout.addWidget(self.label, 1, 1, 1, 1)
self.lineEditRA = QtWidgets.QLineEdit(self.widget) self.label_2 = QtWidgets.QLabel(self.layoutWidget)
self.lineEditRA.setObjectName("lineEditRA")
self.gridLayout.addWidget(self.lineEditRA, 1, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(self.widget)
self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2") self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1) self.gridLayout.addWidget(self.label_2, 1, 2, 1, 1)
self.lineEditDec = QtWidgets.QLineEdit(self.widget) self.label_5 = QtWidgets.QLabel(self.layoutWidget)
self.lineEditDec.setObjectName("lineEditDec") self.label_5.setAlignment(QtCore.Qt.AlignCenter)
self.gridLayout.addWidget(self.lineEditDec, 2, 1, 1, 1) self.label_5.setObjectName("label_5")
self.label_3 = QtWidgets.QLabel(self.widget) self.gridLayout.addWidget(self.label_5, 6, 0, 1, 1)
self.lineEditRA = QtWidgets.QLineEdit(self.layoutWidget)
self.lineEditRA.setAlignment(QtCore.Qt.AlignCenter)
self.lineEditRA.setObjectName("lineEditRA")
self.gridLayout.addWidget(self.lineEditRA, 2, 2, 1, 1)
self.label_3 = QtWidgets.QLabel(self.layoutWidget)
self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setWordWrap(True)
self.label_3.setObjectName("label_3") self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
self.lineEditRaDistance = QtWidgets.QLineEdit(self.widget) self.buttonBoxCreatePointings = QtWidgets.QDialogButtonBox(self.layoutWidget)
self.lineEditRaDistance.setObjectName("lineEditRaDistance") self.buttonBoxCreatePointings.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.gridLayout.addWidget(self.lineEditRaDistance, 3, 1, 1, 1) self.buttonBoxCreatePointings.setObjectName("buttonBoxCreatePointings")
self.label_7 = QtWidgets.QLabel(self.widget) self.gridLayout.addWidget(self.buttonBoxCreatePointings, 6, 1, 1, 1)
self.label_7.setObjectName("label_7") self.label_9 = QtWidgets.QLabel(self.layoutWidget)
self.gridLayout.addWidget(self.label_7, 3, 2, 1, 1) self.label_9.setAlignment(QtCore.Qt.AlignCenter)
self.lineEditRaSteps = QtWidgets.QLineEdit(self.widget) self.label_9.setWordWrap(True)
self.lineEditRaSteps.setObjectName("lineEditRaSteps") self.label_9.setObjectName("label_9")
self.gridLayout.addWidget(self.lineEditRaSteps, 3, 3, 1, 1) self.gridLayout.addWidget(self.label_9, 2, 0, 1, 1)
self.label_4 = QtWidgets.QLabel(self.widget) self.lineEditDec = QtWidgets.QLineEdit(self.layoutWidget)
self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.lineEditDec.setAlignment(QtCore.Qt.AlignCenter)
self.label_4.setObjectName("label_4") self.lineEditDec.setObjectName("lineEditDec")
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1) self.gridLayout.addWidget(self.lineEditDec, 2, 1, 1, 1)
self.lineEditDecDistance = QtWidgets.QLineEdit(self.widget) self.label_6 = QtWidgets.QLabel(self.layoutWidget)
self.lineEditDecDistance.setObjectName("lineEditDecDistance") self.label_6.setAlignment(QtCore.Qt.AlignCenter)
self.gridLayout.addWidget(self.lineEditDecDistance, 4, 1, 1, 1) self.label_6.setObjectName("label_6")
self.label_8 = QtWidgets.QLabel(self.widget) self.gridLayout.addWidget(self.label_6, 0, 0, 1, 1)
self.label_8 = QtWidgets.QLabel(self.layoutWidget)
self.label_8.setAlignment(QtCore.Qt.AlignCenter)
self.label_8.setWordWrap(True)
self.label_8.setObjectName("label_8") self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 4, 2, 1, 1) self.gridLayout.addWidget(self.label_8, 3, 0, 1, 1)
self.lineEditDecSteps = QtWidgets.QLineEdit(self.widget) self.doubleSpinBoxDistanceRA = QtWidgets.QDoubleSpinBox(self.layoutWidget)
self.lineEditDecSteps.setObjectName("lineEditDecSteps") self.doubleSpinBoxDistanceRA.setAlignment(QtCore.Qt.AlignCenter)
self.gridLayout.addWidget(self.lineEditDecSteps, 4, 3, 1, 1) self.doubleSpinBoxDistanceRA.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
self.label_5 = QtWidgets.QLabel(self.widget) self.doubleSpinBoxDistanceRA.setMinimum(0.1)
self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.doubleSpinBoxDistanceRA.setMaximum(2.0)
self.label_5.setObjectName("label_5") self.doubleSpinBoxDistanceRA.setSingleStep(0.1)
self.gridLayout.addWidget(self.label_5, 5, 0, 1, 1) self.doubleSpinBoxDistanceRA.setProperty("value", 0.5)
self.buttonBox = QtWidgets.QDialogButtonBox(self.widget) self.doubleSpinBoxDistanceRA.setObjectName("doubleSpinBoxDistanceRA")
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.gridLayout.addWidget(self.doubleSpinBoxDistanceRA, 4, 1, 1, 1)
self.buttonBox.setObjectName("buttonBox") self.doubleSpinBoxDistanceDec = QtWidgets.QDoubleSpinBox(self.layoutWidget)
self.gridLayout.addWidget(self.buttonBox, 5, 1, 1, 1) self.doubleSpinBoxDistanceDec.setAlignment(QtCore.Qt.AlignCenter)
self.pushButton = QtWidgets.QPushButton(self.widget) self.doubleSpinBoxDistanceDec.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
self.pushButton.setObjectName("pushButton") self.doubleSpinBoxDistanceDec.setMinimum(0.1)
self.gridLayout.addWidget(self.pushButton, 5, 3, 1, 1) self.doubleSpinBoxDistanceDec.setMaximum(2.0)
self.doubleSpinBoxDistanceDec.setSingleStep(0.1)
self.doubleSpinBoxDistanceDec.setProperty("value", 0.5)
self.doubleSpinBoxDistanceDec.setObjectName("doubleSpinBoxDistanceDec")
self.gridLayout.addWidget(self.doubleSpinBoxDistanceDec, 4, 2, 1, 1)
self.spinBoxStepsRA = QtWidgets.QSpinBox(self.layoutWidget)
self.spinBoxStepsRA.setAlignment(QtCore.Qt.AlignCenter)
self.spinBoxStepsRA.setMaximum(30)
self.spinBoxStepsRA.setObjectName("spinBoxStepsRA")
self.gridLayout.addWidget(self.spinBoxStepsRA, 3, 1, 1, 1)
self.spinBoxStepsDec = QtWidgets.QSpinBox(self.layoutWidget)
self.spinBoxStepsDec.setAlignment(QtCore.Qt.AlignCenter)
self.spinBoxStepsDec.setMaximum(30)
self.spinBoxStepsDec.setObjectName("spinBoxStepsDec")
self.gridLayout.addWidget(self.spinBoxStepsDec, 3, 2, 1, 1)
self.retranslateUi(FormCreatePoinings) self.retranslateUi(FormCreatePoinings)
QtCore.QMetaObject.connectSlotsByName(FormCreatePoinings) QtCore.QMetaObject.connectSlotsByName(FormCreatePoinings)
FormCreatePoinings.setTabOrder(self.comboBox, self.spinBoxStepsRA)
FormCreatePoinings.setTabOrder(self.spinBoxStepsRA, self.spinBoxStepsDec)
FormCreatePoinings.setTabOrder(self.spinBoxStepsDec, self.doubleSpinBoxDistanceRA)
FormCreatePoinings.setTabOrder(self.doubleSpinBoxDistanceRA, self.doubleSpinBoxDistanceDec)
FormCreatePoinings.setTabOrder(self.doubleSpinBoxDistanceDec, self.lineEditDec)
FormCreatePoinings.setTabOrder(self.lineEditDec, self.lineEditRA)
def retranslateUi(self, FormCreatePoinings): def retranslateUi(self, FormCreatePoinings):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
FormCreatePoinings.setWindowTitle(_translate("FormCreatePoinings", "Create Pointings")) FormCreatePoinings.setWindowTitle(_translate("FormCreatePoinings", "Create Pointings"))
self.label_6.setText(_translate("FormCreatePoinings", "Object"))
self.comboBox.setItemText(0, _translate("FormCreatePoinings", "M1")) self.comboBox.setItemText(0, _translate("FormCreatePoinings", "M1"))
self.comboBox.setItemText(1, _translate("FormCreatePoinings", "M13")) self.comboBox.setItemText(1, _translate("FormCreatePoinings", "M13"))
self.comboBox.setItemText(2, _translate("FormCreatePoinings", "M31")) self.comboBox.setItemText(2, _translate("FormCreatePoinings", "M31"))
...@@ -95,12 +121,11 @@ class Ui_FormCreatePoinings(object): ...@@ -95,12 +121,11 @@ class Ui_FormCreatePoinings(object):
self.comboBox.setItemText(4, _translate("FormCreatePoinings", "M101")) self.comboBox.setItemText(4, _translate("FormCreatePoinings", "M101"))
self.label.setText(_translate("FormCreatePoinings", "RA")) self.label.setText(_translate("FormCreatePoinings", "RA"))
self.label_2.setText(_translate("FormCreatePoinings", "DEC")) self.label_2.setText(_translate("FormCreatePoinings", "DEC"))
self.label_3.setText(_translate("FormCreatePoinings", "RA Distance"))
self.label_7.setText(_translate("FormCreatePoinings", "RA Steps"))
self.label_4.setText(_translate("FormCreatePoinings", "DEC distance"))
self.label_8.setText(_translate("FormCreatePoinings", "DEC Steps"))
self.label_5.setText(_translate("FormCreatePoinings", "Create Pointings")) self.label_5.setText(_translate("FormCreatePoinings", "Create Pointings"))
self.pushButton.setText(_translate("FormCreatePoinings", "Clear Settings")) self.label_3.setText(_translate("FormCreatePoinings", "Distance between pointings (degree)"))
self.label_9.setText(_translate("FormCreatePoinings", "Central Pointing"))
self.label_6.setText(_translate("FormCreatePoinings", "Object"))
self.label_8.setText(_translate("FormCreatePoinings", "Number of Steps"))
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -6,35 +6,40 @@ ...@@ -6,35 +6,40 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>482</width> <width>475</width>
<height>241</height> <height>264</height>
</rect> </rect>
</property> </property>
<property name="maximumSize">
<size>
<width>590</width>
<height>270</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Create Pointings</string> <string>Create Pointings</string>
</property> </property>
<widget class="QWidget" name=""> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>11</x>
<y>10</y> <y>11</y>
<width>463</width> <width>461</width>
<height>220</height> <height>245</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Object</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="comboBox"> <widget class="QComboBox" name="comboBox">
<property name="toolTip">
<string extracomment="Select Object"/>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>M1</string> <string>M1</string>
...@@ -62,7 +67,7 @@ ...@@ -62,7 +67,7 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="1">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>RA</string> <string>RA</string>
...@@ -72,10 +77,7 @@ ...@@ -72,10 +77,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="2">
<widget class="QLineEdit" name="lineEditRA"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>DEC</string> <string>DEC</string>
...@@ -85,82 +87,162 @@ ...@@ -85,82 +87,162 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="6" column="0">
<widget class="QLineEdit" name="lineEditDec"/> <widget class="QLabel" name="label_5">
<property name="text">
<string>Create Pointings</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="2">
<widget class="QLineEdit" name="lineEditRA">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>RA Distance</string> <string>Distance between pointings (degree)</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="6" column="1">
<widget class="QLineEdit" name="lineEditRaDistance"/> <widget class="QDialogButtonBox" name="buttonBoxCreatePointings">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item> </item>
<item row="3" column="2"> <item row="2" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_9">
<property name="text"> <property name="text">
<string>RA Steps</string> <string>Central Pointing</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3"> <item row="2" column="1">
<widget class="QLineEdit" name="lineEditRaSteps"/> <widget class="QLineEdit" name="lineEditDec">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item> </item>
<item row="4" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
<string>DEC distance</string> <string>Object</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="0">
<widget class="QLineEdit" name="lineEditDecDistance"/>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
<string>DEC Steps</string> <string>Number of Steps</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="3"> <item row="4" column="1">
<widget class="QLineEdit" name="lineEditDecSteps"/> <widget class="QDoubleSpinBox" name="doubleSpinBoxDistanceRA">
</item> <property name="alignment">
<item row="5" column="0"> <set>Qt::AlignCenter</set>
<widget class="QLabel" name="label_5"> </property>
<property name="text"> <property name="buttonSymbols">
<string>Create Pointings</string> <enum>QAbstractSpinBox::PlusMinus</enum>
</property> </property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxDistanceDec">
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::PlusMinus</enum>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="3" column="1">
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QSpinBox" name="spinBoxStepsRA">
<property name="standardButtons"> <property name="alignment">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>Qt::AlignCenter</set>
</property>
<property name="maximum">
<number>30</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="3"> <item row="3" column="2">
<widget class="QPushButton" name="pushButton"> <widget class="QSpinBox" name="spinBoxStepsDec">
<property name="text"> <property name="alignment">
<string>Clear Settings</string> <set>Qt::AlignCenter</set>
</property>
<property name="maximum">
<number>30</number>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<tabstops>
<tabstop>comboBox</tabstop>
<tabstop>spinBoxStepsRA</tabstop>
<tabstop>spinBoxStepsDec</tabstop>
<tabstop>doubleSpinBoxDistanceRA</tabstop>
<tabstop>doubleSpinBoxDistanceDec</tabstop>
<tabstop>lineEditDec</tabstop>
<tabstop>lineEditRA</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment