gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master de1b645b 20/69: PSF stamp: computing radial pr


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

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

    PSF stamp: computing radial profile up to the minimum possible value
    
    Until this commit, when creating the stamps of for constructing the PSF,
    the radial profile was computed up to the maximum possible value. In
    principle I thought it was not a problem since the stamps are allways
    smaller than the original image. However, when trying to compute an
    extended PSF, the size of the individual stamps could be considerable
    large. And consequently, computing the entire radial profile is a waste of
    CPU time (the radial profile is only necessary for making the
    normalization). 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. Since the radial profile is computed for the
    normalization, it is not necessary to obtain larger radial profile than
    this. However, if the user wants to obtain radial profile larger than this
    default value, it is possible by using the --rmax option. Possible
    situations are those in which the user want to have a look and check
    individual radial profiles of all star stamps.
---
 bin/script/psf-create-make-stamp.in | 8 +++++---
 doc/gnuastro.texi                   | 5 ++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/bin/script/psf-create-make-stamp.in 
b/bin/script/psf-create-make-stamp.in
index f7208b2d..f9f81096 100644
--- a/bin/script/psf-create-make-stamp.in
+++ b/bin/script/psf-create-make-stamp.in
@@ -474,11 +474,13 @@ fi
 if [ x"$normradiusmin" != x ] && [ x"$normradiusmax" != x ]; then
     # Generate the radial profile of the stamp, 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. If
-    # the user specifies sigma clip parameters, use them.
+    # 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.
     radialprofile=$tmpdir/rprofile-$objectid.fits
     if [ x"$rmax" != x ]; then maximumradius="--rmax=$rmax"
-    else                       maximumradius=""
+    else                       maximumradius="--rmax=$normradiusmax";
     fi
     if [ x"$sigmaclip" = x ]; then finalsigmaclip=""
     else                           finalsigmaclip="--sigmaclip=$sigmaclip";
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 63af1536..451a1109 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -23656,7 +23656,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.
+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]