  We present a new non-parametric deprojection algorithm DOPING (Deprojection
of Observed Photometry using and INverse Gambit), that is designed to extract
the three dimensional luminosity density distribution $\rho$, from the observed
surface brightness profile of an astrophysical system such as a galaxy or a
galaxy cluster, in a generalised geometry, while taking into account changes in
the intrinsic shape of the system. The observable is the 2-D surface brightness
distribution of the system. While the deprojection schemes presented hitherto
have always worked within the limits of an assumed intrinsic geometry, in
DOPING, geometry and inclination can be provided as inputs. The $\rho$ that is
most likely to project to the observed brightness data is sought; the
maximisation of the likelihood is performed with the Metropolis algorithm.
Unless the likelihood function is maximised, $\rho$ is tweaked in shape and
amplitude, while maintaining positivity, but otherwise the luminosity
distribution is allowed to be completely free-form. Tests and applications of
the algorithm are discussed.
