gregmoille / pyLLE

Lugiato Lefever Equation Solver in Python/Julia
Other
65 stars 39 forks source link
combs frequency-comb frequency-combs julia lle python

pyLLE NIST logo

What's new

A major revision, v4.0.0 introduces a lot of new stuff including:

How to Cite Us?

Please, if you use this package and it helps you with your research and publication, cite us in your paper. Not only does it allow us to have a better idea of new things people are interested in and how to keep improving the solver, but it also helps us build a community where everybody can help maintain the solver to better suit the needs of everybody. You can cite our paper published in the Journal of Research of the National Institute of Standards and Technology, available here, with the following BibTeX entry.:

@article{moille_pyLLE,
      author = {Gregory Moille and Qing Li and Xiyuan Lu and Kartik Srinivasan},
      title = {pyLLE: a Fast and User Friendly Lugiato-Lefever Equation Solver},
      year = {2019},
      volume = {124},
      pages = {124012},
      month = {2019-05-24},
      journal = {Journal of Research of the NIST},
       doi = {https://doi.org/10.6028/jres.124.012},
     }

How to install

As pyLLE relies on a Julia back-end, please prior to installing this package be sure that Julia is installed on your machine or visit the julia package download page to install it. The code should now work with any recent version of Julia.

Once Julia installed, the different packages needed to run pyLLE, either python or julia related, will be automatically downloaded and installed. Just a heads up, the installation of the package can vary in time, especially because of Julia that might rebuild the cache.

pyLLE will look by default to find the Julia binary in the /opt/bin/julia, which you can make it happen either in MacOS

ln -s /Applications/Julia-<version>.app/Contents/Resources/julia/bin/julia /opt/bin/julia

or Linux

ln -s <julia_path>/bin/julia /opt/bin/julia

Note that if this step is skipped it is alright as an update of the pyLLE package provide a way to specify the julia binary you would like to use specifyin solver.SolveTemporal(bin = <where julia bin is>)

Now, one can simply automatic install, just pip it :

pip install pyLLE

or pip the github

pip install git+https://github.com/gregmoille/pyLLE.git

For windows the julia package have to be installed manually, using a julia console and typing the following command:

using Pkg

Pkg.add("HDF5")
Pkg.update("HDF5")

Pkg.add("FFTW")
Pkg.update("FFTW")

Pkg.add("LinearAlgebra")
Pkg.update("LinearAlgebra")

For a manual install, download the .zip of the repository or clone it and install with the setup.py script.

Checking that everything works correctly

Launch a julia console and within type the commands:

using HDF5
using FFTW
using LinearAlgebra

if any of the previous command throw an issue, mostly it is because it is not installed. One way to fix it is to remove the installed packaged to remove the cache

Then enter the pacakge manager for julia by typing in the julia console:

julia>]

then

(v1.1) pkg>add HDF5
(v1.1) pkg>add FFTW

Example NBviewer

A complete example is available in the example directory notebook with the corresponding file needed in the folder. You can also access the nbviewer example to have a better idea of what's going on:

Works Using/citing pyLLE

If you want to be featured here, shoot me an email! I try to keep it up to date but this is not a priority. I would love to hear anybody who uses it!