Skip to main content

Computing frequency combinations made simple

Project description

pyfcomb: Easy frequency combinations

Frequency combinations made easy! pyfcomb allows you to compute possible combinations of frequencies from a given list of frequencies.

Installation

Call

pip install pyfcomb

to install pyfcomb.

Usage

Use

pyfcomb.get_combinations(f_ids,frequencies,amplitudes)

to compute the combinations. You need to provide a list of frequency ids, frequencies and amplitudes all of the same length to compute combinations. You can also use the combo_depth parameter to change the maximum amount of combinations as well as the accuracy parameter to change the minimum precision of combinations.

The function then returns a pandas.DataFrame consisting of all frequencies and their possible combinations. The best combination (in this case the one with highest precision and least complexity) is also used to calculate the residual from the actual frequency to the combination. Lastly, this DataFrame also contains a list of all other possible combinations.

Example

from pyfcomb import get_combinations
from pandas import read_csv

file = read_csv("pyfcomb/tests/testfiles/freq_data.txt",delimiter="\t",header=None,names=['f_num','f','amp','snr'])
f_num = [int(i.replace("F","")) for i in file.f_num]
combinations = get_combinations(f_num,file.f,file.amp)

Project details


Download files

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

Files for pyfcomb, version 1.0.7
Filename, size File type Python version Upload date Hashes
Filename, size pyfcomb-1.0.7.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View
Filename, size pyfcomb-1.0.7-py3-none-any.whl (5.4 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page