[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 50fd424f 66/69: PSF tutorial: adding informati
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 50fd424f 66/69: PSF tutorial: adding information to choose proper --normradii values |
Date: |
Wed, 26 Jan 2022 12:39:17 -0500 (EST) |
branch: master
commit 50fd424f9a5d5c1f8379e93cb3898520d6fdb8d5
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF tutorial: adding information to choose proper --normradii values
Until this commit, the selection of the normalization radii were not
explained properly. In the Gnuastro book I only set the values without any
explanation at all. This is bad since the user (specially the new users)
don't know actually why I am choosing these values.
With this commit, the missing information has been added. Now the book has
several paragraphs and detailed steps for finding the proper normalization
radii.
---
doc/gnuastro.texi | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 442bdc29..591385b9 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -23739,7 +23739,7 @@ Now, we can easily visualize the magnitude and
positions of these stars using @c
@example
$ astscript-ds9-region gaia.fits -cra,dec \
--namecol=phot_g_mean_mag \
- --command='ds9 flat/image.fits -zoom to fit -zscale'
+ --command="ds9 flat/image.fits -zoom to fit -zscale"
@end example
You can see that we have several stars between magnitudes 6 to 10.
@@ -23766,6 +23766,50 @@ $ astscript-ds9-region outer/stars.fits -cra,dec \
Now that the catalog of good stars is ready, it is time to construct the
individual stamps for each star of the catalog.
To do that, we'll use @file{astscript-psf-create-make-stamp}.
+One of the most important parameters for this script is the normalization
radii @code{--normradii}.
+This parameter defines a ring for the flux normalization of each star stamp.
+The normalization of the flux is necessary because each star has a different
brightness, and consequently, it is crucial for having all the stamps with the
same flux level in the same region.
+Otherwise the final stack of the different stamps would have no sense.
+Depending on the PSF shape, internal reflections, ghosts, saturated pixels,
and other systematics, it would be necessary to choose the @code{--normradii}
appropriately.
+
+The selection of the normalization radii is something that requires a good
understanding of the data.
+To do that, let's use two useful parameters that will help us in the checking
of the data: @code{--tmpdir} and @code{--keeptmp}.
+With @code{--tmpdir=checking-normradii} all temporal files, including the
radial profiles, will be save in that directory.
+With @code{--keeptmp} we won't remove the temporal files, so it is possible to
have a look at them.
+It is necessary to specify the @code{--normradii} even if we don't know yet
the final values.
+Otherwise the script will not generate the radial profile.
+As a consequence, in this step we put the normalization radii equal to the
size of the stamps.
+By doing this, the script will generate the radial profile of the entire stamp.
+In this particular step we set it to @code{--normradii=150,160}.
+
+@example
+$ counter=1
+$ mkdir finding-normradii
+$ asttable stars-mag-8-12.fits \
+ | while read -r ra dec mag; do
+ astscript-psf-create-make-stamp image-masked.fits \
+ --mode=wcs \
+ --center=$ra,$dec \
+ --stampwidth=150 \
+ --normradii=150,160 \
+ --output=finding-normradii/$counter.fits \
+ --tmpdir=checking-normradii --keeptmp; \
+ counter=$((counter+1)); \
+ done
+@end example
+
+Now, by having a look at all radial profiles at the same time, it is possible
to choose a good normalization region where the profiles are similar.
+For example using Topcat or any other plotting tool.
+In the same way, it is always good to check the different stamps to ensure the
quality and posible two dimensional features that are difficult to detect from
the radial profiles (i.e., ghosts, internal reflections, etc.).
+
+@example
+$ topcat checking-normradii/rprofile*.fits
+$ ds9 checking-normradii/cropped*.fits
+@end example
+
+After some study of this data, we could say that a good normalization ring is
those pixels between R=20 and R=30 pixels.
+Such ring ensures having a high number of pixels so the estimation of the flux
normalization will be robust.
+Also, at such distance from the center the signal to noise is high and there
are not obvious features that can affect the normalization.
We later need the normalization radii in the next steps also.
Therefore, to avoid typos or chances of a mistake, we'll define the two
@code{NORMRADII_INNER} and @code{NORMRADII_OUTER} variables.
@@ -23773,10 +23817,11 @@ Furthermore, since there are several stars (as you
saw from the output of the pr
@example
$ counter=1
+$ IMAGE=image-masked.fits
$ NORMRADII_INNER=20
$ NORMRADII_OUTER=30
$ mkdir stamps-outer
-$ asttable stars-mag-6-10.fits \
+$ asttable stars-mag-8-12.fits \
| while read -r ra dec mag; do
astscript-psf-create-make-stamp $IMAGE \
--mode=wcs \
- [gnuastro-commits] master aae0d156 64/69: PSF tutorial: running of Segment on saturated images added, (continued)
- [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
- [gnuastro-commits] master da6eea59 33/69: Scripts: changing 'wcstoimg' to 'wcs-to-img' in several scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 50fd424f 66/69: PSF tutorial: adding information to choose proper --normradii values,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 86ac2dd1 42/69: PSF select-stars: corrected bug in checking the catalog-image overlap, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master cf58a078 62/69: PSF select-stars: give the default value to the two variables, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master db2d55be 37/69: PSF select-stars: changing some variable names to follow conventions, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master cd14a366 44/69: PSF select-stars: including the make check step for this script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 85648ac3 45/69: PSF select-stars: The script has been changed for use in general scenario, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 0facf365 16/69: Book: adding documentation of 'psf-model-scattered-light' script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master b1e3da80 34/69: PSF junction: fixed bug when centering the different parts of the PSF, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 7c398567 36/69: Book: Correct the some parts of the making the PSF, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master b82adcfc 46/69: Book: some essential option was add to astscript-psf-select-stars section, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ff3bb03f 38/69: PSF select-stars: removing not used options and polishing the comments, Mohammad Akhlaghi, 2022/01/26