gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 5a236622 21/69: PSF model: computing radial pr


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 5a236622 21/69: PSF model: computing radial profile up to the minimum possible value
Date: Wed, 26 Jan 2022 12:39:11 -0500 (EST)

branch: master
commit 5a23662260adb699aff50583965bc0e8a17ff5c8
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    PSF model: computing radial profile up to the minimum possible value
    
    Until this commit, when computing the flux factor, the radial profile was
    computed up to the maximum radius that fits in the cropped image. However,
    if the entire radial profile is not necessary, this is a waste of CPU time.
    
    With this commit, this inefficiency has been fixed by computing the radial
    profile up to a radius equal to the outer part of the normalization ring.
    If the user wants to obtain radial profile larger than this default value,
    it is possible by using the --rmax option.
---
 bin/script/psf-create-make-stamp.in | 4 ++--
 bin/script/psf-model-flux-factor.in | 8 ++++----
 doc/gnuastro.texi                   | 7 ++++---
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/bin/script/psf-create-make-stamp.in 
b/bin/script/psf-create-make-stamp.in
index f9f81096..fffbc293 100644
--- a/bin/script/psf-create-make-stamp.in
+++ b/bin/script/psf-create-make-stamp.in
@@ -476,8 +476,8 @@ if [ x"$normradiusmin" != x ] && [ x"$normradiusmax" != x 
]; then
     # centered on the center of the object, it is not necessary to give the
     # center coordinates. If the user specifies a maximum radius, use it.
     # Otherwise, compute the radial profile up to the outer part of the
-    # ring for the normalization +1 pixel (to not wast CPU time). If the
-    # user specifies sigma clip parameters, use them.
+    # ring for the normalization (to not wast CPU time). If the user
+    # specifies sigma clip parameters, use them.
     radialprofile=$tmpdir/rprofile-$objectid.fits
     if [ x"$rmax" != x ]; then maximumradius="--rmax=$rmax"
     else                       maximumradius="--rmax=$normradiusmax";
diff --git a/bin/script/psf-model-flux-factor.in 
b/bin/script/psf-model-flux-factor.in
index 962a4f0b..87a096d5 100644
--- a/bin/script/psf-model-flux-factor.in
+++ b/bin/script/psf-model-flux-factor.in
@@ -494,12 +494,12 @@ fi
 # Generate the radial profile of the stamp and the PSF, since it has been
 # already centered on the center of the object, it is not necessary to give
 # the center coordinates. If the user specifies a maximum radius, use it.
+# Otherwise, compute the radial profile up to the outer part of the ring
+# for the normalization (to not wast CPU time).
 radialprofile=$tmpdir/rprofile-$objectid.fits
 psfradialprofile=$tmpdir/rprofile-psf-$objectid.fits
-if [ x"$rmax" != x ]; then
-  maximumradius="--rmax=$rmax"
-else
-  maximumradius=""
+if [ x"$rmax" != x ]; then maximumradius="--rmax=$rmax"
+else                       maximumradius="--rmax=$normradiusmax";
 fi
 astscript-radial-profile $cropped_masked --hdu=1 $maximumradius \
                          --measure=$normop --output=$radialprofile $quiet
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 451a1109..b4118a5a 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -23914,9 +23914,10 @@ With this option, it is possible to control the size 
of the central region for c
 
 @item -R FLT
 @itemx --rmax=FLT
-Maximum radius (in pixels) for computing the radial profile.
-By default, the radial profile will be computed up to a radial distance equal 
to the maximum radius that fits into the stamp image.
-As a consequence, this option is only relevant for checking and testing that 
everything is fine.
+By default, the radial profile will be computed up to a radial distance equal 
to the outer radius of the normalization region (@option{--normradii}).
+If the user wants to compute larger radial profile it is possible with this 
option.
+Situations in which this option is necessary are those in which the user wants 
to check individual radial profiles to ensure everything is fine.
+To be able to check the radial profile use the option @option{--keeptmp} to 
not delete temporary files, see below.
 
 @item -N STR
 @itemx --normop=STR



reply via email to

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