;Create a random 'catalog' with 1 in non masked pixels (whose ;subscripts list is the in input) function create_random, image, in nxpix = n_elements(image[*,0]) nypix = n_elements(image[0,*]) res = dblarr(nxpix, nypix) res[in] = 1 return, res end