Commit fc2c0fa7 authored by Marco Buttu's avatar Marco Buttu
Browse files

Added lowpass filter to the IFs

parent 6e2543b7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -107,13 +107,13 @@ void CComponentCore::getLBandBandwidth(ACS::doubleSeq& bw)
{
    baci::ThreadSyncGuard guard(&m_mutex);
    bw.length(m_configuration.getIFs());
    double ifmax, ifmin, filter;
    double if_max, if_min, filter_max;
    for (WORD i=0; i<m_configuration.getIFs(); i++) {
        ifmin = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue;
        ifmax = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue;
        filter = m_configuration.getLowpassFilterMin()[0];
        ifmax = (ifmax < filter) ? ifmax : filter;
        bw[i] = (ifmax - ifmin) > 0 ? (ifmax - ifmin) : 0;
        if_min = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue;
        if_max = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue;
        filter_max = m_configuration.getLowpassFilterMax()[0];
        if_max = (if_max < filter_max) ? if_max : filter_max;
        bw[i] = (if_max - if_min) > 0 ? (if_max - if_min) : 0;
    }
}

+2 −2
Original line number Diff line number Diff line
@@ -92,8 +92,8 @@ Expected: Bandwidth==75 (925:1000)
Expected: start frequency==925


Test 11: low pass IF filter (NO-default)
========================================
Test 11: low pass IF filter (NO-default): NOT IMPLMENTED
========================================================
> receiversMode=L1L5 (1625-1715)
> setL0=500 (IF band: 1125-1215) # Target command

+16 −0
Original line number Diff line number Diff line
@@ -127,6 +127,22 @@ class TestLO(unittest2.TestCase):
        self.assertEqual(initialFrequency, ifmin)


    def test_lowpassfilter_setMode_before_setLo(self):
        """The lowpass filter cuts the IF band: setMode before setLO"""
        self.lp.setMode('XXL4')  # RF band -> 1300:1800
        self.lp.setLO([600.0, 600.0])  # IF band -> 700:1200
        bandWidth = self.get_property('bandWidth') 
        self.assertEqual(bandWidth, [300.0, 300])


    def test_lowpassfilter_setMode_after_setLo(self):
        """The lowpass filter cuts the IF band: setMode after setLO"""
        self.lp.setLO([700.0, 700.0])  
        self.lp.setMode('XXL5') # band 1625:1715 -> IF band -> 925:1015
        bandWidth = self.get_property('bandWidth') 
        self.assertEqual(bandWidth, [75.0, 75])


    def get_ifs(self):
        """Return the current IFs, taking in account the low pass filter"""
        rfmin = self.get_cdb_values('LBandRFMin')