discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] window sizing issue


From: ematlis
Subject: Re: [Discuss-gnuradio] window sizing issue
Date: Mon, 19 Mar 2007 12:40:36 -0400 (EDT)

Michael-

I'm trying to "calibrate" the flow-graph of the am_rcv_plasma_mod.py so that the values displayed in the final window represent actual input amplitudes.

The first step to do this would be to account for the internal gain; so I need to divide through by a factor of 10^(gain) where gain is in db. To implement this I define:

self.gain_correction = gr.divide_ff(math.log10(self.gain))

and later I implement it as follows:

self.connect (self.magblock, self.gain_correction)

and

        if plot3:
self.scope = scopesink.scope_sink_f(self, self.panel, title="AM Demodulated Time Series", sample_rate=demod_rate, size=(50,100), t_scale=1.0e-3, v_scale=None, vbox=vbox)
            self.connect(self.gain_correction, self.scope)


but I get the error:

File "am_rcv_plasma_mod.py", line 95, in __init__
    self.gain_correction = gr.divide_ff(math.log10(self.gain))
AttributeError: 'am_plasma_rx_graph' object has no attribute 'gain'

How do I "grab" whatever the current value of the gain is and use it to divide through? The gain will be set by either the mouse or the powermate device.

Any thoughts?
thanks,
eric

************************************
Eric H. Matlis, Ph.D.
Aerospace & Mechanical Engineering Dept.
120 Hessert Center for Aerospace Research
University of Notre Dame
Notre Dame, IN 46556-5684
Phone: (574) 631-6054
Fax:   (574) 631-8355

On Fri, 16 Mar 2007, Michael Dickens wrote:

On Mar 16, 2007, at 12:01 PM, address@hidden wrote:
1) do you happen to know where the default values for the control buttons are set? I'd like to change the time scale from 100us/div to 1ms/div and to set the Autorange to "on" by default.

In your "am_..." file, change the "scope_sink_f" call to inside "_build_gui", "if plot3:":

self.scope = scopesink.scope_sink_f(self, self.panel, title="AM Demodulated Time Series", sample_rate=demod_rate, size=(50,100), t_scale=1.0e-3, v_scale=None)

the last 2 items set the time scale and autorange as you want.

2) do you know how to convert the integer values on the third window (time-series) to actual voltage values as measured by the adc? It must be a function of the internal gain and offset. I need to know these eventually; this application is supposed to measure physical voltages, not just produce sounds.

Not sure of this.  Maybe whoever wrote the script knows? - MLD

Attachment: am_rcv_plasma_mod.py
Description: Text document


reply via email to

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