Tagged: python

Using 50 Lines of Python Code to Decode NOAA APT Weather Satellite Images

There are already many image decoders for the NOAA APT weather satellites available, with the most common and feature rich program being the abandoned freeware "WXtoIMG".

However many people may not know how simple the APT digital signal processing code is. Over on his blog post Dmitrii Eliuseev explains how only 50 lines of Python code are required to decode an image from received APT audio. Dmitrii's post shows how a Hilbert transform is used on the APT audio which is essentially the entire decoding step. This is then followed by a for loop that calculates the pixel luminosity from the decoded data, and plots it onto an image file. 

Of course the image is only grayscale (or in Dmitrii's case he decided to use greenscale), but adding false color and various other image enhancements found in advanced software like WXtoIMG are just standard image processing techniques.

Dmitrii concludes with the following:

Interesting to mention, that there are not so many operational radio communication systems in the world, the signal of which can be decoded using 20 lines of code. The NOAA satellites are about 20 years old, and when they finally will retire, the new ones will most likely be digital and format will be much more complex (the new Russian Meteor-M2 satellite is already transmitting digital data at 137 MHz). So those who want to try something simple to decode can be advised to hurry up.

[Also mentioned on Hackaday]

Simple decoding of NOAA APT satellites in Python

Hack Chat: Learning SDR and DSP with Marc Lichtman

On Wednesday Nov 11 Noon Pacific time, Hackaday will hold a hack chat (group text chat session) with Marc Lictman, author of the free online book "PySDR: A Guide to SDR and DSP using Python". We posted about the release of this book last month, noting that it is probably one of the best books in terms of explaining DSP fundamental concepts in an easy to understand way. Hackaday write:

Join us on Wednesday, November 11th at noon Pacific for Learning SDR and DSP Hack Chat with Marc Lichtman!

“Revolution” is a term thrown about with a lot less care than it probably should be, especially in fields like electronics. It’s understandable, though — the changes to society that have resulted from the “Transistor Revolution” or the “PC Revolution” or more recently, the “AI Revolution” have been transformative, often for good and sometimes for ill. The common thread, though, is that once these revolutions came about, nothing was ever the same afterward.

Such is the case with software-defined radio (SDR) and digital signal processing (DSP). These two related fields may not seem as transformative as some of the other electronic revolutions, but when you think about it, they really have transformed the world of radio communications. SDR means that complex radio transmitters and receivers, no longer have to be implemented strictly in hardware as a collection of filters, mixers, detectors, and amplifiers; instead, they can be reduced to a series of algorithms running on a computer.

Teamed with DSP, SDR has resulted in massive shifts in the RF field, with powerful, high-bandwidth radio links being built into devices almost as an afterthought. But the concepts can be difficult to wrap one’s head around, at least when digging beyond the basics and really trying to learn how SDR and DSP work. Thankfully, Dr. Marc Lichtman, an Adjunct Professor at the University of Maryland, literally wrote the book on the subject. “PySDR: A Guide to SDR and DSP using Python” is a fantastic introduction to SDR and DSP that’s geared toward those looking to learn how to put SDR and DSP to work in practical systems. Dr. Lichtman will stop by the Hack Chat to talk about his textbook, to answer your questions on how best to learn about SDR and DSP, and to discuss what the next steps are once you conquer the basics.

Our Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, November 11 at 12:00 PM Pacific time. If time zones baffle you as much as us, we have a handy time zone converter.

PySDR: A (Free) Guide to SDR and DSP using Python

Dr. Marc Lichtman has recently released his free online PySDR guide to Digital Signal Processing (DSP) explained with the help of software defined radio and Python code. Over the years we've seen numerous SDR & DSP courses come out, some requiring payment and some free. We note that this guide is completely free, and appears to be one of the better if not the best guide in terms of explaining DSP fundamental concepts in an easy to understand way. A lot of visualizations and animations are used which really help anyone new to the subject.

While the explanations are very good, please note that this is still a technical University level guide intended for Computer Science or Engineering students, so prerequisite knowledge is required. Dr. Marc recommends it for someone who is:

  1. Interested in using SDRs to do cool stuff
  2. Good with Python
  3. Relatively new to DSP, wireless communications, and SDR
  4. A visual learner, preferring animations over equations
  5. Better at understanding equations after learning the concepts
  6. Looking for concise explanations, not a 1000 page textbook

The SDR hardware used in the book examples is the PlutoSDR which is a fairly low cost SDR intended for use by students. However, the PlutoSDR isn't required as most of the code examples use generated data.

Developing Your Own SDR Applications With Python

[Max-Felix Müller] wanted to develop his own SDR application with the goal of learning python and a bit about signals processing. To accomplish this goal he’s using [pyrtlsdr] a library which wraps many of the functions from the [rtlsdr-dev] library into a Pythonic set of functions that you can use to develop SDR applications for an RTL based SDR in python. Over on Hackaday.io Max-Felix has been writing about his Python RTL-SDR experiments and has been uploading sample code for anyone to take a look at and learn from. 

Using the library is pretty simple as it handles the basics of setting up the frequency and PPM settings as well as gain and proceeds to tunnel samples into your application. Max-Felix’s examples take us from the very first steps of setting up the dongle and gathering samples, to plotting the spectrum and creating a waterfall. This generally entails the use of another python library known as [matplotlib] and [numpy], which together you can use to create your own FFT.

It is nearly limitless what you can do with a little bit of Python and a few libraries given enough development time and you don’t need to be a software developing master to get started. You may be interested in taking a look at [PLSDR] which we covered in a previous article where [P. Lutus] developed his own SDR application completely in Python. It’s open-source so feel free to take a look and learn more about how you can implement amazing things with just a little bit of code.

RTL-SDR Software Radio with CTypes

Thomas Winningham, author of the rtl_fm_python web application for the RTL-SDR has given a talk at the PyOhio 2014 conference. In Thomas’ presentation he gives an overview of the RTL-SDR dongle and then goes on to discuss his RTL-SDR Python library and software.

If you are interested in developing your own software for the RTL-SDR this talk may be of interest to you as he discusses several aspects of the code used in his RTL-SDR library.

Software Radio with CTypes