https://github.com/ojdf/fast
Simulation tool that utilises a Fourier domain adaptive optics model to enable rapid Monte Carlo characterisation of free space optical links between the Earth and satellites
https://github.com/ojdf/fast
adaptive-optics free-space-optical-communiucation simulation turbulence
Last synced: 6 days ago
JSON representation
Simulation tool that utilises a Fourier domain adaptive optics model to enable rapid Monte Carlo characterisation of free space optical links between the Earth and satellites
- Host: GitHub
- URL: https://github.com/ojdf/fast
- Owner: ojdf
- License: gpl-3.0
- Created: 2022-03-15T11:34:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-10-07T10:54:53.000Z (4 months ago)
- Last Synced: 2025-10-07T11:41:41.815Z (4 months ago)
- Topics: adaptive-optics, free-space-optical-communiucation, simulation, turbulence
- Language: Python
- Homepage: https://ojdf.github.io/fast/
- Size: 545 KB
- Stars: 15
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# FAST (Fourier domain Adaptive optics Simulation Tool)

[](https://codecov.io/gh/ojdf/fast)
FAST is a simulation tool that utilises a Fourier domain AO model to enable rapid Monte Carlo characterisation of free space optical links between the Earth and satellites. For more details, see the paper [https://doi.org/10.1364/OE.458659](https://doi.org/10.1364/OE.458659).
Documentation is hosted at [ojdf.github.io/fast](https://ojdf.github.io/fast).
WARNING: FAST is under active development and the simulation API and configuration is not fixed. If you find a bug, or something is not working as you would expect, please email me or make an issue on GitHub, it's likely I've broken something!
## Requirements
See `requirements.txt`
It is recommended to install [pyFFTW](https://pypi.org/project/pyFFTW/) to speed up FFTs.
## Installation
### PyPI
`pip install fast-aosim`
### From Source
For the latest developments, clone this repository run `pip install -r requirements.txt` to get the required dependencies. Then, ensure that the FAST directory is on your `PYTHONPATH`, or navigate to the directory and run
`pip install .`
To confirm correct installation, try running
`cd test && python test_script.py`
in the FAST directory, which should run a short simulation. You can also run the unit tests with
`pytest -v test/tests_pytest.py`
## Configuration
Config is handled currently by python scripts, an example of which is shown in `test_params.py`. The config file should define a dictionary `p` which contains all of the configuration information required. If any values are missed, they will be replaced by defaults.
To start a simulation either in the python shell or in a script, you can either pass the filename of the script defining the config dictionary, or you can provide the dictionary itself, which can be useful if you are scanning through parameters. So
```
import fast
sim = fast.Fast("your_config_file.py")
```
or
```
import fast
p = {your config}
sim = fast.Fast(p)
```
## Running the simulation
The simulation is run by calling the `run()` function on the sim object. This will compute the phase screens and log-amplitude values, and then compute the detected power or phase/amplitude for coherent detection. The results are stored in `sim.result` and are also returned from `run()`, i.e. `res = sim.run()`. Results in either dB or power units can be obtained from e.g. `sim.result.dB_rel` (for dB relative to the diffraction limit) or `sim.result.power`. See the documentation for more details.
To save the simulation results as a fits file with header information, use `sim.save(filename)`.