program maskprep


use sep

implicit none

real, dimension(:,:), allocatable	:: data_mask, data_mis
integer					:: n1, n2, i2

call sep_init()

call from_history("n1", n1)
call from_history("n2", n2)

allocate(data_mis(n1,n2), data_mask(n1,n2))
call sep_read(data_mis)


do i2 = 1,n2
	if(sum(data_mis(:,i2))==0) then 
		data_mask(:,i2) = 0.
	else
		data_mask(:,i2) = 1.
	end if
end do
	
		
call sep_write(data_mask)
call sep_close()

end program maskprep			

