[Top][All Lists]

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

[bug #63171] Strange patterns on warped images

From: Raul Infante-Sainz
Subject: [bug #63171] Strange patterns on warped images
Date: Mon, 10 Oct 2022 18:16:36 -0400 (EDT)

Follow-up Comment #11, bug #63171 (project gnuastro):

Thanks a lot for investigating this Pedram! You are right, I have been playing
a bit with the images and I can clearly see the same pattern on SWarped
images. But the effect is less strong so we didn't notice that until now.

I am pasting here a few command that I have been playing with. Basically I
tried to check what is the difference between having and not having the
distortion coefficients in the header. I also tried to simplify the problem by
constructing images with only ones as pixel values, and random noise. That
would simplify the problem of having astronomical objects that make difficult
the analysis of the data.

# Create an image with ones
astarithmetic m51.fits -h1 set-i i i / -o ones.fits

# SWarp and Warp _with_ PV
0.555594         -IMAGEOUT_NAME ones-swarp.fits -IMAGE_SIZE 9245,9245        
-CENTER_TYPE MANUAL -CENTER 109.5309438,40.17599612

 astwarp ones.fits --cdelt 0.555594/3600           -o ones-warp.fits --width
9245,9245           --widthinpix --center 109.5309438,40.17599612

# Remove the PV parameters
cp ones.fits ones-no-pv.fits

for pv in $(astfits ones.fits -h1 --printkeynames | grep ^PV); do astfits
ones-no-pv.fits -h1 --delete $pv; done

# SWarp and Warp _without_ PV
swarp ones-no-pv.fits -SUBTRACT_BACK N         -PIXELSCALE_TYPE MANUAL
-PIXEL_SCALE 0.555594         -IMAGEOUT_NAME ones-no-pv-swarp.fits -IMAGE_SIZE
9245,9245         -CENTER_TYPE MANUAL -CENTER 109.5309438,40.17599612

astwarp ones-no-pv.fits --cdelt 0.555594/3600           -o
ones-no-pv-warp.fits --width 9245,9245           --widthinpix --center

# Create an image with noise
astarithmetic m51.fits -h1 set-i i i / 10 mknoise-sigma -o noise.fits

# SWarp and Warp _with_ PV
0.555594         -IMAGEOUT_NAME noise-swarp.fits -IMAGE_SIZE 9245,9245        
-CENTER_TYPE MANUAL -CENTER 109.5309438,40.17599612

astwarp noise.fits --cdelt 0.555594/3600           -o noise-warp.fits --width
9245,9245           --widthinpix --center 109.5309438,40.17599612

# Remove the PV parameters
cp noise.fits noise-no-pv.fits

for pv in $(astfits noise.fits -h1 --printkeynames | grep ^PV); do astfits
noise-no-pv.fits -h1 --delete $pv; done

# SWarp and Warp _with_ PV
swarp noise-no-pv.fits -SUBTRACT_BACK N         -PIXELSCALE_TYPE MANUAL
-PIXEL_SCALE 0.555594         -IMAGEOUT_NAME noise-no-pv-swarp.fits

astwarp noise-no-pv.fits --cdelt 0.555594/3600           -o
noise-no-pv-warp.fits --width 9245,9245           --widthinpix --center

An interesting thing:

In the warped images of ones with PV you can clearly see a circular shape.
While in the SWarped image it is flat.

astscript-fits-view ones-warp.fits

On the SWarped images, with two different regions of the same size on
different parts of the image, I can see that the properties (statistics) are

Sorry for the long lines and etc. I will try to polish that and re-post when I
have some time, but I wanted to let you know what I have done quickly so you
can have some clues to keep investigating.



Reply to this item at:


Message sent via Savannah

reply via email to

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