FarLabPointSource¶
- class marxs.source.FarLabPointSource(sourcePos, **kwargs)[source] [edit on github]¶
Bases:
Source
,FlatOpticalElement
Simple in-lab point source used with aperture
assumes point source is far from a rectangular aperture, and only the photons that pass through are tracked
photon start positions uniformly distributed within rectangular aperture (reasonable approximation if source is far)
photon direction determined by location of source, and selected photon starting position
aperture is in its local y-z plane
- Parameters:
- sourcePos: 3 element list
3D coordinates of photon source (not aperture)
- kwargs:
pos4d
orposition
,orientation
, andzoom
can be used to set the position, size and orientation of the rectangular apeture; seepos4d
for details. Other keyword arguments includeflux
,energy
andpolarization
. SeeSource
for details.
Define a new MARXS element.
Methods Summary
generate_photons
(exposuretime)Central function to generate photons.
Methods Documentation
- generate_photons(exposuretime: Unit('s'))[source] [edit on github]¶
Central function to generate photons.
Calling this function generates a photon table according to the
flux
,energy
, andpolarization
of this source. The number of photons depends on the total exposure time, which is a parameter of this function. Depending on the setting forflux
the photons could be distributed equally over the interval 0..exposuretime or follow some other distribution.- Parameters:
- exposuretime
astropy.quantity.Quantity
Total exposure time.
- exposuretime
- Returns:
- photons
astropy.table.Table
Table with photon properties.
- photons