XYShift#

class prose.blocks.XYShift(reference, tolerance=2, clean=False, **kwargs)#

Compute the linear shift between two point clouds. Star coordinates in the image are expected in image.stars_coords

write Image.dx, Image.dy, Image.header

Parameters:
  • reference ([type]) – (x,y) coordinates of n reference stars (shape should be (2, n))

  • tolerance (float, optional) – maximum difference for which shifts are considered similar, by default 1.5

  • clean (bool, optional) – Merge coordinates if too close, by default False

Notes

xyshift is originaly the TRAPHOT (M. Gillon) method to align consecutive images.

Principle: Let’s consider two images, im and ref. We want to know the shift between im and ref knowing the position of the stars in these two images. We suppose that there is N stars in im and ref and that their position are given by

\[\begin{split}\boldsymbol{S^{im}} = \begin{bmatrix} x^{im}_0 & y^{im}_0 \\ x^{im}_1 & y^{im}_1 \\ . & . \\ x^{im}_N & y^{im}_N \end{bmatrix} \quad and \quad \boldsymbol{S^{ref}} = \begin{bmatrix} x^{ref}_0 & y^{ref}_0 \\ x^{ref}_1 & y^{ref}_1 \\ . & . \\ x^{ref}_N & y^{ref}_N \end{bmatrix}\end{split}\]

\(x_i, y_i\) being the coordinates of the star \(i\)

If we want to know, let’s say, the \(x\) shift between im and ref we just have to compute \(x^{im}_0 - x^{ref}_0\), or to be more accurate, by considering all the stars, the mean shift

\[\Delta x = \frac{1}{N}\sum_{0}^{N} x^{im}_i - x^{ref}_i\]

This is possible because \(x^{im}_i\) and \(x^{ref}_i\) are the position of the same identified star \(i\) (\(N\) of them in each image)

Identifying stars in the sky, for example using their position with respect to constellations or by trying to match catalogs (as with astrometry.net) is possible with a single image, but is time-consuming when applied to a complete set of images. Unfortunately most of the time detected stars do not hold the same index \(i\) (index is attributed by the star detection algorithm) and their number might differ.

The goal of xyshift is to check all the possible shifts from one star with respect to all the others, and to identify the most common shifts between stars of two different images.

../../_images/xyshift_principle.png