Software for observing Galactic Hydrogen spin flip photons using GNU Radio flow graphs?

313 views
Skip to first unread message

Stephen Arbogast

unread,
May 29, 2025, 11:50:47 PM5/29/25
to Society of Amateur Radio Astronomers
 It has been said that laziness is good in an Engineer. I like GNU Radio flow  graphs  where  I can  connect blocks of code to achieve my  goals  instead of writing detailed  code.
 I know I will have to  write an out of tree  block  to achieve this  like in the  project DSPIRA.
 
 Something like  Ted Cline's  ideas where moving my dish is not necessary  until I get my  az/el motors working.
 
 Am  I  crazy?

 

HI_averaged_spectrum.grc

Marcus D. Leech

unread,
May 30, 2025, 12:04:29 AM5/30/25
to sara...@googlegroups.com
I"ve been using GR, and been a contributor to GR since 2004.  Works for me, and I did a 2-part seminar series for the BAA a couple of years ago
  on the subject for GR and amateur radio astronomy.  You can find that seminar series on YouTube, and the code is on github:

https://github.com/ccera-astro/baa_seminar

Out-of-tree modules for doing "clever little things" aren't usually necessary since the introduction of "embedded Python blocks".
  The BAA Seminar code uses them in a couple of places -- mostly to provide logging in a format that is easily consumable by
  analysis tools, etc.

My tendency for integration has been to use a single-pole IIR filter, so, no custom integrator blocks required.

While one *can* achieve some performance advantages by careful hand-coding, rather than using Gnu Radio's "string of pearls" approach, it's
  not for the faint of heart.  If performance is your goal, then you end up re-inventing some of the territory that Gnu Radio has already explored
  over the years.  The only thing it cannot do, where hand-coding by a DSP wizz is better, is the notion of "functional collapse".  There are cases
  where when you have two adjacent transforms happening, there may be a third transform that is more efficient than the sum of the two
  adjacent transforms.  Gnu Radio takes fairly-aggressive advantage of both multi-threading AND vector SIMD implementations for many many of
  the core processing blocks.  Hand coding all of that, as a naive coder, would be a challenge.

What has historically held people back is that installation on Windows was a colossal PITA.   Since the advent of radioconda, that is MUCH MUCH less
  of a challenge, from what I gather.

CCERA's observatory work has been Gnu Radio-centric for many years.   I think Astropeiler Stockert uses some Gnu Radio tools, and DSES are using
  a modified version of one of our early pulsar flow-graphs for their pulsar work.

I find that it is very useful for doing quick experiments, and just as useful for "production".

Cheers

 

--
--
You received this message because you are subscribed to the Google
Groups "Society of Amateur Radio Astronomers" group.
To post to this group, send email to sara...@googlegroups.com
To unsubscribe from this group, send email to
sara-list-...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sara-list?hl=en
---
You received this message because you are subscribed to the Google Groups "Society of Amateur Radio Astronomers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sara-list+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sara-list/11ca3cc7-b314-463c-bb4e-aba1aad85ca5n%40googlegroups.com.

Stephen Arbogast

unread,
May 30, 2025, 12:25:55 AM5/30/25
to Society of Amateur Radio Astronomers
Thank you,

tedcl...@gmail.com

unread,
May 30, 2025, 2:44:24 AM5/30/25
to Society of Amateur Radio Astronomers
      On Thursday, May 29, 2025 at 10:04:29 PM UTC-6 Marcus D. Leech wrote:
      ...
      I did a 2-part seminar series for the BAA a couple of years ago on the subject for GR and amateur radio astronomy.

GNU Training Seminar Unpacking the mysteries of GNU Radio
RAG Zoom Sep 18, 2021
Marcus Leech;  a leading authority on GNU for Radio Astronomers.

GNU II Training seminar - Unpacking more mysteries of GNU Radio
RAG Zoom Jan 15 2022
Marcus Leach  - Canadian Centre for Experimental Radio Astronomy

      and the code is on github:
...

Anthony

unread,
May 30, 2025, 7:26:00 AM5/30/25
to Society of Amateur Radio Astronomers
Been using GNU Radio ever since introduced to it four years ago! Windows was used for my other applications but over the years find my comfort with Linux. 

Marcus Fisher

unread,
May 30, 2025, 8:02:11 AM5/30/25
to sara...@googlegroups.com

Anyone want to do a GNU Radio demo/training on Saturday at the conference, we will have some scope in a boxes set up too

-- Marcus Fisher
mugseysoftware.com
mar...@mugseysoftware.com

Society for Amateur Radio Astronomers (SARA)
vicepresident@radio-astronomy
www.radio-astronomy.org

andrew....@googlemail.com

unread,
May 30, 2025, 1:38:53 PM5/30/25
to sara...@googlegroups.com

I would love to attend one if it can be done remotely as I can’t be there in person – but I don’t know enough to run one

Andy

Marcus D. Leech

unread,
May 30, 2025, 2:11:56 PM5/30/25
to sara...@googlegroups.com
On 2025-05-30 13:38, andrew.thornett via Society of Amateur Radio Astronomers wrote:

I would love to attend one if it can be done remotely as I can’t be there in person – but I don’t know enough to run one

Andy

 

I'd be the obvious person to run a training seminar on the subject, but I can't be there.  And I don't really have time to prepare anything.


Stephen Arbogast

unread,
May 31, 2025, 7:45:24 PM5/31/25
to Society of Amateur Radio Astronomers
Yes,  I plan to try  an IIR filter...  but.. in the meantime  I am  experiencing  weird problems on my old  Intel iMac from 2012....  on  both an external SSD and  internal HDD running Ubuntu.  Applications  stop  running   randomly....  Perhaps  time to retire the old iMac.  For now I am stuck  using Windows 11.    I have all data backed up...no problem there!


On Thursday, May 29, 2025 at 10:04:29 PM UTC-6 Marcus D. Leech wrote:

Stephen Arbogast

unread,
Jun 3, 2025, 1:57:19 PM6/3/25
to Society of Amateur Radio Astronomers
Playing with the IIR filter from project DSPIRA...Screenshot from 2025-06-03 11-55-55.png
H1_spectrum_filterd.grc

Marcus D. Leech

unread,
Jun 3, 2025, 3:19:04 PM6/3/25
to sara...@googlegroups.com
On 2025-06-03 13:57, 'Stephen Arbogast' via Society of Amateur Radio Astronomers wrote:
Playing with the IIR filter from project DSPIRA...
I just use the built-in Single Pole IIR filter that has been in Gnu Radio since forever....

It kind of looks like you're trying to implement a WOLA FFT implementation.   There's very little advantage, and considerable
  computational cost to this for the types of things we do here.

Also, I generally process the FFT output with a "Complex to Mag**2", which basically extracts the PSD function, then integrate with
  a single-pole IIR filter.

Not sure what you're trying to achieve with conj multiply.


Stephen Arbogast

unread,
Jun 3, 2025, 4:17:35 PM6/3/25
to Society of Amateur Radio Astronomers
Okay,  I will try your suggestions for a simpler implementation and compare the two.   Yes, the Multiply Conjugate block converts complex to magnitude squared but still outputs a complex number.... kind of weird.

Stephen Arbogast

unread,
Jun 3, 2025, 5:00:36 PM6/3/25
to Society of Amateur Radio Astronomers
With dish pointing toward outer galactic plane...

Screenshot from 2025-06-03 14-58-11.png

Nathaniel Butts

unread,
Jun 5, 2025, 12:31:13 PM6/5/25
to Society of Amateur Radio Astronomers

Howdy all,

I've used some GR stuff for UHF/VHF ham stuff and it was pretty exceptional there, especially signal detection.  I've been attempting to learn more about it for radio astro.  Using the gr_radio_astro blocks provided by WVU and the spectrometer with calibration example it gives me a T_sys of 1300-1650, which doesn't seem quite feasible.  Will be doing some more testing to try to get an accurate T_sys.

Thanks,

Nathan Butts KQ4TIV
Wannabe Astronomy
Bowling Green, KY

Stephen Arbogast

unread,
Jun 5, 2025, 4:22:34 PM6/5/25
to Society of Amateur Radio Astronomers
Single Pole IIR Filter

Screenshot from 2025-06-05 14-20-22.png
H1_simpler.grc

Marcus D. Leech

unread,
Jun 5, 2025, 6:21:33 PM6/5/25
to 'Stephen Arbogast' via Society of Amateur Radio Astronomers
On 2025-06-05 16:22, 'Stephen Arbogast' via Society of Amateur Radio Astronomers wrote:
Single Pole IIR Filter
I'm afraid that you flow-graph displays a certain confusion about what exactly one should be doing to the signal, and in what order.

Starting at the far end.  The "Qt Frequency Display" *already* does:   FFT-->complex-to-mag**2->single-pole-iir-->logarithm-conversion--->display

Your flow should be more like:

signal-source-->stream-to-vector-->FFT-->complex-to-mag**2-->single-pole-iir-->keep_one-in_N--->display/save-data

So, let's discuss the above.

Since FFTs generally operate on a fixed-size "window" of data, we have to take the continuous stream, and turn it into "vectors" that correspond
  to our desired FFT size.  The larger the FFT,  the higher the spectral resolution, but the slower it produces outputs.  Inside the FFT function, you can
  ask it to apply a "window" function--this is important to "smooth out" the inherent discontinuities at the edge of your window.  I tend to use the
  Blackmann-Harris window function.  There are others.

Once you have the FFT output, the signal is represented in complex frequency form.  You want to extract the power information.  Soooooo, you compute
  the complex-to-mag**2, which produces a simple floating-point output.

Once you have THAT, you want to integrate/average/low-pass-filter it (they're all conceptually very similar mathematically).   I use a single-pole-iir
  filter, because they have a computationally-simple structure.   Once you have THAT, you can basically discard many many of the outputs, because
  our frequency estimate changes only very very slowly, compared to the input sample rate.  That is, *information rate* of this data is very very low,
  so there's no poing in recording all of it.

Now, I cover much of this in my BAA Seminar.  Granted I think the "total runtime" on that (over the two seminars) is probably something like
  3 hours.  A lot to sit through.

Keep in mind that a lot of this DSP stuff is something you might learn, over the course of a year perhaps, while getting a "modern" EECS degree.
  It's hard to compress it all down into the essences required just for radio astronomy use.    Very few radio astronomy signal chains, for example,
  need to understand phase modulation, error-coding, timing-extraction , what OFDM is and why you'd care, etc, etc, etc.  But there's also a lot
  of "basics".  Like what is an FFT, and what does it tell us?  Why use a window function?  Can we/should we improve on the basic FFT transform?
  How do you extract total-power estimates from an FFT?  What about without an FFT?  What is a complex-baseband signal, and why do we care?

In addition there are things like the Nyquist sampling theorem.  Information theory from Shannon et al.

One of the "seductive" things about Gnu Radio and similar frameworks (like Pothos), is that it kind of makes it seem like you don't actually need
  any kind of "background knowledge" in order to be successful.  That's a trap......  :) :)

  


Stephen Arbogast

unread,
Jun 5, 2025, 7:08:14 PM6/5/25
to Society of Amateur Radio Astronomers
Screenshot from 2025-06-05 17-05-32.png
Better?
H1_simpler.grc

Marcus D. Leech

unread,
Jun 5, 2025, 7:58:57 PM6/5/25
to sara...@googlegroups.com
On 2025-06-05 19:08, 'Stephen Arbogast' via Society of Amateur Radio Astronomers wrote:
Screenshot from 2025-06-05 17-05-32.png
Better?
Yup.   The vector-to-stream in front of your Vector Display shouldn't be necessary.


Stephen Arbogast

unread,
Jun 6, 2025, 12:54:05 AM6/6/25
to Society of Amateur Radio Astronomers

Stephen Arbogast

unread,
Jun 6, 2025, 4:06:06 AM6/6/25
to Society of Amateur Radio Astronomers
Very  cool  stuff  ..   Jupyter labs notebook  for exploring    DSP...  Screenshot from 2025-06-06 01-59-30.png

Alex P

unread,
Jun 6, 2025, 5:40:54 AM6/6/25
to Society of Amateur Radio Astronomers
From my course at the Univ of Central Fla : Mechanical Systems : Dynamic Test & Analysis 
Leakage & Windowing 
Windowing_Leakage.jpg


wk07_SubSet _Windows__Rev10_Fall10.pdf

flavio camacho

unread,
Jun 6, 2025, 6:42:00 AM6/6/25
to sara...@googlegroups.com
Steven nice on the Fourier transform I did a bit on it too on my own. I dipped into the Fourier series which is more difficult. Wave form decomposition really opened the tech doors. 
--
--
You received this message because you are subscribed to the Google
Groups "Society of Amateur Radio Astronomers" group.
To post to this group, send email to sara...@googlegroups.com
To unsubscribe from this group, send email to
sara-list-unsubscribe@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/sara-list?hl=en
---
You received this message because you are subscribed to the Google Groups "Society of Amateur Radio Astronomers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sara-list+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sara-list/830188a5-8e80-4dc5-91bd-73942f5a93b4n%40googlegroups.com.

Steve Hallman

unread,
Jun 6, 2025, 6:51:09 AM6/6/25
to sara...@googlegroups.com

Hi Nathan;


Your T_Sys measurement may not be in error.


I have a Scope in a Box, system with a SAWBird H1 Filter/LNA and Smartee SDR which measures a T_Sys of about 1440 K.


It's important to remember that the System Temperature (T_Sys) is NOT the System Noise (Sigma_Noise).


Your Ability to detect H1 signals is limited by the System Signal to Noise Ratio (SNR)


The System_Noise part of the SNR is:


Sigma_Noise = T_Sys / √(integration_time * bandwidth)


So for:

T_Sys = 1475 [K]

Integration_time = 300 [s]

Bandwidth = 2.5 [MHz] / 256 [FFT bins] = 9765 [Hz]


Sigma_Noise = 1475 [K] / √(300 [s] * 9765 [Hz] )


Giving ...

Sigma_Noise = 0.86 [K]


P.S. I've been following your GNU Radio work and I'm intrigued ... Keep up the good work 


Steve Hallman 

Retired Physicist


Stephen Arbogast

unread,
Jun 8, 2025, 5:08:20 PM6/8/25
to Society of Amateur Radio Astronomers
FYI,
I went through the BAA_Seminar  on YouTube and  have it working on Ubuntu 24.04.2, GRC 3.10.9.2 (Python 3.12.3)
Very educational, thanks.

Screenshot from 2025-06-08 15-03-07.png

Marcus D. Leech

unread,
Jun 8, 2025, 9:28:11 PM6/8/25
to sara...@googlegroups.com
On 2025-06-05 13:17, Steve Hallman wrote:

Hi Nathan;


Your T_Sys measurement may not be in error.


I have a Scope in a Box, system with a SAWBird H1 Filter/LNA and Smartee SDR which measures a T_Sys of about 1440 K.


It's important to remember that the System Temperature (T_Sys) is NOT the System Noise (Sigma_Noise).


Your Ability to detect H1 signals is limited by the System Signal to Noise Ratio (SNR)


The System_Noise part of the SNR is:


Sigma_Noise = T_Sys / √(integration_time * bandwidth)


So for:

T_Sys = 1475 [K]

Integration_time = 300 [s]

Bandwidth = 2.5 [MHz] / 256 [FFT bins] = 9765 [Hz]


Sigma_Noise = 1475 [K] / √(300 [s] * 9765 [Hz] )


Giving ...

Sigma_Noise = 0.86 [K]


P.S. I've been following your GNU Radio work and I'm intrigued ... Keep up the good work 


Steve Hallman 

Retired Physicist

If T_sys was properly derived using the Y-factor technique, then a T_sys of 1400+K suggests something horribly wrong.

The T_sys has a couple of components of interest--the equivalent noise temperature of your receiving chain, which, in the case of the
  NooElec SawBird+ H1 will be *utterly dominated* by the noise temperature of the LNA, which is around 50-60K, and the LNA has
  a typical gain between around 38dB and 42dB.  So unless components down-stream of the LNA are wildly misbehaving, there's something
  else contributing, like side-lobe noise, but even that should be at *MOST* 300K.

My guess is that either the LNA is broken (possible, although I have rather a lot of them, and they don't fail very often), or something is
  wrong with the measurement technique.


Nathaniel Butts

unread,
Jun 8, 2025, 9:38:58 PM6/8/25
to sara...@googlegroups.com
Was kind of my feeling as well.  I've got a couple of wideband lna coming from Amazon tomorrow for an ADS-B antenna and another project.  Once I heal up some more from this kidney stone surgery I'll go out there and put one on just as a sanity check.  No filter, but even without it should make a big difference.  This will do until I get my GPIO labs lna in the mail and can figure out how to integrate it into my software chain.

Thanks,

Nathan Butts 
KQ4TIV
Wannabe Astronomer
Bowling Green, KY


You received this message because you are subscribed to a topic in the Google Groups "Society of Amateur Radio Astronomers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sara-list/_dxRG-4aDgM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sara-list+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sara-list/127ddd56-52ca-4326-a5c9-9b6f5e018b3b%40gmail.com.

Marcus D. Leech

unread,
Jun 8, 2025, 9:42:49 PM6/8/25
to sara...@googlegroups.com
On 2025-06-08 21:38, Nathaniel Butts wrote:
Was kind of my feeling as well.  I've got a couple of wideband lna coming from Amazon tomorrow for an ADS-B antenna and another project.  Once I heal up some more from this kidney stone surgery I'll go out there and put one on just as a sanity check.  No filter, but even without it should make a big difference.  This will do until I get my GPIO labs lna in the mail and can figure out how to integrate it into my software chain.

Thanks,

Nathan Butts 
KQ4TIV
Wannabe Astronomer
Bowling Green, KY

Good luck with the kidney stones.   I've had them twice, but neither time required surgery.    I also have a friend who
  went through acoustic lithotrypsy (sp???).

Look at us old guys talking about kidney stones.  Yikes!


Nathaniel Butts

unread,
Jun 8, 2025, 9:45:58 PM6/8/25
to sara...@googlegroups.com
Lol, I've got kidney stones, gallstones, and an enlarged spleen.  I hear my next punch will get me a free surgery!

Thanks,

Nathan Butts 
KQ4TIV
Wannabe Astronomer
Bowling Green, KY

Stephen Arbogast

unread,
Jun 8, 2025, 9:56:03 PM6/8/25
to Society of Amateur Radio Astronomers
Did   two   kidney  stone  surgeries  last summer   and  survived  but   with   large stone   in my  gall bladder  and  large  cyst  on my left  kidney.... Don't it   always  seem to  go?  Joni  Mitchell.....

Anthony

unread,
Jun 10, 2025, 2:19:29 PM6/10/25
to sara...@googlegroups.com
Just a quick add-on from my own setup: I ran Marcus Leech’s BAA Seminar GRC flow-graph on my two-dish interferometer and was able to capture the Milky Way’s 21 cm hydrogen line in real time. Overlaying the East/West spectra (blue/red traces) shows the Doppler-shifted peak at about ±0 km/s, and the Total-Power plot confirms stable integration over an hour. It’s a simple, fully open-source chain—but it really drives home how accessible radio astronomy can be with GNU Radio and a pair of 3 m dishes. I’m very thankful to Marcus for creating such a valuable interferometric tool. Images attached. 



Hydrogen_scan-05-10-2025b.png
Hydrogen_scan-05-10-2025c.png
Hydrogen_scan-05-10-20251a.png
Hydrogen_scan-05-10-2025d.png

Stephen Arbogast

unread,
Jun 11, 2025, 7:22:13 PM6/11/25
to Society of Amateur Radio Astronomers
Very cool!   I am looking into setting up a  second dish to try this. Thank You Marcus  Leech.

Nathaniel Butts

unread,
Jun 24, 2025, 9:09:15 PM6/24/25
to sara...@googlegroups.com
Put the wide band on, very janky like, and got T_sys down to 600 without any adjustments.  So I think we're on to something.  Good time to order a GPIO labs lna for a replacement.

Thanks,

Nathan Butts 
KQ4TIV
Wannabe Astronomer
Bowling Green, KY

Reply all
Reply to author
Forward
0 new messages