{"id":13736631,"url":"https://github.com/fancompute/angler","last_synced_at":"2026-01-21T16:06:00.156Z","repository":{"id":57410326,"uuid":"142919590","full_name":"fancompute/angler","owner":"fancompute","description":"Frequency-domain photonic simulation and inverse design optimization for linear and nonlinear devices","archived":false,"fork":false,"pushed_at":"2019-12-14T13:10:50.000Z","size":122335,"stargazers_count":175,"open_issues_count":11,"forks_count":52,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-12-02T08:55:10.915Z","etag":null,"topics":["adjoint","adjoint-sensitivities","electromagnetic","fdfd","frequency-domain","inverse-problems","mkl","nonlinear-devices","optics","optimization","photonics","sensitivity-analysis","simulation","solver"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1811.01255","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fancompute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-30T19:31:40.000Z","updated_at":"2025-12-01T11:57:52.000Z","dependencies_parsed_at":"2022-09-04T22:13:57.484Z","dependency_job_id":null,"html_url":"https://github.com/fancompute/angler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fancompute/angler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancompute%2Fangler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancompute%2Fangler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancompute%2Fangler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancompute%2Fangler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fancompute","download_url":"https://codeload.github.com/fancompute/angler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancompute%2Fangler/sbom","scorecard":{"id":392007,"data":{"date":"2025-08-11","repo":{"name":"github.com/fancompute/angler","commit":"4c9f475e059797b3bf2d38ebf3f04ffe68c8729a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T18:04:23.418Z","repository_id":57410326,"created_at":"2025-08-18T18:04:23.418Z","updated_at":"2025-08-18T18:04:23.418Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["adjoint","adjoint-sensitivities","electromagnetic","fdfd","frequency-domain","inverse-problems","mkl","nonlinear-devices","optics","optimization","photonics","sensitivity-analysis","simulation","solver"],"created_at":"2024-08-03T03:01:25.399Z","updated_at":"2026-01-21T16:06:00.125Z","avatar_url":"https://github.com/fancompute.png","language":"Python","readme":"\u003clink rel=\"icon\" href=\"/img/favicon.png\" type=\"image/x-icon\" /\u003e\n\u003cimg src=\"/img/anglerlogos/rainbow.png\" title=\"Angler\" alt=\"Angler\"\u003e\n\n# angler\n\n`angler` (named for '**a**djoint **n**onlinear **g**radients') is a package for simulating and optimizing optical structures.\n\nIt provides a finite-difference frequency-domain (FDFD) solver for simulating for linear and nonlinear devices in the frequency domain.\n\nIt also provides an easy to use package for adjoint-based inverse design and optimization of linear and nonlinear devices.  For example, you can inverse design optical switches to transport power to different ports for different input powers:\n\n\u003cimg src=\"/img/Tport.gif\" title=\"Fields\" alt=\"Fields\"\u003e\n\n`angler` is released as part of a paper `Adjoint method and inverse design for nonlinear optical devices`, which can be viewed [here](https://arxiv.org/abs/1811.01255).\n\n## Installation\n\nOne can install the most stable version of `angler` and all of its dependencies (apart from MKL) using\n\n\tpip install angler\n\t\nAlternatively, to use the most current version\n\n\tgit clone https://github.com/fancompute/angler.git\n\tpip install -e angler\n\nAnd then this directory can be added to path to import angler, i.e.\n\n\timport sys\n\tsys.path.append('path/to/angler')\n\n\n## Make angler faster\n\nThe most computationally expensive operation in `angler` is the sparse linear system solve.  This is done with [`scipy.sparse.linalg.spsolve()`](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.spsolve.html) by default.  If MKL is installed, `angler` instead uses this with a python wrapper [`pyMKL`](https://github.com/dwfmarchant/pyMKL), which makes things significantly faster, depending on the problem.  The best way to install MKL, if using anaconda, is\n\n\tconda install MKL\n\t\n(pyMKL does not work when MKL is pip installed.)\n\n## Examples / Quickstart\n\nThere are several jupyter notebook examples in the `Notebooks/` directory.\n\nFor a good introduction, try:\n\n\tNotebooks/Splitter.ipynb\n\nFor more specific applications:\n\n#### Electromagnetic simulations\n\nFor modeling linear devices with our FDFD solver (no optimization), see\n\n\tNotebooks/Linear_system.ipynb\n\nFor modeling nonlinear devices with FDFD (no optimization), see \n\n\tNotebooks/Nonlinear_system.ipynb\n\n#### Inverse design \u0026 optimization\n\nFor examples of optimizing linear devices, see \n\n\tNotebooks/Splitter.ipynb\n\tNotebooks/Accelerator.ipynb\n\nFor examples of optimizing nonlinear devices, see\n\n\tNotebooks/2_port.ipynb\n\tNotebooks/3_port.ipynb\n\tNotebooks/T_port.ipynb\n\n## Package Structure\n\n`angler` provides two main classes, `Simulation` and `Optimization`, which perform most of the functionality.\n\nGenerally, `Simulation` objects are used to perform FDFD simulations, and `Optimization` classes run inverse design and optimization algorithms over `Simulation`s.  To learn more about how `angler` works and how to use it, please take a look at [angler/README.md](angler/README.md) for a more detailed explanation.\n\n## Tests\n\nTo run all tests:\n\n\tpython -m unittest discover tests\n\nOr to run individually:\n\t\n\tpython tests/individual_test.py\n\n## Contributing\n\n`angler` is under development and we welcome suggestions, pull-requests, feature-requests, etc.\n\nIf you contribute a new feature, please also write a few tests and document your changes in [angler/README.md](angler/README.md) or the wiki.\n\n## Authors\n\n`angler` was written by Tyler Hughes, Momchil Minkov, and Ian Williamson.\n\n## Citing\n\nIf you use `angler`, please cite us using\n\n\t@article{Hughes2018,\n\tauthor = {Hughes, Tyler W. and Minkov, Momchil and Williamson, Ian A. D. and Fan, Shanhui},\n\ttitle = {Adjoint Method and Inverse Design for Nonlinear Nanophotonic Devices},\n\tjournal = {ACS Photonics},\n\tvolume = {5},\n\tnumber = {12},\n\tpages = {4781-4787},\n\tyear = {2018},\n\tdoi = {10.1021/acsphotonics.8b01522}\n\t}\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. Copyright 2018 Tyler Hughes.\n\n## Acknowledgments\n\n* our logo was made by [Nadine Gilmer](http://nadinegilmer.com/) :)\n* RIP Ian's contributions before the code merge\n* We made use of a lot of code snippets (and advice) from [Jerry Shi](https://yujerryshi.github.io/index.html)\n","funding_links":[],"categories":["simulation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancompute%2Fangler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffancompute%2Fangler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancompute%2Fangler/lists"}