- self.connect(self.u, self.scope)
- self.connect(self.u, 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 adder output to two-stages of FIR integrator
- # followed by a single stage IIR integrator, and
- # the calibrator
- self.connect(self.adder, self.integrator1,
- self.integrator2, self.integrator3, self.cal_mult,
- self.cal_offs, self.chart)
-
- # Connect calibrator to probe
- # SPECIAL NOTE: I'm setting the ground work here
- # for completely changing the way local_calibrator
- # works, including removing some horrible kludges for
- # recording data.
- # But for now, self.probe() will be used to display the
- # current instantaneous integrated detector value
- self.connect(self.cal_offs, self.probe)
+ if (self.dual_mode == False):
+ self.head = self.u
+ self.shead = self.u
+
+ else:
+ self.di = gr.deinterleave(gr.sizeof_gr_complex)
+ self.addchans = gr.add_cc ()
+ self.h_power = gr.complex_to_mag_squared()
+ self.v_power = gr.complex_to_mag_squared()
+ self.connect (self.u, self.di)
+
+ #
+ # For spectral, adding the two channels works, assuming no gross
+ # phase or amplitude error
+ self.connect ((self.di, 0), (self.addchans, 0))
+ self.connect ((self.di, 1), (self.addchans, 1))
+
+ #
+ # Connect heads of spectral and total-power chains
+ #
+ self.head = self.di
+ self.shead = self.addchans
+
+ #
+ # For dual-polarization mode, we compute the sum of the
+ # powers on each channel, after they've been detected
+ #
+ self.detector = gr.add_ff()
+
+ # The scope--handle SETI mode
+ if (self.setimode == False):
+ self.connect(self.shead, self.scope)
+ else:
+ self.connect(self.shead, self.fft_bandpass, self.scope)
+
+ if (self.setimode == False):
+ if (self.dual_mode == False):
+ self.connect(self.head, self.detector,
+ self.integrator, self.keepn, self.cal_mult, self.cal_offs, self.chart)
+ else:
+ #
+ # In dual-polarization mode, we compute things a little differently
+ # In effect, we have two radiometer chains, terminating in an adder
+ #
+ self.connect((self.di, 0), self.h_power)
+ self.connect((self.di, 1), self.v_power)
+ self.connect(self.h_power, (self.detector, 0))
+ self.connect(self.v_power, (self.detector, 1))
+ self.connect(self.detector,
+ self.integrator, self.keepn, self.cal_mult, self.cal_offs, self.chart)
+
+ # current instantaneous integrated detector value
+ self.connect(self.cal_offs, self.probe)