Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

A Python module that implements NAFF algorithm

Project description


  • Foteini Asvesta (fasvesta .at. cern .dot. ch)
  • Nikos Karastathis (nkarast .at. cern .dot. ch)
  • Panagiotis Zisopoulos (pzisopou .at. cern .dot. ch)

A Python module that implements the Numerical Analysis of Fundamental Frequencies method of J. Lashkar. The code works either as a script (as the original code of Lashkar) or loaded as a module in Python/Julia code or jupyter-like notebooks (i.e. SWAN).

Example of Usage

import PyNAFF as pnf
import numpy as np

t = np.linspace(1, 3000, num=3000, endpoint=True)
Q = 0.12345
signal = np.sin(2.0*np.pi*Q*t)
pnf.naff(signal, 500, 1, 0 , False, window=1)
# outputs an array of arrays for each frequency. Each sub-array includes:
# [order of harmonic, frequency, Amplitude, Re{Amplitude}, Im{Amplitude]

# My frequency is simply
pnf.naff(signal, 500, 1, 0 , False)[0][1]

– nkarast

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 PyNAFF, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size PyNAFF-1.1.4-py2.py3-none-any.whl (6.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size PyNAFF-1.1.4.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page