{ "info": { "author": "Michael Ortner", "author_email": "magpylib@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "

\n

magpylib - A simple and user friendly magnetic toolbox for Python 3

\n\n\n\n\n---\n

\n

Builds: \n\n \n \n \n \n \n\n

\n\n

Documentation: \n \n \n\n

\n\n

Test Coverage: \n\n \n \n\n\"Language\n

\n\n

Downloads: \n\n\"PyPI\n\"Conda\n\"Conda\n

\n\n\n\n
\n\n\n## What is magpylib ?\n- Python package for calculating magnetic fields of magnets, currents and\n moments (sources).\n- It provides convenient methods to generate, geometrically manipulate, group\n and vizualize assemblies of sources.\n- The magnetic fields are determined from underlying (semi-analytical)\n solutions which results in fast computation times (sub-millisecond) and\n requires little computation power.\n\n

\n \n

\n\n\n### Dependencies: \n_Python3.6+_, _Numpy_, _Matplotlib_\n\n---\n\n### Guides & Installation:\n\n**Please [check out our documentation](https://magpylib.readthedocs.io/en/latest) for getting started and more info!**\n\nQuickstart:\n\nInstalling this project using pip:\n- run the following in your Python environment terminal:\n ```\n pip install magpylib\n ```\n\nInstalling this project locally:\n- Clone this repository to your machine.\n- In the directory, run `pip install .` in your conda terminal.\n\n\n### Example:\n\n- Two permanent magnets with axial magnetization are created and geometrically manipulated. They are grouped in a single collection and the system geometry is displayed using a supplied method.\n- The total magnetic field that is generated by the collection is calculated on a grid in the xz-plane and is displayed using matplotlib.\n\n**Program output:**\n![](https://raw.githubusercontent.com/magpylib/magpylib/master/docs/_static/images/documentation/examplePlot.jpg)\n\n**Code:**\n```python\n# imports\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport magpylib as magpy\n \n# create magnets\nmagnet1 = magpy.source.magnet.Box(mag=[0,0,600],dim=[3,3,3],pos=[-4,0,3])\nmagnet2 = magpy.source.magnet.Cylinder(mag=[0,0,500], dim=[3,5], pos=[0,0,0])\n\n# manipulate magnets\nmagnet1.rotate(45,[0,1,0],anchor=[0,0,0])\nmagnet2.move([5,0,-4])\n\n# collect magnets\npmc = magpy.Collection(magnet1,magnet2)\n\n# display system geometry\npmc.displaySystem()\n\n# calculate B-fields on a grid\nxs = np.linspace(-10,10,20)\nzs = np.linspace(-10,10,20)\nBs = np.array([[pmc.getB([x,0,z]) for x in xs] for z in zs])\n\n# display fields using matplotlib\nfig, ax = plt.subplots()\nX,Y = np.meshgrid(xs,zs)\nU,V = Bs[:,:,0], Bs[:,:,2]\nax.streamplot(X, Y, U, V, color=np.log(U**2+V**2), density=1.5)\nplt.show() \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/magpylib/magpylib", "keywords": "magnetism physics analytical parallel electromagnetic fields b-field", "license": "GNU Affero General Public License v3 or later (AGPLv3+) (AGPL-3.0-or-later)", "maintainer": "", "maintainer_email": "", "name": "magpylib", "package_url": "https://pypi.org/project/magpylib/", "platform": "", "project_url": "https://pypi.org/project/magpylib/", "project_urls": { "Homepage": "https://github.com/magpylib/magpylib" }, "release_url": "https://pypi.org/project/magpylib/1.2.1b0/", "requires_dist": null, "requires_python": "~=3.6", "summary": "A simple, user friendly Python 3 toolbox for calculating magnetic fields from permanent magnets and current distributions.", "version": "1.2.1b0" }, "last_serial": 5613842, "releases": { "1.0.2b0": [ { "comment_text": "", "digests": { "md5": "0834b9cad935a538048aaeee4c5065ff", "sha256": "6bf826ce6d5a74c3701d02d121697616e2e04792c11368789fc6ac0d65fc4085" }, "downloads": -1, "filename": "magpylib-1.0.2b0-py3-none-any.whl", "has_sig": false, "md5_digest": "0834b9cad935a538048aaeee4c5065ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 67385, "upload_time": "2019-05-29T14:48:33", "url": "https://files.pythonhosted.org/packages/36/32/eaaef25ded1c3c44c9f6c5ff2dba6ad84dc0fcdffcf93e0487fb93a8d0f9/magpylib-1.0.2b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e90265fd138dfd843d4d50047492d8e0", "sha256": "fde2f8641a265461a9eb50259c5fccdf82822b57a441e3eae7a99f2861f3022e" }, "downloads": -1, "filename": "magpylib-1.0.2b0.tar.gz", "has_sig": false, "md5_digest": "e90265fd138dfd843d4d50047492d8e0", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 45895, "upload_time": "2019-05-29T14:58:18", "url": "https://files.pythonhosted.org/packages/d2/bc/f09f9ae0fac48ba19b0ab891a6f9dec2400dc3ab5ac35ee867f1232c6ea1/magpylib-1.0.2b0.tar.gz" } ], "1.1.0b0": [ { "comment_text": "", "digests": { "md5": "00b0488588b30cde0014fa276c08aba1", "sha256": "9653aaed69ee3b77ca880be8ef0906b9f651b3441edd224956c871c80715132b" }, "downloads": -1, "filename": "magpylib-1.1.0b0.tar.gz", "has_sig": false, "md5_digest": "00b0488588b30cde0014fa276c08aba1", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 47183, "upload_time": "2019-06-14T10:22:12", "url": "https://files.pythonhosted.org/packages/5f/74/047a911092397a144edbee572c89ed161b955d0514ad970d6e229e7cbd7c/magpylib-1.1.0b0.tar.gz" } ], "1.1.1b0": [ { "comment_text": "", "digests": { "md5": "fa255f49448dd77d9097962fbbff7ef3", "sha256": "c32f231aabf126960c327eb1ac54a6686f27ffb06ecb294dcc7d1f1fc9dee039" }, "downloads": -1, "filename": "magpylib-1.1.1b0.tar.gz", "has_sig": false, "md5_digest": "fa255f49448dd77d9097962fbbff7ef3", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 59646, "upload_time": "2019-06-25T10:20:55", "url": "https://files.pythonhosted.org/packages/b0/f2/766165d1c211c511eb6488a27d7b9a3e5919982412daba2acca2860accae/magpylib-1.1.1b0.tar.gz" } ], "1.2.0b0": [ { "comment_text": "", "digests": { "md5": "1631d8efd40987ad5ea90ab16ab32541", "sha256": "058969ac0363d301dc682c9c3084977385660ef673ab321c394ede00240f8581" }, "downloads": -1, "filename": "magpylib-1.2.0b0.tar.gz", "has_sig": false, "md5_digest": "1631d8efd40987ad5ea90ab16ab32541", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 63524, "upload_time": "2019-07-16T13:09:55", "url": "https://files.pythonhosted.org/packages/79/7b/b7a07f0f2f2450a3a830bb886912000578b7aa1111bf2f847e2001762cf5/magpylib-1.2.0b0.tar.gz" } ], "1.2.1b0": [ { "comment_text": "", "digests": { "md5": "387323b57871693174fb11d9cd6cff7e", "sha256": "cb202ed45c06c136371117d9c64e7ef9fdf6698776d12d8f18117cb20f7d073e" }, "downloads": -1, "filename": "magpylib-1.2.1b0.tar.gz", "has_sig": false, "md5_digest": "387323b57871693174fb11d9cd6cff7e", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 63125, "upload_time": "2019-07-31T14:46:51", "url": "https://files.pythonhosted.org/packages/69/7c/ff24793e63159aec0be955e13b3dee5ba0da9a2403d0fdf975aebcda2eee/magpylib-1.2.1b0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "387323b57871693174fb11d9cd6cff7e", "sha256": "cb202ed45c06c136371117d9c64e7ef9fdf6698776d12d8f18117cb20f7d073e" }, "downloads": -1, "filename": "magpylib-1.2.1b0.tar.gz", "has_sig": false, "md5_digest": "387323b57871693174fb11d9cd6cff7e", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 63125, "upload_time": "2019-07-31T14:46:51", "url": "https://files.pythonhosted.org/packages/69/7c/ff24793e63159aec0be955e13b3dee5ba0da9a2403d0fdf975aebcda2eee/magpylib-1.2.1b0.tar.gz" } ] }