stuff for sky subtraction and masks