gnuastro-devel
[Top][All Lists]
Advanced

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

[sr #110541] astcrop -width not matching output


From: Mohammad Akhlaghi
Subject: [sr #110541] astcrop -width not matching output
Date: Fri, 17 Sep 2021 09:35:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

Update of sr #110541 (project gnuastro):

                  Status:                    None => Done                   
             Assigned to:                    None => makhlaghi              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for reporting this Alex.

When you specify a '--center' coordinate (with a certain '--width') the output
will always be an odd-sided image, it is also explained in the manual (see the
description of '--width'):

https://www.gnu.org/software/gnuastro/manual/html_node/Crop-options.html

The basic reason for this is that your given coordinate will ultimately fall
within a discrete pixel in the image (defined by the FITS standard). When the
crop has an odd number of pixels in each dimension, that pixel can be very
well defined as the "central" pixel of the crop (hence the '--center').
However, for an even-sided crop, it will be very hard to identify the "center"
(it can be on any edge of the four central pixels!).

The lower-level '--section' option can be used to crop an even-sided crop
(because it doesn't assume a high-level center). There is an example in the
description of '--width' (in the link above) on how to use '--section' in a
second call, to make it even-sided.

I thought a lot about this back when I was implementing this feature and
although it also causes such confusions, this was the least confusing solution
I could find! The alternative (where people didn't know where their central
coordinate is located) is generally more confusing.

But if you have any suggestions on how to fix this problem for an even-sided
crop, feel free to share your thoughts, I am sure there may be a good solution
;-).

Hopefully this address the problem, so I am closing this ticket, but if you
have any suggestions, feel free to continue sending them here.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110541>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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