[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}.
- [gnuastro-commits] master b5262f34 26/69: PSF stamp: rmax option was redundant, (continued)
- [gnuastro-commits] master b5262f34 26/69: PSF stamp: rmax option was redundant, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 03bc1e69 22/69: PSF model: using PSF radial profile as input for flux factor computation, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master df256000 35/69: PSF select-stars: Add 'astscript-psf-create-select-stars' section to the, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 117fd766 24/69: PSF select stars: new script for selecting stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5d9a6d9b 50/69: PSF select-stars: make check steps done again because some new option are added, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 1e0cc1a0 43/69: PSF select-stars: changing default values to not crash in make check, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ca8fc03a 55/69: PSF scripts: getting proper NAXIS values when data is compressed as .fz, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5eac0cea 40/69: Book: polishing the description of the PSF select-stars script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master d99fc9df 60/69: PSF select-stars: add new option for selecting more bright stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 69a2e6ee 54/69: Book: correct some comments in the psf-create-select-stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f42832f8 23/69: PSF stamp: allowingto use a position angle and axis ratio,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 2894b35a 32/69: PSF model: including the make check step for two PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master aae0d156 64/69: PSF tutorial: running of Segment on saturated images added, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5fdd3a4a 31/69: PSF create: including the make check step for two PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master d6e6f9da 47/69: PSF flux-factor: correct the indentation, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 809be22b 67/69: Book: PSF construction tutorial, completed until the outer part, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 2b0b6294 56/69: PSF scripts: fixed two FAILS during make checks, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f2a74d83 30/69: Book: fixing references and labels for the PSF scripts information, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master cf6335a6 18/69: PSF stamp: enabling the use of sigma-clip parameters, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 00b08df2 28/69: PSF stamp: add --saturation option for masking the saturated pixels, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 2718494e 19/69: PSF stamp: allowing to run the script without making normalization, Mohammad Akhlaghi, 2022/01/26