synthetic_radiograph
- plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.synthetic_radiograph(obj, size=None, bins=None, ignore_grid: bool = False, optical_density: bool = False)[source]
Calculate a “synthetic radiograph” (particle count histogram in the image plane).
- Parameters:
obj (
dict
orTracker
) – Either aTracker
object that has been run, or a dictionary equivalent toresults_dict
.size (
Quantity
, shape(2, 2)
, optional) – The size of the detector array, specified as the minimum and maximum values included in both the horizontal and vertical directions in the detector plane coordinates. Shape is((hmin, hmax), (vmin, vmax))
. If not specified, the size will be set to include all particles on the detector. Units must be convertible to meters.bins (array of integers, shape
(2)
) – The number of bins in each direction in the format(hbins, vbins)
. The default is(200, 200)
.ignore_grid (
bool
) – IfTrue
, returns the intensity in the image plane in the absence of simulated fields.optical_density (
bool
) –If
True
, return the optical density rather than the intensity\[OD = -log_{10}(Intensity/I_0)\]where \(Intensity\) is the simulation intensity on the detector plane and \(I_0\) is the intensity on the detector plane in the absence of simulated fields. Default is
False
. If the \(Intensity\) histogram contains zeros, then the corresponding values in \(OD\) will benumpy.inf
. When plotting \(OD\) theinf
values can be replaced usingnumpy.nan_to_num(OD, neginf=0, posinf=0)
.
- Returns: