Skip to main content

Python library for describing time-dependent laserfields by Johannes Feist.

Project description

laserfields

laserfields is a python library to describe the time-dependent electric fields of a laser pulse, and can be installed with pip install laserfields or conda -c conda-forge install laserfields. It implements the same pulse shapes and most of the features of the laserfields library written in Fortran (and as the Julia variant LaserFields.jl), please see the documentation of that library for the parameter meanings, conventions used, etc. In particular, the "main" function make_laserfield(**kwargs...) accepts the same parameters as the Fortran library parameter files as keyword arguments, and returns an instance of a subtype of the base class LaserField depending on the parameters. E.g., to create a Gaussian pulse with a duration (defined as the FWHM of the intensity) of 6 fs, a wavelength of 800 nm, a peak intensity of 1e14 W/cm^2, and with the peak at time t=7fs, one should call

lf = make_laserfield(form="gaussianI", is_vecpot=true, lambda_nm=800,
                      intensity_Wcm2=1e16, duration_as=6000, peak_time_as=7000)

Given a LaserField instance lf, the functions lf.E(t), lf.E_fourier(ω), lf.A(t), and lf.A_fourier(ω) can be used to obtain, respectively, the electric field as a function of time, its Fourier transform (implemented for most pulse shapes), the vector potential as a function of time, and its Fourier transform. Calling the instance as a function, lf(t) returns the electric field, i.e., is equivalent to lf.E(t). The notebooks in the examples folder show some ways to use the library, including how to define a set of fields through a YAML configuration file.

In addition to the pulses described by each LaserField instance, the library also implements a LaserFieldCollection class that can be used to combine multiple fields into a single effective one (i.e., the sum of the individual ones). It is also a LaserField instance and supports much of the same interface. Note that some of the parameters it contains are just "best-effort" values and may not be fully meaningful for the combined field - e.g., for the carrier frequency lf.ω0, it returns the highest value in the collection, to support use cases where this is used to define maximum time step in a numerical propagation, or the maximum frequency evaluated in a Fourier transform.

The "effective" duration of the pulse for n-photon processes can be obtained as lf.Teff(n_photon), which is the integral over the pulse intensity envelope to the n-th power (i.e., electric field envelope to the (2n)th power) over the pulse, see, e.g., https://doi.org/10.1103/PhysRevA.77.043420 (Eq. 14).

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

laserfields-0.4.2.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

laserfields-0.4.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file laserfields-0.4.2.tar.gz.

File metadata

  • Download URL: laserfields-0.4.2.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for laserfields-0.4.2.tar.gz
Algorithm Hash digest
SHA256 8edd55722c5ad35b59eabaa98ed62f5f316f685a12e60e04cc235ab403eeedfa
MD5 16c6be096adc0735f5b0eaed88f326cd
BLAKE2b-256 dfb052d27362730813bd323346b82a7afe156d63f2c21ce9ff5bd0b332579da6

See more details on using hashes here.

File details

Details for the file laserfields-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: laserfields-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for laserfields-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cfcc97676eabc1213ae395e2c460be1d380c0c6c15dc3397ada040b200b74d0
MD5 d56b4cb9b5ea82952c4eccf01917d556
BLAKE2b-256 e8b220906f0c8e2269fd6202d0a9990da75b5efbd5dabf22ef1bf2b2b9a23e43

See more details on using hashes here.

Supported by

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