snlo-helper


Namesnlo-helper JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryAn autoclicker to automatically configure and read SNLO.
upload_time2024-06-18 17:52:55
maintainerNone
docs_urlNone
authorBenedikt Burger
requires_python>=3.9
licenseNone
keywords snlo nonlinear optics simulation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SNLO-Helper

[![pypi release](https://img.shields.io/pypi/v/snlo-helper.svg)](https://pypi.org/project/snlo-helper/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11125163.svg)](https://doi.org/10.5281/zenodo.11125163)
[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)

SNLO-Helper helps to use [SNLO](https://as-photonics.com/products/snlo/) software for simulation of nonlinear optical processes in crystals.

An autoclicker clicks different buttons and fills fields in order to automate SNLO simulations.
Afterwards, it can retrieve the results and return them as a dictionary.

Attention:
- The script does use your mouse and keyboard, so you should not interact with the computer at the same time.
- The script uses predefined positions of the windows, so **do not move the windows**.
- The autoclicker can be interrupted by moving the mouse into the top left corner of the screen.


Currently it supports the following functions (feel free to add more):
- Ref. Ind.
- Qmix
- 2D-mix-LP
- 2D-mix-SP
- PW-OPO-BB
- 2D-cav-LP
- Focus


## Installation

Install it executing `pip install -e .` in this folder or via `pip install snlo-helper` to download it in the background and install it.


## Usage

### Quick Start

1. Start SNLO on your computer
2. Import `snlohelper.main_window.MainWindow` as a starting point.
3. Create an instande `mw = MainWindow`
4. Open the desired function: `ri = mw.open_function(Functions.REF_INDEX)`
5. Execute it `no, ne = ri.refractive_indices(Wavelength=1234)`

Here is a small snippet how to do a 2D mix of long pulses:
```
from snlohelper.main_window import MainWindow

mw = MainWindow()
mix = mw.open_two_d_mix_lp()
mix.configure({"Wavelengths (nm)": [1064.5, None, None]})
result = mix.run_and_read()
print(result)
```

For more examples see the `examples` folder.


### General usage

* The `main_window.MainWindow` class manages the main window.
* For several functions exists a module containing a class, which in turn allows to configure the function, to run the calculation, and to extract the result.
  1. You start that class, for example `mix = two_d_mix_lp.TwoDMixLp()` or `mix = MainWindow().open_function("2D-Mix-LP")`.
  2. You can configure it giving a configuration dictionary (the keys correspond to the names) with `mix.configure({"Wavelengths": [1064, None, None]})`. If a value is `None`, it won't be changed.
  3. You can run it with `mix.run()`
  4. With `results = mix.read_results()` you can extract the resulting text.
  5. With `result_dict = mix.interpret_results(results)` you get a dictionary of the result data
  6. There are convenience methods like `mix.run_and_read` which runs and returns the dictionary, or even `mix.configure_run_read`, which does all of above steps in one.


## Contribution

You are welcome to contribute to this library.
Just open an issue for suggestions or bug reports and open a pull request for code contributions.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "snlo-helper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "SNLO, nonlinear optics, simulation",
    "author": "Benedikt Burger",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/df/e5/8aac090a3c3e59d2c1fa6f78f8ae1d64c8b6ea83b156890173e3d28abdac/snlo_helper-0.4.0.tar.gz",
    "platform": null,
    "description": "# SNLO-Helper\n\n[![pypi release](https://img.shields.io/pypi/v/snlo-helper.svg)](https://pypi.org/project/snlo-helper/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11125163.svg)](https://doi.org/10.5281/zenodo.11125163)\n[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)\n\nSNLO-Helper helps to use [SNLO](https://as-photonics.com/products/snlo/) software for simulation of nonlinear optical processes in crystals.\n\nAn autoclicker clicks different buttons and fills fields in order to automate SNLO simulations.\nAfterwards, it can retrieve the results and return them as a dictionary.\n\nAttention:\n- The script does use your mouse and keyboard, so you should not interact with the computer at the same time.\n- The script uses predefined positions of the windows, so **do not move the windows**.\n- The autoclicker can be interrupted by moving the mouse into the top left corner of the screen.\n\n\nCurrently it supports the following functions (feel free to add more):\n- Ref. Ind.\n- Qmix\n- 2D-mix-LP\n- 2D-mix-SP\n- PW-OPO-BB\n- 2D-cav-LP\n- Focus\n\n\n## Installation\n\nInstall it executing `pip install -e .` in this folder or via `pip install snlo-helper` to download it in the background and install it.\n\n\n## Usage\n\n### Quick Start\n\n1. Start SNLO on your computer\n2. Import `snlohelper.main_window.MainWindow` as a starting point.\n3. Create an instande `mw = MainWindow`\n4. Open the desired function: `ri = mw.open_function(Functions.REF_INDEX)`\n5. Execute it `no, ne = ri.refractive_indices(Wavelength=1234)`\n\nHere is a small snippet how to do a 2D mix of long pulses:\n```\nfrom snlohelper.main_window import MainWindow\n\nmw = MainWindow()\nmix = mw.open_two_d_mix_lp()\nmix.configure({\"Wavelengths (nm)\": [1064.5, None, None]})\nresult = mix.run_and_read()\nprint(result)\n```\n\nFor more examples see the `examples` folder.\n\n\n### General usage\n\n* The `main_window.MainWindow` class manages the main window.\n* For several functions exists a module containing a class, which in turn allows to configure the function, to run the calculation, and to extract the result.\n  1. You start that class, for example `mix = two_d_mix_lp.TwoDMixLp()` or `mix = MainWindow().open_function(\"2D-Mix-LP\")`.\n  2. You can configure it giving a configuration dictionary (the keys correspond to the names) with `mix.configure({\"Wavelengths\": [1064, None, None]})`. If a value is `None`, it won't be changed.\n  3. You can run it with `mix.run()`\n  4. With `results = mix.read_results()` you can extract the resulting text.\n  5. With `result_dict = mix.interpret_results(results)` you get a dictionary of the result data\n  6. There are convenience methods like `mix.run_and_read` which runs and returns the dictionary, or even `mix.configure_run_read`, which does all of above steps in one.\n\n\n## Contribution\n\nYou are welcome to contribute to this library.\nJust open an issue for suggestions or bug reports and open a pull request for code contributions.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An autoclicker to automatically configure and read SNLO.",
    "version": "0.4.0",
    "project_urls": {
        "Issues": "https://github.com/BenediktBurger/snlo-helper/issues",
        "Repository": "https://github.com/BenediktBurger/snlo-helper"
    },
    "split_keywords": [
        "snlo",
        " nonlinear optics",
        " simulation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab9841fef70fbf0d8eaddd87c2c5f466207f5f719957ff35bd55817d3d906c8d",
                "md5": "7372832898ce6418ceb0f0ba248a4078",
                "sha256": "df6e3ff1907b5fe4606919c044176755ef798b1c854a6d3c4464915a886dd2ea"
            },
            "downloads": -1,
            "filename": "snlo_helper-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7372832898ce6418ceb0f0ba248a4078",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 26326,
            "upload_time": "2024-06-18T17:52:52",
            "upload_time_iso_8601": "2024-06-18T17:52:52.496463Z",
            "url": "https://files.pythonhosted.org/packages/ab/98/41fef70fbf0d8eaddd87c2c5f466207f5f719957ff35bd55817d3d906c8d/snlo_helper-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfe58aac090a3c3e59d2c1fa6f78f8ae1d64c8b6ea83b156890173e3d28abdac",
                "md5": "f5196bcd087a38fea1c3c608067336b6",
                "sha256": "1b39a28817eff8d090f6fce4e5686d535742d8de5500287350f3d7a7383b4216"
            },
            "downloads": -1,
            "filename": "snlo_helper-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f5196bcd087a38fea1c3c608067336b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 20060,
            "upload_time": "2024-06-18T17:52:55",
            "upload_time_iso_8601": "2024-06-18T17:52:55.816303Z",
            "url": "https://files.pythonhosted.org/packages/df/e5/8aac090a3c3e59d2c1fa6f78f8ae1d64c8b6ea83b156890173e3d28abdac/snlo_helper-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-18 17:52:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BenediktBurger",
    "github_project": "snlo-helper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "snlo-helper"
}
        
Elapsed time: 0.54899s