From aeab152beebbad85217794200a236b4ace281bb7 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Thu, 29 Aug 2024 14:06:10 +0200 Subject: [PATCH] Simplify jday computation --- pygac/reader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pygac/reader.py b/pygac/reader.py index c769892..3a58218 100644 --- a/pygac/reader.py +++ b/pygac/reader.py @@ -516,8 +516,7 @@ def get_sun_earth_distance_correction(self): """Get the julian day and the sun-earth distance correction.""" self.get_times() # Shouldn't we use the start time from the header if available? - start_time = self._times_as_np_datetime64[0] - jday = (start_time - start_time.astype("datetime64[Y]")).astype("timedelta64[D]").astype(int) + 1 + jday = self._times[0].timetuple().tm_yday return calculate_sun_earth_distance_correction(jday) def update_meta_data(self):