{"id":13586597,"url":"https://github.com/xmikos/soapy_power","last_synced_at":"2025-04-09T23:16:49.839Z","repository":{"id":57469015,"uuid":"82124123","full_name":"xmikos/soapy_power","owner":"xmikos","description":"Obtain power spectrum from SoapySDR devices (RTL-SDR, Airspy, SDRplay, HackRF, bladeRF, USRP, LimeSDR, etc.)","archived":false,"fork":false,"pushed_at":"2024-06-22T16:31:16.000Z","size":49,"stargazers_count":181,"open_issues_count":25,"forks_count":38,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-09T23:16:48.620Z","etag":null,"topics":["airspy","fft","hackrf","limesdr","python","radio","rtl-sdr","sdr","software-defined-radio","spectrum-analyzer"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmikos.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-16T01:14:12.000Z","updated_at":"2025-03-13T15:18:10.000Z","dependencies_parsed_at":"2022-09-19T08:40:12.397Z","dependency_job_id":null,"html_url":"https://github.com/xmikos/soapy_power","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsoapy_power","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsoapy_power/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsoapy_power/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmikos%2Fsoapy_power/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmikos","download_url":"https://codeload.github.com/xmikos/soapy_power/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airspy","fft","hackrf","limesdr","python","radio","rtl-sdr","sdr","software-defined-radio","spectrum-analyzer"],"created_at":"2024-08-01T15:05:40.360Z","updated_at":"2025-04-09T23:16:49.816Z","avatar_url":"https://github.com/xmikos.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"soapy_power\n===========\n\nObtain power spectrum from SoapySDR devices (RTL-SDR, Airspy, SDRplay, HackRF, bladeRF, USRP, LimeSDR, etc.)\n\nRequirements\n------------\n\n- `Python 3 \u003chttps://www.python.org\u003e`_\n- `NumPy \u003chttp://www.numpy.org\u003e`_\n- `SimpleSoapy \u003chttps://github.com/xmikos/simplesoapy\u003e`_\n- `SimpleSpectral \u003chttps://github.com/xmikos/simplespectral\u003e`_\n- Optional: `pyFFTW \u003chttps://github.com/pyFFTW/pyFFTW\u003e`_ (for fastest FFT calculations with FFTW library)\n- Optional: `SciPy \u003chttps://www.scipy.org\u003e`_ (for faster FFT calculations with scipy.fftpack library)\n\nYou should always install SciPy or pyFFTW, because numpy.fft has horrible\nmemory usage and is also much slower.\n\nUsage\n-----\n::\n\n    usage: soapy_power [-h] [-f Hz|Hz:Hz] [-O FILE | --output-fd NUM] [-F {rtl_power,rtl_power_fftw,soapy_power_bin}] [-q]\n                       [--debug] [--detect] [--info] [--version] [-b BINS | -B Hz] [-n REPEATS | -t SECONDS | -T SECONDS]\n                       [-c | -u RUNS | -e SECONDS] [-d DEVICE] [-C CHANNEL] [-A ANTENNA] [-r Hz] [-w Hz] [-p PPM]\n                       [-g dB | -G STRING | -a] [--lnb-lo Hz] [--device-settings STRING] [--force-rate] [--force-bandwidth]\n                       [--tune-delay SECONDS] [--reset-stream] [-o PERCENT | -k PERCENT] [-s BUFFER_SIZE] [-S MAX_BUFFER_SIZE]\n                       [--even | --pow2] [--max-threads NUM] [--max-queue-size NUM] [--no-pyfftw] [-l] [-R]\n                       [-D {none,constant}] [--fft-window {boxcar,hann,hamming,blackman,bartlett,kaiser,tukey}]\n                       [--fft-window-param FLOAT] [--fft-overlap PERCENT]\n    \n    Obtain a power spectrum from SoapySDR devices\n    \n    Main options:\n      -h, --help            show this help message and exit\n      -f Hz|Hz:Hz, --freq Hz|Hz:Hz\n                            center frequency or frequency range to scan, number can be followed by a k, M or G multiplier\n                            (default: 1420405752)\n      -O FILE, --output FILE\n                            output to file (incompatible with --output-fd, default is stdout)\n      --output-fd NUM       output to existing file descriptor (incompatible with -O)\n      -F {rtl_power,rtl_power_fftw,soapy_power_bin}, --format {rtl_power,rtl_power_fftw,soapy_power_bin}\n                            output format (default: rtl_power)\n      -q, --quiet           limit verbosity\n      --debug               detailed debugging messages\n      --detect              detect connected SoapySDR devices and exit\n      --info                show info about selected SoapySDR device and exit\n      --version             show program's version number and exit\n    \n    FFT bins:\n      -b BINS, --bins BINS  number of FFT bins (incompatible with -B, default: 512)\n      -B Hz, --bin-size Hz  bin size in Hz (incompatible with -b)\n    \n    Averaging:\n      -n REPEATS, --repeats REPEATS\n                            number of spectra to average (incompatible with -t and -T, default: 1600)\n      -t SECONDS, --time SECONDS\n                            integration time (incompatible with -T and -n)\n      -T SECONDS, --total-time SECONDS\n                            total integration time of all hops (incompatible with -t and -n)\n    \n    Measurements:\n      -c, --continue        repeat the measurement endlessly (incompatible with -u and -e)\n      -u RUNS, --runs RUNS  number of measurements (incompatible with -c and -e, default: 1)\n      -e SECONDS, --elapsed SECONDS\n                            scan session duration (time limit in seconds, incompatible with -c and -u)\n    \n    Device settings:\n      -d DEVICE, --device DEVICE\n                            SoapySDR device to use\n      -C CHANNEL, --channel CHANNEL\n                            SoapySDR RX channel (default: 0)\n      -A ANTENNA, --antenna ANTENNA\n                            SoapySDR selected antenna\n      -r Hz, --rate Hz      sample rate (default: 2000000.0)\n      -w Hz, --bandwidth Hz\n                            filter bandwidth (default: 0)\n      -p PPM, --ppm PPM     frequency correction in ppm\n      -g dB, --gain dB      total gain (incompatible with -G and -a, default: 37.2)\n      -G STRING, --specific-gains STRING\n                            specific gains of individual amplification elements (incompatible with -g and -a, example:\n                            LNA=28,VGA=12,AMP=0\n      -a, --agc             enable Automatic Gain Control (incompatible with -g and -G)\n      --lnb-lo Hz           LNB LO frequency, negative for upconverters (default: 0)\n      --device-settings STRING\n                            SoapySDR device settings (example: biastee=true)\n      --force-rate          ignore list of sample rates provided by device and allow any value\n      --force-bandwidth     ignore list of filter bandwidths provided by device and allow any value\n      --tune-delay SECONDS  time to delay measurement after changing frequency (to avoid artifacts)\n      --reset-stream        reset streaming after changing frequency (to avoid artifacts)\n    \n    Crop:\n      -o PERCENT, --overlap PERCENT\n                            percent of overlap when frequency hopping (incompatible with -k)\n      -k PERCENT, --crop PERCENT\n                            percent of crop when frequency hopping (incompatible with -o)\n    \n    Performance options:\n      -s BUFFER_SIZE, --buffer-size BUFFER_SIZE\n                            base buffer size (number of samples, 0 = auto, default: 0)\n      -S MAX_BUFFER_SIZE, --max-buffer-size MAX_BUFFER_SIZE\n                            maximum buffer size (number of samples, -1 = unlimited, 0 = auto, default: 0)\n      --even                use only even numbers of FFT bins\n      --pow2                use only powers of 2 as number of FFT bins\n      --max-threads NUM     maximum number of PSD threads (0 = auto, default: 0)\n      --max-queue-size NUM  maximum size of PSD work queue (-1 = unlimited, 0 = auto, default: 0)\n      --no-pyfftw           don't use pyfftw library even if it is available (use scipy.fftpack or numpy.fft)\n    \n    Other options:\n      -l, --linear          linear power values instead of logarithmic\n      -R, --remove-dc       interpolate central point to cancel DC bias (useful only with boxcar window)\n      -D {none,constant}, --detrend {none,constant}\n                            remove mean value from data to cancel DC bias (default: none)\n      --fft-window {boxcar,hann,hamming,blackman,bartlett,kaiser,tukey}\n                            Welch's method window function (default: hann)\n      --fft-window-param FLOAT\n                            shape parameter of window function (required for kaiser and tukey windows)\n      --fft-overlap PERCENT\n                            Welch's method overlap between segments (default: 50)\n\nExample\n-------\n::\n\n    [user@host ~] soapy_power -r 2.56M -f 88M:98M -B 500k -F rtl_power -O output.txt --even -T 1 --debug\n    DEBUG: pyfftw module found (using 4 threads by default)\n    DEBUG: Applying fixes for RTLSDR quirks...\n    INFO: Using device: RTLSDR\n    DEBUG: SoapySDR stream - buffer size: 8192\n    DEBUG: SoapySDR stream - read timeout: 0.103200\n    INFO: repeats: 106667\n    INFO: samples: 640002 (time: 0.25000 s)\n    INFO: max_buffer_size (samples): 32768000 (repeats: 5461333.33, time: 12.80000 s)\n    INFO: buffer_size (samples): 647168 (repeats: 107861.33, time: 0.25280 s)\n    INFO: buffer_repeats: 1\n    INFO: overlap: 0.00000\n    INFO: bin_size: 426666.67 Hz\n    INFO: bins: 6\n    INFO: bins (after crop): 6\n    INFO: sample_rate: 2.560 MHz\n    INFO: sample_rate (after crop): 2.560 MHz\n    INFO: freq_range: 10.000 MHz\n    INFO: hopping: YES\n    INFO: hop_size: 2.560 MHz\n    INFO: hops: 4\n    INFO: min_center_freq: 89.280 MHz\n    INFO: max_center_freq: 96.960 MHz\n    INFO: min_freq (after crop): 88.000 MHz\n    INFO: max_freq (after crop): 98.240 MHz\n    DEBUG: Frequency hops table:\n    DEBUG:   Min:          Center:       Max:    \n    DEBUG:     88.000 MHz    89.280 MHz    90.560 MHz\n    DEBUG:     90.560 MHz    91.840 MHz    93.120 MHz\n    DEBUG:     93.120 MHz    94.400 MHz    95.680 MHz\n    DEBUG:     95.680 MHz    96.960 MHz    98.240 MHz\n    DEBUG: Run: 1\n    DEBUG:   Frequency hop: 89280000.00 Hz\n    DEBUG:     Tune time: 0.017 s\n    DEBUG:     Repeat: 1\n    DEBUG:       Acquisition time: 0.251 s\n    DEBUG:     Total hop time: 0.282 s\n    DEBUG: FFT time: 0.103 s\n    DEBUG:   Frequency hop: 91840000.00 Hz\n    DEBUG:     Tune time: 0.010 s\n    DEBUG:     Repeat: 1\n    DEBUG:       Acquisition time: 0.251 s\n    DEBUG:     Total hop time: 0.272 s\n    DEBUG: FFT time: 0.006 s\n    DEBUG:   Frequency hop: 94400000.00 Hz\n    DEBUG:     Tune time: 0.010 s\n    DEBUG:     Repeat: 1\n    DEBUG:       Acquisition time: 0.252 s\n    DEBUG:     Total hop time: 0.266 s\n    DEBUG: FFT time: 0.004 s\n    DEBUG:   Frequency hop: 96960000.00 Hz\n    DEBUG:     Tune time: 0.010 s\n    DEBUG:     Repeat: 1\n    DEBUG:       Acquisition time: 0.253 s\n    DEBUG:     Total hop time: 0.267 s\n    DEBUG: FFT time: 0.004 s\n    DEBUG:   Total run time: 1.095 s\n    DEBUG: Number of USB buffer overflow errors: 0\n    DEBUG: PSD worker threads: 4\n    DEBUG: Max. PSD queue size: 2 / 40\n    DEBUG: Writer worker threads: 1\n    DEBUG: Max. Writer queue size: 2 / 100\n    INFO: Total time: 1.137 s\n\nOutput::\n\n    2017-03-17, 13:18:25, 88000000.0, 90560000.0, 426666.666667, 647168, -98.6323, -98.7576, -97.3716, -98.3133, -98.8829, -98.9333\n    2017-03-17, 13:18:25, 90560000.0, 93120000.0, 426666.666667, 647168, -95.7163, -96.2564, -97.01, -98.1281, -90.701, -88.0872\n    2017-03-17, 13:18:25, 93120000.0, 95680000.0, 426666.666667, 647168, -99.0242, -91.3061, -91.9134, -85.4561, -86.0053, -97.8411\n    2017-03-17, 13:18:26, 95680000.0, 98240000.0, 426666.666667, 647168, -94.2324, -83.7932, -78.3108, -82.033, -89.1212, -97.4499\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmikos%2Fsoapy_power","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmikos%2Fsoapy_power","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmikos%2Fsoapy_power/lists"}