Skip to content

Commit

Permalink
updates to miriad_to_uvfits.py given recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern authored and bhazelton committed Jul 24, 2018
1 parent 46cda2f commit 32bf553
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/miriad_to_uvfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import sys
import os
import pyuvdata
from astropy.time import Time

# setup argparse
a = argparse.ArgumentParser(description="A command-line script for converting a Miriad file to UVFITS format.")
Expand All @@ -37,16 +38,16 @@

# read in file
UV = pyuvdata.UVData()
UV.read_miriad(filename, 'miriad')
UV.read_miriad(filename)

# phase data
if args.phase_time is not None:
UV.phase_to_time(args.phase_time)
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(UV.time_array[0])
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]))

Expand Down

0 comments on commit 32bf553

Please sign in to comment.