Skip to main content

Compute antenna noise temperature from a NEC model file

Project description

Skynoise

Contents

Introduction

Skynoise computes the average sky temperature seen by an antenna from radiation pattern data produced by the NEC2 or NEC4 electromagnetic modelling software from a NEC model of the antenna.

User Guide

Installation

Windows

If Python is not installed, with a browser go to python.org

Hover over ‘Downloads’, and select ‘Windows’

Click on the ‘Latest Python Install Manager’ link and on the page that loads, click the button ‘Download Installer (MSIX)’

When it downloads, open the downloaded msix file and follow instructions to install Python. Note that you should do this in non-administrator mode so that Python installs under your normal user name (in Users<username>\AppData\Local\Python)

Once Python is installed bring up a command window or Powershell window and do the following:

py -m pip install skynoise

Besides skynoise several other packages - Numpy, Astropy, Astropy-healpix and Astronomy-engine - as required by skynoise, will also be installed if not already installed.

Linux

Normally Python is already installed in most distributions. If not, search online for instructions on how to install Python in your distribution. If you are still using Python version 2 then to run skynoise you will need also to install a recent version of Python3.

To use skynoise and other tools, they will be installed in a virtual environment (venv), which is the modern way to use Python in Linux.

Create a directory to work in with skynoise. In that directory do:

python -m venv venv

This will create a ‘venv’ directory in your working directory. Then do:

source venv/bin/activate

You will now see (venv) in front of the name@host$ prompt to remind you that you are in venv mode. Then do:

pip install skynoise

This will install skynoise plus any of the dependent libraries if not already installed. To exit from the venv environment, just type deactivate. To get back in then do:

source venv/bin/activate

again as above. You will need to have the virtual environment activated to use skynoise.

MacOS

Not having an Apple Mac to test, these instructions may not be quite correct.

With a browser, go to 'python.org'

Hover over ‘Downloads’, and select ‘macOS’

Click on the ‘Latest Python Release’ link and on the page that loads, click the button ‘Download macOS Installer’. This will download a standard macOS .pkg file. Install this .pkg file in the usual way.

Open a Terminal window and follow the instructions for Linux above from the sentence starting To use skynoise …. skynoise on macOS will use a virtual environment (venv) as on Linux.

Using Skynoise

Skynoise is a command line program so it needs to be used from a terminal window. Type:

skynoise --help

This will produce the following:

usage: skynoise [-h] [-c CONF] [-f FREQ] [-t TFILE] modelfile

Calculate the Antenna temperature from the input model

positional arguments:
  modelfile

options:
  -h, --help            show this help message and exit
  -c CONF, --conf CONF  Additional configuration file
  -f FREQ, --freq FREQ  Sky temperature to use 144 or 432. Default=144
  -t TFILE, --tfile TFILE  Tracking file - for temperature of moon positions

modelfile is required. This is the output file from the NEC2 or NEC4 electromagnetic modelling software. It specifically requires the 'RADIATION PATTERNS' data, which is produced by including a 'RP' line in the input model data to NEC. The recommended RP line is:

RP 0 181 360 1000 0 0 1 1

This will produce radiation pattern vectors at 1 degree intervals in both θ and φ. The genetic optimiser wrapper program for NEC, 4NEC2, already generates radiation pattern data in the correct format.

The program assumes that the model is constructed such that the direction of maximum gain (boresight) is along the positive X axis (θ = 90, φ = 0). So for a Yagi the boom direction is along the positive X axis and the elements extend in the Y (horizontal) or Z (vertical) directions.

The default configuration of Skynoise includes default Location and Observation data that will point the antenna model towards a low noise portion of the sky in the Northern Hemisphere at Right Ascension 142.0 degrees, Declination 30 degrees. The -c option takes an additional configuration file to provide Location and Observation data which supersede sections in the default configuration. The file is in toml format (https://toml.io):

[Location]
# example QTH Lat +ve North, Lon +ve East
Lat = 52.2
Lon = 1.4

[Observation]
# example pointing and date/time
Azimuth = 270.0
Elevation = 40.0
# must be UTC without a timezone offset field or Z suffix
ObTime = 2026-01-01T13:00:00

The -f option takes one of the two values 144 or 432. The default is 144 which selects sky noise data for 144MHz. 432 selects sky noise data for 432MHz.

The -t option takes a file of moon positions generated by the auxiliary program moontrack (see below). skynoise then generates an output file of the input moon positions with the calculated sky temperature appended.

Moontrack

This is the output from moontrack --help:

usage: moontrack [-h] [-l LOCFILE] [-i INTERVAL] [-p PERIOD] [-e MINELEVATION]
                 [latlon] starttime

Generate a list of Moon azimuth and elevation

positional arguments:
  latlon                Latitude & Longitude in the form lat:lon, Default =
                        52.2:1.4
  starttime

options:
  -h, --help            show this help message and exit
  -l LOCFILE, --locfile LOCFILE
                        File with location information
  -i INTERVAL, --interval INTERVAL
                        Interval between records. Default = 15 minutes
  -p PERIOD, --period PERIOD
                        Period of records, Default = 31 days
  -e MINELEVATION, --minelevation MINELEVATION
                        Minimum Elevation to track, Default = 10.0 degrees

The start time is a date of the form 2026-02-01. With the default values the program produces a list of moon positions from that date, every 15 minutes while the moon elevation is above 10 degrees, for 31 days. Each record looks like e.g.:

2026-02-01T00:15:00:00.000Z   122.851   22.864   204.545   58.997

The fields are in the order: Time, Right Ascension, Declination, Azimuth, Elevation.

The -l option takes a toml format file with location information in the same format as used in the configuration file for skynoise, described above. The same information can be supplied on the command line before the start time:

moontrack 52.2:1.4 2026-02-01 >mpoints_202602.txt

Note that the latitude and longitude values are separated by a colon (:)

The -i, -p and -e options are explained in the --help listing above.

Description

Sky noise temperature data for the VHF/UHF frequency bands was produced by an all-sky survey by Haslam et al at 408MHz in 1982. Most subsequent releases of data are still based on that survey. For this program, a re-processing of the Haslam data by Remazeilles et al in 2014 has been used. This data is available on NASA's Lambda server. The particular file used is haslam408_ds_Remazeilles2014.fits.

The file is in HEALPix (Hierarchical Equal Area isoLatitude Pixelization) format in Galactic coordinates with over 3 million data points at 408MHz. The pixel density of the data is reduced to 196,608 pixels and transformed to Equatorial (RA, Dec) coordinates. That temperature data is finally transformed to the frequencies of interest - 144MHz and 432MHz - by the following equation:

Tf = kT408 + C

Where k = (408/f)2.56 and C is a correction factor for extra-galactic noise.

When skynoise runs it reads the radiation pattern data, producing an xyz vector for each gain point. With the RP line described above there are 64442 vectors and gain points in total. For each point the gain is multiplied by sin(θ) to allow for the fact that points towards the θ = 0 and θ = 180 poles of the pattern represent reducing areas on the sphere. As sin(θ) = 0 at 0 and 180 degrees, these θ values are ignored during this process and the gains for those two polar points are accounted for at the end.

Each pattern vector is then rotated to put the boresight direction (+X axis) in the azimuth and elevation direction and the Right Ascension and Declination for each vector is calculated from the QTH latitude, longitude and the observation time. For vectors pointing above the horizon the sky temperature in that direction is interpolated from the sky noise data, and for vectors pointing on or below the horizon the standard temperature of 290K is used. The average temperature is then calculated as:

T =(∑temperature∗gain) / (∑gain)

As output the program produces e.g.:

Boresight RA,Dec: 142.000 30.000
Average Temperature: 190.688K
Gain Average: 0.976

The Gain Average is (∑gain)/(∑sin(θ)) and is similar to the EFFICIENCY figure in the POWER BUDGET section of the NEC output file.

John C Sager G8ONH March 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skynoise-0.2.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file skynoise-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: skynoise-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for skynoise-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 beb7d0d654903b6cf4434a42410a9ae6d6beb4b3519ab981ed987f3b1e0c0e8d
MD5 77f2b00ea877320c3c3422edfcb649b9
BLAKE2b-256 c98b5fcde7d2ddf31285bc968e275bb9d7f9f4cb85d7d7af9d5b59c9c084e34b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page