Devices

Lenses used in experiments.

class syris.devices.lenses.Lens(magnification, na=None, f_number=None, focal_length=None, transmission_eff=1, sigma=None)

Class holding lenses.

numerical_aperture

Lens numerical aperture.

Cameras used by experiments.

class syris.devices.cameras.Camera(pixel_size, gain, dark_current, amplifier_sigma, bits_per_pixel, shape, quantum_efficiencies=None, wavelengths=None, exp_time=array(1.) * s, fps=array(1.) * 1/s, dtype=<class 'numpy.uint16'>)

Base class representing a camera.

get_image(photons, shot_noise=True, amplifier_noise=True, psf=True, queue=None)

Get digital counts image from incoming photons. The resulting image is based on the incoming photons and dark current. We apply noise based on EMVA 1288 standard according to which the variance \sigma_y^2 = K^2 ( \sigma_e^2 + \sigma_d^2 ) + \sigma_q^2, where K is the system gain, \sigma_e^2 is the poisson- distributed shot noise variance, \sigma_d^2 is the normal distributed electronics noise variance and \sigma_q^2 is the quantization noise variance. If shot_noise is False don’t apply it. If amplifier_noise is False don’t apply it as well. If psf is False don’t apply the point spread function.

get_quantum_efficiency(wavelength)

Get quantum efficiency [dimensionless] at wavelength.

syris.devices.cameras.is_fps_feasible(fps, exp_time)

Determine whether frame rate given by fps can be accomplished with the exposure time exp_time. It is only possible to set frame rates for which exposure\ time <= 1 / fps.

syris.devices.cameras.make_pco_dimax()

Make a pco.dimax camera.

Module for beam filters which cause light attenuation. Filters are assumed to be homogeneous, thus no phase change effects are introduced when a wavefield passes through them.

class syris.devices.filters.Filter

Beam frequency filter.

get_next_time(t_0, distance)

A filter doesn’t move, this function returns infinity.

class syris.devices.filters.GaussianFilter(energies, center, sigma, peak_transmission=1)

Gaussian beam filter.

get_next_time(t_0, distance)

A filter doesn’t move, this function returns infinity.

class syris.devices.filters.MaterialFilter(thickness, material)

Beam frequency filter.

get_attenuation(energy)

Get attenuation at energy.

get_next_time(t_0, distance)

A filter doesn’t move, this function returns infinity.

class syris.devices.filters.Scintillator(thickness, material, light_yields, energies, luminescence, wavelengths, optical_ref_index)

Scintillator emits visible light when it is irradiated by X-rays.

d_wavelength

Wavelength spacing.

get_conversion_factor(energy)

Get the conversion factor to convert X-ray photons to visible light photons [dimensionless].

get_light_yield(energy)

Get light yield at energy [1 / keV].

get_luminescence(wavelength)

Get luminescence at wavelength [1 / nm].

wavelengths

Wavelengths for which the emission is defined.

Detector composed of a scintillator, a lens and a camera.

class syris.devices.detectors.Detector(scintillator, lens, camera)

A detector consisting of a camera and an objective lens.

convert(photons, energy, wavelengths=None)

Convert X-ray photons at energy to visible light photons with wavelengths.

get_visible_attenuation(wavelengths=None)

Get the attenuation coefficient for visible light wavelengths [dimensionless].

X-ray sources at synchrotrons. They provide X-ray photons used for imaging. Synchrotron radiation sources provide high photon flux of photons with different energies, which form a spectrum characteristic for a given source type.

class syris.devices.sources.BendingMagnet(electron_energy, el_current, magnetic_field, sample_distance, dE, size, pixel_size, trajectory, profile_approx=True, phase_profile='plane')

Bending magnet X-ray source.

critical_energy

Critical energy of the source is defined as .. math:

\epsilon_c [keV] = 0.665 E^2 [GeV] B[T]
gama

\frac{E}{m_ec^2}

get_flux(photon_energy, vertical_angle, pixel_size)

Get the photon flux coming from the source consisting of photons with photon_energy and get it at the vertical observation angle vertical_angle.

get_next_time(t_0, distance)

Get the next time when the source will have moved more than distance.

class syris.devices.sources.FixedSpectrumSource(energies, flux, sample_distance, size, trajectory, pixel_size=None, phase_profile='plane')
get_flux(photon_energy, vertical_angle, pixel_size)

Get linearly interpolated flux at photon_energy.

class syris.devices.sources.Wiggler(electron_energy, el_current, magnetic_field, sample_distance, dE, size, pixel_size, trajectory, num_periods, profile_approx=True, phase_profile='plane')

Wiggler source.

get_flux(photon_energy, vertical_angle, pixel_size)

Get the photon flux coming from the source consisting of photons with photon_energy and get it at the vertical observation angle vertical_angle.

class syris.devices.sources.XRaySource(sample_distance, size, trajectory, phase_profile='plane')
apply_blur(intensity, distance, pixel_size, queue=None, block=False)

Apply source blur based on van Cittert-Zernike theorem at distance.

get_next_time(t_0, distance)

Get the next time when the source will have moved more than distance.

exception syris.devices.sources.XRaySourceError

X-ray source related exceptions.

syris.devices.sources.make_topotomo(dE=None, trajectory=None, pixel_size=None, ring_current=array(200.) * mA)

Make the TopoTomo bending magnet source located at ANKA, KIT. Use dE for energy spacing (1 keV if not specified), trajectory for simulating beam fluctuations. If it is None a (1024, 1024) window is used with the beam center in the middle and no fluctuations. pixel_size specifies the pixel spacing between the window points, if not specified 1 um is used. ring_current is the storage ring electric current.