@@ -398,3 +398,41 @@ def test_ms_dterm_warning(sma_pcal, tmp_path):
398398 match = "CASA MSCal tables store cross-handed Jones terms as leakages " ,
399399 ):
400400 sma_pcal .write_ms_cal (testfile , clobber = True )
401+
402+
403+ def test_ms_close_spaced_times (tmp_path ):
404+
405+ uvobj = UVCal ()
406+ testfile = fetch_data ("sma_pha_gcal" )
407+ with check_warnings (UserWarning , match = sma_warnings ):
408+ uvobj .read (testfile )
409+
410+ use_times = np .array (
411+ [
412+ np .float64 (5274914431.899564 ),
413+ np .float64 (5274914431.880366 ),
414+ np .float64 (5274914431.878805 ),
415+ np .float64 (5274914431.883291 ),
416+ np .float64 (5274914431.885088 ),
417+ np .float64 (5274914431.883654 ),
418+ np .float64 (5274914431.882857 ),
419+ np .float64 (5274914431.880334 ),
420+ np .float64 (5274914431.880322 ),
421+ np .float64 (5274914431.883885 ),
422+ np .float64 (5274914431.8886795 ),
423+ np .float64 (5274914431.876619 ),
424+ np .float64 (5274914431.883705 ),
425+ np .float64 (5274914431.886172 ),
426+ np .float64 (5274914431.880832 ),
427+ np .float64 (5274914431.881411 ),
428+ ]
429+ )
430+ use_times = (use_times / 86400.0 ) + 2400000.5 # Convert to jd
431+ uvobj .time_array [: len (use_times )] = use_times
432+ uvobj .set_lsts_from_time_array ()
433+ uvobj .select (times = use_times , inplace = True )
434+
435+ testfile_newtimes = os .path .join (tmp_path , "close_spaced_times.ms" )
436+ uvobj .write_ms_cal (testfile_newtimes , clobber = True )
437+ uvobj_new = UVCal ()
438+ uvobj_new .read (testfile_newtimes )
0 commit comments