The weight function W(X) is a diagnostic sensitivity to phase-space variables X that relates the measured signal C to the distribution function F(X) through the equation C = ∫ W(X)F(X)dX. In the present work, an algorithm to calculate W for a diagnostic that measures 3 MeV protons produced in d(d,p)t fusion reactions between a fast ion and a thermal deuteron is developed. The emitted protons escape the tokamak on curved orbits and are detected. These curved orbits constitute effective diagnostic “sightlines.” The presented algorithm accounts for the complications associated with these curved sightlines. An initial calculation of time-reversed proton orbits computes effective solid angles and sightlines for the relevant range of incident proton velocity vectors. These precomputed orbits are then used within the framework of FIDASIM [Plasma Phys. Cont. Fusion 62 (2020) in press] to calculate the reactivity averaged over the thermal distribution of the “target” deuterons and the probability that a fast ion of specified energy and pitch has a gyroangle that is consistent with the kinematic equations along each of the sightlines. Comparisons with analytic formulas and with independent calculations for the MAST 3-MeV proton diagnostic verify the algorithm.