Skip to content

Commit

Permalink
Update documentation to discuss sum of profiles (#275)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
MaxThevenet and pre-commit-ci[bot] authored Aug 31, 2024
1 parent 30e11f4 commit 539b744
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/api/profiles/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Laser Profiles
==============

.. autoclass:: lasy.profiles.Profile
:members:

.. toctree::
:hidden:

Expand Down
3 changes: 3 additions & 0 deletions docs/source/api/profiles/transverse/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Transverse Laser Profiles
=========================

.. autoclass:: lasy.profiles.transverse.TransverseProfile
:members:

.. toctree::
:maxdepth: 4
:hidden:
Expand Down
2 changes: 2 additions & 0 deletions lasy/profiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
from .from_insight_file import FromInsightFile
from .from_openpmd_profile import FromOpenPMDProfile
from .gaussian_profile import GaussianProfile
from .profile import Profile
from .speckle_profile import SpeckleProfile

__all__ = [
"Profile",
"CombinedLongitudinalTransverseProfile",
"GaussianProfile",
"FromArrayProfile",
Expand Down
5 changes: 5 additions & 0 deletions lasy/profiles/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class Profile(object):
Any new laser profile should inherit from this class, and define its own
`evaluate` method, using the same signature as the method below.
For most cases, use derived classes instead of this base class.
Common operators (addition and multiplication by a scalar) are provided as part of this base class.
For such operations, the user is responsible for handling the complex phase and weights of summed profiles.
In particular, summing between different types of profiles is not recommended.
Parameters
----------
Expand Down
6 changes: 6 additions & 0 deletions lasy/profiles/transverse/transverse_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ class TransverseProfile(object):
Any new transverse profile should inherit from this class, and define its own
`evaluate` method, using the same signature as the method below.
For most cases, use derived classes instead of this base class.
Common operators (addition and multiplication by a scalar) are provided as part of this base class.
For such operations, the user is responsible for handling the complex phase and weights of summed profiles.
In particular, summing between different types of profiles is not recommended.
This feature is tailored for linear combination of profiles of the same type, in particular analytical profiles like Laguerre-gauss or Hermite-Gauss.
"""

def __init__(self):
Expand Down

0 comments on commit 539b744

Please sign in to comment.