diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-25 11:36:46 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-25 11:36:46 +0800 |
commit | 65a54acbe7c2fdf5666f80d6145097aa35296379 (patch) | |
tree | a1ceba38a2f34180ed222520f7a02535a12a3ea2 | |
parent | 1f47be26bb4d33daabf97b4726684f3df52ba74b (diff) | |
download | atoolbox-65a54acbe7c2fdf5666f80d6145097aa35296379.tar.bz2 |
ps2d.py: Use [arcsec] for pixel size
-rwxr-xr-x | astro/ps2d.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/astro/ps2d.py b/astro/ps2d.py index d3d988b..3d20720 100755 --- a/astro/ps2d.py +++ b/astro/ps2d.py @@ -60,8 +60,8 @@ class PS2D: window_name=None, window_width="extended"): logger.info("Initializing PS2D instance ...") self.cube = cube - self.pixelsize = pixelsize # [arcmin] - logger.info("Image pixel size: %.2f [arcmin]" % pixelsize) + self.pixelsize = pixelsize # [arcsec] + logger.info("Image pixel size: %.2f [arcsec]" % pixelsize) self.frequencies = np.array(frequencies) # [MHz] self.nfreq = len(self.frequencies) # Central frequency and redshift @@ -167,7 +167,7 @@ class PS2D: @property def k_xy(self): __, ny, nx = self.cube.shape - dxy = self.DMz * np.deg2rad(self.pixelsize / 60.0) # [Mpc] + dxy = self.DMz * np.deg2rad(self.pixelsize / 3600.0) # [Mpc] kx = 2*np.pi * fftpack.fftshift(fftpack.fftfreq(nx, dxy)) ky = 2*np.pi * fftpack.fftshift(fftpack.fftfreq(ny, dxy)) return (kx, ky) # [Mpc^-1] @@ -255,7 +255,7 @@ def main(): help="overwrite existing file") parser.add_argument("-p", "--pixelsize", dest="pixelsize", type=float, required=True, - help="image cube pixel size; unit: [arcmin]") + help="image cube pixel size; unit: [arcsec]") parser.add_argument("--window", dest="window", choices=["nuttall"], help="apply window along frequency axis " + |