The centroid is determined using an intensity weighted mean in the correllated image. A future version may fit a 2D gaussian or appropriate function to the correllation image.
Some caution is warrented as the results can depend on the size of the box (box=) and number of pixels (n=) to look around the correllation peak. See also clop= below.
The WCS of the output image is not meaningfull, and remains in pixel space. Since the number of pixels is odd, the reported shift between the images is the shift from the central pixel, which is made the reference pixel.
Images should ideally be the same size, but nothing will stop the program from running off without that. The user is then responsible for computing the true offsets as all bets are off.
A wrong choice of box= and n= can cause a bias in the center. Using clop= can help making it more robust.
Only one clip= value can be given, ideally each input image should have it’s
own clip
Here two gaussian shaped sources with noise are created with a small 1 pixel offset from each other.
ccdgen - gauss 1,2 size=128,128
center=64,64 | ccdgen g64 noise spar=0,0.05 seed=64 in=-
ccdgen - gauss 1,2 size=128,128 center=65,65 | ccdgen g65 noise spar=0,0.05
seed=65 in=-
ccdcross g64,g65 shift.ccd box=16
...
### nemo Debug[0]: Using 2 images
### nemo Debug[0]: Image 0: pixel size 1 1 minmax -0.22856 0.971157
[g64]
### nemo Debug[0]: center=64,64
### nemo Debug[0]: Full box size 33
### nemo Debug[0]: Image 1: pixel size 1 1 minmax -0.20781 0.927271
[g65]
### nemo Debug[0]: 128 128 16 0 1
### nemo Debug[0]: New min and max in correlation image are: -0.597157
11.907974
### nemo Debug[0]: Max cross 11.908 @ 17 17
### nemo Debug[0]: MinMax in 49 pts: 3.40988 11.908, use clop= to clip
the corr out image
### nemo Debug[0]: X,Y mean: -0.0561799 -0.0237276
### nemo Debug[0]: X,Y sig: 1.81226 1.81864
### nemo Debug[0]: Center at: 0.94382 0.976272
11-Apr-2022 V0.1 Created PJT 3-aug-2023 V0.2 fix absolute coordinate PJT 18-apr-2024 V0.3 add peak flux in correlation map PJT