Skip to main content

Tools for tuning optical parametric amplifiers and multidimensional spectrometers.

Project description

attune

image

Tools for tuning optical parametric amplifiers and multidimensional spectrometers.

Documentation is available at https://attune.wright.tools/en/latest/.

Overview

attune has three primary jobs:

  1. attune parses calibration data to find optimal motor positions

    # data has scans of a motor position ("OPA1_SHS_crystal") against a signal
    # ("signal") for a set of second harmonic signal color setpoints
    # ("opa_color")
    calibration_data = wt.open(path_to_data.wt5)
    calibration_data.transform("opa_color", "motor")
    args = {
        "data": calibration_data,
        "channel": "signal",
        "arrangement": "SHS",
        "tune": "SHS_crystal",
        "instrument": "OPA1",
    }
    tuned_opa1 = attune.intensity(**args)
    
  2. attune organizes optimal motor positions. The motor positions are stored in a hierarchy of mappings. Beginning at the lowest level:

    • Tune : a map of OPA color (the "independent") to positions of a single motor (the "dependent").

      my_tune = attune.Tune(
          independent=[450, 600, 700],
          dependent=[3.225, 2.332, 1.987]
      )  # relate color to bbo angle
      
    • Arrangement : a collection of Tunes that define a concerted process (e.g. to generate idler photons, one might move several motors (bbo, g1, etc.))

      idler = attune.Arrangement("idler", dict(bbo=my_tune, g1=my_other_tune))
      
    • Instrument : a collection of Arrangements (e.g. an OPA may have signal and idler)

      my_opa = attune.Instrument({"idler": idler, "signal": signal}, name="opa1")
      

      Note: arrangements can be called as tunables if they exist in the same instrument. This can allow nested naming

      shi = attune.Arrangement(Dict(
          idler = Tune(shi_colors, idler_colors), 
          sh_crystal = Tune(shi_colors, angles)
      )) 
      
  3. attune stores motor mappings and remembers them through version tracking.

    • save a new instrument (or update an existing one)

      attune.store(my_opa)
      
    • lookup a saved instrument (by name)

      attune.catalog()  # lists all saved instruments
      my_opa = attune.load("opa1")  # fetches the most recent version of the instrument
      my_previous_opa = attune.undo(my_opa) # fetches the previous version of the instrument
      my_old_opa = attune.load("opa1", time="yesterday")  # optional kwarg specifies the version by time of usage    
      

Notes

  • attune uses default units of nanometers ("nm") for its independent variables. At this time, units cannot be changed, so alternate units must be handled externally (PRs are welcome!). WrightTools calibration data is automatically converted into "nm" units for parsing.

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

attune-0.4.5.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

attune-0.4.5-py2.py3-none-any.whl (29.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file attune-0.4.5.tar.gz.

File metadata

  • Download URL: attune-0.4.5.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for attune-0.4.5.tar.gz
Algorithm Hash digest
SHA256 fd362d7dbf683772d1d1225d9039d4feaee03e8db97e882508bfb389d0caf0ef
MD5 5dad3e0a7da59ffbf6b82cd5eaf59aa9
BLAKE2b-256 b5892b929d760479208175e4c0278f75dd613cf2d5402e99ddcccc65ea951cc4

See more details on using hashes here.

File details

Details for the file attune-0.4.5-py2.py3-none-any.whl.

File metadata

  • Download URL: attune-0.4.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for attune-0.4.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 adb22dd95a6fdc386e14c9878b5ada308d2226021ce6bf05e55b95a0fdd31e47
MD5 7ca2e6a891ec4996aa78bee722640713
BLAKE2b-256 697d556ffc417b1da7e15298ffd214b0ad58267a23ca20b154c61ee2b9f9a28c

See more details on using hashes here.

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