def burst(self, wavelength0, wavelength): """ Calculates pdf(wavelength) for burst time component Parameters ---------- wavelength0: float Nominal wavelength, Angstrom wavelength: float Wavelength, Angstrom Returns ------- pdf: float Probability density function at `wavelength` """ # burst time tc = general.tauC(wavelength0, xsi=self.xsi, z0=self.z0 / 1000, freq=self.freq) # time of flight TOF = self.L / 1000.0 / general.wavelength_velocity(wavelength0) width = tc / TOF * wavelength0 return stats.uniform.pdf(wavelength - wavelength0, -width / 2, width)
def width(self, wavelength0): # burst width tc = general.tauC(wavelength0, xsi=self.xsi, z0=self.z0 / 1000, freq=self.freq) # time of flight TOF = self.L / 1000. / general.wavelength_velocity(wavelength0) width = tc / TOF * wavelength0 # da width width += self._da * wavelength0 # crossing width tau_h = self.H / self.R / (2 * np.pi * self.freq) width += tau_h / TOF * wavelength0 return width