Skip to content

Commit ffd53af

Browse files
Sylwia Majchrowskamajsylw
authored andcommitted
refactor to v2.0.0
1 parent 81e2858 commit ffd53af

20 files changed

+88
-87
lines changed

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ python test_Dudley.py
4343
And you expect to visualise supercontinuum generation process in use of 3 types
4444
of pulses (simulation similar to Fig.3 of Dudley et. al, RMP 78 1135 (2006)):
4545

46-
![supercontinuum_generation](https://github.com/WUST-FOG/gnlse-python/raw/master/data/supercontinuum_3pulses.png)
46+
![soliton_traping](./data/supercontinuum_3pulses.png)
4747

4848
### Major features
4949

@@ -80,23 +80,26 @@ And you expect to visualise supercontinuum generation process in use of 3 types
8080
- **Available demos**
8181

8282
We prepare few examples in `examples` subdirectory:
83-
- plot_input_pulse.py: plots envelope of different impulse shapes,
83+
- plot_input_pulse.py: plots envelope of different pulse shapes,
8484
- plot_Raman_response.py: plots different Raman in temporal domain,
8585
- test_3rd_order_soliton.py: evolution of the spectral and temporal characteristics of the 3rd order soliton,
8686
- test_dispersion.py: example of supercontinuum generation using different dispersion operators,
8787
- test_nonlinearity.py: example of supercontinuum generation using different GNLSE and M-GNLSE (take into account mode profile dispersion),
8888
- test_Dudley.py: example of supercontinuum generation with three types of input pulse,
89-
- test_gvd.py: example of impuls broadening due to group velocity dispersion,
89+
- test_gvd.py: example of pulse broadening due to group velocity dispersion,
9090
- test_import_export.py: example of saving file with `.mat` extension,
9191
- test_raman.py: example of soliton fision for diffrent raman response functions,
9292
- test_spm.py: example of self phase modulation,
9393
- test_spm+gvd.py: example of generation of 1st order soliton.
9494

9595
## Release History
9696

97-
v1.1.3 was released in 13/2/2022.
98-
The master branch works with **python 3.7**.
97+
v2.0.0 was released in 26/4/2022.
98+
The main branch works with **python 3.7**.
9999

100+
* **2.0.0 -> Apr 26th, 2022**
101+
* CHANGE: Code refactor - rename envelopes module
102+
* FIX: Fixed extrapolation for nonlinear coefficient
100103
* **1.1.3 -> Feb 13th, 2022**
101104
* FIX: Shift scalling data for interpolated dispersion
102105
* **1.1.2 -> Aug 30th, 2021**
@@ -115,10 +118,10 @@ The master branch works with **python 3.7**.
115118

116119
## Authors
117120

118-
- [Adam Pawłowski](https://github.com/adampawl)
119121
- [Paweł Redman](https://redman.xyz/)
120-
- [Daniel Szulc](http://szulc.xyz/)
121122
- [Magda Zatorska](https://github.com/magdazatorska)
123+
- [Adam Pawłowski](https://github.com/adampawl)
124+
- [Daniel Szulc](http://szulc.xyz/)
122125
- [Sylwia Majchrowska](https://majsylw.netlify.app/)
123126
- [Karol Tarnowski](http://www.if.pwr.wroc.pl/~tarnowski/)
124127

@@ -136,8 +139,10 @@ by J. M. Dudley and J. R. Taylor, available at
136139

137140
```
138141
@misc{redman2021gnlsepython,
139-
title={gnlse-python: Open Source Software to Simulate Nonlinear Light Propagation In Optical Fibers},
140-
author={Paweł Redman and Magdalena Zatorska and Adam Pawłowski and Daniel Szulc and Sylwia Majchrowska and Karol Tarnowski},
142+
title={gnlse-python: Open Source Software to Simulate
143+
Nonlinear Light Propagation In Optical Fibers},
144+
author={Paweł Redman and Magdalena Zatorska and Adam Pawłowski
145+
and Daniel Szulc and Sylwia Majchrowska and Karol Tarnowski},
141146
year={2021},
142147
eprint={2110.00298},
143148
archivePrefix={arXiv},

docs/code_documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNLSE package documentation
22
===========================
33

4-
Impulse envelopes
4+
Pulse envelopes
55
-----------------
66

77
This module allows one to model proper input envelope as the given initial

docs/envelopes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ input pulse. The below figure illustrates a modulated waves varying between
99
an upper and a lower envelope of four types of optical signal.
1010

1111
.. image:: _static/input_pulse.png
12-
:alt: example_input_impulse
12+
:alt: example_input_pulse
1313

1414
.. autoclass:: gnlse.SechEnvelope
1515
.. autoclass:: gnlse.GaussianEnvelope

docs/examples/example_dispersive_wave.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ crystal fiber using three different models to model Raman response. ::
1818
setup.time_window = 12.5 # ps
1919
setup.z_saves = 400
2020
21-
# Input impulse parameters
21+
# Input pulse parameters
2222
peak_power = 10000 # W
2323
duration = 0.050284 # ps
2424
2525
# Physical parameters
2626
setup.wavelength = 835 # nm
2727
setup.fiber_length = 0.15 # m
2828
setup.nonlinearity = 0.11 # 1/W/m
29-
setup.impulse_model = gnlse.SechEnvelope(peak_power, duration)
29+
setup.pulse_model = gnlse.SechEnvelope(peak_power, duration)
3030
setup.self_steepening = True
3131
3232
# The dispersion model is built from a Taylor expansion with coefficients

docs/examples/example_effective_mode_area.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ a 15 centimeter long photonic crystal fiber. ::
2828
setup.raman_model = gnlse.raman_blowwood
2929
setup.self_steepening = True
3030

31-
# Input impulse parameters
31+
# Input pulse parameters
3232
power = 10000
3333
# pulse duration [ps]
3434
tfwhm = 0.05
3535
# hyperbolic secant
36-
setup.impulse_model = gnlse.SechEnvelope(power, tfwhm)
36+
setup.pulse_model = gnlse.SechEnvelope(power, tfwhm)
3737

3838
# The dispersion model is built from a Taylor expansion with coefficients
3939
# given below.

docs/examples/example_soliton.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ higher-order N = 3 soliton in three cases:
5151
Z0 = np.pi * LD / 2
5252
# Fiber length [m]
5353
setup.fiber_length = .5
54-
# Type of impulse: hyperbolic secant
55-
setup.impulse_model = gnlse.SechEnvelope(power, 0.050)
54+
# Type of pulse: hyperbolic secant
55+
setup.pulse_model = gnlse.SechEnvelope(power, 0.050)
5656
# Loss coefficient [dB/m]
5757
loss = 0
5858
# Type of dyspersion operator: build from Taylor expansion

docs/examples/example_supercontinuum.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@ different input shape of input pulse's envelopes.
3636
])
3737
setup.dispersion_model = gnlse.DispersionFiberFromTaylor(loss, betas)
3838
39-
# Input impulse parameters
39+
# Input pulse parameters
4040
peak_power = 10000 # W
4141
duration = 0.050 # ps
4242
4343
# This example extends the original code with additional simulations for
44-
impulse_models = [
44+
pulse_models = [
4545
gnlse.SechEnvelope(peak_power, duration),
4646
gnlse.GaussianEnvelope(peak_power, duration),
4747
gnlse.LorentzianEnvelope(peak_power, duration)
4848
]
4949
50-
count = len(impulse_models)
50+
count = len(pulse_models)
5151
plt.figure(figsize=(14, 8), facecolor='w', edgecolor='k')
52-
for i, impulse_model in enumerate(impulse_models):
53-
print('%s...' % impulse_model.name)
52+
for i, pulse_model in enumerate(pulse_models):
53+
print('%s...' % pulse_model.name)
5454
55-
setup.impulse_model = impulse_model
55+
setup.pulse_model = pulse_model
5656
solver = gnlse.GNLSE(setup)
5757
solution = solver.run()
5858
5959
plt.subplot(2, count, i + 1)
60-
plt.title(impulse_model.name)
60+
plt.title(pulse_model.name)
6161
gnlse.plot_wavelength_vs_distance(solution, WL_range=[400, 1400])
6262
6363
plt.subplot(2, count, i + 1 + count)

docs/gnlse_intro.rst

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ Installation
1717

1818
``git clone https://github.com/WUST-FOG/gnlse-python.git``
1919

20-
4. Install the requirements:
21-
22-
``pip install -r requirements.txt``
23-
24-
5. Install the package:
20+
4. Install the package with all requirements:
2521

2622
``pip install .``
2723

@@ -85,7 +81,7 @@ Major features
8581
and calculated from effective refractive indices.
8682
* A number of example scripts in the ``examples`` subdirectory:
8783

88-
* ``plot_input_pulse.py``, plotting various input impulse envelopes,
84+
* ``plot_input_pulse.py``, plotting various input pulse envelopes,
8985
* ``plot_Raman_response.py``, plotting supported Raman response functions
9086
in the time domain,
9187
* ``test_3rd_order_soliton.py``, demonstrating the evolution of spectral
@@ -96,8 +92,8 @@ Major features
9692
different GNLSE and M-GNLSE
9793
(take into account mode profile dispersion),
9894
* ``test_Dudley``, an example of supercontinuum generation using
99-
different input impulse envelopes,
100-
* ``test_gvd``, showing impulse broadening due to group velocity
95+
different input pulse envelopes,
96+
* ``test_gvd``, showing pulse broadening due to group velocity
10197
dispersion,
10298
* ``test_import_export.py``, an example of saving and loading simulation
10399
results to and from a \*.mat file.
@@ -110,21 +106,24 @@ Major features
110106
Release information
111107
-------------------
112108

113-
v1.1.2 was released on August 30, 2021. The master branch works with
109+
v2.0.0 was released on April 26, 2022. The master branch works with
114110
**Python 3.7.**
115111

116-
======= =============== ====================================================
117-
Version Date Notes
118-
======= =============== ====================================================
119-
1.1.2 August 30, 2021 * ADD: Continious wave envelope
120-
* FIX: Shift scalling data for nonlinear coefficient
121-
1.1.1 August 28, 2021 * CHANGE: Minor bug fix with scaling
122-
* CHANGE: Few minor changes in the documentation
123-
1.1.0 August 21, 2021 * Modified-GNLSE extension
124-
* CHANGE: Code refactor - relocate attribiutes
125-
1.0.0 August 13, 2020 * The first proper release
126-
* CHANGE: Complete documentation and code.
127-
======= =============== ====================================================
112+
======= ================= ====================================================
113+
Version Date Notes
114+
======= ================= ====================================================
115+
2.0.0 April 26, 2022 * CHANGE: Code refactor - rename modules
116+
* FIX: Fixed extrapolation for nonlinear coefficient
117+
1.1.3 February 13, 2022 * FIX: Fix scaling for interpolated dispersion
118+
1.1.2 August 30, 2021 * ADD: Continious wave envelope
119+
* FIX: Shift scalling data for nonlinear coefficient
120+
1.1.1 August 28, 2021 * CHANGE: Minor bug fix with scaling
121+
* CHANGE: Few minor changes in the documentation
122+
1.1.0 August 21, 2021 * Modified-GNLSE extension
123+
* CHANGE: Code refactor - relocate attribiutes
124+
1.0.0 August 13, 2020 * The first proper release
125+
* CHANGE: Complete documentation and code.
126+
======= ================= ====================================================
128127

129128
Authors
130129
*******

examples/plot_input_pulse.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""Calculates envelopes of various impulses and plots them.
2-
Based on the chosen envelopes impulse, the aplitude envelope is
1+
"""Calculates envelopes of various pulses and plots them.
2+
Based on the chosen envelopes pulse, the aplitude envelope is
33
calculated and shown on the graph. There are three
4-
available envelopes impulses models:
4+
available envelopes pulses models:
55
hyperbolic secant, gaussian and lorentzian.
66
"""
77

@@ -11,18 +11,18 @@
1111
import gnlse
1212

1313
if __name__ == '__main__':
14-
# time full with half maximum of impulse
14+
# time full with half maximum of pulse
1515
FWHM = 2
1616
# Time grid [ps]
1717
T = np.linspace(-2 * FWHM, 2 * FWHM, 1000 * FWHM)
1818
# peak power [W]
1919
Pmax = 100
2020

21-
# Amplitude envelope of gaussina impulse
21+
# Amplitude envelope of gaussina pulse
2222
A1 = gnlse.GaussianEnvelope(Pmax, FWHM).A(T)
23-
# Amplitude envelope of hiperbolic secans impulse
23+
# Amplitude envelope of hiperbolic secans pulse
2424
A2 = gnlse.SechEnvelope(Pmax, FWHM).A(T)
25-
# Amplitude envelope of lorentzian impulse
25+
# Amplitude envelope of lorentzian pulse
2626
A3 = gnlse.LorentzianEnvelope(Pmax, FWHM).A(T)
2727
# Amplitude envelope of continious wave
2828
A4 = gnlse.CWEnvelope(Pmax).A(T)

examples/test_3rd_order_soliton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
Z0 = np.pi * LD / 2
5252
# Fiber length [m]
5353
setup.fiber_length = .5
54-
# Type of impulse: hyperbolic secant
55-
setup.impulse_model = gnlse.SechEnvelope(power, 0.050)
54+
# Type of pulse: hyperbolic secant
55+
setup.pulse_model = gnlse.SechEnvelope(power, 0.050)
5656
# Loss coefficient [dB/m]
5757
loss = 0
5858
# Type of dyspersion operator: build from Taylor expansion

0 commit comments

Comments
 (0)