Skip to main content

Apply antenna factors and cable loss to spectrum analyzer measurements

Project description

applyaf

PyPi Version 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

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

$ just

Deploying with uv

$ just test
$ git tag -a vX.Y.Z -m "vX.Y.Z"
$ just deploy

Development Setup on macOS

$ brew install uv ruff just

License

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

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

applyaf-2.1.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

applyaf-2.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: applyaf-2.1.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.10

File hashes

Hashes for applyaf-2.1.1.tar.gz
Algorithm Hash digest
SHA256 51c70203866cb65b025d982e3e3fad96de0758613d61a3ae6c2c228999977092
MD5 01b0c3999fde7a9aa1e51e7a50629a47
BLAKE2b-256 d3abac829e4738a95cab44833756db4d11b990a8bb8341ef89c019af1dd62d4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: applyaf-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.10

File hashes

Hashes for applyaf-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2725f57361aad928342b2d4495124373a0b7874b20735c47580541e5bf8047ca
MD5 28eccca5404609d5d56675b8c62105cb
BLAKE2b-256 f7e952e8ce4c2410d3cc3d0aa881ebebb3f53185a1f0d22508c94c4dc69ee186

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page