gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 337e46d 18/32: The half-light radii


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 337e46d 18/32: The half-light radii
Date: Wed, 24 Feb 2021 22:36:18 -0500 (EST)

branch: master
commit 337e46d2cca6c26a55e7e6db1f097a5c8525030f
Author: Zahra Sharbaf <zahra.sharbaf2@gmail.com>
Commit: Zahra Sharbaf <zahra.sharbaf2@gmail.com>

    The half-light radii
    
    With this commit, the half-light radius has been calculated. Half-light
    radius Re encloses half of the total light emitted by an object.
---
 bin/script/radial-profile.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bin/script/radial-profile.in b/bin/script/radial-profile.in
index 4d49c2f..1ab9210 100644
--- a/bin/script/radial-profile.in
+++ b/bin/script/radial-profile.in
@@ -448,6 +448,14 @@ asttable $bprofile \
 cat $aprofile | asttable -o$output
 
 
+# Calculate the Half-Light Radii
+#
+# The half-light or 'effective' radius as the radius within which half of
+# the object's luminosity is contained.
+halfoflight=$(asttable $output | awk '{if(max<$2){max=$2}}END{print max/2}')
+radius=$(asttable $output \
+           | awk '{if('$(echo $halfoflight)'<=$2){line=$1;light=$2}}END{print 
line}')
+echo "Half-Light-Radii: $radius pixels from the center of the object"
 
 
 # Remove temporal files



reply via email to

[Prev in Thread] Current Thread [Next in Thread]