applyaf is a Python 3.9+ 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.
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.
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?
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
Use the following commands to create a virtualenv using pyenv and
pyenv-virtualenv, install the requirements in the virtualenv named
applyaf
, and list the available Invoke tasks.
$ pyenv install 3.13
$ pyenv virtualenv 3.13 applyaf
$ pyenv activate applyaf
$ pip install -r requirements.txt
$ inv -l
applyaf is released under the MIT license. Please see the LICENSE.txt file for more information.