From b4f24c498271c4520cd840b84aa29ecdc4ce907a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 13 Sep 2017 01:02:58 +0800 Subject: fits2skymodel.py: Show image size and FoV size --- astro/oskar/fits2skymodel.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'astro/oskar') diff --git a/astro/oskar/fits2skymodel.py b/astro/oskar/fits2skymodel.py index c610e21..4d2f847 100755 --- a/astro/oskar/fits2skymodel.py +++ b/astro/oskar/fits2skymodel.py @@ -78,7 +78,26 @@ class SkyModel: self.minvalue = minvalue self.mask = mask self.projection = projection - logger.info("SkyModel: Loaded image @ %.2f [MHz]" % freq) + logger.info("SkyModel: Loaded image @ %.2f [MHz], " % freq + + "%.1f [arcsec/pixel]" % pixelsize) + logger.info("Image size: %dx%d" % self.shape) + logger.info("FoV size: %.2fx%.2f [deg^2]" % self.fov) + + @property + def shape(self): + """ + FITS image (width, height) + """ + width, height = list(reversed(self.image.shape))[:2] + return (width, height) + + @property + def fov(self): + """ + FITS image FoV size: (width, height) [deg] + """ + width, height = self.shape + return (width*self.pixelsize/3600, height*self.pixelsize/3600) @property def wcs(self): -- cgit v1.2.2