[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master d6e6f9da 47/69: PSF flux-factor: correct the i
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master d6e6f9da 47/69: PSF flux-factor: correct the indentation |
Date: |
Wed, 26 Jan 2022 12:39:14 -0500 (EST) |
branch: master
commit d6e6f9da41cfd00a9f32e49f2cda24aa307e47d0
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF flux-factor: correct the indentation
Until now, the script had indentation problem in some parts.
With this commit, the indentation problem has been solved.
---
bin/script/psf-model-flux-factor.in | 51 +++++++++++++++++++------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/bin/script/psf-model-flux-factor.in
b/bin/script/psf-model-flux-factor.in
index 752e0877..9b7a1d79 100644
--- a/bin/script/psf-model-flux-factor.in
+++ b/bin/script/psf-model-flux-factor.in
@@ -413,18 +413,18 @@ objectid="$xcoord"_"$ycoord"
# mode will be generated.
bname_prefix=$(basename $inputs | sed 's/\.fits/ /' | awk '{print $1}')
if [ x$tmpdir = x ]; then \
- tmpdir=$(pwd)/"$bname_prefix"_psfmodelfluxfactor
+ tmpdir=$(pwd)/"$bname_prefix"_psfmodelfluxfactor
fi
if [ -d $tmpdir ]; then
- junk=1
+ junk=1
else
- mkdir -p $tmpdir
+ mkdir -p $tmpdir
fi
# Output
if [ x$output = x ]; then
- output="$bname_prefix"_psfmodelfluxfactor_$objectid.txt
+ output="$bname_prefix"_psfmodelfluxfactor_$objectid.txt
fi
@@ -439,14 +439,14 @@ fi
# the WCS information from the original input image. If the original
# coordinates were done in IMG, then just use them.
if [ $mode = wcs ]; then
- xycenter=$(echo "$xcoord,$ycoord" \
- | asttable --column='arith $1 $2 wcs-to-img' \
- --wcsfile=$inputs --wcshdu=$hdu $quiet)
- xcenter=$(echo "$xycenter" | awk '{print $1}')
- ycenter=$(echo "$xycenter" | awk '{print $2}')
+ xycenter=$(echo "$xcoord,$ycoord" \
+ | asttable --column='arith $1 $2 wcs-to-img' \
+ --wcsfile=$inputs --wcshdu=$hdu $quiet)
+ xcenter=$(echo "$xycenter" | awk '{print $1}')
+ ycenter=$(echo "$xycenter" | awk '{print $2}')
else
- xcenter=$xcoord
- ycenter=$ycoord
+ xcenter=$xcoord
+ ycenter=$ycoord
fi
@@ -474,8 +474,8 @@ fi
# Crop the object around its center with the given stamp size width.
cropped=$tmpdir/cropped-$objectid.fits
astcrop $inputs --hdu=$hdu --mode=img \
- --center=$xcenter,$ycenter \
- --width=$stampwidth --output=$cropped $quiet
+ --center=$xcenter,$ycenter \
+ --width=$stampwidth --output=$cropped $quiet
@@ -498,20 +498,21 @@ astcrop $inputs --hdu=$hdu --mode=img \
# sky.
# - Mask all non zero pixels in the mask image as nan values.
if [ x"$mask" != x ]; then
- cropped_mask=$tmpdir/cropped_mask-$objectid.fits
- astcrop $mask --hdu=$maskhdu --mode=img \
- --center=$xcenter,$ycenter \
- --width=$stampwidth --output=$cropped_mask $quiet
+ cropped_mask=$tmpdir/cropped_mask-$objectid.fits
+ astcrop $mask --hdu=$maskhdu --mode=img \
+ --center=$xcenter,$ycenter \
+ --width=$stampwidth --output=$cropped_mask $quiet
# If the user does not provide a core width, consider it as the maximum
# normalization radius value.
if [ x"$corewidth" = x ]; then corewidth="$normradiusmax,$normradiusmax"
fi
+ # Crop just the center of the target star.
cropped_core=$tmpdir/cropped_core-$objectid.fits
astcrop $mask --hdu=$maskhdu --mode=img \
- --center=$xcenter,$ycenter \
- --width=$corewidth --output=$cropped_core $quiet
+ --center=$xcenter,$ycenter \
+ --width=$corewidth --output=$cropped_core $quiet
# Compute the label of the central object from the core cropped image.
centrallabel=$(aststatistics $cropped_core --median -q)
@@ -528,7 +529,7 @@ if [ x"$mask" != x ]; then
$cropped_unlabel --hdu=1 \
0 ne nan where --output=$cropped_masked $quiet
else
- cropped_masked=$cropped
+ cropped_masked=$cropped
fi
@@ -576,11 +577,11 @@ fi
# different tables are concatenated into a single one.
radialprofile_ring=$tmpdir/rprofile-ring-$objectid.fits
asttable $radialprofile --range=1,$normradiusmin,$normradiusmax \
- --output=$radialprofile_ring $quiet
+ --output=$radialprofile_ring $quiet
psfradialprofile_ring=$tmpdir/rprofile-psf-ring-$objectid.fits
asttable $psfradialprofile --range=1,$normradiusmin,$normradiusmax \
- --output=$psfradialprofile_ring $quiet
+ --output=$psfradialprofile_ring $quiet
# Concatenated table. This table has the rows corresponding to the ring
# over which the flux radius is computed, and 3 columns: radius, STAR
@@ -600,9 +601,9 @@ asttable $radialprofile_ring
--output=$radialprofile_ring_both $quiet \
# make the ratio of the two radial profiles (STAR and PSF) columns.
radialprofile_ratio=$tmpdir/rprofile-ratio-$objectid.fits
asttable $radialprofile_ring_both $quiet \
- --column=1,2,3 \
- --column='arith $2 $3 /' \
- --output=$radialprofile_ratio
+ --column=1,2,3 \
+ --column='arith $2 $3 /' \
+ --output=$radialprofile_ratio
# Obtain the flux factor by computing the averaged value of the ratio.
# Print the flux factor on the screen and save it into the output file.
- [gnuastro-commits] master 5d9a6d9b 50/69: PSF select-stars: make check steps done again because some new option are added, (continued)
- [gnuastro-commits] master 5d9a6d9b 50/69: PSF select-stars: make check steps done again because some new option are added, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 1e0cc1a0 43/69: PSF select-stars: changing default values to not crash in make check, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ca8fc03a 55/69: PSF scripts: getting proper NAXIS values when data is compressed as .fz, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5eac0cea 40/69: Book: polishing the description of the PSF select-stars script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master d99fc9df 60/69: PSF select-stars: add new option for selecting more bright stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 69a2e6ee 54/69: Book: correct some comments in the psf-create-select-stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f42832f8 23/69: PSF stamp: allowingto use a position angle and axis ratio, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 2894b35a 32/69: PSF model: including the make check step for two PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [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 <=
- [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, 2022/01/26
- [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