{ "info": { "author": "Johannes Sahlmann", "author_email": "jsahlmann@stsci.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Astronomy" ], "description": "\nlinearfit\n======\n\n**python class that implements a general least-squares fit of a linear model using numpy matrix inversion.**\n\nUncertainties in the dependent variables (but not in the independent\nvariables) can be taken into account. All inputs have to be numpy matrices.\n\nMath is based on Press' \nNumerical Receipes p661 : Section 15.2 Fitting Data to a Straight Line \nNumerical Receipes p671 : Section 15.4 General Linear Least Squares \n\nCode is based on an early yorick implementation by Damien Segransan\n(University of Geneva)\n\nPython implementation and tools by Johannes Sahlmann 2009-2017 (University of Geneva, European Space Agency, STScI/AURA)\n\nPlease see the test in test_linearfit.py for an example usage.\n\n\nBasic example usage (Fitting a straight line to data with uncertainties in y)\n-------------\n\n```\n# independent variable\nx = np.array([0.0, 0.9, 1.8, 2.6, 3.3, 4.4, 5.2, 6.1, 6.5,7.4])\n\n# dependent variable\t\ny = np.array([5.9, 5.4, 4.4, 4.6, 3.5, 3.7, 2.8, 2.8, 2.4, 1.5])\n\n# weights of dependent variable\t\nwy = np.array([1,1.8,4,8,20,20,70,70,100,500])\n\n# prepare matrices\nM = np.mat(y);\n# diagonal covariance matrix of dependent variables\nS = np.mat(np.diag(wy));\n# matrix of independent variables, here only ones\nC = np.mat(np.vstack( (np.ones(len(x)) , x)))\n\n# initialise object\nres = linearfit.LinearFit(M,S,C);\n\n# do the fit\nres.fit()\nres.display_results()\n```\n\n\nDocumentation\n-------------\n\nAll classes and methods/functions include basic documentation. \n\n\nInstallation notes\n------------------\n\nThis package was developed in a python 2.7 environment, but was also\nsuccessfully tested using python 3.5.\n\nThe following python packages are required:\n\n* numpy\n\n\nHow to run the example script\n-----------\n\nYou may use pip for installation: \n```pip install linearfit```\n\nOr get the source files, e.g.: \n```git clone https://github.com/johannes-sahlmann/linearfit```\n\nInstall pygacs: \n```cd linearfit``` \n```python setup.py install --user```\n\nTo run the test, do: \n```python test_linearfit.py```\n\n\nLicense\n-------\n\nCopyright (c) 2017 Johannes Sahlmann, STScI/AURA\n\nlinearfit is open source and free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program. If not, see http://www.gnu.org/licenses/.\n\n\nChangelog\n---------\n\n.. :changelog:\n\n0.1 (May 2017)\n++++++++++++++++++\n\n- First posting on github\n\n \n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Johannes-Sahlmann/linearfit", "keywords": "", "license": "LGPLv3+", "maintainer": "", "maintainer_email": "", "name": "linearfit", "package_url": "https://pypi.org/project/linearfit/", "platform": "", "project_url": "https://pypi.org/project/linearfit/", "project_urls": { "Homepage": "https://github.com/Johannes-Sahlmann/linearfit" }, "release_url": "https://pypi.org/project/linearfit/0.1.10/", "requires_dist": null, "requires_python": "", "summary": "python class that implements a general least-squares fit of a linear model using numpy matrix inversion", "version": "0.1.10" }, "last_serial": 2898424, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f07f677ae0bb214167e500974d9f77fb", "sha256": "7183dee7e474a4ebfecbd2c41ceddb49b47606fc087e5d3b8da6d451d7b4fc6b" }, "downloads": -1, "filename": "linearfit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f07f677ae0bb214167e500974d9f77fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11316, "upload_time": "2017-05-17T23:24:25", "url": "https://files.pythonhosted.org/packages/8d/ce/204df9843dc156ca284e5ba41c3860647ecc5ac2b44c3976c12bb9a0da4f/linearfit-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4968894c0df66914398886cc7f5b97b5", "sha256": "281ed06532c8280eadad01c14a2992beefdcbb6482d9dc097746d40f39f13e09" }, "downloads": -1, "filename": "linearfit-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4968894c0df66914398886cc7f5b97b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11316, "upload_time": "2017-05-17T23:25:38", "url": "https://files.pythonhosted.org/packages/0a/ca/9082bcfe51c3600597814988c8f63ba6ea67807e627a4a6b462c07c39a40/linearfit-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "db773009e9ecc47ccbe82d36cede2b6d", "sha256": "b0ff0f7bc208ab5135cdd0f1ca65c0577962dbed02fb0030acc3e7ec0098d6df" }, "downloads": -1, "filename": "linearfit-0.1.10.zip", "has_sig": false, "md5_digest": "db773009e9ecc47ccbe82d36cede2b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20322, "upload_time": "2017-05-25T16:05:16", "url": "https://files.pythonhosted.org/packages/19/92/32a7a37503f32cdf8c5ceae084d3408287f331e4a5a9f2ae47cd4c260fda/linearfit-0.1.10.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3029b15b8341635f716bdb09ee1a1796", "sha256": "77c776796ecf3d43af67e9cd44df8875e8ac60433670204cf043258e9a5d81fc" }, "downloads": -1, "filename": "linearfit-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3029b15b8341635f716bdb09ee1a1796", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11329, "upload_time": "2017-05-17T23:30:45", "url": "https://files.pythonhosted.org/packages/f2/07/b70a4138b0ccd47e24f027fc8aa0093618e5596a10e6fce2239d7a5e65dc/linearfit-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f0e6ca8b8b5de1aa6e7b8dc2910cad83", "sha256": "3c6d7405eb8b1214249221f37733a455ab5dcc35cb5789bc0f40c64502bc1e71" }, "downloads": -1, "filename": "linearfit-0.1.3.zip", "has_sig": false, "md5_digest": "f0e6ca8b8b5de1aa6e7b8dc2910cad83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17463, "upload_time": "2017-05-17T23:35:15", "url": "https://files.pythonhosted.org/packages/c9/38/c5f0a510575c444f4a5b2e6aa011657bc4dadd2047f64c882bd52e5910ec/linearfit-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "fe6c10e935b010a7a3699911235adc4c", "sha256": "e679f93eeb5cf6422ec3c2a6b4661bda78ba4aaa605b4e6257ab855ac17f1041" }, "downloads": -1, "filename": "linearfit-0.1.4.zip", "has_sig": false, "md5_digest": "fe6c10e935b010a7a3699911235adc4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17428, "upload_time": "2017-05-17T23:37:52", "url": "https://files.pythonhosted.org/packages/1d/1a/1b629ded2f4d72a3f2e77041959822bcfc1a8048e44578c42eb3daa30e05/linearfit-0.1.4.zip" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1b63c665db21227247861ca3e11fbb7d", "sha256": "9d01106f279045ea026d9d21b08122cbb07ad517cb1cf4c5a307e73f439456b7" }, "downloads": -1, "filename": "linearfit-0.1.5.zip", "has_sig": false, "md5_digest": "1b63c665db21227247861ca3e11fbb7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17428, "upload_time": "2017-05-17T23:40:51", "url": "https://files.pythonhosted.org/packages/c2/0f/b8735701a66cc6df3bc344289c897071061fdbd5775d65f268dc03d22b22/linearfit-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "548fb01c4329f19b56b00056ad7f051b", "sha256": "72ae5b19a83431053e2e6b0e15b20be187b9db55f4cc23441bf78168f77e7baf" }, "downloads": -1, "filename": "linearfit-0.1.6.zip", "has_sig": false, "md5_digest": "548fb01c4329f19b56b00056ad7f051b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17428, "upload_time": "2017-05-18T13:49:31", "url": "https://files.pythonhosted.org/packages/84/14/88e782bd57a6f070cdb993792ef39f08c47720bb8f097245c7bdd456fe4b/linearfit-0.1.6.zip" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "578a011076e636b7e13af8ff675fd4b5", "sha256": "1bdc79e4d8af8084b4894d2214bf4d15535a6a1db424f2a9b74fd570811aa3ff" }, "downloads": -1, "filename": "linearfit-0.1.7.zip", "has_sig": false, "md5_digest": "578a011076e636b7e13af8ff675fd4b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20067, "upload_time": "2017-05-18T13:55:31", "url": "https://files.pythonhosted.org/packages/7f/ce/e432d630c1f96fb6595b968bbe3c59e1f9bf2ac39908625fc7cf8984fef1/linearfit-0.1.7.zip" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "8e5bd2c2d2c6d757c65f34f754fe9361", "sha256": "299d84762e967e8b11ef91d71d272f64e4e25eace6d8f93ec02c661c956b7558" }, "downloads": -1, "filename": "linearfit-0.1.8.zip", "has_sig": false, "md5_digest": "8e5bd2c2d2c6d757c65f34f754fe9361", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20065, "upload_time": "2017-05-25T15:23:12", "url": "https://files.pythonhosted.org/packages/c4/6c/dfa08c69e6610b31bf75da2a864ed89d86057f6f4c1927e62d0c6e509f5d/linearfit-0.1.8.zip" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "39109870409b59ff31040e43978faed8", "sha256": "e0762c0566cfb1b4772b26b845868e17af70f4c734085c7353ffa4f105d783d7" }, "downloads": -1, "filename": "linearfit-0.1.9.zip", "has_sig": false, "md5_digest": "39109870409b59ff31040e43978faed8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17419, "upload_time": "2017-05-25T15:29:54", "url": "https://files.pythonhosted.org/packages/2f/1a/e839c322651a9ea58e3c5710d41a06071ade6dc3de7c74fa06054625023b/linearfit-0.1.9.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db773009e9ecc47ccbe82d36cede2b6d", "sha256": "b0ff0f7bc208ab5135cdd0f1ca65c0577962dbed02fb0030acc3e7ec0098d6df" }, "downloads": -1, "filename": "linearfit-0.1.10.zip", "has_sig": false, "md5_digest": "db773009e9ecc47ccbe82d36cede2b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20322, "upload_time": "2017-05-25T16:05:16", "url": "https://files.pythonhosted.org/packages/19/92/32a7a37503f32cdf8c5ceae084d3408287f331e4a5a9f2ae47cd4c260fda/linearfit-0.1.10.zip" } ] }