The Compton Spectrometer and Imager (COSI) is a soft γ-ray (0.2 ~ 10 MeV) telescope with twelve germanium detectors (GeDs), which are designed to detect the cosmic γ-ray photons by using the Compton scattering technique to locate the incident photons. A coded mask technique is planned to be applied on this instrument, so that the incoming non-scattered photons below 200 keV can be imaged instead of being excluded in the existing Compton imaging approach. The imaging capability of COSI is then expected to extend to the hard X-ray band (40-100 keV) to enable more possibilities on scientific purposes. With a basic mask pattern designed for COSI, which is a 33×31 pixels array with a pixel size of 2× 2 mm2 (the spatial resolution of the GeDs is 2 mm), we set up a data reduction pipeline for the coded mask pattern and tested the an- alytic method by performing Monte-Carlo simulations to get the instrumental parameters and found the best-performed mask geometry and material. The effects from the Caroli-factor and pixel shuffling were considered in the simula- tions. From the simulation results, we decided to use Tin (Sn) which absorbs effectively below 100 keV but is well transmitted at high energy range, as the mask material.