Commit 01e4fb69 authored by LorenzoMonti's avatar LorenzoMonti
Browse files

configuration LO QBand files merged

parents 920af729 13c8a843
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41,7 +41,9 @@ Common/Interfaces/CommonInterface/idl/ReceiversDefinitions.idl
Common/Interfaces/ManagmentInterface/idl/CustomLogger.idl
Common/Interfaces/ReceiversInterface/idl/DewarPositionerDefinitions.idl
Common/Interfaces/XBackendInterface/idl/XBackends.idl
Common/Interfaces/ActiveSurfaceInterface/idl/ActiveSurfaceCommon.idl
Common/Misc/PMUpdate/src/PMUpdate_gui.py
Medicina/Interfaces/MedicinaActiveSurfaceInterface/idl/MedicinaActiveSurfaceBoss.idl
Noto/Errors/NotoActiveSurfaceErrors/idl/ASErrors.idl
Noto/Interfaces/NotoActiveSurfaceInterface/idl/NotoActiveSurfaceBoss.idl
SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUI.h
+9 −4
Original line number Diff line number Diff line
@@ -81,10 +81,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/

## [discos1.0.6] - 09-02-2022
## Added
    issue #655 - ACU Component for Noto and Medicina is now capble to prevent seldom mode changes coming from ACU reset
    issue #655 - ACU Component for Noto and Medicina is now capable to prevent seldom mode changes coming from ACU reset
    issue #653 - added a couple of scriptsto ease vnc conection from remote a file copying. The scripts support 
                 linux and macos
	issue #588 - added the control of the new Noto subreflector and primary focus receiver box servo system.     
    issue #758 - Sardara enabled for Medicina
    
## Fixed
    issue #448 - Added Sky Offsets to calibration tool client
@@ -96,7 +97,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/
	              
## [Next Release] - 
## Added
    issue #625 - Added Medicina Active Surface. Both component and GUIs were implemented.
    issue #791 - Nodding added for TotalPower and Sardara components via the `enable` command. This command can only be issued from a schedule and not via the operatorInput CLI.
                 The syntax for the command is the following: `enable=X;Y` with X and Y representing the 2 feeds the user would like to use for the Nodding observation.
                 This command must be placed in the <schedule_name>.bck file in order to work properly.
## Fixed
## Changed
	 issue #689 - The dataset provided by wether station has been enlarged by the wind direction. The correctponding RAL 'wx' command will noe provided wind direction readout, as well
	issue #689 - The dataset provided by weather station has been enlarged by the wind direction. The correctponding RAL 'wx' command will noe provided wind direction readout, as well
    issue #621 - The maximum number of chars of the schedule file name is now 37 (extension included). This is done for fits file and archive issue with the lenght of the schedule name.
+10 −15
Original line number Diff line number Diff line
@@ -201,12 +201,7 @@ int main(int argc, char *argv[]) {
	// Change the style of the main frame 
	window.setTitleStyle(CStyle(TITLE_COLOR_PAIR,TITLE_STYLE));
	
	if (window.colorReady()) {
		window.defineColor(GRAY_COLOR,255,255,255);		
		window.defineColorPair(BLUE_GRAY,CColor::BLUE,GRAY_COLOR);
		window.defineColorPair(GRAY_BLUE,GRAY_COLOR,CColor::BLUE);		
	}
	else {
	window.defineColor(GRAY_COLOR,500,500,500);
	window.defineColorPair(BLUE_GRAY,CColor::BLUE,CColor::WHITE);
	window.defineColorPair(GRAY_BLUE,CColor::WHITE,CColor::BLUE);
	window.defineColorPair(BLACK_RED,CColor::BLACK,CColor::RED);
@@ -215,7 +210,7 @@ int main(int argc, char *argv[]) {
	window.defineColorPair(BLACK_BLUE,CColor::BLACK,CColor::BLUE);
	window.defineColorPair(BLACK_MAGENTA,CColor::BLACK,CColor::MAGENTA);
	window.defineColorPair(BLACK_WHITE,CColor::BLACK,CColor::WHITE);
	}

	ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_INFO,MODULE_NAME"::FRAME_INITIALIZED"));
	ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_INFO,MODULE_NAME"::GET_DEFAULT_COMPONENENT: %s",COMPONENT_INTERFACE_TPYE));
	
+3 −1
Original line number Diff line number Diff line
@@ -210,7 +210,9 @@ install : install_all
gui:
	pyuic4 calibrationToolClient.ui -o calibrationtool_ui.py
	
	@sed  -ie 's/Qwt5.QwtPlot/PlotProperty/g' calibrationtool_ui.py
	@sed  -ie 's/from qwt_plot import QwtPlot//g' calibrationtool_ui.py
	
	@sed  -ie 's/QwtPlot/PlotProperty/g' calibrationtool_ui.py
	
	@sed -ie '9 i\from customwidgets import *' calibrationtool_ui.py

+323 −343
Original line number Diff line number Diff line
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from Acspy.Clients.SimpleClient import PySimpleClient
import Acspy.Common.Err
import maciErrType
@@ -11,7 +12,7 @@ import ACSLog
import ACS, ACS__POA                                  # Import the Python CORBA stubs for BACI
from PyQt4 import Qt
from PyQt4.QtCore import pyqtSlot,QThread,QMutex,QTimer
import PyQt4.Qwt5 as Qwt
import PyQt4.Qwt as Qwt
import sys,getopt,os
from time import sleep
import math
@@ -19,8 +20,7 @@ from IRAPy import logger,userLogger



import calibrationtool_ui # file generated by pyuic4 but modified to include 
		          #custom widgets.
import calibrationtool_ui # file generated by pyuic4 but modified to include custom widgets.

__version__ = '$Id'

@@ -62,10 +62,10 @@ class MyWorker(QThread):
        self.offset       =self.caltool._get_offset()
        self.name        =self.boss._get_target()
        self.device      =self.caltool._get_deviceID()
                self.oldscan=0L
                self.newscan=0L
                self.oldsubscan=0L
                self.newsubscan=0L
        self.oldscan=0
        self.newscan=0
        self.oldsubscan=0
        self.newsubscan=0
        self.oldrecordingstatus=False
        self.newrecordingstatus=False
        self.azimuthOffset=self.boss._get_azimuthOffset()
@@ -74,7 +74,6 @@ class MyWorker(QThread):

    def run (self):
        try:
        	
            #arrayDataX=self.componenselft._get_arrayDataX()
            #arrayDataY=self.component._get_arrayDataY()
            while self.run:
@@ -83,16 +82,12 @@ class MyWorker(QThread):
                (arraydatax,compl)=self.arrayDataX.get_sync()
                if 'SUBR' not in str(scanaxis):
                    arraydatax[:]=[x /math.pi*180. for x in arraydatax]
                        

                self.emit(Qt.SIGNAL("arrayDataX"),arraydatax)
                (arraydatay,compl2)=self.arrayDataY.get_sync()
                        
                self.emit(Qt.SIGNAL("arrayDataY"),arraydatay)
                (datay,compl3)=self.dataY.get_sync()
                (datax,compl3)=self.dataX.get_sync()
                if 'SUBR' not in str(scanaxis):
                        
                    datax=datax/math.pi*180.
                (projectname,compl4)=self.projectname.get_sync()
                self.emit(Qt.SIGNAL("projectname"),projectname)
@@ -105,7 +100,6 @@ class MyWorker(QThread):
                (scanid,compl8)=self.scan.get_sync()
                self.emit(Qt.SIGNAL("scan"),str(scanid))
                (hpbw,compl9)=self.hpbw.get_sync()
                        
                if 'SUBR' not in str(scanaxis):
                    hpbw= hpbw/math.pi*180*60
                self.emit(Qt.SIGNAL("hpbw"),("%5.3f" % (hpbw)))
@@ -114,10 +108,8 @@ class MyWorker(QThread):
                (peakOffset,compl11)=self.peakOffset.get_sync()
                if 'SUBR' not in str(scanaxis):
                    peakOffset=peakOffset/math.pi*180
                                  
                self.emit(Qt.SIGNAL("peakOffset"),"%5.3f" % (peakOffset))
                (slope,compl12)=self.slope.get_sync()
                        
                self.emit(Qt.SIGNAL("slope"),"%5.3f" %slope)
                (offset,compl13)=self.offset.get_sync()
                self.emit(Qt.SIGNAL("offset"),"%5.3f" % offset)
@@ -128,11 +120,9 @@ class MyWorker(QThread):
                self.emit(Qt.SIGNAL("scanAxis"),scanaxis)
                (azOffset,_)=self.azimuthOffset.get_sync()
                (elOffset,_)=self.elevationOffset.get_sync()

                self.emit(Qt.SIGNAL("azoffset"),str(azOffset/math.pi*180))
                self.emit(Qt.SIGNAL("eloffset"),str(elOffset/math.pi*180))


                rec= self.caltool.isRecording()
                if rec==True:
                   self.datay_tmp.append(datay)
@@ -143,36 +133,31 @@ class MyWorker(QThread):
                self.emit(Qt.SIGNAL("isRecording"),rec)
                self.emit(Qt.SIGNAL("scanAxis"),scanaxis)

 #                       print rec
                #print(rec)
                #if (subscanid!=self.oldsubscan and scanid !=self.oldscanid):
#                                print "scan changed",self.oldsubscan,subscanid
                    #print("scan changed",self.oldsubscan,subscanid)
                    #self.oldsubscan=subscanid
                    #self.subscan=subscanid
                    #self.datax_tmp=[]
                    #self.datay_tmp=[]


                if (rec!=self.oldrecordingstatus):
                    self.oldrecordingstatus=rec
                    self.datax_tmp=[]
                    self.datay_tmp=[]


                        
                QThread.msleep(200)
                   print "Exited from thread"
            print("Exited from thread")

	      except Exception,ex:
        except Exception as ex:
            newEx = ClientErrorsImpl.CouldntAccessPropertyExImpl(exception=ex, create=1)
            newEx.setPropertyName("")
            #ACS_LOG_ERROR
            newEx.log(self.simpleClient.getLogger(),ACSLog.ACS_LOG_ERROR)

            self.run=False

    def __del__(self):
        QThread.msleep(200)
                pass


class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog):
@@ -189,28 +174,28 @@ class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog):
        try:
            self.simpleClient = PySimpleClient()
            self.managerConnected=True
		except Exception,ex:
        except Exception as ex:
            newEx = ClientErrorsImpl.CouldntLogManagerExImpl(exception=ex, create=1)
            logger.logException(newEx)
			print "Please check the system is up and running......"
            print("Please check the system is up and running......")
            sys.exit(-1)

        try:
            self.scheduler= self.simpleClient.getDefaultComponent("IDL:alma/Management/Scheduler:1.0")
		except Exception,ex:
        except Exception as ex:
            newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1)
            newEx.setComponentName("IDL:alma/Management/Scheduler:1.0")
            logger.logException(newEx)
			print "Please check the system is up and running and scheduler component is alive!"
            print("Please check the system is up and running and scheduler component is alive!")
            sys.exit(-1)

        try:
            self.antennaBoss =self.simpleClient.getDefaultComponent("IDL:alma/Antenna/AntennaBoss:1.0")
		except Exception,ex:
        except Exception as ex:
            newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1)
            newEx.setComponentName("IDL:alma/Antenna/AntennaBoss:1.0")
            logger.logException(newEx)
			print "Please check the system is up and running and antenna boss is alive!"
            print("Please check the system is up and running and antenna boss is alive!")
            sys.exit(-1)

        #choose default recorder
@@ -218,29 +203,29 @@ class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog):
            try:
                recorder=self.scheduler._get_currentRecorder()
                (recordername,compl)=recorder.get_sync()
			except  Exception,ex:
            except Exception as ex:
                newEx = ClientErrorsImpl.CouldntAccessPropertyExImpl(exception=ex, create=1)
                logger.logException(newEx)
				print "Please check scheduler component is alive and responsive|" 
                print("Please check scheduler component is alive and responsive|")
                sys.exit(-1)

			print "Starting with default component: " + DEFAULT_COMPONENT	
            print("Starting with default component: " + DEFAULT_COMPONENT)
            if recordername!=DEFAULT_COMPONENT:
				print "Be aware that the in-use recorder is currently " + recordername
                print("Be aware that the in-use recorder is currently " + recordername)

            self.componentName=DEFAULT_COMPONENT

        else:
            self.componentName=compname
			print "Starting with component: " + self.componentName
            print("Starting with component: " + self.componentName)

        try:
            self.component= self.simpleClient.getComponent(self.componentName)
		except Exception,ex:
        except Exception as ex:
            newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1)
            newEx.setComponentName(self.componentName)
            logger.logException(newEx)
			print "Please check the system is up and running and " + self.componentName + " is alive!"
            print("Please check the system is up and running and " + self.componentName + " is alive!")
            sys.exit(-1)

        self.thread=MyWorker([self.component,self.scheduler,self.antennaBoss,self.simpleClient])
@@ -275,11 +260,6 @@ class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog):
        self.connect(self.thread,Qt.SIGNAL("eloffset"),self.elOffsetlineEdit.setText)
        self.connect(self.thread,Qt.SIGNAL("azoffset"),self.azOffsetlineEdit.setText)





                       
    @pyqtSlot(Qt.QObject,name="isRecording")
    def isRecording(self,rec):
        if rec==False:
@@ -336,22 +316,22 @@ class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog):
                    self.simpleClient.releaseComponent(self.scheduler._get_name())
                if self.antennaBoss:
                    self.simpleClient.releaseComponent(self.antennaBoss._get_name())
			except Exception,ex:
				print "Error in application cleanup"                      
            except Exception as ex:
                print("Error in application cleanup")


def usage():
	print "calibrationtoolclient [component name]"
	print
	print "If no component name is provided, the default MANAGEMENT/CalibrationTool will be used" 
    print("calibrationtoolclient [component name]")
    print()
    print("If no component name is provided, the default MANAGEMENT/CalibrationTool will be used")

def main(args):
    sys.tracebacklimit=0

    try:
        opts, args = getopt.getopt(sys.argv[1:],"h",["help"])
	except getopt.GetoptError, err:
		print str(err)
    except getopt.GetoptError as err:
        print(str(err))
        usage()
        sys.exit(1)

@@ -372,7 +352,7 @@ def main(args):
    p=a.show()
    sys.exit(app.exec_())
    sleep(2)
	print "Application closed!"
    print("Application closed!")


if __name__=='__main__':
Loading