commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5564 - gnuradio/trunk/gr-radio-astronomy/src/python


From: mleech
Subject: [Commit-gnuradio] r5564 - gnuradio/trunk/gr-radio-astronomy/src/python
Date: Tue, 29 May 2007 05:37:09 -0600 (MDT)

Author: mleech
Date: 2007-05-29 05:37:08 -0600 (Tue, 29 May 2007)
New Revision: 5564

Modified:
   gnuradio/trunk/gr-radio-astronomy/src/python/usrp_psr_receiver.py
   gnuradio/trunk/gr-radio-astronomy/src/python/usrp_ra_receiver.py
Log:
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.


Modified: gnuradio/trunk/gr-radio-astronomy/src/python/usrp_psr_receiver.py
===================================================================
--- gnuradio/trunk/gr-radio-astronomy/src/python/usrp_psr_receiver.py   
2007-05-29 01:06:01 UTC (rev 5563)
+++ gnuradio/trunk/gr-radio-astronomy/src/python/usrp_psr_receiver.py   
2007-05-29 11:37:08 UTC (rev 5564)
@@ -356,18 +356,9 @@
         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);
+        # Detector
+        self.detector = gr.complex_to_mag_squared()
 
-        # 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();
-
         self.enable_comb_filter = False
         # Epoch folder comb filter
         if self.enable_comb_filter == True:
@@ -402,25 +393,12 @@
         # 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 raw USRP to de-dispersion filter, detector
+        self.connect(self.u, self.dispfilt, self.detector)
 
-        # 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 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

Modified: gnuradio/trunk/gr-radio-astronomy/src/python/usrp_ra_receiver.py
===================================================================
--- gnuradio/trunk/gr-radio-astronomy/src/python/usrp_ra_receiver.py    
2007-05-29 01:06:01 UTC (rev 5563)
+++ gnuradio/trunk/gr-radio-astronomy/src/python/usrp_ra_receiver.py    
2007-05-29 11:37:08 UTC (rev 5564)
@@ -168,12 +168,12 @@
 
         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 @@
         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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]