EnergyFilter¶
- class marxs.optics.EnergyFilter(**kwargs)[source]¶
Bases:
FlatOpticalElementEnergy dependent filter with position, size etc.
Parameters¶
- filterfunccallable
A function that calculates the probability for each photon to pass through the filter based on the photon energy in keV. The function signature should be
p = func(en), wherep, enare 1-d arrays of floats with the same number of elements.
Examples¶
>>> from scipy.interpolate import interp1d >>> from marxs.optics import EnergyFilter >>> energygrid = [.1, .5, 1., 2., 5.] >>> filtercurve = [.1, .5, .9, .9, .5] >>> f = interp1d(energygrid, filtercurve) >>> blockingfilter = EnergyFilter(filterfunc=f, position=[4, 1, 0], zoom=4)
See Also¶
marxs.optics.filter.GlobalEnergyFilter
Define a new MARXS element.
Attributes Summary
Dictionary for display specifications, e.g. color.
Methods Summary
specific_process_photons(photons, intersect, ...)Attributes Documentation
- display = {'color': (1.0, 0.0, 0.0), 'opacity': 0.5, 'shape': 'box'}¶
Dictionary for display specifications, e.g. color
Methods Documentation