gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [task #14363] Change the default behaviour of --scale i


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp
Date: Thu, 9 Feb 2017 13:24:33 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Follow-up Comment #3, task #14363 (project gnuastro):

Thanks for the explanation. I am happy that you agree to having a secondary
option for he higher-level suggestion you made.

Generally, the main thing you are not considering is that unlike GIMP, in
astronomy the WCS information (resolution) is the defining factor of a
dataset, not the number of pixels. Let me give you one example:

In your own example, suppose your input 8x1 image is from telescope+camera A.
Also, suppose you also have another image from telescope+camera B which has
1/3 the resolution of the telescope+camera A. And you want to find the color
of your target. If `--scale' behaved as you suggested, it would be impossible
to correctly scale the two to one grid. The best you could do is scale A by
1/2.6666, not 1/3.

Would you do science (for example measure the colors) with two images that
have a different resolutions? (even though the pixel sizes are the same)

The pixel numbers are irrelevant for science, what defines our data (connects
it to the outside world) is the WCS (which is continues). In any deep survey
(where multiple images are warped then added with each other), the edges
become very inaccurate, both because of such processing issues and also
because their depth (exposure time) will not be as much as the inner regions.
So there is no harm in loosing accuracy on the pixel immediately touching the
edge! The edges are NOT going to be used for science any way. The important
thing is that the main body of the image (inner to the immediate edge) are
accurate (and can be warped to ANY grid).

Just on the side, when I say we work on a continues grid, it doesn't mean that
for example we fit the pixel values to some continues mathematical function,
do the warping and then convert them back into a discrete pixel as you
described! I mean that the output pixel area is mapped onto the input image
(using the inverse of the input warping matrix) and the fractional area/value
of the input pixels that overlap with it is used to calculate the output pixel
value. So the output pixels are assumed to be discrete from the very
beginning. What is continues is the transformation matrix space. You are
suggesting to have a discrete transformation space, where some transformations
would be impossible. 

Every step in the source code of ImageWarp (and all Gnuastro generally, is
heavily commented), you don't have to know C or even read the code to see what
is going on. You can understand each step of any program/library exactly by
following the functions and reading the comments. I have described the main
source files of each program in the Mandatory source code files
<https://www.gnu.org/software/gnuastro/manual/html_node/Mandatory-source-code-files.html>
section of the manual.

The manual is only the tip of the ice-burg! There is much more explanation on
the details of each operation in the comments of the code ;-)! This is the
foundation principle
<https://www.gnu.org/software/gnuastro/manual/html_node/Science-and-its-tools.html>
of Gnuastro.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?14363>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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