From 53579251a8abf7487adc26849f1beedd534b3702 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 4 Nov 2017 19:15:46 +0800 Subject: astro/ps2d.py: Add parameter description; remove unused pad_cube() --- astro/ps2d.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'astro/ps2d.py') 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. -- cgit v1.2.2