在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:gregmoille/pyLLE开源软件地址:https://github.com/gregmoille/pyLLE开源编程语言:Jupyter Notebook 99.8%开源软件介绍:pyLLEUpdate ETAA version 4.0 is currently being pushed on github abd can be accessed through this branch. At the moment there is no real tutorial or readme about it, and a lot has been changed -- from the core code much more user friendly in the algorithm, and introducing as many driving force (i.e. pumps) as needed (see my recent Nat Com paper to understand why) -- so if you need help at the moment just reach out and I'll follow up with you IntropyLLE is a tool to solve the Lugiato Lefever Equations (LLE)1,2,3in 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. If you find this package to be of us for your research, don't forget to cite the paper describing this pacakge How to Cite Us?You can cite our paper published in the Journal of Research of National Institute of Standards and Technology available here:
You can also use the 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 NIST},
doi = {https://doi.org/10.6028/jres.124.012},
} InstalationAs 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 by selecting 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 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 : pip install pyLLE For a manual install, download the .zip of the repository or clone it and install with the setup.py script 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 correctlyLaunch a julia console and within type the commands: 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
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 ExampleA complete example is available in the example directory notebook with the corresponding file needed in the folder. Here we will only go through the main aspect of pyLLE
import pyLLE
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 ',' We can now set up the pyLLE class: 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. To analyze the dispersion just the Analyze 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 solver.Setup() 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: IN [1]: solver.sim['mu_sim']
OUT [1]: [-70,170] Then we can start the simulation solver.SolveTemporal() To retrieve the data computed by julia, we call the RetrieveData method 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 solver.PlotCombPower() From there, we can find the step of the LLE where we want to see the spectra: ind = 600
solver.PlotCombSpectra(ind) One can also quickly solve the LLE through a steady-state method to find its roots sim['δω'] = -5e9*2*np.pi
Ering, Ewg, f, ax = solver.SolveSteadyState() Works Using pyLLE
References1: Luigi A. Lugiato and René Lefever. "Spatial dissipative structures in passive optical systems." Physical review letters 58, no. 21 (1987): 2209. 2: 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. 3: Stéphane Coen, Hamish G. Randle, Thibaut Sylvestre, and Miro Erkintalo. "Modeling of octave-spanning Kerr frequency combs using a generalized mean-field Lugiato–Lefever model." Optics letters 38, no. 1 (2013): 37-39. 4: Qing Li, Travis C. Briles, Daron A. Westly, Tara E. Drake, Jordan R. Stone, B. Robert Ilic, Scott A. Diddams, Scott B. Papp, and Kartik Srinivasan. "Stably accessing octave-spanning microresonator frequency combs in the soliton regime." Optica 4, no. 2 (2017): 193-203. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论