  We present a derivation of a generalized optimally-weighted estimator for the
weak lensing magnification signal, including a calculation of errors. With this
estimator, we present a local method for optimally estimating the local effects
of magnification from weak gravitational lensing, using a comparison of number
counts in an arbitrary region of space to the expected unmagnified number
counts. We show that when equivalent lens and source samples are used, this
estimator is simply related to the optimally-weighted correlation function
estimator used in past work and vice-versa, but this method has the benefits
that it can calculate errors with significantly less computational time, that
it can handle overlapping lens and source samples, and that it can easily be
extended to mass-mapping. We present a proof-of-principle test of this method
on data from the CFHTLenS, showing that its calculated magnification signals
agree with predictions from model fits to shear data. Finally, we investigate
how magnification data can be used to supplement shear data in determining the
best-fit model mass profiles for galaxy dark matter haloes. We find that at
redshifts greater than z ~ 0.6, the inclusion of magnification can often
significantly improve the constraints on the components of the mass profile
which relate to galaxies' local environments relative to shear alone, and in
high-redshift, low- and medium-mass bins, it can have a higher signal-to-noise
than the shear signal.
