Skip to content

Commit

Permalink
FIX: syntax warnings with unsupported escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-lauer committed Aug 14, 2024
1 parent 6e01a1e commit 2ae4288
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pmd_beamphysics/fields/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Analysis

def accelerating_voltage_and_phase(z, Ez, frequency):
"""
r"""
Computes the accelerating voltage and phase for a v=c positively charged particle in an accelerating cavity field.
Z = \int Ez * e^{-i k z} dz
Expand Down Expand Up @@ -57,7 +57,7 @@ def track_field_1d(z,
debug=False,
max_step=None,
):
"""
r"""
Tracks a particle in a 1d complex electric field Ez, oscillating as Ez * exp(-i omega t)
Uses scipy.integrate.solve_ivp to track the particle.
Expand Down Expand Up @@ -181,7 +181,7 @@ def track_field_1df(Ez_f,
max_step=None,
method='RK23'
):
"""
r"""
Similar to track_field_1d, execpt uses a function Ez_f
Tracks a particle in a 1d electric field Ez(z, t)
Expand Down
2 changes: 1 addition & 1 deletion pmd_beamphysics/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def texlabel(key: str):
if key.startswith('bunching'):
wavelength = parse_bunching_str(key)
x, _, prefix = nice_array(wavelength)
return f'\mathrm{{bunching~at}}~{x:.1f}~\mathrm{{ {prefix}m }}'
return fr'\mathrm{{bunching~at}}~{x:.1f}~\mathrm{{ {prefix}m }}'

return None

Expand Down
2 changes: 1 addition & 1 deletion pmd_beamphysics/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def average_current(self):
return self.charge / dt

def bunching(self, wavelength):
"""
r"""
Calculate the normalized bunching parameter, which is the magnitude of the
complex sum of weighted exponentials at a given point.
Expand Down

0 comments on commit 2ae4288

Please sign in to comment.