File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ - Fixed missing MJD to hours conversion in ungridded uv plot times
Original file line number Diff line number Diff line change 44import matplotlib
55import matplotlib .pyplot as plt
66import numpy as np
7+ from astropy .time import Time
78
89__all__ = ["plot_ungridded_uv" , "plot_dirty_image" , "plot_mask" ]
910
@@ -217,12 +218,17 @@ def plot_ungridded_uv(
217218 "The given mode does not exist! Valid modes are: wave, meter."
218219 )
219220
220- times = np .tile (gridder .times .mjd , reps = 2 ) if show_times else None
221+ times = Time (
222+ np .tile (gridder .times .mjd , reps = 2 ) if show_times else None , format = "mjd"
223+ )
221224 time_unit = "MJD"
222225
223226 if use_relative_time and show_times :
224- times -= times [0 ] * 24
227+ times = [time .unix / 3600 for time in times ]
228+ times -= times [0 ]
225229 time_unit = "h"
230+ elif not use_relative_time and show_times :
231+ times = times .value
226232
227233 scat = ax .scatter (
228234 x = np .append (- u , u ),
You can’t perform that action at this time.
0 commit comments