Skip to main content

An autoclicker to automatically configure and read SNLO.

Project description

SNLO-Helper

SNLO-Helper helps to use 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.
  • 2D-mix-LP
  • 2D-mix-SP
  • Focus

Installation

Install it executing pip install -e . in this folder or via pip install git+https://git.rwth-aachen.de/nloqo/snlo-helper.git 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snlo_helper-0.2.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

snlo_helper-0.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file snlo_helper-0.2.0.tar.gz.

File metadata

  • Download URL: snlo_helper-0.2.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for snlo_helper-0.2.0.tar.gz
Algorithm Hash digest
SHA256 15c7da3f05cfea1defddd1e561851fa7dae2ad55d76ce307ef23513870e105bc
MD5 2eb071161e9e316f4a542c98ab11c5a7
BLAKE2b-256 34ffdbef864a084ab68f45eb837315789fe3f3a75429b39e61cf42db8e05740b

See more details on using hashes here.

Provenance

File details

Details for the file snlo_helper-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: snlo_helper-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for snlo_helper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5225c424af1af58f09cdc296800f591befa857f166db1c5a406d726e76930dc6
MD5 80babfa711decb7f84e1229a81897b95
BLAKE2b-256 72946f9f74c1c02900652a870eba925fa03715cd821b6f71e8469bb6192a74a2

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page