Skip to main content

applyaf

PyPI Version Python Versions CI Status Coverage Status License Badge

applyaf is a Python 3.12+ module that applies frequency dependent antenna factors and cable losses to spectrum analyzer readings in order to calculate the incident field. Any duplicate frequency entries in the antenna factors or cable losses data are removed before interpolating the frequencies to match those of the spectrum analyzer readings.

Inputs

Three csv files containing the following are required inputs:

  1. Spectrum analyzer measurements
  2. Antenna factor data
  3. Cable loss data

Each CSV file should contain data in two columns:

  1. Frequency
  2. Amplitude

The amplitude is expected to be in dB.

Dependencies

See the pyproject.toml and uv.lock files for the dependency requirements.

Future Improvements

Some thoughts for future improvements include:

  1. Allowing CSV data files that contain non-dB amplitudes and then convert as needed. Should this be a per-file setting?
  2. Generalize the code to handle a variable number (>3) of data to be interpolated and applied to the given data set.
  3. If the code is generalized, should this be wrapped into the siganalysis project or left on its own?

Contributing

Contributions are welcome! To contribute please:

  1. Fork the repository
  2. Create a feature branch
  3. Add code and tests
  4. Pass lint and tests
  5. Submit a pull request

Development Setup

Development Setup Using uv

Development Setup on macOS

$ brew install uv ruff just

With uv, ruff and Just installed, development has been simplified to simply running Just to see the available commands.

$ just

Releasing to PyPI

just release cuts the release. It lints, type checks, and tests, then shows the entries waiting under Unreleased and the version each kind of bump would produce, and asks which to cut. Once answered it bumps the version, closes out the CHANGELOG, updates the lock file, commits, and tags. Pushing the tag is what publishes.

$ just release

Releasing from 3.0.1, with these entries under Unreleased:

    ### Fixed

    - `read_csv_file()` returned a 0-d array for a single row file.

    1) patch   3.0.1 -> 3.0.2
    2) minor   3.0.1 -> 3.1.0
    3) major   3.0.1 -> 4.0.0
    q) cancel

Which release? [1] 2

Tagged v3.1.0. Publish it with:

    git push --follow-tags

The entries decide the bump, so the prompt puts them next to the versions they would produce rather than leaving the choice to memory. Answering q, or anything unrecognized, changes nothing.

The tag push runs the release workflow, which rechecks the tag against the version in pyproject.toml, repeats the checks, builds, and uploads. There is no PyPI API token anywhere: the workflow authenticates with trusted publishing, which mints a short lived credential from the GitHub OIDC identity of that run.

Pushing the tag is the point of no return, since PyPI never lets a version number be reused. Everything just release does is local and amendable until then, and it refuses to start against a dirty working tree, off master, on a master behind its upstream, with a CHANGELOG whose Unreleased section is empty, or when the tag it would create already exists. A refusal leaves the version and the CHANGELOG untouched.

just build runs the same checks and produces the same distributions without releasing anything, which is the way to inspect what CI would upload.

This depends on one piece of configuration that lives outside the repository. A trusted publisher has to be registered for applyaf on PyPI, pointing at the questrail/applyaf repository, the release.yml workflow, and the pypi environment. It is a one time setup per project.

License

applyaf is released under the MIT license. Please see the LICENSE.txt file for more information.

Download files

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

Source Distribution

applyaf-3.0.1.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

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

applyaf-3.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file applyaf-3.0.1.tar.gz.

File metadata

  • Download URL: applyaf-3.0.1.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for applyaf-3.0.1.tar.gz
Algorithm Hash digest
SHA256 847fb4edcfe240a29bbdd5be6c1cfa7600a608f7c825ee6dad05b59c3a8bd8d7
MD5 b1ac279d036b56b81d35f66a22a8f58b
BLAKE2b-256 95d4a8192ed781be5be00a014b955bc5f4edf91e8dd16342233db8520167237e

See more details on using hashes here.

File details

Details for the file applyaf-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: applyaf-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for applyaf-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d5ccfb305d7a654aee9ab93ee82cef20aed8795041a69f26b02b8ae4dbc6e3
MD5 afc9d86986e6ceb10cd1ba8bb4c0e6e1
BLAKE2b-256 9518e0ced7b1e13934b4da170822dfb88d7c27199e33208c2022462c5cdee659

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0.2

2 files

This release

3.0.1 This release

2 files

3.0.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

1.6.6

2 files

1.6.5

2 files

1.6.3

2 files

1.6.2

1 file

1.6.1

2 files

1.6.0

2 files

1.5.3

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

1 file

1.2.0

1 file

1.1.0

2 files

1.0.1

1 file

1.0.0

1 file

0.4.2

1 file

0.4.0

1 file

0.3.0

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 file

0.1.0

1 file

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