FlatStack¶
- class marxs.optics.FlatStack(**kwargs)[source] [edit on github]¶
Bases:
FlatOpticalElement
,BaseContainer
Convenience class for several flat, stacked optical elements.
This class is meant to simplify the specification of a single physical element that fullfills several logical functions, e.g. a detector can be seen as a a sequence of a contamination layer (which modifies the probability of a photon reaching the CCD), a QE filter (which modifies the probability of detecting the photon), and the pixelated CCD (which sorts the photons in pixels). All these things can be approximated as happening in the same physical location, and thus it is convenient to treat all three functions as one element.
- Parameters:
- elementslist of classes
List of class names specifying the layers in the stack
- keywordslist of dicts
Dictionaries specifying the properties of each layer (do not set the position of individual elements)
Examples
In this example, we will define a single flat CCD with a QE of 0.5 for all energies.
>>> from marxs.optics import FlatStack, EnergyFilter, FlatDetector >>> myccd = FlatStack(position=[0, 2, 2], zoom=2, ... elements=[EnergyFilter, FlatDetector], ... keywords=[{'filterfunc': lambda x: 0.5}, {'pixsize': 0.05}])
Define a new MARXS element.
Methods Summary
process_photons
(photons[, intersect, ...])- Parameters:
specific_process_photons
(*args, **kwargs)Methods Documentation
- process_photons(photons, intersect=None, interpos=None, intercoos=None)[source] [edit on github]¶
- Parameters:
- intersect, interpos, intercoosarray (N, 4)
The array
interpos
contains the intersection points in the global coordinate system,intercoos
in the local (y,z) system of the grating.
- specific_process_photons(*args, **kwargs)[source] [edit on github]¶