Added option to generate mask from skymodel