This check should apply both to az and el or ra/dec. I suggest checking the tracks and scans separately. Currently only elevation seems to be checked. One possibility for az:
d=katdal.open(' ....')
d.select(corrprods='auto', scans='scan', strict=True)
azmedian=(np.median(d.az, axis=1))
azdev=np.average(np.absolute((d.az[:,:]-azmedian[:,None])/azmedian[:,None]),axis=0)
print((azdev > 0.01).sum()) # Number of bad dishes. only allows a 1% deviation
print((np.asarray(azdev > 0.01).nonzero())[0]) # list of bad dishes
This check should apply both to az and el or ra/dec. I suggest checking the tracks and scans separately. Currently only elevation seems to be checked. One possibility for az:
d=katdal.open(' ....') d.select(corrprods='auto', scans='scan', strict=True) azmedian=(np.median(d.az, axis=1)) azdev=np.average(np.absolute((d.az[:,:]-azmedian[:,None])/azmedian[:,None]),axis=0) print((azdev > 0.01).sum()) # Number of bad dishes. only allows a 1% deviation print((np.asarray(azdev > 0.01).nonzero())[0]) # list of bad dishes