Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

src/r/t/RTLSDR-Scanner-HEAD/src/dialogs.py   RTLSDR-Scanner(Download)
from wx.lib.masked.numctrl import NumCtrl
 
from constants import F_MIN, F_MAX, Cal, SAMPLE_RATE, BANDWIDTH, WINFUNC, \
    TUNER
from devices import DeviceRTL, DeviceGPS
        textOffset = wx.StaticText(self, label="Offset (kHz)")
        self.spinOffset = wx.SpinCtrl(self)
        self.spinOffset.SetRange(0, ((SAMPLE_RATE / 2) - BANDWIDTH) / 1e3)
        self.spinOffset.SetValue(offset)
        self.Bind(wx.EVT_SPINCTRL, self.__on_spin, self.spinOffset)
        powers, freqs = matplotlib.mlab.psd(capture,
                         NFFT=1024,
                         Fs=SAMPLE_RATE / 1e6,
                         window=function(1024))
 
            else:
                sdr = RtlTcp(self.device.server, self.device.port)
            sdr.set_sample_rate(SAMPLE_RATE)
            sdr.set_center_freq(self.spinFreq.GetValue() * 1e6)
            sdr.set_gain(self.spinGain.GetValue())
        textRbw = wx.StaticText(self, label="RBW")
        gridScan.Add(textRbw, (6, 0), (1, 1), wx.ALL, 5)
        rbw = ((SAMPLE_RATE / scanInfo.nfft) / 1000.0) * 2.0
        textCtrlStop = wx.TextCtrl(self, value="{0:.3f}".format(rbw),
                                   style=wx.TE_READONLY)

src/r/t/RTLSDR-Scanner-HEAD/src/scan.py   RTLSDR-Scanner(Download)
import rtlsdr
 
from constants import SAMPLE_RATE, BANDWIDTH, WINFUNC
from events import EventThread, Event, post_event
import rtltcp
            try:
                self.sdr = rtlsdr.RtlSdr(self.indexRtl)
                self.sdr.set_sample_rate(SAMPLE_RATE)
                self.sdr.set_manual_gain_enabled(1)
                self.sdr.set_gain(self.gain)
            try:
                self.sdr = rtltcp.RtlTcp(self.server, self.port)
                self.sdr.set_sample_rate(SAMPLE_RATE)
                self.sdr.set_manual_gain_enabled(1)
                self.sdr.set_gain(self.gain)
                                        NFFT=nfft,
                                        noverlap=int((nfft) * overlap),
                                        Fs=SAMPLE_RATE / 1e6,
                                        window=function(nfft))
    for freqPsd, pwr in itertools.izip(freqs, powers):

src/r/t/RTLSDR-Scanner-HEAD/src/misc.py   RTLSDR-Scanner(Download)
import wx
 
from constants import SAMPLE_RATE, TIMESTAMP_FILE
 
 
def calc_samples(dwell):
    samples = dwell * SAMPLE_RATE
    samples = next_2_to_pow(int(samples))
    return samples
 
 
def calc_real_dwell(dwell):
    samples = calc_samples(dwell)
    dwellReal = samples / SAMPLE_RATE

src/r/t/RTLSDR-Scanner-HEAD/src/cli.py   RTLSDR-Scanner(Download)
from urlparse import urlparse
 
from constants import SAMPLE_RATE
from devices import DeviceRTL, get_devices_rtl
from events import Event, post_event, EventThread
    def __scan(self, settings, index, pool):
        samples = settings.dwell * SAMPLE_RATE
        samples = next_2_to_pow(int(samples))
        threadScan = ThreadScan(self.queue, None, settings, index, samples,
                                False)