# pyLLE ![NIST logo](images/NISTlogo32x32.jpg)
[![](https://img.shields.io/static/v1.svg?label=docs&message=passing&color=green&style=flat)](https://gregmoille.github.io/pyLLE/)
![](https://img.shields.io/static/v1.svg?label=version&message=3.0.0&color=9cf&style=flat)
[![](https://img.shields.io/static/v1.svg?label=DOI&message=10.6028/jres.124.012&color=blue&style=flat)](https://doi.org/10.6028/jres.124.012)
pyLLE is a tool to solve the Lugiato Lefever Equations (LLE)<sup>[1](#ref1)</sup><sup>,</sup><sup>[2](#ref2)</sup><sup>,</sup><sup>[3](#ref3)</sup>in a fast and easy way. Thanks to a user-friendly front-end in python and an efficient back-end in Julia, solving this problem becomes easy and fast.
For a complete documentation of the package, please visit the [github page](https://gregmoille.github.io/pyLLE/)
## Instalation
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](https://julialang.org/downloads/) to install it by selecting ⚠ **v1.1.1** ⚠.
**Windows users**: Please, keep julia in the default directory during the installation (i.e. ~\AppData\Local\Julia-1.1.1\ for windows).
**Mac Os User**: You would need to add the julia binary to the path. The easiest way to do it is to create a simlink in the terminal
```bash
ln -s /Applications/Julia-1.1.app/Contents/Resources/julia/bin/julia /usr/local/bin/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.
For a automatic install, just pip it :
```bash
pip install pyLLE
```
For a manual install, download the .zip of the repository or clone it and install with the setup.py script
```bash
git clone https://github.com/gregmoille/pyLLE.git
cd pyLLE
python setup.py install
```
If the julia location is custom, please before installing change in the setup.py, line 18 to the correct location, as in pyLLE/llesolver.py line 430 to point to the correct location. Thanks
## Checking that everything works correctly
Launch a julia console and within type the commands:
```julia
using HDF5
using FFTW
using ProgressMeter
```
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
- for linux and mac os user: remove everything in ~/.julia/
- for windows users: remove everything in C:\Users\<your user name>\.julia\
Then enter the pacakge manager for julia by typing in the julia console:
```julia
julia>]
```
then
```julia
(v1.1) pkg>add HDF5
(v1.1) pkg>add FFTW
```
## Example
A complete example is available in the example directory [notebook](https://github.com/gregmoille/pyLLE/tree/master/example/NotebookExample.ipynb) with the corresponding file needed in the folder. Here we will only go through the main aspect of pyLLE
- First import the package:
```python
import pyLLE
```
- Define a resonator and a simulation dictionary such as (parameters from Li et _al._<sup>[4](#ref4)</sup>):
```python
res = {'R': 23e-6, # ring radius
'Qi': 1e6, # intrinsic quality factor
'Qc': 1e6, # coupling quality factor
'γ': 2, # non-linear coefficient
'dispfile': 'TestDispersion.csv' # name of the dispersion file
}
sim = {'Pin': 100e-3, #input power in W
'Tscan': 1e6, # Total time for the simulation in unit of round trip
'f_pmp': 191e12, # frequency of the pump in Hz
'δω_init': 4e9*2*np.pi, # start frequency of detuning ramp in Hz
'δω_end': -10e9*2*np.pi, # stop frequency of detuning ramp in Hz
'μ_sim': [-70,170], # limit of the mode on the left and right side of the pump to simulate
'μ_fit': [-60, 160], # limit of the mode on the left and right side of the pump to fit the dispersion with
}
```
It is important to note the format of the dispersion file *TestDispersion.csv*. It must be formatted such that each line represents a resonance, with first the azimuthal mode order listed and then the frequency of the resonance, separated by a comma ','
<br>
We can now set up the pyLLE class:
```python
solver = pyLLE.LLEsolver(sim=sim,
res=res,
debug=False)
```
The debug input allows the script to generate a log file in the working directory with useful information on the simulation. The authors highly encourage to keep this key to True, unless some loops are run, which could create an issue with the read/write access to the file.
<br>
To analyze the dispersion just the *Analyze*
```python
solver.Analyze(plot=True,
plottype='all')
```
To start the simulation, first we need to set up an hdf5 file which makes the bridge between python and julia
```python
solver.Setup()
```
<br>
For the sake of simplicity and to retrieve the different parameters, all keys of the sim and res dictionary are translated with the previously described translator dictionary and cannot be accessed anymore with the greek alphabet. Hence, in an ipython console, one can retrieve the parameter with, for example:
```python
IN [1]: solver.sim['mu_sim']
OUT [1]: [-70,170]
```
<br>
Then we can start the simulation
```python
solver.SolveTemporal()
```
To retrieve the data computed by julia, we call the *RetrieveData* method
```python
solver.RetrieveData()
```
We can finally start to plot the result of the simulation. One can start with a complete overview of the simulation, where a spectral and a temporal map vs the LLE step is displayed in addition to the comb power Vs the LLE step
```python
solver.PlotCombPower()
```
From there, we can find the step of the LLE where we want to see the spectra:
```python
ind = 600
solver.PlotCombSpectra(ind)
```
One can also quickly solve the LLE through a steady-state method to find its roots
```python
sim['δω'] = -5e9*2*np.pi
Ering, Ewg, f, ax = solver.SolveSteadyState()
```
## How to Cite Us?
You can cite our paper published in the Journal of Research of National Institute of Standards and Technology available [here](https://doi.org/10.6028/jres.124.012):
> Moille G, Li Q, Lu X, Srinivasan K (2019) pyLLE: A Fast and User Friendly Lugiato-Lefever Equation Solver. J Res Natl Inst Stan 124:124012. https://doi.org/10.6028/jres.124.012
## Works Using pyLLE
- Gregory Moille, Xiyuan Lu, Ashutosh Rao, Qing Li, Daron A. Westly, Leonardo Ranzani, Scott B. Papp, Mohammad Soltani, and Kartik Srinivasan "_Kerr-Microresonator Soliton Frequency Combs at Cryogenic Temperatures_," Phys. Rev. Applied 12, 034057 (2019)
- Gregory Moille, Qing Li, Travis C. Briles, Su-Peng Yu, Tara Drake, Xiyuan Lu, Ashutosh Rao, Daron Westly, Scott B. Papp, and Kartik Srinivasan "_Broadband resonator-waveguide coupling for efficient extraction of octave-spanning microcombs_," Optics Letters Vol. 44, Issue 19, pp. 4737-4740 (2019)
- Lin Chang, Weiqiang Xie, Haowen Shu, Qifan Yang, Boqiang Shen, Andreas Boes, Jon D. Peters, Warren Jin, Songtao Liu, Gregory Moille, Su-Peng Yu, Xingjun Wang, Kartik Srinivasan, Scott B. Papp, Kerry Vahala, John E. Bowers "_Ultra-efficient frequency comb generation in AlGaAs-on-insulator microresonators_," arXiv:1909.09778 (2019)
## References
<a name="ref1">1</a>: Luigi A. Lugiato and René Lefever. "Spatial dissipative structures in passive optical systems." Physical review letters 58, no. 21 (1987): 2209.
<a name="ref1">2</a>: Yanne K. Chembo and Curtis R. Menyuk. "Spatiotemporal Lugiato-Lefever formalism for Kerr-comb generation in whispering-gallery-mode resonators." Physical Review A 87, no. 5 (2013): 053852.
<a name="ref1">3</a>: Stéphane Coen, Hamish G. Randle, Thibaut Sylvestre, and Miro Erkintalo. "Modeling of octave-spanning Kerr frequency combs using a generalized mean-field
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
派乐 pyLLE是解决Lugiato Lefever方程(LLE)的工具 , , 在一个快速简便的方法。 得益于python的用户友好前端和Julia的高效后端,解决此问题变得容易而快捷。 有关该软件包的完整文档,请访问 安装方式 由于pyLLE依赖于Julia后端,因此在安装此软件包之前,请确保已在您的计算机上安装了Julia或访问julia以选择安装它 :warning: v1.1.1 :warning: 。 Windows用户:请在安装过程中将julia保留在默认目录中(例如,对于Windows,为〜\ AppData \ Local \ Julia-1.1.1 \)。 Mac Os用户:您需要将julia
资源详情
资源评论
资源推荐
收起资源包目录
pyLLE-master.zip (57个子文件)
pyLLE-master
pyLLE
_analyzedisp.py 10KB
ComputeLLE.jl 6KB
_llesolver.py 43KB
__pycache__
__init__.cpython-37.pyc 246B
_analyzedisp.cpython-37.pyc 7KB
_llesolver.cpython-37.pyc 30KB
__init__.py 71B
ComputeLLE.jl.bkp 6KB
.gitignore 113B
README.md 8KB
.github
ISSUE_TEMPLATE
bug_report.md 654B
feature_request.md 560B
InstallPkg.jl 136B
docs
_config.yml 918B
Search.md 43B
README.rst 500B
Gemfile 130B
Example.md 11KB
_includes
copyright.html 158B
custom-foot.html 0B
custom-nav-links.html 2B
custom-head.html 752B
pyLLE.md 6KB
Gemfile.lock 6KB
index.md 2KB
installation.md 3KB
HowToCite.md 491B
Team.md 408B
PaperUsingPyLLE.md 810B
assets
images
NISTlogo32x32.jpg 4KB
.gitattributes 79B
dist
pyLLE-3.0.1.tar.gz 20KB
licence.txt 801B
example
NotebookExample.ipynb 25.7MB
NotebookExample.html 10.51MB
PickleSolver.pkl 11.28MB
.ipynb_checkpoints
LLE-checkpoint.log 1004B
NotebookExample-checkpoint.ipynb 25.7MB
TestDispersion-checkpoint.txt 6KB
mainLLE.py 858B
images
FastTime.png 83KB
.ipynb_checkpoints
Analyze-checkpoint.png 94KB
CombPower.pdf 350KB
CombSpectra.pdf 140KB
SteadyState.pdf 313KB
Disp.pdf 315KB
CombSpectra.png 136KB
CombPower.png 410KB
FastTime.pdf 138KB
DispPlotly.pdf 38KB
Temporal.pdf 312KB
TestDispersion.csv 6KB
LLE.log 6KB
images
NISTlogo32x32.jpg 4KB
MANIFEST.in 49B
setup.py 1KB
requirement.txt 18B
共 57 条
- 1
林海靖
- 粉丝: 68
- 资源: 4726
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于java+spring+springMVCl的学生就业管理系统开题报告.doc
- 一个C++实现的简易动态语言解释器,可定义变量和函数,有if和while两种控制流语句,词法分析和语法分析分别使用flex和bison实现,参考自《flex & bison》.zip
- 深入理解编程中的回调函数:原理、实现及应用场景
- yolov8l-cls.pt
- 操作系统中银行家算法详解与Python实现防止死锁
- 使用Java实现回调函数代码示例callback.zip
- Vue+ElementPlus构建的CMS开发框架.rar
- yolov8图像分类模型yolov8m-cls.pt
- yolov8图像分类yolov8s-cls.pt模型
- 使用Java实现字符串左移指定位数StringRotation.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0