{ "info": { "author": "Henri-Louis Girard", "author_email": "hl.girard@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# xptools\n\n[![PyPI version](https://badge.fury.io/py/xptools.svg)](https://badge.fury.io/py/xptools)\n\nAnalysis tools for experimental sciences to display images, detect particles (cells, bubbles, crystals), moving fronts and analyze their shape, size and distibution.\n\n## Installation\n\nxptools is on PyPI so you can install it straight from pip with the command\n\n```\npip install xptools\n```\n\nAlternatively, you can clone the repository to your local computer and install from source\n\n```\ngit clone https://github.com/hlgirard/xptools\ncd xptools\npip install .\n```\n\n## Scripts\n\n- analyze_front - This scipt takes a directory containing video files. For each file, it asks the user to select a region of interest\nand processes the selected area with a minimum threshold to find the largest area. It then plots the height of this area as\na function of time.\n\n```\nanalyze_front --plotly --scale 60 --framerate 30 moviedirectory/\n```\n\n![screenshot](docs/screenshots/analyze_front_ex-01.jpg)\n\n- analyze_bubbles - This script takes a movie (or directory of movies) showing bubbles on a surface (bright on dark). It uses a watershed segmentation algorithm to identify the bubbles and characterize their size. It then plots the bubble density and mean size as a function of time.\n\n```\nanalyze_bubbles --plotly --scale 60 bubble_movie.avi\n```\n\n![screenshot](docs/screenshots/analyze_bubbles_ex-01.jpg)\n\n- analyze_crystals - This script takes a directory containing pictures of droplets containing crystals (under cross polarization). It uses a thresholding algorithm to segment the crystals, count them and measure their size.\n\n```\nanalyze_crystals --plotly --key funct_key.txt imagedirectory/\n```\n\n![screenshot](docs/screenshots/analyze_crystals_ex-01.jpg)\n\n- display_image_matrix - Arranges all the images in a directory as a matrix and saves the resulting image\n\n```\ndisplay_image_matrix --lines 10 --compress imagedirectory/\n```\n\n## Utilities\n\nSeveral utilities are included in the submodule utils including:\n\n- select_roi:select_rectangle - Prompts the user to make a rectangular selection on the passed image and returns the coordinates of the selection.\n\n- videotools:open_video - Opens a video file as a list of np.arrays each containing one frame of the video.\n\n- videotools:determine_threshold - Determines the threshold to use for a video based on the minimum threshold algorithm.\n\n- videotools:obtain_cropping_boxes - Prompts the user to select the region of interest for each video file. Returns a dataframe containing the coordinates of the selected area for each file.\n\n- imagetools:open_all_images - Opens all the images in a folder and returns a list of cv2 images.\n\n### Example usage\n\n```python\nimport pandas as pd\nfrom xptools.utils import videotools\n\nvideo_list = ['Film1.avi','Film2.avi']\n\ndict_crop = videotools.obtain_cropping_boxes(video_list)\n\nfor key, val in dict_crop:\n stack = videotools.open_video(key)\n (minRow, minCol, maxRow, maxCol) = val\n stack = [img[minRow:maxRow,minCol:maxCol] for img in stack]\n process(stack)\n```\n\n## Notebooks\n\n- SegmentationBroadSpectrum.ipynb - Tests different image segmentation techniques to determine which is most appropriate\n- SegmentationFocused.ipynb - Implements a specific analysis and plots the resulting size and number distributions for the particles\n- Watershed_Segmentation.ipynb - Implements Watershed segmentation.\n\n## Credits\n\nCode for display_image_matrix adapted from https://gist.github.com/pgorczak/95230f53d3f140e4939c#file-imgmatrix-py\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\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": "https://github.com/hlgirard/xptools", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "xptools", "package_url": "https://pypi.org/project/xptools/", "platform": "", "project_url": "https://pypi.org/project/xptools/", "project_urls": { "Homepage": "https://github.com/hlgirard/xptools" }, "release_url": "https://pypi.org/project/xptools/0.38.post1/", "requires_dist": [ "opencv-python", "numpy", "pandas", "scikit-image", "joblib", "matplotlib", "av", "tqdm" ], "requires_python": "", "summary": "Image and video analysis tools for experimental sciences", "version": "0.38.post1" }, "last_serial": 4964066, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ddfa4e05a4dbf995415024e4702a7621", "sha256": "ae634a4c705d6c369ccd70ce111459789d888e72655835a98d4baa069a5abf59" }, "downloads": -1, "filename": "xptools-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ddfa4e05a4dbf995415024e4702a7621", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12126, "upload_time": "2018-11-15T20:36:23", "url": "https://files.pythonhosted.org/packages/07/b0/028fb92aa194f8327ff0db377680f3dd1a268c5663c7e27a01a463c6a0ab/xptools-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60b97e0c4a51d02853a004890037d0ab", "sha256": "c0bec203e9f3ff311e1405c86c2368ea6461dacbdbc3126ac37f68e9408a3c88" }, "downloads": -1, "filename": "xptools-0.1.tar.gz", "has_sig": false, "md5_digest": "60b97e0c4a51d02853a004890037d0ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8848, "upload_time": "2018-11-15T20:36:26", "url": "https://files.pythonhosted.org/packages/4d/57/d9cad66fb7541d3621e84b17a1488e12ca953bdf5d571558b6fc31d20e34/xptools-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "335154e27dfa667d881a1484498f0729", "sha256": "0364767e0889712545b15ed6edd8be2ba1cc3e0bca3ec19248440c5aa3f8a90d" }, "downloads": -1, "filename": "xptools-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "335154e27dfa667d881a1484498f0729", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14189, "upload_time": "2018-11-15T21:55:47", "url": "https://files.pythonhosted.org/packages/8c/2c/36b02cd30d09310a86bf46707f1e0aeaea831be494791c9e81ec13c8ea40/xptools-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca90724fd767c1a27f920c41d6a103e4", "sha256": "f1b817f3a3caf4294643a483438b9ac4d71f0627d2454ea0c16ea0bbc7882aa8" }, "downloads": -1, "filename": "xptools-0.2.tar.gz", "has_sig": false, "md5_digest": "ca90724fd767c1a27f920c41d6a103e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9415, "upload_time": "2018-11-15T21:55:48", "url": "https://files.pythonhosted.org/packages/41/9e/9814796f113d129ce98cf978f1e0e97e8698736fdf80d1a895b0e92ec06a/xptools-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1cbace82fa246381408eca4eff7b78bc", "sha256": "899c9947628f8dc4fb24c370b4247cf3ebdddd0e24d614925bb99ed6d081d3c6" }, "downloads": -1, "filename": "xptools-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1cbace82fa246381408eca4eff7b78bc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17349, "upload_time": "2018-11-26T19:24:45", "url": "https://files.pythonhosted.org/packages/65/54/cbf1e06d104b499ad386bb53e66933108657b75152479a907ee4c73db1b7/xptools-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f485b2549f7297bd2fbbfb7c57e129a3", "sha256": "cc6c7d2c94bb1e4192530421580863694329177520d833f253648d1c2494df2b" }, "downloads": -1, "filename": "xptools-0.3.tar.gz", "has_sig": false, "md5_digest": "f485b2549f7297bd2fbbfb7c57e129a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10423, "upload_time": "2018-11-26T19:24:47", "url": "https://files.pythonhosted.org/packages/64/5a/91d314dbd124a047b84e59cea1c2a370438ddcf2a140a99322a0d99d348c/xptools-0.3.tar.gz" } ], "0.35": [ { "comment_text": "", "digests": { "md5": "e0ddee21cb1b2cd6e54ea7b0fc507ab3", "sha256": "bffc10604380b83e0c9bc2f607f3055b9922726e1b48e1f36f0a5712e8ddefdd" }, "downloads": -1, "filename": "xptools-0.35.tar.gz", "has_sig": false, "md5_digest": "e0ddee21cb1b2cd6e54ea7b0fc507ab3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10818, "upload_time": "2018-11-28T20:17:44", "url": "https://files.pythonhosted.org/packages/50/8c/66bd969272b871fcdf97e653d3b0b20f44d518b00bb1eabdee8e53ebb04f/xptools-0.35.tar.gz" } ], "0.36": [ { "comment_text": "", "digests": { "md5": "1aca8ae7b1c1082c5fa6860792de6dc5", "sha256": "7ee86c64107a9332bd0c0d1211d1db9e6a2a0fc5b187f22eef810da2b8ca39f3" }, "downloads": -1, "filename": "xptools-0.36.tar.gz", "has_sig": false, "md5_digest": "1aca8ae7b1c1082c5fa6860792de6dc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11038, "upload_time": "2018-11-28T22:35:36", "url": "https://files.pythonhosted.org/packages/89/f7/d5b803ac7f6cc615d14932df1930628f009911f673d0e1cb1faac4f8fee7/xptools-0.36.tar.gz" } ], "0.37": [ { "comment_text": "", "digests": { "md5": "08856074cd140df15f08038d9e27c87c", "sha256": "128109e5073858af5a4798bf08db6f3392aaf1ff1b80bcfab280778be2e831a0" }, "downloads": -1, "filename": "xptools-0.37.tar.gz", "has_sig": false, "md5_digest": "08856074cd140df15f08038d9e27c87c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11038, "upload_time": "2018-11-28T22:35:37", "url": "https://files.pythonhosted.org/packages/bc/10/52755dbe4437bf4611f48b09149b2947d8537834f5fe17dcc0ad2b05d742/xptools-0.37.tar.gz" } ], "0.37.post1": [ { "comment_text": "", "digests": { "md5": "96cb1bc5daa5f67ef3ef80e66ba11def", "sha256": "8b573438cb05c2685e57d58ccc40acd392e870f00fdf642109b96198a7f8791e" }, "downloads": -1, "filename": "xptools-0.37.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "96cb1bc5daa5f67ef3ef80e66ba11def", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19098, "upload_time": "2018-11-28T22:39:27", "url": "https://files.pythonhosted.org/packages/12/5f/b37fda8381f5e200595efa326e3630272bb03ce36153947886eea50024ed/xptools-0.37.post1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba57b60e5b096bcab8fdaf8bde00eab4", "sha256": "5cfb670394538f18c85cf12d8b9b17e40d495b03fd462b8def16753d18e46ac0" }, "downloads": -1, "filename": "xptools-0.37.post1.tar.gz", "has_sig": false, "md5_digest": "ba57b60e5b096bcab8fdaf8bde00eab4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11093, "upload_time": "2018-11-28T22:39:45", "url": "https://files.pythonhosted.org/packages/8c/aa/37b34dd7d082429c8151f92a84094c901c762ab5c130d496fe41a276df5e/xptools-0.37.post1.tar.gz" } ], "0.38": [ { "comment_text": "", "digests": { "md5": "492465a25c723d93a90c94bd13cec239", "sha256": "a3e17c69fc82bc2030e788f6e6bf4365076b6d1a5a97df05d5189cb15108ed64" }, "downloads": -1, "filename": "xptools-0.38-py3-none-any.whl", "has_sig": false, "md5_digest": "492465a25c723d93a90c94bd13cec239", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19384, "upload_time": "2019-03-15T14:38:14", "url": "https://files.pythonhosted.org/packages/69/46/cb7427f83999be74bb5cf129c3509d04367375c2d8a6f2c1e0eccd1d644f/xptools-0.38-py3-none-any.whl" } ], "0.38.post1": [ { "comment_text": "", "digests": { "md5": "1406f203bdfb5b5ed62ccc85de0b1642", "sha256": "d4c27ab039ff0b147a9e3c6838846fc2036f1c07d4b7f84cc154cb65a7bfb3c5" }, "downloads": -1, "filename": "xptools-0.38.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "1406f203bdfb5b5ed62ccc85de0b1642", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19536, "upload_time": "2019-03-20T14:43:27", "url": "https://files.pythonhosted.org/packages/26/82/011ee3d2f5324e49183b0b092ac0b0873d19b717476cae45691b763f0c93/xptools-0.38.post1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1406f203bdfb5b5ed62ccc85de0b1642", "sha256": "d4c27ab039ff0b147a9e3c6838846fc2036f1c07d4b7f84cc154cb65a7bfb3c5" }, "downloads": -1, "filename": "xptools-0.38.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "1406f203bdfb5b5ed62ccc85de0b1642", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19536, "upload_time": "2019-03-20T14:43:27", "url": "https://files.pythonhosted.org/packages/26/82/011ee3d2f5324e49183b0b092ac0b0873d19b717476cae45691b763f0c93/xptools-0.38.post1-py3-none-any.whl" } ] }