Data APIs

SimExLite.SampleData

SimExLite.PhotonBeamData

Photon Beam data APIs

class SimExLite.PhotonBeamData.BeamBase(pulse_energy=None, wavelength=None, focus_area=None)[source]

The simplest description of a pulse of the beam.

Parameters:
  • pulse_energy (float, optional) – The energy of the X-ray pulse in Joule.

  • photons_per_pulse (int, optional) – The number of photons of this pulse.

  • wavelength (float, optional) – The wavelength of this pulse in Angstrom.

  • photon_energy (float, optional) – The photon energy of this pulse, in eV.

  • focus_area (float, optional) – The focus area of this pulse, in m**2.

property pulse_energy

The pulse_energy property.

property wavelength

The wavelength property.

class SimExLite.PhotonBeamData.SimpleBeam(pulse_energy=None, photons_per_pulse=None, wavelength=None, wavelength_weights=None, photon_energy=None, photon_energy_weights=None, beam_size: Optional[ndarray] = None, profile: str = 'gaussian', focus_area=None)[source]

The simplest description of a pulse of the beam.

Parameters:
  • pulse_energy (float, optional) – The energy of the X-ray pulse in Joule.

  • photons_per_pulse (int, optional) – The number of photons of this pulse.

  • wavelength (float or ndarray, optional) –

    The wavelength(s) of this pulse in Angstrom. Monchromatic beam: a scalar wavelength. Polychromatic beam (shot-to-shot-invariant):

    an array of length m of wavelengths.

    Polychromatic beam (shot-to-shot-variant):

    an array of np by m of wavelengths.

  • wavelength_weights (ndarray, optional) –

    The relative weights of the corresponding wavelengths. Monchromatic beam: None Polychromatic beam (shot-to-shot-invariant):

    an array of length m of wavelengths.

    Polychromatic beam (shot-to-shot-variant):

    an array of np by m of wavelengths.

  • photon_energy (float of ndarray, optional) –

    The photon energy(s) of this pulse, in eV. Monchromatic beam: a scalar. Polychromatic beam (shot-to-shot-invariant):

    an array of length m of photon energies.

    Polychromatic beam (shot-to-shot-variant):

    an array of np by m of photon energies.

  • photon_energy_weights (ndarray, optional) –

    The relative weights of the corresponding photon energies. Monchromatic beam: None Polychromatic beam (shot-to-shot-invariant):

    an array of length m of photon energies.

    Polychromatic beam (shot-to-shot-variant):

    an array of np by m of photon energies.

  • beam_size (array-like, optional) – Two-element array/list of FWHM (if Gaussian or Airy function) or diameters (if top hat) or widths (if rectangular) of the beam in the order x, y. The unit is meter.

  • profile (str, optional) – The beam profile. It can be one of: gaussian|airy|top-hat|rectangular.

  • focus_area (float, optional) – The focus area of this pulse, in m**2. It will be overridden by beam_size if both are provided.

SimExLite.PhotonBeamData.hcDivide(val)[source]

h is the Plank constant and c is the speed of light. keV <-> Angstrom.

SimExLite.DiffractionData