{ "info": { "author": "Maxime Costalonga", "author_email": "maxime.costalonga@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering" ], "description": "Anafit\n=================================\n\nAnafit is a package providing fitting tools for matplotlib figures. It is largely inspired from the Ezyfit toolbox for Matlab.\n\nSource code repository and issue tracker:\n https://gitlab.com/xamcosta/Anafit\n\nPython Package Index:\n https://pypi.python.org/pypi/anafit/0.1.5\n\nRequirements\n------------\n\nPython:\n Anafit has been coded using Python 3.5 from Anaconda_ distribution.\n\npip/setuptools:\n Those are the most convenient way to install Anafit and its dependencies. \n Most likely they are already installed in your system, but if not, please \n refer to `pip`_ doc webpage.\n\nMatplotlib and PyQt5:\n When called, Anafit menu, based on `PyQt5`_, will appear as a new button in the \n `matplotlib`_ figure toolbar. However, this requires Qt5Agg as matplotlib\u2019s \n backend. \n WARNING : When imported, anafit will switch your actual backend to Qt5Agg, \n destroying all figures already constructed during your session. \n\nOther packages:\n To fit, Anafit uses scipy.optimize.curve_fit function from `scipy`_ module.\n It also uses `numpy`_ , os , sys , functools and finally json (for \n custom fit function saving in a text file).\n\n.. _Anaconda: http://docs.continuum.io/anaconda/\n.. _PyPy: http://pypy.org/\n.. _pip: https://pip.pypa.io/en/stable/installing/\n.. _matplotlib: https://matplotlib.org/\n.. _PyQt5: https://pypi.python.org/pypi/PyQt5/5.9.2\n.. _scipy: https://www.scipy.org/\n.. _NumPy: http://www.numpy.org/\n\nInstallation\n------------\n\nOnce you have installed the above-mentioned dependencies, you can use pip\nto download and install the latest release with a single command::\n\n python3 -m pip install anafit\n\nTo un-install, use::\n\n python3 -m pip uninstall anafit\n\nNote that you can also just download and add the anafit repository to your PYTHONPATH.\n\nUsage\n-----\n\nFirst, import anafit:\n\n.. code:: python\n\n import anafit\n\nNote that importing anafit will switch matplotlib\u2019s backend to \u2018Qt5Agg\u2019, destroying your current figures ! To prevent this, the best is to import anafit BEFORE importing matplotlib.pyplot or pylab.\n\nAdding anafit button to a matplotlib figure\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis is done simply by calling anafit.Figure() class:\n\n.. code:: python\n\n fig = plt.figure() \n ana = anafit.Figure(fig)\n\nIf no argument is passed to anafit.Figure(), the anafit button will be added to the\ncurrent active figure.\n\nFitting a curve\n^^^^^^^^^^^^^^^\n\nIn case several curves are plotted, you can select the one you wanna fit in the \u201cDataset\u201d menu. The dataset are represented by a icon filled with the color of the curve, followed by their marker. \n\nThen, in the \u201cShow Fit\u201d menu, you can select predefined fitting functions, sorted by types (linear, power, etc\u2026), or your own saved fitting functions, or any function you want to define on the way, using \u201cOther Fit\u2026\u201d.\n\nThe fitting curve will appear as an orange line on your figure, and its parameters will appear in the Python console. You can access them anytime through the attribute ana.lastFit . More generally, an history of fits is stored in ana.fits . These anafit.Fit object contains not only the fit informations, but also the handles of the fit line, allowing to easily change the style of the fit curve. For instance, you can change the color of the last fit by simply running:\n\n.. code:: python\n\n ana.fits[-1].linfit.set_color(\u2018r\u2019)\n\n\nDefining a region of interest (ROI)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can restrict the range on which you wanna fit your datas in the \u201cDefine Range\u201d menu. This menu displays the current range, and offers the possibility to set the range manually in a dialog (\u2018Define\u2026\u2019) or by selecting two points on the figure (\u2018Define ROI\u2019). You can restore the full range by selecting \u2018Reset\u2019.\n\nCreating custom fit functions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can create your own fitting functions in the \u2018Edit User Fit\u2019 menu. They will then appear in the \u2019Show Fit\u2019 menu. Those fitting functions are stored in a text file in the anafit repository, that you can edit by hand. Clicking \u2018Reset\u2019 deletes all custom fitting functions, but let one as an example.\n\nGetting slopes from drawn lines\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can draw a line on the figure by selecting \u2018Draw Line\u2019, and remove it using \u2018Undo Line\u2019. Use \u2018Get Slope\u2019 to access the parameters of this line: in log-log scale, this returns the prefactor and the exponent of a power law.\n\nYou can draw a line corresponding to a given slope (a given exponent in log-log scale) using \u2018Show Slope\u2019.\n\nDisplaying fit infos\n^^^^^^^^^^^^^^^^^^^^\n\nYou can display the range of confidence of the fit curve by selecting \u2019Show Confidence\u2019. The interval of confidence is evaluated using the square root of the diagonal of the covariance matrix. \n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/xamcosta/Anafit", "keywords": "matplotlib fit", "license": "", "maintainer": "", "maintainer_email": "", "name": "anafit", "package_url": "https://pypi.org/project/anafit/", "platform": "", "project_url": "https://pypi.org/project/anafit/", "project_urls": { "Homepage": "https://gitlab.com/xamcosta/Anafit" }, "release_url": "https://pypi.org/project/anafit/0.1.6/", "requires_dist": [ "matplotlib", "numpy", "scipy" ], "requires_python": "", "summary": "A toolbox providing interactive fitting tools for matplotlib", "version": "0.1.6" }, "last_serial": 4994768, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3a711cb95c3c51115fbeb235cd6a7ee7", "sha256": "e7b4d36a99ccb9d15d314830f31c453c8a4436009a88721e912a1e0af45ac08c" }, "downloads": -1, "filename": "anafit-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3a711cb95c3c51115fbeb235cd6a7ee7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19945, "upload_time": "2018-01-07T19:23:45", "url": "https://files.pythonhosted.org/packages/ab/9b/01d57639496f27ea8725dc06028ae270396194927b6310c092c2cd7c7dd5/anafit-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cbd89a670cec4fb7faa08b17484dd922", "sha256": "e9cf39698e0bdf07b41819fc5caffea2ee7eaa11448f448b24eb9630b43e6127" }, "downloads": -1, "filename": "anafit-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cbd89a670cec4fb7faa08b17484dd922", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19941, "upload_time": "2018-01-07T19:51:25", "url": "https://files.pythonhosted.org/packages/e3/8e/e99f1160e2b2514cc172ab22647cadfeaa09c00e40ff8754ffea4e911193/anafit-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "fdd6d2d2dab440f2a027448103e6fe4d", "sha256": "fdea738971ebcb11f75c1a45a16df93b5454d2b02495e1c0856c8429f863347f" }, "downloads": -1, "filename": "anafit-0.1.3.tar.gz", "has_sig": false, "md5_digest": "fdd6d2d2dab440f2a027448103e6fe4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19940, "upload_time": "2018-01-07T19:56:32", "url": "https://files.pythonhosted.org/packages/d7/36/69549174eee06f14ad253c3b341249aa3d93617348f5d95d1c8f07ddf6fd/anafit-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a3964e91468169fffc497d979d95d97f", "sha256": "21ffd84c53cf292584f181a51db4505f247310347c47f222015c08e792b3b7cb" }, "downloads": -1, "filename": "anafit-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a3964e91468169fffc497d979d95d97f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20171, "upload_time": "2018-01-08T19:33:15", "url": "https://files.pythonhosted.org/packages/95/4f/0b940113c0f0bffbc23f6338ee3a03c45fbea741f30c86253019d63416a2/anafit-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "e4cfb513405710d9a4464432f53aa257", "sha256": "aadcf2528203bc5ceb422a93208647fa11280c09be8bff52345c394690af77f2" }, "downloads": -1, "filename": "anafit-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e4cfb513405710d9a4464432f53aa257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22259, "upload_time": "2018-04-08T05:27:46", "url": "https://files.pythonhosted.org/packages/07/1b/89d3cbc71b0e60fa9cd06d51b833d93ae5f1c86cd1da8a928520a8256c16/anafit-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "a6e745ea1ffa201160f8d8b0093a941e", "sha256": "11bf08728b480a383f564fc6eaa44099845ce5a8b46e4db68dcce52fdbe78b5f" }, "downloads": -1, "filename": "anafit-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a6e745ea1ffa201160f8d8b0093a941e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22718, "upload_time": "2019-03-27T20:58:04", "url": "https://files.pythonhosted.org/packages/e7/ba/bedacf9330d2535d6cdcb052fb1714c022ab802c887e83c2a565745c041e/anafit-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c22a5357e31577e5e66e10502a56208", "sha256": "0ac6ebfeaa3db0f5f240635b6de745b6959af141689fefc13735478de0f79b7e" }, "downloads": -1, "filename": "anafit-0.1.6.tar.gz", "has_sig": false, "md5_digest": "3c22a5357e31577e5e66e10502a56208", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24190, "upload_time": "2019-03-27T20:58:05", "url": "https://files.pythonhosted.org/packages/75/1a/4b94d0552cdd0d1ca0e25ec850692962f61c2c4957c4f95d13901896a39b/anafit-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6e745ea1ffa201160f8d8b0093a941e", "sha256": "11bf08728b480a383f564fc6eaa44099845ce5a8b46e4db68dcce52fdbe78b5f" }, "downloads": -1, "filename": "anafit-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a6e745ea1ffa201160f8d8b0093a941e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22718, "upload_time": "2019-03-27T20:58:04", "url": "https://files.pythonhosted.org/packages/e7/ba/bedacf9330d2535d6cdcb052fb1714c022ab802c887e83c2a565745c041e/anafit-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c22a5357e31577e5e66e10502a56208", "sha256": "0ac6ebfeaa3db0f5f240635b6de745b6959af141689fefc13735478de0f79b7e" }, "downloads": -1, "filename": "anafit-0.1.6.tar.gz", "has_sig": false, "md5_digest": "3c22a5357e31577e5e66e10502a56208", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24190, "upload_time": "2019-03-27T20:58:05", "url": "https://files.pythonhosted.org/packages/75/1a/4b94d0552cdd0d1ca0e25ec850692962f61c2c4957c4f95d13901896a39b/anafit-0.1.6.tar.gz" } ] }