Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When fwhm -> 0, the initial image does not converge toward a dirac #116

Open
FerreolS opened this issue May 25, 2022 · 7 comments
Open

When fwhm -> 0, the initial image does not converge toward a dirac #116

FerreolS opened this issue May 25, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@FerreolS
Copy link
Member

Two related issue:

  • When the FWHM is small the initial image converge toward a 2x2 square and not a dirac
  • when the FWHM is very small it raise a image = 0 bug
@FerreolS FerreolS added the bug Something isn't working label May 25, 2022
@bourgesl bourgesl self-assigned this May 25, 2022
@bourgesl
Copy link
Member

What is expected ?
An image 3x3 with all zero and 1 in center ?

@FerreolS
Copy link
Member Author

FerreolS commented May 25, 2022

When FWHM is smaller than a 2 pixels then its center should be around (0.5,0.5)

I propose:

  • to bound fwhm to 1 or 0.5 pixel
  • to center the gaussian in (0.5,0.5) in this case. A good things should be that the center continuously move toward (0.5,0.5) as fwhm is smaller e.g. the center is:

$\frac{0.5}{1+FWHM}$

@FerreolS
Copy link
Member Author

FerreolS commented May 25, 2022

What is expected ? An image 3x3 with all zero and 1 in center ?

the expected behaviour is that a dirac is a single non zero pixel centered at pixel coordinate (0.5,0.5) , (0,0) being the center of the image with an even number of pixels

@FerreolS
Copy link
Member Author

FerreolS commented Jun 1, 2022

According to @emmt , in MiRA the reconstructed image is centered on the central pixel when the width in pixel of the (square) image is odd. When the number of pixel is even the image is centered on the pixel at the top right of the center of the fov.

@FerreolS
Copy link
Member Author

FerreolS commented Jun 1, 2022

so should we always center the image at pixel coordinate (0.5,05)?

@emmt
Copy link

emmt commented Jun 2, 2022

You have the FITS keywords related to coordinates allong axes to do pretty anything you want. My understanding is that you want the centre of the FOV (0,0) exactly at the center of a pixel so that a "Dirac" can be as small as one pixel.

@FerreolS
Copy link
Member Author

FerreolS commented Jun 3, 2022

You have the FITS keywords related to coordinates allong axes to do pretty anything you want. My understanding is that you want the centre of the FOV (0,0) exactly at the center of a pixel so that a "Dirac" can be as small as one pixel.

This is the right way to do, for an image of $N$ pixels, put the center of the image in FITS header on the center of the pixel $(N/2+1, N/2+1) $ if $N$ is even or the pixel $\left( \frac{N+1}{2} , \frac{N+1}{2} \right) $ if $N$ is odd. As it is the convention for discrete Fourier transform.

@FerreolS FerreolS added this to the Oimaging 1.0.0 milestone Jun 3, 2022
@bourgesl bourgesl removed this from the Oimaging 1.0.0 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants