Commit b4b0887a authored by SRT Operator's avatar SRT Operator
Browse files

Roach: bug in Pol parameter

parent b8ed9478
Loading
Loading
Loading
Loading
+28 −14
Original line number Diff line number Diff line
@@ -560,15 +560,9 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const
		_EXCPT(BackendsErrors::BackendBusyExImpl,impl,"CCommandLine::setConfiguration()");
		throw impl;
	}*/
    if (pol == 2) { // FULL STOKES
        //m_sectionsNumber = 1; // TBC!!!!!!!!!!!!!!!!!!!!!!!!
        m_polarization[inputId] = Backends::BKND_FULL_STOKES;
    }
    if (pol == -1)
        newPol = 2; //TBC!!!!!!!!!!!!!!

	if (inputId>=0) {  //check the section id is in valid ranges
		if (inputId>=m_sectionsNumber) {
		//if (inputId>=m_sectionsNumber) {
		if (inputId>m_sectionsNumber) {
			_EXCPT(ComponentErrors::ValidationErrorExImpl,impl,"CCommandLine::setConfiguration()");
			impl.setReason("the section identifier is out of range");
			throw impl;
@@ -635,6 +629,25 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const
    else
        newFeed = m_feedNumber[inputId];
    
	if (pol >= 0) { // the user ask for a new value
		if ((pol == 0) || (pol == 1)) { // LCP or RCP
			newPol = pol;
        		m_sectionsNumber = 2;
		}
		if (pol == 2) { // FULL STOKES
			newPol = pol;
        		m_sectionsNumber = 1;
		}
		if (pol >= 3) {
			_EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"CCommandLine::setConfiguration()");
		    	impl.setValueName("pol");
		    	throw impl;
		}
	}
	else
		newPol = m_polarization[inputId];


    if (bins>=0) { // the user ask for a new value
        if (bins != MIN_BINS && bins != MAX_BINS) {
		    _EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"CCommandLine::setConfiguration()");
@@ -693,6 +706,7 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const
        	m_frequency[inputId]=newFreq;
        	m_feedNumber[inputId]=newFeed;
        	m_bins[inputId]=newBins;
		m_polarization[inputId]=newPol;
		IRA::CString temp;
		if (m_polarization[inputId]==Backends::BKND_LCP)
			temp="LCP";