Skip to content

Commit

Permalink
check phsae_type == drift in miriad_to_uvfits.py before phasing
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern authored and bhazelton committed Jul 24, 2018
1 parent 32bf553 commit 65953f8
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions scripts/miriad_to_uvfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65953f8

Please sign in to comment.