CASA task to flag bad data by drawing upon statistics from a reference channel