  We present a method we developed for the correction of the beam divergence in
finite distance sources imaging through coded mask instruments. We discuss the
defocusing artifacts induced by the finite distance showing two different
approaches to remove such spurious effects. We applied our method to
one-dimensional coded-mask systems, although it is also applicable to 2D
systems as well. We provide a detailed mathematical description of the adopted
method and of the systematics introduced in the reconstructed image (e. g. the
fraction of source flux collected in the reconstructed peak counts). The
accuracy of this method was tested by simulating point-like and extended
sources at finite distance with the instrumental set-up of the SuperAGILE
experiment, the one dimensional coded-mask X-ray imager on-board the AGILE
mission. We obtained reconstructed images of good quality and high source
location accuracy. Finally, we show the results obtained by applying this
method to real data collected during the calibration campaign of SuperAGILE.
Our method was demonstrated to be a powerful tool to investigate the imaging
response of the experiment, particularly, the absorption due to the materials
intercepting the line of sight of the instrument and the conversion between
detector pixel and sky direction.
