Skip to content

Commit

Permalink
Make energy calibration the default (#96)
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
soerenjalas and pre-commit-ci[bot] authored Feb 10, 2023
1 parent 91dc36b commit 5a7a0e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ __pycache__/
*.py[cod]
*$py.class

# Data files
*.h5
*.hdf5

# C extensions
*.so

Expand Down
6 changes: 3 additions & 3 deletions lasy/laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ def __init__(self, dim, lo, hi, npoints, profile, n_azimuthal_modes=1):
# Perform the azimuthal decomposition
self.field.field[...] = np.fft.ifft(envelope, axis=0)

def normalize(self, value, kind=None):
def normalize(self, value, kind="energy"):
"""
Normalize the pulse either to the energy, peak field amplitude or peak intensity
Parameters
----------
value: scalar
Value to which to normalize the field property that is defined in 'kind'
kind: string
kind: string (optional)
Distance by which the laser pulse should be propagated
Options: 'energy', 'field', 'intensity'
Options: 'energy', 'field', 'intensity' (default is 'energy')
"""

if kind == "energy":
Expand Down

0 comments on commit 5a7a0e1

Please sign in to comment.