synthetic_radiograph

plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph(obj, size=None, bins=None, ignore_grid=False, optical_density=False)

Calculate a “synthetic radiograph” (particle count histogram in the image plane).

Parameters
  • obj (dict or Tracker) – Either a Tracker object that has been run, or a dictionary equivalent to results_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) – If True, 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 be numpy.inf. When plotting \(OD\) the inf values can be replaced using numpy.nan_to_num(OD, neginf=0, posinf=0).

Returns

  • hax (Quantity array shape (hbins,)) – The horizontal axis of the synthetic radiograph in meters.

  • vax (Quantity array shape (vbins, )) – The vertical axis of the synthetic radiograph in meters.

  • intensity (ndarray, shape (hbins, vbins)) – The number of particles counted in each bin of the histogram.