Skip to main content

pyAtmosphere

Physics-based simulation of light propagation in turbulent atmosphere.

Installation

*Highly recommend to use virtual environment.

Use the package manager pip to install required packages.

pip install -r requirements.txt

If you want to use GPU for simulation, you need to install CUDA on your machine. Additinally, the cupy python package is required. For example, for CUDA 11.0:

pip install cupy-cuda110

Usage

GPU usage

If you want to enable GPU simulation, execute at the beginning of your script:

from pyatmosphere import gpu
gpu.config['use_gpu'] = True

QuickChannel example

from pyatmosphere import QuickChannel

quick_channel = QuickChannel(
    Cn2=1e-15,
    length=10000,
    count_ps=5,
    beam_w0=0.09,
    beam_wvl=8.08e-07,
    aperture_radius=0.12
    )

quick_channel.plot()

Advanced channel

import numpy as np
from pyatmosphere import (
    Channel,
    RectGrid,
    RandLogPolarGrid,
    GaussianSource,
    IdenticalPhaseScreensPath,
    SSPhaseScreen,
    CirclePupil,
    MVKModel,
    measures
    )

channel = Channel(
    grid=RectGrid(
        resolution=2048, 
        delta=0.0015
    ),
    source=GaussianSource(
        wvl=808e-9,
        w0=0.12,
        F0=np.inf
    ),
    path=IdenticalPhaseScreensPath(
        phase_screen=SSPhaseScreen(
            model=MVKModel(
                Cn2=5e-16,
                l0=6e-3,
                L0=1e3,
            ),
            f_grid=RandLogPolarGrid(
                points=2**10, 
                f_min=1 / 1e3 / 15, 
                f_max=1 / 6e-3 * 2
            )
        ),
        length=50e3,
        count=5
    ),
    pupil=CirclePupil(
        radius=0.2
    ),
)

channel_output = channel.run(pupil=False)
intensity = measures.I(channel, output=channel_output)
mean_x = measures.mean_x(channel, output=channel_output)

Simulations

from pyatmosphere import simulations

beam_result = simulations.BeamResult(quick_channel, max_size=2000)
pdt_result = simulations.PDTResult(quick_channel, max_size=6000)
sim = simulations.Simulation([beam_result, pdt_result])
sim.run(plot_step=1000)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Feel free to open new issues if you have any questions.

License

GNU GPLv3

Metadata

Release files for pyAtmosphere 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyAtmosphere 0.0.1
File Size Uploaded Provenance Actions
pyAtmosphere-0.0.1.tar.gz 60.0 kB Without provenance Details for pyAtmosphere-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyAtmosphere 0.0.1
File Interpreter ABI Platform Actions
pyAtmosphere-0.0.1-py3-none-any.whl Python 3 none any Details for pyAtmosphere-0.0.1-py3-none-any.whl

Total release size: 116.2 kB

Release files / pyAtmosphere-0.0.1.tar.gz

Download URL pyAtmosphere-0.0.1.tar.gz
Size 60.0 kB
Tags Source
SHA-256 checksum
How to use checksums
604a2f6140ca41251a815318d97f361af1318ffb96d057e0bdb8ff791b5d1f85
BLAKE2b-256 checksum
How to use checksums
dbac6922fd6ca31c8e1efe2e7e13dff9c6029db8c57fefe9de5b1f43311e9707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.15

Release files / pyAtmosphere-0.0.1-py3-none-any.whl

Download URL pyAtmosphere-0.0.1-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fa7f1d27420cfe8107dac01055cd0021145fab0769b5d36d036f8cfd4f01ae0
BLAKE2b-256 checksum
How to use checksums
119e4235d7a8f76d3bb804be10ef801529be164c8f7aee9648c3311802496ac3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.15

Security for pyAtmosphere 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page