Skip to main content

Samples of a line's terminal admittance, the rational model fitted through them, and its poles beneath the resonances

pyvectorfit

CI PyPI Python Documentation MIT license

Vector fitting of delayed pole-residue models for electromagnetic transient (EMT) simulation: rational fitting, universal line models with searched modal delays, and passivity assessment and enforcement, on plain NumPy arrays.

Documentation: examples, guide, benchmarks and API.

pip install pyvectorfit

Quick Start

import numpy as np
import pyvectorfit as vf

f = np.geomspace(1, 1e6, 121)  # Hz
s = 2j * np.pi * f[:, None, None]
r = 3e-5 * np.sqrt(1 + s / (2 * np.pi * 1e3))  # ohm/m, with skin effect
z = r * np.eye(2) + s * 1e-6 * np.array([[1.6, 0.5], [0.5, 1.6]])  # ohm/m
y = 1e-11 + s * 1e-12 * np.array([[8, -2], [-2, 8]])  # S/m

line, report = vf.fit_line(f, z, y, length=80e3)
line, correction = vf.enforce_passivity(line, f)
print(line.h.delays)  # s

Line constants z and y come from any line constants program. For overhead lines, OpenLine computes them from conductor and structure catalogs.

Author

Luke Lowery, PhD student in the Birchfield Research Group at Texas A&M University · Google Scholar · ORCID

Also by the author: OpenLine, overhead transmission line modeling · latkit, GPU visualization of large networks · sgwt, sparse graph convolution for power systems · gridkit-studio, a VS Code extension for GridKit

Metadata

Release files for pyvectorfit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvectorfit 0.1.1
File Size Uploaded Provenance Actions
pyvectorfit-0.1.1.tar.gz 22.8 kB With provenance Details for pyvectorfit-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyvectorfit 0.1.1
File Interpreter ABI Platform Actions
pyvectorfit-0.1.1-py3-none-any.whl Python 3 none any Details for pyvectorfit-0.1.1-py3-none-any.whl

Total release size: 42.7 kB

Release files / pyvectorfit-0.1.1.tar.gz

Download URL pyvectorfit-0.1.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c901881d3eabb9d97f1ee827ac3581bad2d830258bb7ad3e6c30609fe103a059
BLAKE2b-256 checksum
How to use checksums
7e2a1c6fb6da7f075fd3578c4e8a48e52f67118274d99b0b6a4c8bd24d4b9a15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Release files / pyvectorfit-0.1.1-py3-none-any.whl

Download URL pyvectorfit-0.1.1-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a395702f75c911f1ed22fc474c03c13c9e8e38b59d48885a164a62e0ae34836c
BLAKE2b-256 checksum
How to use checksums
6421e6c3978a285a7e191b0a849df05c8618f5f10462976011a0860cdb20caa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Security for pyvectorfit 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyvectorfit-0.1.1.tar.gz

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 Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page