Skip to content

Commit 65953f8

Browse files
nkernbhazelton
authored andcommitted
check phsae_type == drift in miriad_to_uvfits.py before phasing
1 parent 32bf553 commit 65953f8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

scripts/miriad_to_uvfits.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,17 @@
4040
UV = pyuvdata.UVData()
4141
UV.read_miriad(filename)
4242

43-
# phase data
44-
if args.phase_time is not None:
45-
UV.phase_to_time(Time(args.phase_time, format='jd', scale='utc'))
46-
if args.verbose:
47-
print("phasing {} to time {}".format(filename, args.phase_time))
48-
49-
else:
50-
UV.phase_to_time(Time(UV.time_array[0], format='jd', scale='utc'))
51-
if args.verbose:
52-
print("phasing {} to time {}".format(filename, UV.time_array[0]))
43+
if UV.phase_type == 'drift':
44+
# phase data
45+
if args.phase_time is not None:
46+
UV.phase_to_time(Time(args.phase_time, format='jd', scale='utc'))
47+
if args.verbose:
48+
print("phasing {} to time {}".format(filename, args.phase_time))
49+
50+
else:
51+
UV.phase_to_time(Time(UV.time_array[0], format='jd', scale='utc'))
52+
if args.verbose:
53+
print("phasing {} to time {}".format(filename, UV.time_array[0]))
5354

5455
# write data
5556
UV.history += history

0 commit comments

Comments
 (0)