A tool for decomposition of images of galaxies