From 27c5539ea6228c2116b619098b8c1c0847b65dba Mon Sep 17 00:00:00 2001 From: Michael Coughlin Date: Sat, 27 Apr 2024 17:40:17 -0500 Subject: [PATCH] further optimization --- gwemopt/segments.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gwemopt/segments.py b/gwemopt/segments.py index cf90cdd..d82d210 100644 --- a/gwemopt/segments.py +++ b/gwemopt/segments.py @@ -236,13 +236,7 @@ def get_segments_tile(config_struct, radec, segmentlist, moon_radecs, airmass): date_set = ephem.Date(0.0) break - astropy_rise = Time(date_rise.datetime(), scale="utc") - astropy_set = Time(date_set.datetime(), scale="utc") - - astropy_rise_mjd = astropy_rise.mjd - astropy_set_mjd = astropy_set.mjd - - segment = segments.segment(astropy_rise_mjd, astropy_set_mjd) + segment = segments.segment(date_rise + MJD_TO_DJD, date_set + MJD_TO_DJD) tilesegmentlist = tilesegmentlist + segments.segmentlist([segment]) tilesegmentlist.coalesce()