aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xastro/fits/fitsimage.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/astro/fits/fitsimage.py b/astro/fits/fitsimage.py
index f49280a..95c9ed8 100755
--- a/astro/fits/fitsimage.py
+++ b/astro/fits/fitsimage.py
@@ -180,12 +180,17 @@ def show_info(filename, abs_=None, center=None):
rc, cc = rows//2, cols//2
cs1, cs2 = center//2, (center+1)//2
data = data[(rc-cs1):(rc+cs2), (cc-cs1):(cc+cs2)]
+ min_ = np.nanmin(data)
+ max_ = np.nanmax(data)
mean = np.nanmean(data)
median = np.nanmedian(data)
std = np.nanstd(data)
iqr = np.diff(np.nanpercentile(data, q=(25, 75)))
mad = np.nanmedian(np.abs(data - median))
rms = np.sqrt(np.nanmean(data**2))
+ print("min: %13.6e" % min_)
+ print("max: %13.6e" % max_)
+ print("range: %13.6e (max - min)" % (max_ - min_))
print("mean: %13.6e" % mean)
print("median: %13.6e" % median)
print("std: %13.6e (standard deviation)" % std)