INcoherent SCAtter Radar spectrum
Info
Calculates an incoherent scatter radar spectrum based on the theory presented in Hagfors (1961) and Mace (2003).
Installing
You can install inscar via pip from PyPI:
$ pip install inscar
Usage
Please see the Modules Reference for details.
Physical environment
The plasma parameters that are supported natively by the program are
Radar frequency [Hz]
This will also set the radar wave number (= -4pi(radar frequency)/(speed of light))
Magnetic field strength [T]
Aspect angle [1]
Electron temperature [K]
Ion temperature [K]
Electron collision frequency [Hz]
Ion collision frequency [Hz]
Electron mass in atomic mass units [u]
Ion mass in atomic mass units [u]
Electron number density [m^(-3)]
Ion number density [m^(-3)]
Kappa value for the kappa velocity distribution function [1]
Custom simulation set-ups can be made by inheriting from the different classes. Say you want a Particle class that also carries information about the temperature of a collection of super thermal electrons as well as some height information. You then inherit from Particle and decorate it with the @attr.s object:
@attr.s
class RealDataParticle(isr.Particle):
"""Create a particle object with extra attributes."""
superthermal_temperature: float = attr.ib(
default=90000,
validator=is_positive,
on_setattr=attr.setters.validate,
)
z: int = attr.ib(default=300)
For more examples, see the assets directory.
Calculation method
The program support different methods of calculating the spectrum, based on how you assume the particles to be distributed. This includes a Maxwellian distribution (IntMaxwell class) and a kappa distribution (IntKappa class), in addition to any arbitrary isotropic distribution (IntLong class) which can take any Vdf as particle velocity distribution (default is VdfMaxwell). An example showing how a new Vdf class can be made is given in assets (VdfRealData).
Aside
This program was developed during my master thesis. For a more detailed explanation of the mathematical derivations and an analysis of the numerical precision of the program, please refer to the thesis found at munin.uit.no.
Contributing
To contribute to the project, clone and install the full development version (uses rye for dependencies). Optionally, you may also install the pre-commit hooks to automatically format the code and run the tests before committing.
$ git clone https://github.com/engeir/inscar.git
$ cd inscar
$ rye install
$ pre-commit install
Before committing new changes to a branch you may run command
$ nox
to run the full test suite. You will need Rye and nox installed for this.
Release files for inscar 3.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inscar-3.3.2.tar.gz | 41.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inscar-3.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.4 MB
Release files / inscar-3.3.2.tar.gz
| Download URL | inscar-3.3.2.tar.gz |
|---|---|
| Size | 41.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00998ed396e799a865964913ede6ec2f18817ce0351226b715864f4fa102e55a
|
|
BLAKE2b-256 checksum How to use checksums |
68fd0c8ee07c7e799f992da9467186656cd0c2686dbe9c9c93fcc1923518cfcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / inscar-3.3.2-py3-none-any.whl
| Download URL | inscar-3.3.2-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2ef14db3c478beabf8e38c2d9f91a6381458063ff6ffa22ec99e59aa23c53b0
|
|
BLAKE2b-256 checksum How to use checksums |
121a4bc8478e496835e0def3f6aa2a91756b665cf1701737b4d4acaf0b62ed1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|