A method of recording an image of the sky at high X-ray and gamma-ray energies where reflecting telescopes are unable to operate. A patterned mask similar to a crossword grid is used to cast a shadow of the celestial X-ray or gamma-ray emission on to a detector. From the shadow, an image can be reconstructed in a computer by the process of deconvolution. A coded mask does not focus the incoming radiation so the sensitivity and resolution are limited.