{ "info": { "author": "Lumicks B.V.", "author_email": "devteam@lumicks.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Physics" ], "description": "# Lumicks pylake \n\n[![Build Status](https://travis-ci.org/lumicks/pylake.svg?branch=master)](https://travis-ci.org/lumicks/pylake)\n[![Documentation Status](https://readthedocs.org/projects/lumicks-pylake/badge/?version=latest)](https://lumicks-pylake.readthedocs.io/en/latest/?badge=latest)\n\nThis Python package includes data analysis tools for Bluelake HDF5 data.\n\n## Install\n\nFor general use, all you need to do is enter the following on the command line:\n\n```bash\npip install lumicks.pylake\n```\n\nTo upgrade to the latest version:\n\n```bash\npip install -U lumicks.pylake\n```\n\n## Reading HDF5 files\n\n```python\nfrom lumicks import pylake\n\nh5file = pylake.File(\"example.h5\")\n```\n\n### FD curves\n\n```python\nimport matplotlib.pyplot as plt\n\n# Plot all FD curves in a file\nfor name, fd in h5file.fdcurves.items():\n fd.plot_scatter()\n plt.savefig(name)\n\n# Pick a single FD curve\nfd = h5file.fdcurves[\"name\"]\n# By default, the FD channel pair is `downsampled_force2` and `distance1`\nfd.with_channels(force='1x', distance='2').plot_scatter()\n\n# Access the raw data: defaults\nforce = fd.f\ndistance = fd.d\n# Access the raw data: specific\nforce = fd.downsampled_force1y\ndistance = fd.distance2\n\n# Plot manually: FD curve\nplt.scatter(distance.data, force.data)\n# Plot manually: force timetrace\nplt.plot(force.timestamps, force.data)\n\n# By default `f` is `downsampled_force2` and `d` is `distance1`\naltenative_fd = fd.with_channels(force='1x', distance='2')\n\n# Baseline subtraction\nfd_baseline = h5file.fdcurves[\"Baseline\"]\nfd_measured = h5file.fdcurves[\"Measurement\"]\nfd = fd_measured - fd_baseline\nfd.plot_scatter()\n```\n\n### Force vs. time\n\n```python\n# Simple force plotting\nh5file.force1x.plot()\nplt.savefig(\"force1x\")\n\n# Accessing the raw data\nf1x_data = h5file.force1x.data\nf1x_timestamps = h5file.force1x.timestamps\nplt.plot(f1x_timestamps, f1x_data)\n```\n\n### Slicing data channels\n\n```python\n# Take the entire channel\neverything = h5file.force1x\neverything.plot()\n\n# Get the data between 1 and 1.5 seconds\npart = h5file.force1x['1s':'1.5s']\npart.plot()\n# Or manually\nf1x_data = part.data\nf1x_timestamps = part.timestamps\nplt.plot(f1x_timestamps, f1x_data)\n\n# More slicing examples\na = h5file.force1x[:'-5s'] # everything except the last 5 seconds\nb = h5file.force1x['-1m':] # take the last minute\nc = h5file.force1x['-1m':'-500ms'] # last minute except the last 0.5 seconds\nd = h5file.force1x['1.2s':'-4s'] # between 1.2 seconds and 4 seconds from the end\ne = h5file.force1x['5.7m':'1h 40m'] # 5.7 minutes to an hour and 40 minutes\n```\n\n### Scans and kymographs\n\nThe following code uses kymographs as an example. \nScans work the same way -- just substitute `h5file.kymos` with `h5file.scans`.\n\n```python\n# Plot all kymographs in a file\nfor name, kymo in h5file.kymos.items():\n kymo.plot_rgb()\n plt.savefig(name)\n\n# Pick a single kymograph\nkymo = h5file.kymos[\"name\"]\n# Plot a single color channel\nkymo.plot_red()\n\n# Access the raw image data\nrgb = kymo.rgb_image # matrix\nblue = kymo.blue_image\n# Plot manually\nplt.imshow(rgb)\n\n# Low-level raw data\nphotons = kymo.red_photons\nplt.plot(photons.timestamps, photons.data)\n\n# Saving photon counts to TIFF\nkymo.save_tiff(\"kymograph.tiff\")\n```\n\n```python\nscan = h5file.scans[\"name\"]\n\n# A scan can have multiple frames\nprint(scan.num_frames)\nprint(scan.blue_image.shape) # (self.num_frames, h, w) -> single color channel\nprint(scan.rgb_image.shape) # (self.num_frames, h, w, 3) -> three color channels\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": "https://github.com/lumicks/pylake", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "lumicks.pylake", "package_url": "https://pypi.org/project/lumicks.pylake/", "platform": "", "project_url": "https://pypi.org/project/lumicks.pylake/", "project_urls": { "Homepage": "https://github.com/lumicks/pylake" }, "release_url": "https://pypi.org/project/lumicks.pylake/0.3.1/", "requires_dist": [ "pytest (<4.0,>=3.5)", "h5py (<3.0,>=2.9)", "numpy (<2,>=1.14)", "scipy (<2,>=1.1)", "matplotlib (<3,>=2.2)", "tifffile (>=2018.11.6)" ], "requires_python": ">=3.6", "summary": "Bluelake data analysis tools", "version": "0.3.1" }, "last_serial": 4993750, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "aaeb8c2ff1f0d2ebdb93843290a39126", "sha256": "5930ab0d9f48a24135d34f31238bf44fe5f681f42819655fb3ac7dab6936c311" }, "downloads": -1, "filename": "lumicks.pylake-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "aaeb8c2ff1f0d2ebdb93843290a39126", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23278, "upload_time": "2018-06-20T11:09:35", "url": "https://files.pythonhosted.org/packages/78/96/828898971a475eaff037efc10fb1e73c68fcb5302dca830e981744b6b093/lumicks.pylake-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2734074058e869af89c0aa61acbdbff", "sha256": "cf971303c564cd6c5b83010d27bec379816c9e6f33996d548afb89bc67130ab0" }, "downloads": -1, "filename": "lumicks.pylake-0.1.tar.gz", "has_sig": false, "md5_digest": "e2734074058e869af89c0aa61acbdbff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18464, "upload_time": "2018-06-20T11:09:36", "url": "https://files.pythonhosted.org/packages/75/37/165929f7b7899a375f746c8d82f0f510024707661eed9f95186c6b5f1a26/lumicks.pylake-0.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4e77f9f1e4cc838e5acbdf6ef312cae7", "sha256": "ca805567795cce20c1de74e37272518ffe8033997cdd0f5d7773be6e359ace92" }, "downloads": -1, "filename": "lumicks.pylake-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4e77f9f1e4cc838e5acbdf6ef312cae7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 26313, "upload_time": "2018-07-27T12:14:48", "url": "https://files.pythonhosted.org/packages/b2/a7/09b7b221d00d326be2f74a94fc5ceead733b5ff81da78c33b75046ea441b/lumicks.pylake-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5aa3847772605e872b05d16e199d0418", "sha256": "92216307e382a169be1983519b7c23e3f32a3c001d45ba74e74141fdb8ef09bf" }, "downloads": -1, "filename": "lumicks.pylake-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5aa3847772605e872b05d16e199d0418", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 21308, "upload_time": "2018-07-27T12:14:50", "url": "https://files.pythonhosted.org/packages/5c/f9/22500a12f6d6a40dbebc3730aceff479460b54c1618134edde6e345cad34/lumicks.pylake-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ac0a698929f6ab0f7be46e942eba4357", "sha256": "3f04ffe4444b383650a4cf4d4a206ea958bcfd5ac3f10be3ad8b00f59e545e47" }, "downloads": -1, "filename": "lumicks.pylake-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ac0a698929f6ab0f7be46e942eba4357", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 27682, "upload_time": "2018-12-04T18:28:05", "url": "https://files.pythonhosted.org/packages/58/83/a452c4697384c8e8307468bfa076c10f8e455e1996a74df44b0daa6099af/lumicks.pylake-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b404268ae5460a13e7250f4f019ad420", "sha256": "23f04065d0b8da74766b0e9e3345ed3b615b1ffe2c9948401f1007697d8f3a4d" }, "downloads": -1, "filename": "lumicks.pylake-0.3.0.tar.gz", "has_sig": false, "md5_digest": "b404268ae5460a13e7250f4f019ad420", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 22299, "upload_time": "2018-12-04T18:28:06", "url": "https://files.pythonhosted.org/packages/03/26/99fe1bc31625469bfbe85b2a3037876808d4ab67fe6f5321da384d8ec976/lumicks.pylake-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "47b4a8679ce9d862101bad6ce6d5a139", "sha256": "5c2cf173ce0afefd2be0ef25ead09f22d045d8f500af1ac65e96295344d2e877" }, "downloads": -1, "filename": "lumicks.pylake-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "47b4a8679ce9d862101bad6ce6d5a139", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 28139, "upload_time": "2019-03-27T16:42:01", "url": "https://files.pythonhosted.org/packages/a5/42/04d49e1cdb3283f64e60bba5e68f16ee04bbc0fea63a23e064ac621e39ef/lumicks.pylake-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c40f9a38eb9a8b8e05768f5c97d08471", "sha256": "24cf5a3221250014583b4c1b0b92e14fdf831e4b3e5b492c6ff8f9c72a8faab5" }, "downloads": -1, "filename": "lumicks.pylake-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c40f9a38eb9a8b8e05768f5c97d08471", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 22733, "upload_time": "2019-03-27T16:42:02", "url": "https://files.pythonhosted.org/packages/28/ca/b01a4e329f21e3ecd3b7197d3351188f06342964d3f6eecd10074e6260e1/lumicks.pylake-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "47b4a8679ce9d862101bad6ce6d5a139", "sha256": "5c2cf173ce0afefd2be0ef25ead09f22d045d8f500af1ac65e96295344d2e877" }, "downloads": -1, "filename": "lumicks.pylake-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "47b4a8679ce9d862101bad6ce6d5a139", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 28139, "upload_time": "2019-03-27T16:42:01", "url": "https://files.pythonhosted.org/packages/a5/42/04d49e1cdb3283f64e60bba5e68f16ee04bbc0fea63a23e064ac621e39ef/lumicks.pylake-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c40f9a38eb9a8b8e05768f5c97d08471", "sha256": "24cf5a3221250014583b4c1b0b92e14fdf831e4b3e5b492c6ff8f9c72a8faab5" }, "downloads": -1, "filename": "lumicks.pylake-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c40f9a38eb9a8b8e05768f5c97d08471", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 22733, "upload_time": "2019-03-27T16:42:02", "url": "https://files.pythonhosted.org/packages/28/ca/b01a4e329f21e3ecd3b7197d3351188f06342964d3f6eecd10074e6260e1/lumicks.pylake-0.3.1.tar.gz" } ] }