srxraylib.sources.srfunc

srfunc: calculates synchrotron radiation emission (radiation and angle distributions).

functions:

basic:

  • fintk53: integral of the Bessel function K5/3(x).

  • sync_g1: energy spectrum integrated over the full vertical angle.

  • sync_f: angular dependence of synchrotron radiation.

  • sync_hi: function Hi(x) = x^i * BeselK(x/2,2/3).

bending magnet radiation:

  • sync_ang: angular distributions.

  • sync_ene: energy distributions.

wiggler radiation:

  • wiggler_trajectory: computes the electron trajectroy in a magnetic field (sinusoidal or from a file with B[T] or its harmonic decomposition).

  • wiggler_spectrum: computes the wiggler spectrum (full emission) given the trajectory.

  • wiggler_nphoton: computes the number of photons emtted versus bending radius per (1mA 1mrad (horizontal) 0.1% bandwidth).

  • wiggler_harmonics: computes the harmonic decomposition of the magnetic field B(s).

  • wiggler_cdf: computes the cumulative distribution function from radiation.

Functions

fintk53(xd)

Calculates the integral from x to infinity of the Bessel function K5/3(x).

kv_approx(nu, x)

resample_array(array, new_size[, method])

Resample a 1D array to a new size using the specified interpolation method.

sync_ang(flag, angle_mrad[, polarization, ...])

Calculates the synchrotron radiation angular distribution.

sync_ene(f_psi, energy_ev[, ec_ev, ...])

Calculates the synchrotron radiation energy spectrum.

sync_f(rAngle[, rEnergy, polarization, ...])

Angular dependency of synchrotron radiation emission.

sync_f_sigma_and_pi(rAngle, rEnergy)

angular dependency of synchrotron radiation emission

sync_f_sigma_and_pi_approx(rAngle, rEnergy)

angular dependency of synchrotron radiation emission.

sync_g1(x[, polarization])

Calculates the synchrotron radiation g1 function.

sync_hi(x[, i, polarization])

Calculates the function Hi(x) used for Synchrotron radiation.

wiggler_cdf(traj[, enerMin, enerMax, ...])

Calculates the cdf (cumulative density function) of a wiggler using the electron trajectory as input.

wiggler_harmonics(Bs[, Nh, fileOutH])

Calculates the harmonic decomposition of the magnetic field map B[s].

wiggler_nphoton(r_m[, electronEnergy, ...])

Calculates the synchrotron radiation spectrum versus bending radius.

wiggler_spectrum(traj[, enerMin, enerMax, ...])

Calculates the spectrum of a wiggler using an electron trajectory as input.

wiggler_spectrum_on_aperture(traj[, ...])

Calculates the spectrum of a wiggler using an electron trajectory as input.

wiggler_trajectory([b_from, inData, nPer, ...])

Calculates the trajectory of the electrons under a magnetic field in Z direction.