{"id":19361278,"url":"https://github.com/zmitchell/polsim","last_synced_at":"2025-04-23T12:32:31.572Z","repository":{"id":57657026,"uuid":"149537616","full_name":"zmitchell/polsim","owner":"zmitchell","description":"A command line utility for doing polarization simulations","archived":false,"fork":false,"pushed_at":"2019-08-21T18:27:42.000Z","size":680,"stargazers_count":17,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T06:04:57.979Z","etag":null,"topics":["optics","physics","physics-simulation","polarization","rust","simulation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmitchell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-20T02:09:08.000Z","updated_at":"2024-04-24T00:07:58.000Z","dependencies_parsed_at":"2022-08-26T04:10:24.476Z","dependency_job_id":null,"html_url":"https://github.com/zmitchell/polsim","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fpolsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fpolsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fpolsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fpolsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmitchell","download_url":"https://codeload.github.com/zmitchell/polsim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250435116,"owners_count":21430220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optics","physics","physics-simulation","polarization","rust","simulation"],"created_at":"2024-11-10T07:21:37.656Z","updated_at":"2025-04-23T12:32:30.243Z","avatar_url":"https://github.com/zmitchell.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polsim\n\n[![Build Status](https://travis-ci.com/zmitchell/polsim.svg?branch=master)](https://travis-ci.com/zmitchell/polsim)\n\nFor installation and usage instructions, see the [User Guide][guide].\n\n## Elevator Pitch\n\nWould you rather look up (or calculate) the Jones matrix for an optical retarder oriented at an arbitrary angle with an arbitrary phase delay, or would you rather just type this:\n\n```toml\n[[elements]]\nelement_type = \"retarder\"\nphase = 1.57  # pi/2\nphase_units = \"radians\"\nangle = 45.0\nangle_units = \"degrees\"\n```\n\n## About\n\nHere's how it works:\n\n* You specify a beam and some optical elements in a [TOML][toml] file.\n* The command line utility reads the file and performs the simulation.\n* The results of the simulation are printed to the terminal.\n\nFor example, to specify a linearly polarized beam oriented at 0 degrees (i.e. horizontally) that passes through a polarizer oriented at 45 degrees, your file would look like this:\n\n```toml\n# simulation.toml\n[beam]\npolarization = \"linear\"\nangle = 0.0\nangle_units = \"degrees\"\n\n[[elements]]\nelement_type = \"polarizer\"\nangle = 45.0\nangle_units = \"degrees\"\n```\n\nYou would use `polsim` to read the file and do the simulation like this:\n\n```\n$ polsim simulation.toml\nintensity: 5.00000e-1\nx_mag: 5.00000e-1\nx_phase: 0.00000e0\ny_mag: 5.00000e-1\ny_phase: 0.00000e0\n```\n\nIf you want to impress your friends and family, you can print the results in a table via the `-p/--pretty` flag:\n```\n$ polsim -p simulation.toml\n+------------+------------+-----------+------------+-----------+\n| intensity  | x_mag      | x_phase   | y_mag      | y_phase   |\n+------------+------------+-----------+------------+-----------+\n| 5.00000e-1 | 5.00000e-1 | 0.00000e0 | 5.00000e-1 | 0.00000e0 |\n+------------+------------+-----------+------------+-----------+\n```\n\nFor more information, see the [User Guide][guide].\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n[jones_calc]: https://en.wikipedia.org/wiki/Jones_calculus\n[polarization]: https://crates.io/crates/polarization\n[toml]: https://github.com/toml-lang/toml\n[rust]: https://www.rust-lang.org/\n[guide]: https://zmitchell.github.io/polsim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitchell%2Fpolsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmitchell%2Fpolsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitchell%2Fpolsim/lists"}