{ "info": { "author": "Andrew G. Flood", "author_email": "andrew.flood@mail.utoronto.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering" ], "description": "# Optical Scattering Matrix Library\nThis implements a simple 1D scattering matrix algorithm for the calculation of reflection, transmission, and absorption of optical films and filters. It is an alternative to the transfer matrix algorithm and is known for being less prone to issues with highly absorbing films.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine.\n\n### Prerequisites\n\nThis library makes heavy use of the numpy and scipy libraries. You should have:\n\n* python version >3.x\n* numpy version >x.y\n* scipy version >x.y\n\n(testing is ongoing for version compatibility)\n\n### Installing\n\nThe best way to install is via pip. This is a python3 library, so the recommend install is either\n\n```\npip install scatteringmatrix\n```\nor\n```\npip3 install scatteringmatrix\n```\n\n## Examples\nRight now there is a single example file in the examples directory. It is exactly the same as the code below.\n\n```python\n\"\"\"\nThis file implements finding the transmission and reflection for various\nwavelengths for a single index lyaer on a glass substrate.\n\"\"\"\n\nimport scatteringmatrix as sm\nimport numpy as np\n\n'''\nDeclare Structure\n'''\n\n#Defining index functions. Any function that returns a complex value given\n#a specific wavelength (in meters) can be used. Here, we declare functions that\n#always return the same index, regardless of wavelength\nindex_air = sm.single_index_function(1.0)\nindex_glass = sm.single_index_function(1.5)\nindex_Si3N4 = sm.single_index_function(2.0)\n\n#A 1D optical structure is a list of layers. We declare two of the layers here\nfilm = sm.SingleLayer(index_Si3N4, 60.0*sm.Units.NANOMETERS)\nsubstrate = sm.SingleLayer(index_glass, 1.1*sm.Units.MILLIMETERS)\n\n#Here we declare the actual list and append the layers.\nstructure = sm.LayerList()\nstructure.append(sm.SingleLayer(index_air, sm.Units.MICROMETERS))\nstructure.append(film)\nstructure.append(substrate)\nstructure.append(sm.SingleLayer(index_air, sm.Units.MICROMETERS))\n\n'''\nCalculate transmission and reflection at 0 degrees\n'''\n\nwavelengths = np.linspace(300.0, 1200.0, 91)*sm.Units.NANOMETERS\n#Data is returned in an array of arrays.\nresults = sm.scattering_matrix_calculation(structure, wavelengths)\nprint(\"Selected Wavelength Data\")\nprint(\"----------------------------\")\nprint(\"Incident Angle:\", results[4])\nprint(\"Mode:\", results[5])\nprint(\"Wavelengths (nm):\", '{0:.1f}'.format(results[3][30]/sm.Units.NANOMETERS),\n \",\", '{0:.1f}'.format(results[3][60]/sm.Units.NANOMETERS))\nprint(\"Transmission @ 600 nm, 900 nm:\", '{0:.6f}'.format(results[0][30]),\n \",\", '{0:.6f}'.format(results[0][60]))\nprint(\"Reflection @ 600 nm, 900 nm:\", '{0:.6f}'.format(results[1][30]),\n \",\", '{0:.6f}'.format(results[1][60]))\nprint(\"Absorption @ 600 nm, 900 nm:\", '{0:.6f}'.format(results[2][30]),\n \",\", '{0:.6f}'.format(results[2][60]))\n\n```\n\nRunning this file should result in an output of:\n\n```\nSelected Wavelength Data\n----------------------------\nIncident Angle: 0.0\nMode: TE\nWavelengths (nm): 600.0 , 900.0\nTransmission @ 600 nm, 900 nm: 0.662785 , 0.964672\nReflection @ 600 nm, 900 nm: 0.337215 , 0.035328\nAbsorption @ 600 nm, 900 nm: 0.000000 , 0.000000\n```\n\n## Running unit tests\n\nGo into the directory where you have the library installed to run the basic unit tests. This can be done via the command line with\n\n```\npython3 -m unittest\n```\nwhich should result in an output similar to:\n```\nRan 80 tests in 0.026s\n\nOK\n```\n\n## Deployment\n\nThis is enitrely a python module, so no special deployment steps are required.\n\n## Contributing\n\nPlease contact the lead author andrew.flood@mail.utoronto.ca if you wish to join the project.\n\n## Versions\n\nWe have only had development and alpha versions up until now, so it will still stay at 0.1.0 for the time being.\n\n## Authors\n\n* **Andrew Flood** - *Initial work and current project lead*\n\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE.txt file for details", "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/agflood/scatteringmatrix", "keywords": "optics scattering matrix photonics", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "scatteringmatrix", "package_url": "https://pypi.org/project/scatteringmatrix/", "platform": "", "project_url": "https://pypi.org/project/scatteringmatrix/", "project_urls": { "Homepage": "https://github.com/agflood/scatteringmatrix" }, "release_url": "https://pypi.org/project/scatteringmatrix/0.1.0a3/", "requires_dist": null, "requires_python": ">=3", "summary": "Optical scattering matrix library", "version": "0.1.0a3" }, "last_serial": 5317748, "releases": { "0.1.0.dev3": [ { "comment_text": "", "digests": { "md5": "1a2ab27d4d1573bdff9184e199ee2bef", "sha256": "af70006289f2e3ca70d637472fd75eb05161f0daeebbb754e21a65cd1faa7cb3" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev3-py3-none-any.whl", "has_sig": false, "md5_digest": "1a2ab27d4d1573bdff9184e199ee2bef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8583, "upload_time": "2018-01-26T08:46:28", "url": "https://files.pythonhosted.org/packages/c2/4e/eb7ebe9fbf28a565f3959e403fd4744097190631ef49151654b27787c643/scatteringmatrix-0.1.0.dev3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ef59ed4f94ee0fffed6399695c2e8ab", "sha256": "d31ee156fc66e5e4993a468408eb4b8eb629d9a3733dbe9df8b7527819f20535" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev3.tar.gz", "has_sig": false, "md5_digest": "5ef59ed4f94ee0fffed6399695c2e8ab", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7184, "upload_time": "2018-01-26T08:46:29", "url": "https://files.pythonhosted.org/packages/ac/13/6e5e69ec0f996895022306085248dcecac3d1c896ebaf01e22d580b7a64d/scatteringmatrix-0.1.0.dev3.tar.gz" } ], "0.1.0.dev4": [ { "comment_text": "", "digests": { "md5": "066d6d82b1b15920e2300cd4b2f57fe8", "sha256": "a1f3bc6c26ad6bc7d8b99ee2d81493f968b81786addaf76e9db0bd97657a9cb0" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev4-py3-none-any.whl", "has_sig": false, "md5_digest": "066d6d82b1b15920e2300cd4b2f57fe8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8205, "upload_time": "2018-09-03T06:31:07", "url": "https://files.pythonhosted.org/packages/84/3f/d43f0ca81f5a0f75aae351f5039cc9c0936bca89cbe3cbe9dc48178e861d/scatteringmatrix-0.1.0.dev4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8634810e0902707107512b9e0c91dc04", "sha256": "9e8e3cfd9088522f528e18fe36bc3cf212c7e038b93e46a5872781c36b8a2794" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev4.tar.gz", "has_sig": false, "md5_digest": "8634810e0902707107512b9e0c91dc04", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7870, "upload_time": "2018-09-03T06:31:09", "url": "https://files.pythonhosted.org/packages/ed/75/285e11183e28c3fbd6977b3067d2b288b2dc9bcca441115d876a04e12c14/scatteringmatrix-0.1.0.dev4.tar.gz" } ], "0.1.0.dev6": [ { "comment_text": "", "digests": { "md5": "55fac9a5ca137ed0ebb4f1296643253c", "sha256": "594407458a6014effc31931dcf762a1eccc87c25ce8935094bf72aeaa09b48cd" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev6-py3-none-any.whl", "has_sig": false, "md5_digest": "55fac9a5ca137ed0ebb4f1296643253c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11591, "upload_time": "2019-05-22T00:01:46", "url": "https://files.pythonhosted.org/packages/61/36/e1fc495e1392d48537d8977a9d6062aeea7b819ef2245e0cbbe6d2728408/scatteringmatrix-0.1.0.dev6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59dab06c9e5b520ecd2e58c35efbbf92", "sha256": "604e4f03b5df44b03d9e8b673faf1b94ec037ede36639720ac932ab5d11a3dd4" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0.dev6.tar.gz", "has_sig": false, "md5_digest": "59dab06c9e5b520ecd2e58c35efbbf92", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 10751, "upload_time": "2019-05-22T00:01:48", "url": "https://files.pythonhosted.org/packages/8a/a5/bf9d61970897a4ebf15f7f603689297834dcc39eb55393cb808b849634df/scatteringmatrix-0.1.0.dev6.tar.gz" } ], "0.1.0a3": [ { "comment_text": "", "digests": { "md5": "802f924cffcb12ce47846c6ddeef146c", "sha256": "f06da12d9c00dc6fb85f993a0c6ca8cbedbf8e13d22d37cecbd132a62f162230" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0a3.tar.gz", "has_sig": false, "md5_digest": "802f924cffcb12ce47846c6ddeef146c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13808, "upload_time": "2019-05-26T02:51:15", "url": "https://files.pythonhosted.org/packages/b5/e9/a7a2fddfc20095168b788d765ac02e8868f5bb6c8d0d80a58a265b604eb9/scatteringmatrix-0.1.0a3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "802f924cffcb12ce47846c6ddeef146c", "sha256": "f06da12d9c00dc6fb85f993a0c6ca8cbedbf8e13d22d37cecbd132a62f162230" }, "downloads": -1, "filename": "scatteringmatrix-0.1.0a3.tar.gz", "has_sig": false, "md5_digest": "802f924cffcb12ce47846c6ddeef146c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13808, "upload_time": "2019-05-26T02:51:15", "url": "https://files.pythonhosted.org/packages/b5/e9/a7a2fddfc20095168b788d765ac02e8868f5bb6c8d0d80a58a265b604eb9/scatteringmatrix-0.1.0a3.tar.gz" } ] }