[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 5f914259: radial-profile: the central pixel al
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 5f914259: radial-profile: the central pixel always considered for azimuth mode |
Date: |
Sun, 23 Oct 2022 14:43:03 -0400 (EDT) |
branch: master
commit 5f9142596ab7aeb84b02d545652110cf3e2cdaae
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
radial-profile: the central pixel always considered for azimuth mode
Until now, in the radial profile script, when the user requested any
azimuthal range that didn't include the azimuthal angle of 360 degrees, the
central pixel would be ignored!
With this commit, the central pixel is always considered for any azimuthal
range.
This fixes bug #63261.
---
NEWS | 2 ++
bin/script/radial-profile.in | 13 ++++++++++++-
doc/gnuastro.texi | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index ed51e328..4296bbfc 100644
--- a/NEWS
+++ b/NEWS
@@ -318,6 +318,8 @@ See the end of the file for license conditions.
bug #63257: Fits program's '--skycoverage' gives unreasonable outputs
when image crosses the RA=0 hour circle. Found by Irene
Pintos Castro.
+ bug #63261: Radial profile script ignores central pixel in azimuthal
+ profiles. Found and fixed by Sepideh Eskandarlou.
diff --git a/bin/script/radial-profile.in b/bin/script/radial-profile.in
index 21f3efe2..75faf66a 100644
--- a/bin/script/radial-profile.in
+++ b/bin/script/radial-profile.in
@@ -630,6 +630,16 @@ if [ x"$azimuth" != x ]; then
# azimuthal range outside the two angles. In the example above, its
# the 10 degrees around the azimuthal angle 0. For this case, we
# should use 'or' between the two regions.
+ #
+ # - The central pixel contains all azimuth angles, it should
+ # therefore be included in azimthal ranges. By default MakeProfiles
+ # is forced to give it a single azimuth angle value, so without
+ # explicitly adding the central pixel to all azimuthal profiles, it
+ # the radius of 1 will be ignored in some azimuthal ranges and kept
+ # in others. But this is only because it is smaller than our
+ # sampling rate, in practice, the central pixel contains all
+ # azimuth angles. So when defining the 'arc', we are also adding
+ # 'radial 1 eq or' to add that central pixel.
condition=$(echo $azimuth_ini $azimuth_fin \
| awk ' {if ($1<$2) print "and"; \
else print "or"}')
@@ -637,7 +647,8 @@ if [ x"$azimuth" != x ]; then
$radialapertures -h1 set-radial \
$azimuthapertures -h1 set-azimuth \
azimuth $azimuth_ini ge \
- azimuth $azimuth_fin le $condition set-arc \
+ azimuth $azimuth_fin le $condition \
+ radial 1 eq or set-arc \
radial arc 1 uint8 ne 0 uint8 where
else
cd $tmpdir; ln -fs $radialaperturesbase $aperturesrawbase; cd $curdir
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index aee09899..1b4271aa 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -27938,6 +27938,7 @@ By default, it is @option{--positionangle=0}, which
means that the semi-major ax
@cindex Azimuthal range (radial profile)
Limit the profile to the given azimuthal angle range (two numbers given to
this option, in degrees, from 0 to 360) from the major axis (defined by
@option{--positionangle}).
The radial profile will therefore be created on a wedge-like shape, not the
full circle/ellipse.
+The pixel containing the center of the profile will always be included in the
profile (because it contains all azimuthal angles!).
If the first angle is @emph{smaller} than the second (for example,
@option{--azimuth=10,80}), the region between, or @emph{inside}, the two angles
will be used.
Otherwise (for example, @option{--azimuth=80,10}), the region @emph{outside}
the two angles will be used.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 5f914259: radial-profile: the central pixel always considered for azimuth mode,
Mohammad Akhlaghi <=