From 7b47d3c31a3d50dc597f4e99c83c995d51d8a630 Mon Sep 17 00:00:00 2001 From: Yuedong Fang Date: Fri, 4 Oct 2024 16:29:24 -0400 Subject: [PATCH] make DATE-OBS format match the FITS(ISO) standard --- roman_imsim/sca.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roman_imsim/sca.py b/roman_imsim/sca.py index 73b61461..98d796ac 100644 --- a/roman_imsim/sca.py +++ b/roman_imsim/sca.py @@ -128,14 +128,14 @@ def buildImage(self, config, base, image_num, obj_num, logger): full_image.header = galsim.FitsHeader() full_image.header['EXPTIME'] = self.exptime full_image.header['MJD-OBS'] = self.mjd - full_image.header['DATE-OBS'] = str(Time(self.mjd,format='mjd').datetime) + full_image.header['DATE-OBS'] = str(Time(self.mjd,format='mjd').datetime.isoformat()) full_image.header['FILTER'] = self.filter full_image.header['ZPTMAG'] = 2.5*np.log10(self.exptime*roman.collecting_area) base['current_image'] = full_image if 'image_pos' in config and 'world_pos' in config: - raise GalSimConfigValueError( + raise galsim.GalSimConfigValueError( "Both image_pos and world_pos specified for Scattered image.", (config['image_pos'], config['world_pos']))