{ "info": { "author": "Dino Bektesevic", "author_email": "ljetibo@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Linear Feature Detector\n=======================\n\n|docs|\n\nLinear Feature Detector (LFD) library is a collection of packages that enable\nuser to detect and analyze linear features on astronomical images. The code was\ndesigned to be run interactively, or at scale on a cluster and specifically\ntargets SDSS survey data and meteor trails therein.\n\nLFD is a more complete version of LFDS that contains all of the never-published\nfeatures of LFDS. Except for the linear feature detection code in the detecttrails\nmodule, most of the LFDS code was recoded from scratch and made compatible with\nPython 3 and OpenCv 3.0. You can find the old LFDS code here_.\n\n.. _here: https://github.com/DinoBektesevic/LFDA\n\nInstallation\n------------\n\nInstall from pip by running\n\n.. code-block:: bash\n\n pip install lfd\n\nor clone it locally and use `requirements.txt` to create an environment from\nwhich you can run lfd\n\n.. code-block:: bash\n\n git clone https://github.com/DinoBektesevic/lfd.git\n\nImport lfd and be on your merry way. One issue can occur when using conda or\nminiconda virtual environments where `numpy` can not be found. In that case it\nis neccessary to run `conda install numpy` and repeat the pip install for the\nlfd to install properly.\n\nRequirements\n------------\n\nMajor requirements are as follows\n\n* Python 3+\n* OpenCV 3+\n* NumPy 1.11+\n* SciPy 0.19+\n* Fitsio 0.9.7+\n* SQLAlchemy 1.2.11+\n* parts of Erin Sheldon's esutil_ and sdsspy_ utilities are bundled with the\n provided code. Some of the code might have been altered\n\n.. _esutil: https://github.com/esheldon/sdsspy/\n.. _sdsspy: https://github.com/esheldon/esutil\n\n\n\nRunning the code\n----------------\n\nRead the docs! They contain many examples.\n\n\nBy default lfd is setup to work with SDSS files and directory structure. This\ncan be altered significantly, although complete departure from SDSS file and\ndirectory structures are not supported out of the box.\n\nAlthough slightly out of data much of the processing steps are still adequatly\ndescribed in::\n\n Bektesevic & Vinkovic, 2017, MNRAS, 1612.04748, Linear Feature Detection Algorithm for Astronomical Surveys - I. Algorithm description\n\nTo start processing use any of the following:\n\n.. code-block:: python\n\n import lfd\n lfd.setup_detecttrails(\"~/boss\")\n\n\n foo = lfd.detecttrails.DetectTrails(run=2888)\n foo = lfd.detecttrails.DetectTrails(run=2888, camcol=1)\n foo = lfd.detecttrails.DetectTrails(run=2888, camcol=1, filter='i')\n foo = lfd.detecttrails.DetectTrails(run=2888, camcol=1, filter='i', field=139)\n foo.process()\n\n\nIt is possible to change detection parameters of any step in the processing by\n\n.. code-block:: python\n\n foo.params_dim\n foo.params_bright[\"debug\"] = True\n foo.params_removestars[\"filter_caps\"][\"i\"] = 20\n\n\nResults are outputted to a file provided by the filepath `results`, by default\nset to `results.txt`. Results file is a CSV file in which the detected\nparameters. Results module provides functionality to parse these CSV files into\na database for which an SQLAlchemy ORM is provided.\n\n.. code-block:: python\n\n from lfd.results import Event, Frame, Point\n from lfd import results\n\n # create or connect to a database\n results.connect2db(\"foo.db\")\n\n # populate it with data either from output of detecttrails\n results.from_file(\"results.txt\")\n\n # or create mock data to play with\n results.utils.create_test_sample()\n\n # query on Event or Frame parameters fo a single or a collection of items\n with results.session_scope() as s:\n # returns all Events found on run 2888, but pick only one\n e = s.query(Event).filter(Event.run=2888).first()\n results.utils.deep_expunge(e)\n\n # get a collection of frames \n fquery = query.filter(Frame.t.iso > '2009-09-27 10:06:10.430')\n f = fquery.all()\n lfd.results.deep_expunge_all(f, s)\n\n # create table like output\n results.utils.pprint(f)\n\n # manipulate them as OO objects and commit the changes back, f.e. move one\n # of the points of the line somewhere else\n e.p1 = Point(10, 10, camcol=5, filter='r')\n\n # or just move one of P1(x1, y1), P2(x2, y2) line coordinates\n e.y2 = 10\n\n # see and work with the coordinates values in reference to the origin of\n # the entire CCD array and not just individual CCDs within\n e.p1.x\n e.p1.switchCoordSys()\n e.p1.x\n\n # equivalent to\n e.cx1 = 100\n\n # find the points where the line corsses the individual CCD edges again and go there\n e.snap2ccd()\n\n # persist the changes to the DB\n with results.session_scope() as s:\n s.add(e)\n s.commit()\n\n\nLFD was designed to be able to handle processing large ammounts of data, in fact\nit was used to process the entire SDSS database of images by using the Fermi\ncluster at Astronomical Observatory Belgrade in Serbia. To make the creation of\nscripts that ran LFD on the cluster easier createjobs module was written. By\ndefault it is oriented towards running on that particular cluster, but it should\nbe easily adaptable to any Sun Grid cluster out there. \n\n.. code-block:: python\n\n jobs = cj.Jobs(500)\n jobs.create()\n There are no runs to create jobs from.\n Creating jobs for all runs in runlist.par file.\n\n Creating:\n 765 jobs with 1 runs per job\n Queue: standard\n \t Wallclock: 24:00:00\n \t Cputime: 48:00:00\n \t Ppn: 3\n \t Path: /home/user/Desktop/.../jobs\n\nwhich is of course very flexible\n\n.. code-block:: python\n\n runs = [125, 99, 2888, 1447]\n cmd = \"\"\"python3 -c \"import detecttrails as dt;\n x = dt.DetectTrails($);\n x.params_bright['debug']=True;\n x.process()\"\"\"\n jobs = cj.Jobs(2, runs=runs, camcol=1, filter='i', command=cmd)\n jobs.create()\n\nUser will be notified about all important parameters that were set. LFD also\ncomes with Graphical User Interfaces through which users can create these jobs\nvia mouseclicks but also visually inspect their results by using the provided\nspecially designed image browser.\n\nAn analysis module is provided as well through which theoretical meteor profiles\ncan be generated as described in::\n\n Bektesevic & Vinkovic et. al. 2017 (arxiv: 1707.07223).\n\n.. code-block:: python\n\n from lfd.analysis import profiles\n\n point = profiles.PointSource(100)\n seeing = profiles.GausKolmogorov(profiles.SDSSSEEING)\n defocus = profiles.FluxPerAngle(100, *profiles.SDSS)\n\n a = profiles.convolve(point, seeing, defocus)\n\n import matplotlib.pyplot as plt\n fig, ax = plt.subplots(1, 1)\n profiles.plot_profiles(ax, (point, seeing, defocus, a))\n plt.legend()\n plt.show()\n\nAll of this is, of course, just a quick overview of all functionalities. There\nare many more details describing this and other useful utilities, including\nGraphical User Interfaces to common functionality, provided by LFD availible in\nthe documentation.\n\nLicense\n-------\n\nGNU GPLv3 Copyright (C) 2018 Dino Bektesevic\n\n\nThis program is free software: you can redistribute it and/or modify it under the\nterms of the GNU General Public License as published by the Free Software Foundation,\neither version 3 of the License, or (at your option) any 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 this\nprogram. If not, see gnu.org/licenses__\n\n.. __licenses: https://www.gnu.org/licenses/gpl-3.0.en.html\n\n\n.. |docs| image:: https://readthedocs.org/projects/linear-feature-detector/badge/?version=latest\n :alt: Documentation Status\n :scale: 100%\n :target: https://linear-feature-detector.readthedocs.io/en/latest/?badge=latest\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lfd", "package_url": "https://pypi.org/project/lfd/", "platform": "", "project_url": "https://pypi.org/project/lfd/", "project_urls": null, "release_url": "https://pypi.org/project/lfd/1.0.4/", "requires_dist": [ "numpy", "matplotlib", "scipy", "scikit-learn", "SQLAlchemy", "astropy", "fitsio", "Pillow", "opencv-python" ], "requires_python": "", "summary": "Linear Feature Detector for Astronomical images", "version": "1.0.4" }, "last_serial": 4713904, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b19493f45a2b755e40814c9b1d11d22c", "sha256": "245bfcbb21706af7dd7ab700f36461953d03c4cd45f0eebbe437281c1204c490" }, "downloads": -1, "filename": "lfd-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b19493f45a2b755e40814c9b1d11d22c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 170748, "upload_time": "2019-01-15T20:47:12", "url": "https://files.pythonhosted.org/packages/3d/89/e03adae695b9fba4452737f5c4e6941ec61f220f032c086c56edcfb311af/lfd-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45a92c0a2f0d7bec878f66b554b60349", "sha256": "3deb488b4c9309da95ed9ab65bb71454bc40cb261d47ad219b7ebe3a77486adb" }, "downloads": -1, "filename": "lfd-1.0.tar.gz", "has_sig": false, "md5_digest": "45a92c0a2f0d7bec878f66b554b60349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 134007, "upload_time": "2019-01-15T20:47:15", "url": "https://files.pythonhosted.org/packages/b1/96/e14e2585bc3baae29f0d9383937319443039f986bbc73a234e9839443a02/lfd-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c930e35b66e319fadf9b32efd0ca307e", "sha256": "b5fbb8788690c7ed77797fe44a863be383553975d3232b08bda364155b3da7c8" }, "downloads": -1, "filename": "lfd-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c930e35b66e319fadf9b32efd0ca307e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 174080, "upload_time": "2019-01-15T22:49:32", "url": "https://files.pythonhosted.org/packages/0c/c6/232b71591e76e4f5579f31f734acf81b5a91c259b58841e4c54a7d415827/lfd-1.0.1-py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "637194b42ce1f533c0841f2090bbd55e", "sha256": "636242d2c0617ffc0e05b665eb952ceb856ff4807a513738b88167a04992c864" }, "downloads": -1, "filename": "lfd-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "637194b42ce1f533c0841f2090bbd55e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 959402, "upload_time": "2019-01-15T23:55:54", "url": "https://files.pythonhosted.org/packages/eb/db/6a908089f4639962a3bdbd142d83b2f1ab3d43e3592a131118d68d5edc43/lfd-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d20305aa538358aeb87977a5364c014", "sha256": "b3d727f7e05636c6dd366a34cdbc800c15006f8c515cd5f4e70f1ca39bbbbe4f" }, "downloads": -1, "filename": "lfd-1.0.2.tar.gz", "has_sig": false, "md5_digest": "4d20305aa538358aeb87977a5364c014", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 925802, "upload_time": "2019-01-15T23:55:56", "url": "https://files.pythonhosted.org/packages/bc/02/70e8bfa2b023eaa2d65ea8efe8239043ac04c6ca0125a54e1fc2e064cb21/lfd-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b77236f30cc56b935095f8beaf7617c3", "sha256": "9e9f4892f73b70a3509a6aabb0662e7139018753d47bca67ac1d26e9d20297e7" }, "downloads": -1, "filename": "lfd-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b77236f30cc56b935095f8beaf7617c3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 974074, "upload_time": "2019-01-18T06:06:55", "url": "https://files.pythonhosted.org/packages/6e/15/e41a71631fd7f1640305d26509cd57a48e3e2ae5189107c3186c008009e2/lfd-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "739bbf03c5331ff7f56ca073ad9bcfd7", "sha256": "b8022cc77afd305ac20399692f2004719231a4f5ef6cffdfe0f30db8fe69884f" }, "downloads": -1, "filename": "lfd-1.0.3.tar.gz", "has_sig": false, "md5_digest": "739bbf03c5331ff7f56ca073ad9bcfd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 940355, "upload_time": "2019-01-18T06:07:00", "url": "https://files.pythonhosted.org/packages/4c/7c/b8a77698f1b83e6e0a3323658b9f613490e9428c8b4b5576e3b1cc7eb955/lfd-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "d5ce66d8e938c962a3bd3c14479bdd36", "sha256": "bc1c3bd990186da63ba587d6f44390beef35fff924268642f99144ea3cc25bc7" }, "downloads": -1, "filename": "lfd-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d5ce66d8e938c962a3bd3c14479bdd36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 977450, "upload_time": "2019-01-18T22:20:29", "url": "https://files.pythonhosted.org/packages/2e/83/1dd90778c30f14c16db3860bf597daa42e2ce25852e2d5c3a3ca95a228f7/lfd-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b146ca9efd0dac4102c4b0663d6d9f6", "sha256": "18a2feae3d09bfd75bf3a64af97b65c17a61e9cba0e4d5c06f94215202903fea" }, "downloads": -1, "filename": "lfd-1.0.4.tar.gz", "has_sig": false, "md5_digest": "2b146ca9efd0dac4102c4b0663d6d9f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 942564, "upload_time": "2019-01-18T22:20:36", "url": "https://files.pythonhosted.org/packages/f5/37/348ac33de60662ac8d77fd75e294703321a25005b7278a6e39a05d283501/lfd-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5ce66d8e938c962a3bd3c14479bdd36", "sha256": "bc1c3bd990186da63ba587d6f44390beef35fff924268642f99144ea3cc25bc7" }, "downloads": -1, "filename": "lfd-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d5ce66d8e938c962a3bd3c14479bdd36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 977450, "upload_time": "2019-01-18T22:20:29", "url": "https://files.pythonhosted.org/packages/2e/83/1dd90778c30f14c16db3860bf597daa42e2ce25852e2d5c3a3ca95a228f7/lfd-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b146ca9efd0dac4102c4b0663d6d9f6", "sha256": "18a2feae3d09bfd75bf3a64af97b65c17a61e9cba0e4d5c06f94215202903fea" }, "downloads": -1, "filename": "lfd-1.0.4.tar.gz", "has_sig": false, "md5_digest": "2b146ca9efd0dac4102c4b0663d6d9f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 942564, "upload_time": "2019-01-18T22:20:36", "url": "https://files.pythonhosted.org/packages/f5/37/348ac33de60662ac8d77fd75e294703321a25005b7278a6e39a05d283501/lfd-1.0.4.tar.gz" } ] }