{"id":27099460,"url":"https://github.com/klenm/pyatmosphere","last_synced_at":"2025-04-06T12:34:32.753Z","repository":{"id":153079638,"uuid":"342493231","full_name":"KlenM/pyAtmosphere","owner":"KlenM","description":"Physics-based simulation of light propagation in turbulent atmosphere","archived":false,"fork":false,"pushed_at":"2024-03-05T11:49:03.000Z","size":643,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T20:19:58.874Z","etag":null,"topics":["atmospheric-science","gpu","physics","physics-simulation","python","quantum-optics","simulation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KlenM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-02-26T07:11:10.000Z","updated_at":"2024-08-16T20:32:22.000Z","dependencies_parsed_at":"2023-07-14T02:46:08.551Z","dependency_job_id":null,"html_url":"https://github.com/KlenM/pyAtmosphere","commit_stats":{"total_commits":48,"total_committers":3,"mean_commits":16.0,"dds":"0.22916666666666663","last_synced_commit":"2df19d8424b0e5d8bd52fb4171b30259fa2a4c4f"},"previous_names":["nyurin/pyatmosphere"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KlenM%2FpyAtmosphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KlenM%2FpyAtmosphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KlenM%2FpyAtmosphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KlenM%2FpyAtmosphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KlenM","download_url":"https://codeload.github.com/KlenM/pyAtmosphere/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485182,"owners_count":20946395,"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":["atmospheric-science","gpu","physics","physics-simulation","python","quantum-optics","simulation"],"created_at":"2025-04-06T12:34:31.905Z","updated_at":"2025-04-06T12:34:32.739Z","avatar_url":"https://github.com/KlenM.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyAtmosphere\n\nPhysics-based simulation of light propagation in turbulent atmosphere.\n\n## Installation\n*Highly recommend to use [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install required packages.\n\n```bash\npip install -r requirements.txt\n```\n\nIf you want to use GPU for simulation, you need to [install](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#package-manager-installation) `CUDA` on your machine.\nAdditinally, the `cupy` python package is required. For example, for CUDA 11.0:\n```bash\npip install cupy-cuda110\n```\n\n## Usage\n### GPU usage\n\nIf you want to enable GPU simulation, execute at the beginning of your script:\n\n```python\nfrom pyatmosphere import gpu\ngpu.config['use_gpu'] = True\n```\n\n### QuickChannel example\n\n```python\nfrom pyatmosphere import QuickChannel\n\nquick_channel = QuickChannel(\n    Cn2=1e-15,\n    length=10000,\n    count_ps=5,\n    beam_w0=0.09,\n    beam_wvl=8.08e-07,\n    aperture_radius=0.12\n    )\n\nquick_channel.plot()\n```\n\n### Advanced channel\n\n```python\nimport numpy as np\nfrom pyatmosphere import (\n    Channel,\n    RectGrid,\n    RandLogPolarGrid,\n    GaussianSource,\n    IdenticalPhaseScreensPath,\n    SSPhaseScreen,\n    CirclePupil,\n    MVKModel,\n    measures\n    )\n\nchannel = Channel(\n    grid=RectGrid(\n        resolution=2048, \n        delta=0.0015\n    ),\n    source=GaussianSource(\n        wvl=808e-9,\n        w0=0.12,\n        F0=np.inf\n    ),\n    path=IdenticalPhaseScreensPath(\n        phase_screen=SSPhaseScreen(\n            model=MVKModel(\n                Cn2=5e-16,\n                l0=6e-3,\n                L0=1e3,\n            ),\n            f_grid=RandLogPolarGrid(\n                points=2**10, \n                f_min=1 / 1e3 / 15, \n                f_max=1 / 6e-3 * 2\n            )\n        ),\n        length=50e3,\n        count=5\n    ),\n    pupil=CirclePupil(\n        radius=0.2\n    ),\n)\n\nchannel_output = channel.run(pupil=False)\nintensity = measures.I(channel, output=channel_output)\nmean_x = measures.mean_x(channel, output=channel_output)\n```\n\n### Simulations\n```python\nfrom pyatmosphere import simulations\n\nbeam_result = simulations.BeamResult(quick_channel, max_size=2000)\npdt_result = simulations.PDTResult(quick_channel, max_size=6000)\nsim = simulations.Simulation([beam_result, pdt_result])\nsim.run(plot_step=1000)\n```\n\n## Citing\nIf you make use of this software, please cite our associated paper:\n```bib\n@article{klen2023,\n  title = {Numerical simulations of atmospheric quantum channels},\n  author = {Klen, M. and Semenov, A. A.},\n  journal = {Phys. Rev. A},\n  volume = {108},\n  issue = {3},\n  pages = {033718},\n  numpages = {19},\n  year = {2023},\n  month = {Sep},\n  publisher = {American Physical Society},\n  doi = {10.1103/PhysRevA.108.033718},\n  url = {https://link.aps.org/doi/10.1103/PhysRevA.108.033718}\n}\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nFeel free to open new issues if you have any questions.\n\n## License\n[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklenm%2Fpyatmosphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklenm%2Fpyatmosphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklenm%2Fpyatmosphere/lists"}