split to save premasking and galaxy detection