Updated the way the LPF bandwidth is set on daughtercard, if DBS_RX.
[debian/gnuradio] / gr-radio-astronomy / src / python / usrp_psr_receiver.py
index 8a559370690fd7564f504d7325077be063305a14..1aeef8fd9715a33e56a445483f3fe0d09b8cc6b4 100755 (executable)
@@ -30,6 +30,7 @@
 #
 #
 from gnuradio import gr, gru, blks, audio
+import usrp_dbid
 from gnuradio import usrp, optfir
 from gnuradio import eng_notation
 from gnuradio.eng_option import eng_option
@@ -218,10 +219,11 @@ class app_flow_graph(stdgui.gui_flow_graph):
         self.decim = int(decim)
 
         # So that we can view 4 pulses in the pulse viewer window
-        FOLD_MULT=4
+        FOLD_MULT=1
 
         # determine the daughterboard subdevice we're using
         self.subdev = usrp.selected_subdev(self.u, options.rx_subdev_spec)
+        self.cardtype = self.u.daughterboard_id(0)
 
         # Compute raw input rate
         input_rate = self.u.adc_freq() / self.u.decim_rate()
@@ -229,6 +231,15 @@ class app_flow_graph(stdgui.gui_flow_graph):
         # BW==input_rate for complex data
         self.bw = input_rate
 
+        #
+        # Set baseband filter bandwidth if DBS_RX:
+        #
+        if self.cardtype == usrp_dbid.DBS_RX:
+            lbw = input_rate / 2
+            if lbw < 1.0e6:
+                lbw = 1.0e6
+            self.subdev.set_bw(lbw)
+
         #
         # We use this as a crude volume control for the audio output
         #