Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Jul 24, 2024
1 parent 2d2f0d8 commit 643ce6c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions lasy/optical_elements/optical_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def amplitude_multiplier(self, x, y, omega):
Define points on which to evaluate the multiplier.
These arrays need to all have the same shape.
omega_0 : float (in rad/s)
Central angular frequency.
Returns
-------
multiplier: ndarray of complex numbers
Expand Down
3 changes: 3 additions & 0 deletions lasy/optical_elements/parabolic_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def amplitude_multiplier(self, x, y, omega):
Define points on which to evaluate the multiplier.
These arrays need to all have the same shape.
omega_0 : float (in rad/s)
Central angular frequency.
Returns
-------
multiplier: ndarray of complex numbers
Expand Down
18 changes: 11 additions & 7 deletions lasy/optical_elements/polynomial_spectral_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class PolynomialSpectralPhase(OpticalElement):
r"""
Class for an optical element with added spectral phase.
Class for an optical element that adds spectral phase (e.g. a dazzler)
The amplitude multiplier corresponds to:
Expand All @@ -24,28 +24,32 @@ class PolynomialSpectralPhase(OpticalElement):
Parameters
----------
gdd : float (in s^2)
Group Delay Dispersion. ``gdd > 0`` corresponds to a positive chirp, i.e. low-frequency part of the spectrum arriving earlier than the high-frequency part of the spectrum.
Group Delay Dispersion. ``gdd > 0`` corresponds to a positive chirp, i.e. the low-frequency
part of the spectrum arriving earlier than the high-frequency part of the spectrum.
tod : float (in s^3)
Third-order Dispersion. For a Gaussian pulse, adding a positive TOD (``tod > 0``) results in the apparition of post-pulses, i.e. lower intensity pulses arriving after the main pulse.
Third-order Dispersion. For a Gaussian pulse, adding a positive TOD (``tod > 0``) results
in the apparition of post-pulses, i.e. lower intensity pulses arriving after the main pulse.
fod : float (in s^4)
Fourth-order Dispersion.
omega_0 : float (in rad/s)
Central angular frequency.
"""

def __init__(self, gdd, tod, fod):
self.gdd = gdd
self.tod = tod
self.fod = fod

def amplitude_multiplier(self, omega, omega0):
def amplitude_multiplier(self, x, y, omega, omega0):
"""
Return the amplitude multiplier.
Parameters
----------
omega: ndarray of floats
x, y, omega: ndarrays of floats
Define points on which to evaluate the multiplier.
These arrays need to all have the same shape.
omega_0 : float (in rad/s)
Central angular frequency.
Returns
-------
Expand Down

0 comments on commit 643ce6c

Please sign in to comment.