Page History
...
Auto-generated documentation for class RadialBkgd
Initialization
Code Block |
---|
from pyimgalgos.RadialBkgd import RadialBkgd rb = RadialBkgd(xarr, yarr, mask=None, radedges=None, nradbins=100, phiedges=(0,360), nphibins=32) |
...
Input per-pixel coordinates passed in numpy arrays xarr, yarr are used to evaluate per-pixel radius and polar angle:
Code Block |
---|
rad = rb.pixel_rad()
phi = rb.pixel_phi() |
Binning parameters radedges, nradbins, phiedges, nphibins
are used to initialize 2-d bins using class HBins. Initialization with default binning parameters covers entire detector coordinate space.
Non-default binning, for example like
Code Block |
---|
rb rbkg = RadialBkgd(X, Y, mask, nradbins=3, nphibins=8, phiedges=(-20, 240), radedges=(10000,80000)) |
...
and gives 3 bins in radial direction from 10mm to 80mm and 8 bins in angle from -20 to 240 degree:
Code Block |
---|
irad = rb.pixel_irad()
iphi = rb.pixel_iphi()
iseq = rb.pixel_iseq() |
Pixels masked by the n-d array passed in the parameter mask
are excluded from this algorithm and are not corrected.
Averaged background intensity for default and non-default binning cases (nphibins=8, nradbins=500
):
Code Block |
---|
bkgd = rb.bkgd_nda(nda) |
Results
Background subtracted data for default (nradbins=100, nphibins=32
) and non-default binning cases (nradbins=500, nphibins=1
), and (nradbins=500, nphibins=8, phiedges=(-20, 240)
):
Code Block |
---|
res = rb.subtract_bkgd(nda) |
- For good statistical background averaging 2-d bins should contain large number of pixels. Binning artifact in some places are seen in resulting image.
- Photon beam polarization effect is observed in the image with single angular bin (ring-shaped radial bins). One could eliminate this effect by modulation of the background sample using polarization correction.
...
References
...