aboutsummaryrefslogtreecommitdiffstats
path: root/astro/ps2d.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-04 20:39:52 +0800
committerAaron LI <aly@aaronly.me>2017-11-04 20:39:52 +0800
commit30dad264ec305433dd661834addbb1e8b1345af8 (patch)
treee1223a4c2c969422264ba52773d3ca6291d7f2f6 /astro/ps2d.py
parent61eedee622e2f765ea14496d0158b4fed9be03be (diff)
downloadatoolbox-30dad264ec305433dd661834addbb1e8b1345af8.tar.bz2
Fix the wrong use of IQR (interquartile range)
Diffstat (limited to 'astro/ps2d.py')
-rwxr-xr-xastro/ps2d.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/astro/ps2d.py b/astro/ps2d.py
index 9009826..b5b76dc 100755
--- a/astro/ps2d.py
+++ b/astro/ps2d.py
@@ -98,7 +98,7 @@ class PS2D:
frequencies at each image slice [MHz]
meanstd : bool, optional
if ``True``, calculate the mean and standard deviation for each
- power bin instead of the median and 68% IQR.
+ power bin instead of the median and 68% percentile range.
unit : str, optional
unit of the cube data; will be used to determine the power spectrum
unit as well as the plot labels.
@@ -195,7 +195,7 @@ class PS2D:
-------
ps2d : 3D `~numpy.ndarray`
3D array of shape (3, n_k_los, n_k_perp) including the median
- and lower and upper errors (68% IQR) at each power bin.
+ and lower and upper errors (68% percentile range).
If ``self.meanstd=True`` then the mean and standard deviation
are calculated instead.
@@ -260,7 +260,7 @@ class PS2D:
title_err = "Error (standard deviation)"
else:
title = "2D Power Spectrum (median)"
- title_err = "Error (68% IQR)"
+ title_err = "Error (68% percentile range)"
# median/mean
mappable = ax.pcolormesh(x[1:], y[1:],
@@ -274,7 +274,7 @@ class PS2D:
cb = ax.figure.colorbar(mappable, ax=ax, pad=0.01, aspect=30)
cb.ax.set_xlabel(r"[%s$^2$ Mpc$^3$]" % self.unit)
- # error (68% IQR / standard deviation)
+ # error (68% percentile range / standard deviation)
error = 0.5 * (self.ps2d[1, :, :] + self.ps2d[2, :, :])
mappable = ax_err.pcolormesh(x[1:], y[1:],
np.log10(error[1:, 1:]),
@@ -453,7 +453,7 @@ class PS2D:
if self.meanstd:
hdr["AvgType"] = ("mean + standard deviation", "average type")
else:
- hdr["AvgType"] = ("median + 68% IQR", "average type")
+ hdr["AvgType"] = ("median + 68% percentile range", "average type")
hdr["WINDOW"] = (self.window_name, "window applied along LoS")
hdr["WinWidth"] = (self.window_width, "window width")
@@ -503,7 +503,7 @@ def main():
action="store_true",
help="calculate the mean and standard deviation " +
"for each averaged annulus instead of the median " +
- "16%% and 84%% percentiles (i.e., 68%% IQR)")
+ "16%% and 84%% percentiles (i.e., 68%% error)")
parser.add_argument("-P", "--plot", dest="plot",
action="store_true",
help="plot the 2D power spectrum and save")