gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master c0b38ba0 1/2: Book: corrected demos of gal_fit


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master c0b38ba0 1/2: Book: corrected demos of gal_fits_img_read_to_type
Date: Thu, 26 Oct 2023 19:40:35 -0400 (EDT)

branch: master
commit c0b38ba0246778a2878392d8377be6ff2208e1bd
Author: Faezeh Bidjarchian <fbidjarchian@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Book: corrected demos of gal_fits_img_read_to_type
    
    Until now, the 'gal_fits_img_read_to_type' function examples didn't include
    the recently added 'hdu_option_name'. This function has been used in some
    of the programs in the library demo and it was necessary to correct this.
    
    With this commit, this parameter has been added to this function available
    in the library demo programs. Furthermore, some incorrectly written
    "deconvolution" words were corrected in other parts of the text.
---
 doc/gnuastro.texi | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 70b127c6..3bd764b0 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -1085,7 +1085,7 @@ Optionally, it is also possible to add vector graphics 
markers over the output i
 
 @item Convolve
 (@file{astconvolve}, see @ref{Convolve}) Convolve (blur or smooth) data with a 
given kernel in spatial and frequency domain on multiple threads.
-Convolve can also do de-convolution to find the appropriate kernel to 
PSF-match two images.
+Convolve can also do deconvolution to find the appropriate kernel to PSF-match 
two images.
 
 @item CosmicCalculator
 (@file{astcosmiccal}, see @ref{CosmicCalculator}) Do cosmological 
calculations, for example, the luminosity distance, distance modulus, comoving 
volume and many more.
@@ -23283,13 +23283,13 @@ We can therefore re-write the two equations above 
formally as the convolution th
 }
 
 Besides its usefulness in blurring an image by convolving it with a given 
kernel, the convolution theorem also enables us to do another very useful 
operation in data analysis: to match the blur (or PSF) between two images taken 
with different telescopes/cameras or under different atmospheric conditions.
-This process is also known as de-convolution.
+This process is also known as deconvolution.
 Let's take @mymath{f(l)} as the image with a narrower PSF (less blurry) and 
@mymath{c(l)} as the image with a wider PSF which appears more blurred.
 Also let's take @mymath{h(l)} to represent the kernel that should be convolved 
with the sharper image to create the more blurry image.
 Above, we proved the relation between these three images through the 
convolution theorem.
 But there, we assumed that @mymath{f(l)} and @mymath{h(l)} are known (given) 
and the convolved image is desired.
 
-In de-convolution, we have @mymath{f(l)} --the sharper image-- and 
@mymath{f*h(l)} --the more blurry image-- and we want to find the kernel 
@mymath{h(l)}.
+In deconvolution, we have @mymath{f(l)} --the sharper image-- and 
@mymath{f*h(l)} --the more blurry image-- and we want to find the kernel 
@mymath{h(l)}.
 The solution is a direct result of the convolution theorem:
 
 @dispmath{
@@ -23312,7 +23312,7 @@ If there is significant noise in the image, then the 
high frequencies of the noi
 
 @end itemize
 
-A standard solution to both these problems is the Weiner de-convolution
+A standard solution to both these problems is the Weiner deconvolution
 algorithm@footnote{@url{https://en.wikipedia.org/wiki/Wiener_deconvolution}}.
 
 @node Sampling theorem, Discrete Fourier transform, Convolution theorem, 
Frequency domain and Fourier operations
@@ -23777,7 +23777,7 @@ This will certainly slightly degrade the result, 
however, it is necessary.
 If there are multiple good stars, you can shift all of them, then normalize 
them (so the sum of each star's pixels is one) and then take their average to 
decrease this effect.
 
 @item
-The shifting might move the center of the star by one pixel in any direction, 
so crop the central pixel of the warped image to have a clean image for the 
de-convolution.
+The shifting might move the center of the star by one pixel in any direction, 
so crop the central pixel of the warped image to have a clean image for the 
deconvolution.
 @end itemize
 
 
@@ -30777,9 +30777,9 @@ In such cases, with this option, the final profile will 
be built such that its p
 
 @cartouche
 @strong{CAUTION:} If you want to use this option for comparing with 
observations, please note that MakeProfiles does not do convolution.
-Unless you have de-convolved your data, your images are convolved with the 
instrument and atmospheric PSF, see @ref{PSF}.
+Unless you have deconvolved your data, your images are convolved with the 
instrument and atmospheric PSF, see @ref{PSF}.
 Particularly in sharper profiles, the flux in the peak pixel is strongly 
decreased after convolution.
-Also note that in such cases, besides de-convolution, you will have to set 
@option{--oversample=1} otherwise after resampling your profile with Warp (see 
@ref{Warp}), the peak flux will be different.
+Also note that in such cases, besides deconvolution, you will have to set 
@option{--oversample=1} otherwise after resampling your profile with Warp (see 
@ref{Warp}), the peak flux will be different.
 @end cartouche
 
 @item --customtable FITS/TXT
@@ -41415,7 +41415,7 @@ Convolution is a very common operation during data 
analysis and is thoroughly de
 Because of the complete introduction that was presented there, we will 
directly skip onto the currently available convolution functions in Gnuastro's 
library.
 
 As of this version, only spatial domain convolution is available in Gnuastro's 
libraries.
-We have not had the time to liberate the frequency domain function convolution 
and de-convolution functions that are available in the Convolve 
program@footnote{Hence any help would be greatly appreciated.}.
+We have not had the time to liberate the frequency domain function convolution 
and deconvolution functions that are available in the Convolve 
program@footnote{Hence any help would be greatly appreciated.}.
 
 @deftypefun {gal_data_t *} gal_convolve_spatial (gal_data_t @code{*tiles}, 
gal_data_t @code{*kernel}, size_t @code{numthreads}, int @code{edgecorrection}, 
int @code{convoverch}, int @code{conv_on_blank})
 Convolve the given @code{tiles} dataset (possibly a list of tiles, see 
@ref{List of gal_data_t} and @ref{Tessellation library}) with @code{kernel} on 
@code{numthreads} threads.
@@ -42613,7 +42613,7 @@ main(void)
 
   /* Read `img.fits' (HDU: 1) as a float32 array. */
   image=gal_fits_img_read_to_type(filename, hdu, GAL_TYPE_FLOAT32,
-                                  -1, 1);
+                                  -1, 1, "NULL");
 
 
   /* Use the allocated space as a single precision floating
@@ -42687,7 +42687,8 @@ main(void)
   float *array;
   size_t i, num, *dinc;
   gal_data_t *input=gal_fits_img_read_to_type("input.fits", "1",
-                                              GAL_TYPE_FLOAT32, -1, 1);
+                                              GAL_TYPE_FLOAT32, -1, 1,
+                                              "NULL");
 
   /* To avoid the `void *' pointer and have `dinc'. */
   array=input->array;
@@ -42842,7 +42843,7 @@ main(void)
 
   /* Read the image into memory as a float32 data type. */
   p.image=gal_fits_img_read_to_type(filename, hdu, GAL_TYPE_FLOAT32,
-                                    minmapsize, quietmmap);
+                                    minmapsize, quietmmap, "NULL");
 
 
   /* Print some basic information before the actual contents: */



reply via email to

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