Fix antenna flagger segfault when all the baselines are flagged
The antennaflagger steps fails with a segfault when specific data set are provided. In particular, such data sets have completely invalid data. While the antennaflagger is resilient to partially invalid data it is not for completely invalid steps.
By running with gdb I found out that the issue is in the median function. A preventive check should be enough to fix the error.
Edited by Mattia Mancini