ISRSpectrum
by John Swoboda
Overview
This is a Python module to calculate an incoherent scatter spectrum based off of Kudeki and Milla's 2011 IEEE Geophysics paper.
Kudeki, E.; Milla, M.A., "Incoherent Scatter Spectral Theories—Part I: A General Framework and Results for Small Magnetic Aspect Angles," Geoscience and Remote Sensing, IEEE Transactions on , vol.49, no.1, pp.315,328, Jan. 2011
Like the model covered in the paper the software can calculate a spectra given, any magnetic aspect angle not perpendicular to B, any number of ion species, and the collision frequencies associated with those ion species. As the magnetic aspect angles get closer to perpendicular to B, usually < 1 degree perp to B, more and more calculations are needed for the Gordeyev to converge.
Installation
The package can be installed through anaconda through the following command
conda install -c swoboj isrspectrum
The package is also avalible through pypi and using using pip
pip install isrspectrum
The user can also download the software and install it through pip or set up tools if they prefer.
git clone https://github.com/jswoboda/ISRSpectrum.git
cd ISRSpectrum
pip install -e .
Code Examples
In order to create the spectrums, assuming the user installed the code, first import the ISRSpectrum class and create an instance of the class.
import numpy as np
from ISRSpectrum import Specinit
import scipy.constants as spconsts
spfreq = 50e3
nspec = 512
ISS2 = Specinit(centerFrequency = 440.2*1e6, bMag = 0.4e-4, nspec=nspec, sampfreq=spfreq,dFlag=True)
ti = 1e3
te = 1e3
Ne = 1e11
Ni = 1e11
mi = 16
Ce = np.sqrt(spconst.Boltzmann*te/spconst.m_e)
Ci = np.sqrt(spconst.Boltzmann*ti/(spconst.m_p*mi))
datablock90 = np.array([[Ni,ti,0,1,mi,0],[Ne,te,0,1,1,0]])
(omega,specorig,rcs) = ISS2.getspec(datablock90, rcsflag = True)
Where each colum of the data block is represented as a the information for a ion/electron species. The list is in this order:
- density(m^-3)
- temperature(K)
- Doppler velocity (m/s)
- charge in elementary charges
- mass of the species in AMU
- collision frequency in s^-1.
The info for the electron species must be the last row also !
Alternatively, if you are only using the following species: O+,NO+,N2+,O2+,N+, H+, e-, a simpler interface is available. Using this interface quasi-neutrality is assumed so the number of positive ions and electrons are the same. The user can get spectrum in the following way.
from ISRSpectrum import Specinit
import numpy as np
spfreq = 50e3
nspec = 512
ISS2 = Specinit(centerFrequency = 440.2*1e6, bMag = 0.4e-4, nspec=nspec, sampfreq=spfreq,dFlag=True)
ti = 1e3
te = 1e3
Ne = 1e11
Ni = 1e11
vi = 0
species = ['O+','e-']
datablock = np.array([[Ni,ti],[Ne,te]])
(omega,specorig,rcs) = ISS2.getspecsep(datablock,species,vi,90,rcsflag = True)
Further examples can be found in Examples/examplespectrums.py
Note
I switch the default branch to main. If you have a local copy of the software you can run the following commands to deal with the renaming
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Metadata
Release files for ISRSpectrum 4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| isrspectrum-4.3.tar.gz | 19.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| isrspectrum-4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.1 kB
Release files / isrspectrum-4.3.tar.gz
| Download URL | isrspectrum-4.3.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cbab4afaaf4bbf016130f135cb62c6ab9384c98b09cb3377ab12dee0310f4ea
|
|
BLAKE2b-256 checksum How to use checksums |
441958ef530f5627acd3a97da366279615a45dbc36bed4568556b6e1340ebf70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.
Transparency logRelease files / isrspectrum-4.3-py3-none-any.whl
| Download URL | isrspectrum-4.3-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f1c3551df91297ea8937dd20ff72608ecb260555c7028b6c3adda4911aae94e
|
|
BLAKE2b-256 checksum How to use checksums |
3d8c62b1c2754e72a42d86f2e0bc60c69f2d47cf6aa9acbdf5d25589c076b310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.
Transparency log