diff options
-rw-r--r-- | fg21sim/sky.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fg21sim/sky.py b/fg21sim/sky.py index 08ca0df..8f15ca8 100644 --- a/fg21sim/sky.py +++ b/fg21sim/sky.py @@ -87,6 +87,19 @@ class SkyPatch: self.read(infile, frequency) @property + def area(self): + """ + The sky coverage of this patch [ deg^2 ] + + XXX/FIXME + --------- + Consider the spherical coordination and WCS sky projection!! + """ + ps = self.pixelsize / 60.0 # [ deg ] + size = self.xsize * self.ysize + return size * ps**2 + + @property def size(self): return (self.xsize, self.ysize) @@ -283,6 +296,14 @@ class SkyHealpix: self.read(infile, frequency) @property + def area(self): + """ + The sky coverage of this HEALPix map, i.e., all sky, + unit [ deg^2 ] + """ + return 4*np.pi * np.rad2deg(1)**2 + + @property def shape(self): if self.data is not None: return self.data.shape |