diff --git a/scripts/miriad_to_uvfits.py b/scripts/miriad_to_uvfits.py index 19369c58ae..2d558a0f00 100644 --- a/scripts/miriad_to_uvfits.py +++ b/scripts/miriad_to_uvfits.py @@ -40,16 +40,17 @@ UV = pyuvdata.UVData() UV.read_miriad(filename) - # phase data - if args.phase_time is not None: - UV.phase_to_time(Time(args.phase_time, format='jd', scale='utc')) - if args.verbose: - print("phasing {} to time {}".format(filename, args.phase_time)) - - else: - UV.phase_to_time(Time(UV.time_array[0], format='jd', scale='utc')) - if args.verbose: - print("phasing {} to time {}".format(filename, UV.time_array[0])) + if UV.phase_type == 'drift': + # phase data + if args.phase_time is not None: + UV.phase_to_time(Time(args.phase_time, format='jd', scale='utc')) + if args.verbose: + print("phasing {} to time {}".format(filename, args.phase_time)) + + else: + UV.phase_to_time(Time(UV.time_array[0], format='jd', scale='utc')) + if args.verbose: + print("phasing {} to time {}".format(filename, UV.time_array[0])) # write data UV.history += history