diff options
author | Aaron LI <aly@aaronly.me> | 2017-11-04 19:15:46 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-11-04 19:15:46 +0800 |
commit | 53579251a8abf7487adc26849f1beedd534b3702 (patch) | |
tree | 1b400aed0f1bfb977a4899c29cd71e41e3a19992 | |
parent | 2c004996fc004a683fd975a7765aa2e71967dc89 (diff) | |
download | atoolbox-53579251a8abf7487adc26849f1beedd534b3702.tar.bz2 |
astro/ps2d.py: Add parameter description; remove unused pad_cube()
-rwxr-xr-x | astro/ps2d.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/astro/ps2d.py b/astro/ps2d.py index ff762b6..4177d43 100755 --- a/astro/ps2d.py +++ b/astro/ps2d.py @@ -84,6 +84,23 @@ class PS2D: ---- * Cube dimensions: [nfreq, height, width] <-> [Z, Y, X] * Cube data unit: [K] (brightness temperature) + + Parameters + ---------- + cube : 3D `~numpy.ndarray` + 3D spectral cube of shape (nfreq, height, width) + pixelsize : float + cube image pixel size [arcsec] + frequencies : 1D `~numpy.ndarray` + frequencies at each image slice [MHz] + window_name : str, optional + if specified, taper the cube along the frequency axis using the + specified window. + window_width : str, optional + if ``extended`` then use the extended window instead. + unit : str, optional + unit of the cube data; will be used to determine the power spectrum + unit as well as the plot labels. """ def __init__(self, cube, pixelsize, frequencies, window_name=None, window_width="extended", unit="???"): @@ -140,14 +157,6 @@ class PS2D: logger.info("Generated window: %s (%s/%d)" % (name, width, width_pix)) return window - def pad_cube(self): - """ - Pad the image cube to be square in spatial dimensions. - """ - if self.Nx != self.Ny: - logger.info("Padding image to be square ...") - raise NotImplementedError - def calc_ps3d(self): """ Calculate the 3D power spectrum of the image cube. |