Commit 2790826c authored by Giuseppe Carboni's avatar Giuseppe Carboni
Browse files

fixs samplerate and frequency parameters into header fits file

parent e221085b
Loading
Loading
Loading
Loading
+20 −4
Original line number Original line Diff line number Diff line
@@ -1108,6 +1108,18 @@ void CCommandLine::setEnabled(const ACS::longSeq& en) throw (BackendsErrors::Bac
                    throw impl;
                    throw impl;
                }
                }
            }
            }
            if ((m_recstr.Compare("CCB")==0) || (m_recstr.Compare("CCG")==0)) {
                if (en[0] != 0) {
                    _EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"CCommandLine::setEnabled()");
                    impl.setValueName("feed");
                    throw impl;
                }
                if (en[1] != 0) {
                    _EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"CCommandLine::setEnabled()");
                    impl.setValueName("feed");
                    throw impl;
                }
            }
            if (en[0] == en[1]) { // central feed
            if (en[0] == en[1]) { // central feed
                m_inputsNumber = 2;
                m_inputsNumber = 2;
                if (m_stokes == false)
                if (m_stokes == false)
@@ -1136,7 +1148,7 @@ void CCommandLine::setEnabled(const ACS::longSeq& en) throw (BackendsErrors::Bac
        Message reply = sendBackendCommand(request);
        Message reply = sendBackendCommand(request);
        if (reply.is_success_reply()) {
        if (reply.is_success_reply()) {
            // TBD
            // TBD
            ACS_LOG(LM_FULL_INFO,"CCommandLine::setEnabled()",(LM_NOTICE,"NODDING enabled"));
            ACS_LOG(LM_FULL_INFO,"CCommandLine::setEnabled()",(LM_NOTICE,"FEEDS enabled"));
        }
        }
    }
    }
    else {
    else {
@@ -1427,7 +1439,7 @@ void CCommandLine::fillChannelHeader(Backends::TSectionHeader *chHr,const long&
                chHr[index].frequency=m_frequency[i];
                chHr[index].frequency=m_frequency[i];
                chHr[index].attenuation[0]=m_attenuation[i];
                chHr[index].attenuation[0]=m_attenuation[i];
                chHr[index].attenuation[1]=m_attenuation[i];
                chHr[index].attenuation[1]=m_attenuation[i];
                chHr[index].sampleRate=/*m_sampleRate[i];*/m_commonSampleRate;
                chHr[index].sampleRate=m_sampleRate[i];
                if (m_stokes==true) {
                if (m_stokes==true) {
                    chHr[index].inputs=2;
                    chHr[index].inputs=2;
                    chHr[index].feed=m_feedNumber[2*i];
                    chHr[index].feed=m_feedNumber[2*i];
@@ -1809,7 +1821,11 @@ bool CCommandLine::initializeConfiguration(const IRA::CString & config) throw (C
    m_commonSampleRate=DEFAULT_SAMPLE_RATE;
    m_commonSampleRate=DEFAULT_SAMPLE_RATE;
    m_calPeriod=DEFAULT_DIODE_SWITCH_PERIOD;
    m_calPeriod=DEFAULT_DIODE_SWITCH_PERIOD;
    for (i=0;i<m_sectionsNumber;i++) {
    for (i=0;i<m_sectionsNumber;i++) {
        m_sampleRate[i]=DEFAULT_SAMPLE_RATE;
        //m_sampleRate[i]=DEFAULT_SAMPLE_RATE;
        m_sampleRate[i]=2*m_bandWidth[i];
        if (m_bandWidth[i] == 1400.0)
            m_frequency[i] = 0.0;
        else
            m_frequency[i]=STARTFREQUENCY-m_bandWidth[i]/2.;
            m_frequency[i]=STARTFREQUENCY-m_bandWidth[i]/2.;
        //m_bins[i]=BINSNUMBER;
        //m_bins[i]=BINSNUMBER;
        m_enabled[i]=true;
        m_enabled[i]=true;