{ "info": { "author": "Konstantinos Paraschou", "author_email": "konstantinos.paraschou@cern.ch", "bugtrack_url": null, "classifiers": [], "description": "# NAFFlib\nAuthors: \n* **Sofia Kostoglou** \n* **Konstantinos Paraschou**\n* **Dario Pellegrini** \n\nMaintained by **Konstantinos Paraschou**.\n\nNAFFlib is a library written in C and wrapped in \nPython which includes an implementation of the NAFF \nalgorithm. \n[[1]](https://www.sciencedirect.com/science/article/pii/001910359090084M) \n[[2]](http://jacow.org/ipac2017/papers/thpab044.pdf)\n\n## Installation\n### Automatic\n```\n$ pip install NAFFlib\n```\nDepending on the OS, you might need to \n```\n$ pip3 install NAFFlib\n```\nfor Python3 support.\n\n### Local Installation\n```\n$ git clone git@github.com:PyCOMPLETE/NAFFlib.git\n$ cd NAFFlib\n$ make\n$ cd ..\n```\nto compile NAFFlib_c.so (Python3) and NAFFlib2_c.so (Python2) shared objects.\nIf either of Python2 or Python3 is not supported in the OS, the line\n```\n$ make\n```\nshould be replaced with either\n```\n$ make py2\n```\nfor Python2 support or\n```\n$ make py3\n```\nfor Python3 support.\n\n***\nThe NAFFlib module can be imported by:\n\n```\nimport NAFFlib\n```\n\n### Functions in NAFFlib:\n1. ```q = NAFFlib.get_tune(x, order, interpolation)```\nwhere: \n- ```x``` is the (complex or real) input signal in the form of a one-dimensional non-empty numpy array.\n- ```order``` is the value of the Hann's window order parameter to be used with 0 corresponding to no window. This variable is optional and its default value is equal to 2.\n- ```interpolation``` is a boolean variable denoting whether the 7-point Newton-Cotes integration rule should be used. This variable is optional and its default value is equal to 0. It is not recommended that this is set 1.\n\nreturns the single positive frequency ```q``` that is dominant in the Fourier spectrum.\n\n\n2. ```Q, A, B = NAFFlib.get_tunes(x, N, order, interpolation)```\nwhere: \n- ```x``` is the (complex or real) input signal in the form of a one-dimensional non-empty numpy array.\n- ```N``` is the number of frequencies to be found in the signal. This variable is optional and by default is set to 1.\n- ```order``` is the value of the Hann's window order parameter to be used with 0 corresponding to no window. This variable is optional and its default value is equal to 2.\n- ```interpolation``` is a boolean variable denoting whether the 7-point Newton-Cotes integration rule should be used. This variable is optional and its default value is equal to 0. It is not recommended that this is set 1.\n\nreturns three one-dimensional numpy arrays ```Q, A, B``` of size N with the first (being real-valued) containing the most dominant positive frequencies in the Fourier spectrum, the second containing the complex-valued amplitudes of the corresponding frequency and the third containing the complex-valued amplitudes of the negative of the corresponding frequency. It is recommended that this function is used with a real-valued input where the Fourier power spectrum is guaranteed to be an even function.\n\n\n3. ```Q, A = NAFFlib.get_tunes(x, N, order, interpolation)```\nwhere: \n- ```x``` is the (complex or real) input signal in the form of a one-dimensional non-empty numpy array.\n- ```N``` is the number of frequencies to be found in the signal. This variable is optional and by default is set to 1.\n- ```order``` is the value of the Hann's window order parameter to be used with 0 corresponding to no window. This variable is optional and its default value is equal to 2.\n- ```interpolation``` is a boolean variable denoting whether the 7-point Newton-Cotes integration rule should be used. This variable is optional and its default value is equal to 0. It is not recommended that this is set 1.\n\nreturns two one-dimensional numpy arrays ```Q, A``` of size ```N``` with the first (being real-valued) containing the most dominant (positive or negative) frequencies in the Fourier spectrum and the second containing the complex-valued amplitudes of the corresponding frequency. It is recommended that this function is used with a complex-valued input where the Fourier power spectrum is not necessarily an even function. It should be emphasized that *positive and negative frequencies are treated separately*. \n\n4. ```Q = NAFFlib.multiparticle_tunes(x, order, interpolation)```\nwhere: \n- ```x``` is an array of (complex or real) input signals in the form of a two-dimensional non-empty numpy array. The first axis should correspond to the id of each different track while the second axis should correspond to the turn number.\n- ```order``` is the value of the Hann's window order parameter to be used with 0 corresponding to no window. This variable is optional and its default value is equal to 2.\n- ```interpolation``` is a boolean variable denoting whether the 7-point Newton-Cotes integration rule should be used. This variable is optional and its default value is equal to 0. It is not recommended that this is set 1.\n\nreturns a one-dimensional numpy array ```Q``` of size ```len(x)``` which contains the single most dominant frequency of the different tracks.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PyCOMPLETE/NAFFlib", "keywords": "frequency analysis naff", "license": "LGPLv2.1", "maintainer": "", "maintainer_email": "", "name": "NAFFlib", "package_url": "https://pypi.org/project/NAFFlib/", "platform": "", "project_url": "https://pypi.org/project/NAFFlib/", "project_urls": { "Homepage": "https://github.com/PyCOMPLETE/NAFFlib" }, "release_url": "https://pypi.org/project/NAFFlib/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "A Python-wrapped C library which implements the NAFF algorithm", "version": "1.0.1" }, "last_serial": 4584578, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b17c21746c1a38f6fb3f13f61ea51017", "sha256": "5edbd1b3faa4f3969b127b4ea0e98128b5c389ff1dab8f1077eceed9b9b2b61c" }, "downloads": -1, "filename": "NAFFlib-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b17c21746c1a38f6fb3f13f61ea51017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9090, "upload_time": "2018-12-04T16:19:24", "url": "https://files.pythonhosted.org/packages/a7/86/444ac39b9b4a605a186ab681b63fe92ccf320fa27227392b4d57d9e8386c/NAFFlib-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2da678ec0ccd84d07704f87bef847bd0", "sha256": "73d6d3fa376da5f07100f2a1af86958e7218b7e3891d468d8e096c8008f59e67" }, "downloads": -1, "filename": "NAFFlib-1.0.1.tar.gz", "has_sig": false, "md5_digest": "2da678ec0ccd84d07704f87bef847bd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9085, "upload_time": "2018-12-11T09:46:36", "url": "https://files.pythonhosted.org/packages/3b/06/6c1d375f7e70c36e4113b326c348be6068389efdc8d7e68ac23088df4102/NAFFlib-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2da678ec0ccd84d07704f87bef847bd0", "sha256": "73d6d3fa376da5f07100f2a1af86958e7218b7e3891d468d8e096c8008f59e67" }, "downloads": -1, "filename": "NAFFlib-1.0.1.tar.gz", "has_sig": false, "md5_digest": "2da678ec0ccd84d07704f87bef847bd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9085, "upload_time": "2018-12-11T09:46:36", "url": "https://files.pythonhosted.org/packages/3b/06/6c1d375f7e70c36e4113b326c348be6068389efdc8d7e68ac23088df4102/NAFFlib-1.0.1.tar.gz" } ] }