prepic.laser module

Classes for modelling the laser pulse, without any matching

prepic.laser.w0_to_fwhm(w0)[source]

Computes Gaussian laser FWHM from its beam waist.

Parameters

w0 (float, length) – beam waist @ 1/e^2 intensity

Returns

beam FWHM @ 1/2 intensity

Return type

fwhm (float, length)

prepic.laser.fwhm_to_w0(fwhm)[source]

Computes Gaussian laser beam waist from its FWHM.

Parameters

fwhm (float, length) – beam FWHM @ 1/2 intensity

Returns

beam waist @ 1/e^2 intensity

Return type

w0 (float, length)

prepic.laser.intensity_from_a0(a0, λL=unyt_quantity(0.8, 'µm'))[source]

Compute peak laser intensity in the focal plane.

Parameters
  • a0 (float, dimensionless) – normalized laser vector potential

  • λL (float, length) – laser wavelength

Returns

peak laser intensity in the focal plane

Return type

I0 (float, energy/time/area)

prepic.laser.a0_from_intensity(i0, λL=unyt_quantity(0.8, 'µm'))[source]

Compute laser normalized vector potential.

Parameters
  • i0 (float, energy/time/area) – peak laser intensity in the focal plane

  • λL (float, dim.length) – laser wavelength

Returns

normalized laser vector potential

Return type

a0 (float, dimensionless)

class prepic.laser.GaussianBeam(w0=None, fwhm=None, λL=unyt_quantity(0.8, 'µm'))[source]

Bases: prepic.base.BaseClass

Contains the (geometric) parameters for a Gaussian laser beam.

w0

Beam waist @ 1/e^2 intensity.

Type

float, length

fwhm

Beam FWHM @ 1/2 intensity

Type

float, length

λL

Wavelength.

Type

float, length

zR

Rayleigh length.

Type

float, length

Examples

>>> import unyt as u
>>> mybeam = GaussianBeam.from_focal_distance(focal_distance=3 * u.m,
...                             beam_diameter=200 * u.mm, λL=1.0 * u.micrometer)
>>> mybeam
<GaussianBeam(13.504744742356593 µm, 1.0 µm)>
classmethod from_f_number(f_number, λL=unyt_quantity(0.8, 'µm'))[source]

Construct beam by giving the OAP’s f/#.

:param : param f_number: f/# of the off-axis parabolic mirror (float, dimensionless) :param : param λL: laser wavelength (float, length, optional)

classmethod from_focal_distance(focal_distance, beam_diameter, λL=unyt_quantity(0.8, 'µm'))[source]

Constuct beam from OAP’s focal distance and beam diameter.

:param : param focal_distance: focal distance of the off-axis parabolic mirror (float, units of length) :param : param beam_diameter: beam diameter after compressor (float, units of length) :param : param λL: laser wavelength (float, length, optional)

class prepic.laser.Laser(ɛL, τL, beam=<GaussianBeam(None, 0.8 µm)>)[source]

Bases: prepic.base.BaseClass

Class containing laser parameters.

beam

Class instance containing beam params.

Type

GaussianBeam

ɛL

Pulse energy on target (after compressor and beam transport, focused into the FWHM@intensity spot).

Type

float, energy

τL

Pulse duration at FWHM in intensity

Type

float, time

kL

Wavenumber.

Type

float, 1/length

ωL

Agular frequency.

Type

float, 1/time

ncrit

Critical plasma density for this laser.

Type

float, 1/volume

P0

Power.

Type

float, energy/time

I0

Peak intensity in the focal plane.

Type

float, energy/time/area

a0

Normalized vector potential.

Type

float, dimensionless

E0

Peak electric field.

Type

float, energy/charge/length

Examples

>>> import unyt as u
>>> from prepic import GaussianBeam
>>> mylaser = Laser.from_power(power=10 * u.petawatt, ɛL=300 * u.joule,
...                            beam=GaussianBeam(w0=5 * u.micrometer))
>>> mylaser
<Laser(300.0 J, 28.18311836098954 fs, <GaussianBeam(5.0 µm, 0.8 µm)>)>
classmethod from_a0(a0, ɛL=None, τL=None, beam=<GaussianBeam(None, 0.8 µm)>)[source]

Construct laser by giving its normalized vector potential a0. Must supply either (ɛL,τL), (ɛL,beam) or (τL,beam).

classmethod from_intensity(intensity, ɛL=None, τL=None, beam=<GaussianBeam(None, 0.8 µm)>)[source]

Construct laser by giving its intensity I0. Must supply either (ɛL,τL), (ɛL,beam) or (τL,beam).

classmethod from_power(power, beam, ɛL=None, τL=None)[source]

Construct laser by giving its power P0 and beam size.

Must supply either ɛL or τL and a beam with a defined size.