Apply antenna factors and cable loss to spectrum analyzer measurements
Project description
applyaf
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:
- Spectrum analyzer measurements
- Antenna factor data
- Cable loss data
Each CSV file should contain data in two columns:
- Frequency
- 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:
- Allowing CSV data files that contain non-dB amplitudes and then convert as needed. Should this be a per-file setting?
- Generalize the code to handle a variable number (>3) of data to be interpolated and applied to the given data set.
- 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:
- Fork the repository
- Create a feature branch
- Add code and tests
- Pass lint and tests
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 |
51c70203866cb65b025d982e3e3fad96de0758613d61a3ae6c2c228999977092
|
|
MD5 |
01b0c3999fde7a9aa1e51e7a50629a47
|
|
BLAKE2b-256 |
d3abac829e4738a95cab44833756db4d11b990a8bb8341ef89c019af1dd62d4d
|
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
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2725f57361aad928342b2d4495124373a0b7874b20735c47580541e5bf8047ca
|
|
MD5 |
28eccca5404609d5d56675b8c62105cb
|
|
BLAKE2b-256 |
f7e952e8ce4c2410d3cc3d0aa881ebebb3f53185a1f0d22508c94c4dc69ee186
|