summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormleech2007-05-29 11:37:08 +0000
committermleech2007-05-29 11:37:08 +0000
commit25c5610e7e74bc875a70aa091e11d8c89d4b4ff1 (patch)
tree8fff519dad2bda09fb50bc16552566f1406d0060
parent8e8b38dd844ded1017bff0ca79622e497ed7eabf (diff)
downloadgnuradio-25c5610e7e74bc875a70aa091e11d8c89d4b4ff1.tar.gz
gnuradio-25c5610e7e74bc875a70aa091e11d8c89d4b4ff1.tar.bz2
gnuradio-25c5610e7e74bc875a70aa091e11d8c89d4b4ff1.zip
Changed detector chain in usrp_psr_receiver to use complex_to_mag_squared.
Changed usrp_ra_receiver to use dbid() method to determine which card type is being used. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5564 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xgr-radio-astronomy/src/python/usrp_psr_receiver.py34
-rwxr-xr-xgr-radio-astronomy/src/python/usrp_ra_receiver.py4
2 files changed, 8 insertions, 30 deletions
diff --git a/gr-radio-astronomy/src/python/usrp_psr_receiver.py b/gr-radio-astronomy/src/python/usrp_psr_receiver.py
index 759022cfb..3c7dedac8 100755
--- a/gr-radio-astronomy/src/python/usrp_psr_receiver.py
+++ b/gr-radio-astronomy/src/python/usrp_psr_receiver.py
@@ -356,17 +356,8 @@ class app_flow_graph(stdgui.gui_flow_graph):
self.second = gr.fir_filter_fff (int(p), second_filter)
self.third = gr.fir_filter_fff (10, third_filter)
- # Split complex USRP stream into a pair of floats
- self.splitter = gr.complex_to_float (1);
-
- # I squarer (detector)
- self.multI = gr.multiply_ff();
-
- # Q squarer (detector)
- self.multQ = gr.multiply_ff();
-
- # Adding squared I and Q to produce instantaneous signal power
- self.adder = gr.add_ff();
+ # Detector
+ self.detector = gr.complex_to_mag_squared()
self.enable_comb_filter = False
# Epoch folder comb filter
@@ -402,25 +393,12 @@ class app_flow_graph(stdgui.gui_flow_graph):
# Start connecting configured modules in the receive chain
#
- # Connect raw USRP to de-dispersion filter, complex->float splitter
- self.connect(self.u, self.dispfilt, self.splitter)
-
- # Connect splitter outputs to multipliers
- # First do I^2
- self.connect((self.splitter, 0), (self.multI,0))
- self.connect((self.splitter, 0), (self.multI,1))
-
- # Then do Q^2
- self.connect((self.splitter, 1), (self.multQ,0))
- self.connect((self.splitter, 1), (self.multQ,1))
-
- # Then sum the squares
- self.connect(self.multI, (self.adder,0))
- self.connect(self.multQ, (self.adder,1))
+ # Connect raw USRP to de-dispersion filter, detector
+ self.connect(self.u, self.dispfilt, self.detector)
- # Connect detector/adder output to FIR LPF
+ # Connect detector output to FIR LPF
# in two stages, followed by the FFT scope
- self.connect(self.adder, self.first,
+ self.connect(self.detector, self.first,
self.second, self.third, self.scope)
# Connect audio output
diff --git a/gr-radio-astronomy/src/python/usrp_ra_receiver.py b/gr-radio-astronomy/src/python/usrp_ra_receiver.py
index 3f9ff85ba..9e1097547 100755
--- a/gr-radio-astronomy/src/python/usrp_ra_receiver.py
+++ b/gr-radio-astronomy/src/python/usrp_ra_receiver.py
@@ -168,12 +168,12 @@ class app_flow_graph(stdgui.gui_flow_graph):
self.u = usrp.source_c(decim_rate=options.decim)
self.u.set_mux(usrp.determine_rx_mux_value(self.u, options.rx_subdev_spec))
- self.cardtype = self.u.daughterboard_id(0)
# Set initial declination
self.decln = options.decln
# determine the daughterboard subdevice we're using
self.subdev = usrp.selected_subdev(self.u, options.rx_subdev_spec)
+ self.cardtype = self.subdev.dbid()
input_rate = self.u.adc_freq() / self.u.decim_rate()
@@ -426,7 +426,7 @@ class app_flow_graph(stdgui.gui_flow_graph):
self.myform['dbname'].set_value(self.subdev.name())
# Set analog baseband filtering, if DBS_RX
- if self.cardtype == usrp_dbid.DBS_RX:
+ if self.cardtype in (usrp_dbid.DBS_RX, usrp_dbid.DBS_RX_2_1):
lbw = (self.u.adc_freq() / self.u.decim_rate()) / 2
if lbw < 1.0e6:
lbw = 1.0e6