aboutsummaryrefslogtreecommitdiffstats
path: root/astro/oskar
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-09-13 01:02:58 +0800
committerAaron LI <aly@aaronly.me>2017-09-13 01:02:58 +0800
commitb4f24c498271c4520cd840b84aa29ecdc4ce907a (patch)
treec167f6e23dc3dd72c95870c90a02c15a04946839 /astro/oskar
parentb4a9a5a02de398afef98af76f81ff25b39113c46 (diff)
downloadatoolbox-b4f24c498271c4520cd840b84aa29ecdc4ce907a.tar.bz2
fits2skymodel.py: Show image size and FoV size
Diffstat (limited to 'astro/oskar')
-rwxr-xr-xastro/oskar/fits2skymodel.py21
1 files changed, 20 insertions, 1 deletions
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):