Skip to main content

Parametric radio frequency modelling, optimization and sampling

Project description

Tests Status Documentation Status

ParamRF Logo

ParamRF, or pmrf, is an open-source radio frequency (RF) modeling framework. It provides a declarative, object-orientated syntax for creating complex RF circuit and surrogate models using JAX and Equinox. The library also provides tools for model optimization, fitting, statistical analysis and Bayesian inference.

Version:

GitHub Release

Author:

Gary Allen

Homepage:

https://github.com/gvcallen/paramrf

Docs:

https://gvcallen.github.io/paramrf

Paper:

https://doi.org/10.48550/arXiv.2510.15881

Features

  • Declarative syntax: Allows for the definition of models using either a self-documenting, declarative syntax, or via compositional techniques such as cascading or node composition. Since models can consist of a mix of parax.Parameter and other pmrf.Model objects, this allows for a natural means of building complex, hierarchial models.

  • Differentiable: Since the framework is built using jax, all models can be differentiated with respect to frequency and parameters. This allows for complex optimization and sensitivity analysis.

  • High performance and hardware flexibile: Since models are compiled using jax with Just-In-Time (JIT) compilation, model performance is improved, and models can also be computed on high-performance hardware (CPU, GPU, TPU).

  • Built-in optimization and inference wrappers: Provides built-in wrappers for frequentist optimization and Bayesian inference in pmrf.optimize and pmrf.infer, as well as high-level wrappers for data-fitting such as pmrf.fitting.fit.

  • Extensibility: Designed to be extendable, such that additional models, fitting algorithms, cost functions, sampling routines etc. can easily be implemented.

Installation

ParamRF can be installed directly using pip (requires Python 3.11+):

$ pip install paramrf

Note that For Bayesian inference or complex statistical modeling, you may need this fork of distreqx:

$ pip install git+https://github.com/gvcallen/distreqx.git

Example

The example below shows how to define and optimize a simple RLC model to satisfy a given goal function. See the documentation for more complex examples, or have a look at the tutorials folder on GitHub.

import pmrf as prf
from pmrf.models import Resistor, Inductor, Capacitor

# Define the model and frequency
freq = prf.Frequency(1, 10, 101, 'GHz')
rlc_model = Resistor(50) ** Inductor(1e-9) ** Capacitor(1e-12)

# Define the optimization frequency and goal
opt_freq = prf.Frequency(4, 6, 101, 'GHz')
goal = prf.evaluators.Goal('s11_db', '<', -20)

# Optimize the model with Nelder-Mead and output results
result = prf.optimize.minimize(goal, rlc_model, opt_freq, method='Nelder-Mead')
result.model.plot_s_db(freq, m=0, n=0)
print(result.model.param_values())

Optional dependencies

Several additional dependencies are required/recommended for more advanced use-cases.

For PolyChord inference:

$ pip install git+https://github.com/PolyChord/PolyChordLite.git anesthetic mpi4py

For BlackJAX inference:

$ pip install git+https://github.com/handley-lab/blackjax@nested_sampling anesthetic

For eqx-learn surrogate modeling:

$ pip install git+https://github.com/eqx-learn/eqx-learn

Citation

If you have used ParamRF for academic work, please cite the original paper (https://doi.org/10.48550/arXiv.2510.15881): as:

G.V.C. Allen, D.I.L. de Villiers, (2025). ParamRF: A JAX-native Framework for Declarative Circuit Modelling. arXiv, https://doi.org/10.48550/arXiv.2510.15881.

or using the BibTeX:

@article{paramrf,
   doi = {10.48550/arXiv.2510.15881},
   url = {https://doi.org/10.48550/arXiv.2510.15881},
   year = {2025},
   month = {Oct},
   title = {ParamRF: A JAX-native Framework for Declarative Circuit Modelling},
   author = {Gary V. C. Allen and Dirk I. L. de Villiers},
   eprint = {2510.15881},
   archivePrefix = {arXiv},
   primaryClass = {cs.OH},
}

Project details


Download files

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

Source Distribution

paramrf-0.16.4.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

paramrf-0.16.4-py3-none-any.whl (137.2 kB view details)

Uploaded Python 3

File details

Details for the file paramrf-0.16.4.tar.gz.

File metadata

  • Download URL: paramrf-0.16.4.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for paramrf-0.16.4.tar.gz
Algorithm Hash digest
SHA256 9aab58684ae349ad535cadfd758033a883a8ee4d4e2d2bda01606aa33d0fec27
MD5 cad90bf93320fa3859779120ed1ee8de
BLAKE2b-256 efc414de2101163f4f393b28f7e36fd5f8bd0f4845932dc332ca6ec67d481491

See more details on using hashes here.

Provenance

The following attestation bundles were made for paramrf-0.16.4.tar.gz:

Publisher: publish.yml on gvcallen/paramrf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paramrf-0.16.4-py3-none-any.whl.

File metadata

  • Download URL: paramrf-0.16.4-py3-none-any.whl
  • Upload date:
  • Size: 137.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for paramrf-0.16.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d99ef0b7fcdcd2cb29bf33ae60c950d1664e079d8c900d61c933e29f80d6fd7c
MD5 66e5545a1d806dd2bbaeca092443991e
BLAKE2b-256 c45729644f6167bbfb8cbee5d5d8f2b50134c9039c26c9d025da3b2748cdaff7

See more details on using hashes here.

Provenance

The following attestation bundles were made for paramrf-0.16.4-py3-none-any.whl:

Publisher: publish.yml on gvcallen/paramrf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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