Metadata-Version: 2.1
Name: optcom
Version: 0.2.2
Summary: Optical System Simulator
Home-page: https://github.com/optcom-org/optcom
Author: Sacha Medaer
Author-email: sacha.medaer@optcom.org
License: GNU
Download-URL: https://github.com/optcom-org/optcom/archive/v0.2.2.tar.gz
Platform: UNKNOWN
Classifier: Natural Language :: English
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7.0
Description-Content-Type: text/markdown
Requires-Dist: scipy
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: pillow
Requires-Dist: pyfftw
Requires-Dist: typing-extensions

<div align="center">
  <img src="branding/logo/logo_crop.png">
</div>

# Optcom: Open Source Optical System Simulator

[![Python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%20...-blue)](https://www.python.org/)
[![PyPI version](https://badge.fury.io/py/optcom.svg)](https://badge.fury.io/py/optcom)
[![Gitter](https://badges.gitter.im/optcom-org/optcom.svg)](https://gitter.im/optcom-org/optcom?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Documentation Status](https://readthedocs.org/projects/optcom/badge/?version=latest)](https://optcom.readthedocs.io/en/latest/?badge=latest)

## What is Optcom ?

Optcom is a Python library which aims to simulate optical systems.
Optcom has been build for both advanced research and teaching purposes.

On one hand, Optcom can be used as an optical system simulation
framework in which users can create their own optical / electric
components and benefit from a wide range of helper functions. On the
other hand, Optcom can be used with the in-build components for
state-of-the art optical system simulation.

Moreover, user-friendly experience is at the heart of Optcom approach.
In Optcom, an optical system is built by linking the ports of different
components to each other. Here is a small example of what can be done:

```python
import optcom as oc

# Create 2 Gaussian channels
pulse = oc.Gaussian(channels=2, center_lambda=[1030., 1550.], peak_power=[0.5, 1.0])
# Create fiber with a user-defined attenuation coefficient
fiber = oc.Fiber(length=1.0, alpha=[0.4], ATT=True, DISP=True, SPM=True, save_all=True)
# Create an optical layout and link the 2 first ports of pulse and fiber
layout = oc.Layout()
layout.link((pulse[0], fiber[0]))
layout.run_all()
# Extract outputs and plot
time = fiber.storage.time
power = oc.temporal_power(fiber.storage.channels)
space = fiber.storage.space
oc.animation2d(time, power, space, x_label=['t'], y_label=['P_t'],
               plot_title='My first Optcom example',
               plot_labels=['1030. nm channel', '1550. nm channel'])
```

![](./examples/example_anim_readme/example_anim_readme.gif)


## Tutorials

See [`tutorials/`](tutorials) for basic and advanced tutorials.

## Requirements
Installation should be OS independent. Python3.7 or later version is
required. See https://www.python.org/downloads/ for more detail about
python installation.

As an example, in Ubuntu, Debian or Mint, python 3 can be installed
with:

```sh
sudo apt-get install python3 python3-pip
```

## Install
Optcom can be installed using pip with:

```sh
python3 -m pip install optcom
```

Or in order to run the latest version of the code from the git repo:

```sh
python3 -m pip install git+git://github.com/optcom-org/optcom/
```

The required dependencies should have been installed along the pip
installation, if any trouble is encountered, the dependencies can be
manually install by chance of the requirements.txt file with:

```sh
python3 -m pip install -r requirements.txt
```

## Issues and Questions

For bug report or suggestion, please use the Optcom issue tracker:
https://github.com/optcom-org/optcom/issues

To ask questions about the usage of Optcom, use the Gitter repo:
https://gitter.im/optcom-org/optcom

For any matter that does not concern the aforementioned ones, send an
email to info@optcom.org


## Contributing

Any contribution is welcome !

Optcom provides an optical system simulation framework and is as rich
as the number of components that can be used. You enjoy Optcom and
created your own component to fulfill your simulation need ? Share it
with the community!  See [`tutorials/`](tutorials) to learn
how to create your own component.

Any help in testing, development or documentation is highly appreciated
and can be done from contributors of all experience levels. Please have
a look at the [`ROADMAP.md`](ROADMAP.md) to see which tasks are available.

For contribution instructions and guidelines, please see
[`CONTRIBUTING.md`](CONTRIBUTING.md).

## Documentation

Find the built documentation at https://readthedocs.org/projects/optcom/

To manually build the documentation, go in [`docs/`](docs/) and type:
```sh
make clean && make html
```

## Release History

* 0.1.0
    * The first Alpha version of Optcom.
* 0.2.0
    * The first Beta version of Optcom.

## Hosting

The source code is hosted at https://github.com/optcom-org/optcom

## Citation

If you use Optcom, please cite it as:

```
@misc{Optcom-org-optcom,
  title = {{Optcom}: A Python library for optical system simulation},
  author = "{Sacha Medaer}",
  howpublished = {\url{https://github.com/optcom-org/optcom}},
  url = "https://github.com/optcom-org/optcom",
  year = 2019
}
```

## License

Optcom is licensed under the terms of the GNU V3 License, see
[`LICENSE.txt`](LICENSE.txt).

## Disclaimer

Optcom is a free open source Software developed and maintained by
volunteers. The authors take no responsibility, see
[`LICENSE.txt`](LICENSE.txt).

<!-- Markdown link & img dfn's -->


