gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master f42832f8 23/69: PSF stamp: allowingto use a po


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master f42832f8 23/69: PSF stamp: allowingto use a position angle and axis ratio
Date: Wed, 26 Jan 2022 12:39:11 -0500 (EST)

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

    PSF stamp: allowingto use a position angle and axis ratio
    
    Until this commit, when creating the stamps for the PSF, it was not
    possible to use a given position angle nor axis ratio than the default
    ones. So, the normalization was done on circulary symmetric apertures.
    However, it is a good feature to allow changing the axis ratio and position
    angle (for example, if the PSF is not circulary symmetric).
    
    With this commit, this new feature have been added. Now the user is able to
    specify a position angle and axis ratio for obtaining the radial profiles
    and the normalization in a more flexible way.
---
 bin/script/psf-create-make-stamp.in | 12 ++++++++++++
 doc/gnuastro.texi                   | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/bin/script/psf-create-make-stamp.in 
b/bin/script/psf-create-make-stamp.in
index fffbc293..ea6c51d0 100644
--- a/bin/script/psf-create-make-stamp.in
+++ b/bin/script/psf-create-make-stamp.in
@@ -47,11 +47,13 @@ keeptmp=0
 maskhdu=1
 output=""
 tmpdir=""
+axisratio=1
 corewidth=""
 normradii=""
 sigmaclip=""
 stampwidth=""
 normop="median"
+positionangle=0
 version=@VERSION@
 scriptname=@SCRIPT_NAME@
 
@@ -102,6 +104,8 @@ $scriptname options:
   -R, --rmax=FLT          Maximum radius for the radial profile (in pixels).
   -N, --normop=STR        Operator for computing the normalization value
                           (mean, sigclip-mean, etc.).
+  -Q, --axisratio=FLT     Axis ratio for ellipse maskprofile (A/B).
+  -p, --positionangle=FLT Position angle for ellipse mask profile.
   -s, --sigmaclip=FLT,FLT Sigma-clip multiple and tolerance.
 
  Output:
@@ -228,6 +232,12 @@ do
         -s|--sigmaclip)      sigmaclip="$2";                            
check_v "$1" "$sigmaclip";  shift;shift;;
         -s=*|--sigmaclip=*)  sigmaclip="${1#*=}";                       
check_v "$1" "$sigmaclip";  shift;;
         -s*)                 sigmaclip=$(echo "$1"  | sed -e's/-s//');  
check_v "$1" "$sigmaclip";  shift;;
+        -Q|--axisratio)      axisratio="$2";                            
check_v "$1" "$axisratio";  shift;shift;;
+        -Q=*|--axisratio=*)  axisratio="${1#*=}";                       
check_v "$1" "$axisratio";  shift;;
+        -Q*)                 axisratio=$(echo "$1"  | sed -e's/-Q//');  
check_v "$1" "$axisratio";  shift;;
+        -p|--positionangle)     positionangle="$2";                            
check_v "$1" "$positionangle";  shift;shift;;
+        -p=*|--positionangle=*) positionangle="${1#*=}";                       
check_v "$1" "$positionangle";  shift;;
+        -p*)                    positionangle=$(echo "$1"  | sed -e's/-p//');  
check_v "$1" "$positionangle";  shift;;
 
 
         # Output parameters
@@ -487,6 +497,8 @@ if [ x"$normradiusmin" != x ] && [ x"$normradiusmax" != x 
]; then
     fi
     astscript-radial-profile $cropped_masked --hdu=1 $maximumradius \
                              --measure=$normop $finalsigmaclip \
+                             --positionangle=$positionangle \
+                             --axisratio=$axisratio \
                              --output=$radialprofile $quiet
 
     # The normalization value is computed from the radial profile in between
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 905b903a..ac251feb 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -23159,7 +23159,7 @@ This parameter is used as the option @option{--qcol} in 
the generation of the ap
 @item -p FLT
 @itemx --positionangle=FLT
 The position angle (in degrees) of the profiles relative to the first FITS 
axis (horizontal when viewed in SAO DS9).
-By default, it is @option{--pangle=0}, which means that the semi-major axis of 
the profiles will be parallel to the first FITS axis.
+By default, it is @option{--positionangle=0}, which means that the semi-major 
axis of the profiles will be parallel to the first FITS axis.
 
 @item -m STR
 @itemx --measure=STR
@@ -23668,6 +23668,18 @@ The operator given to this option will be directly 
passed to the radial profile
 As a consequence, all MakeCatalog measurements (median, mean, sigclip-mean, 
sigclip-number, etc.) can be used here.
 For a full list of MakeCatalog's measurements, please run 
@command{astmkcatalog --help}.
 
+@item -Q FLT
+@itemx --axisratio=FLT
+The axis ratio of the radial profiles for computing the normalization value.
+By default (when this option isn't given), the radial profile will be circular 
(axis ratio of 1).
+This parameter is used directly in the @file{astscript-radial-profile} script.
+
+@item -p FLT
+@itemx --positionangle=FLT
+The position angle (in degrees) of the profiles relative to the first FITS 
axis (horizontal when viewed in SAO DS9).
+By default, it is @option{--positionangle=0}, which means that the semi-major 
axis of the profiles will be parallel to the first FITS axis.
+This parameter is used directly in the @file{astscript-radial-profile} script.
+
 @item -s FLT,FLT
 @itemx --sigmaclip=FLT,FLT
 Sigma clipping parameters: only relevant if sigma-clipping operators are 
requested by @option{--normop}.



reply via email to

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