All pages shall now have been validated Info Cookies (Kakor) / GDPR

 Follow Astrofriend Travel News 20181218 Sweden's Lappland, 2002 20181122 Portugal, five days at Lisbon, 2018 20181103 Tenerife, island of Spain, 2016 20181013 Crete, island of Greece, 2018 20180912 MAK star party, 2018 20180813 Sagittarius star party, 2018 20180417 Tips/info: Växla Svenska Kronor till annan valuta 20180314 Island of Malta 2018 20171028 Sardinia, island of Italy, 2017 20171019 Observatory Sites: Sardinia Observatory, 2017 20170829 MAK, Mariestad's Star Party, 2017 20170609 My Baltic Sea coastal cities travels 20170412 Turkey, Side, 2014 20170322 Round trip in western Andalusia, 2017 20170316 A cruise through Norway's fjords, 2009 20170224 Scotland by car, 2007 20170219 Bus tour in Western Turkey, 2013 2017 - - Older News

# Tutorial: AstroImageJ Align and Drizzle

### Content:

Note:
I take no responsibility or liability for what are written here, you use the information at your own risk!

## 4, Inverse matrix:

### Inverse matrix:

In part one I talked about the matrix T that transform our sub images to fit the reference image. But how to find out what T is?

We need to know how to calculate the matrix T and its internal parameters.

X' = T X.

With help of the invers matrix X-1 we can get T alone on the right side, in matrix manipulation we normally can't change order of the matrices. It looks a bit strange if you are not used with it.

X-1 is of the construction that X-1 X give the unit matrix I (I=1). X must be a square matrix!

X' X-1 = T X X-1 = T I = T

T = X' X-1

Now we get one more problem, to calculate X-1.

Later when we have find T values for each sub image we can put in each sub images coordinates one pixel by one to the transformation T matrix and get the new coordinates in the reference image. In more advanced programs like Matlab we put in the whole image, in more general software like AstroImageJ we have too work with loops.

Inverse matrix, a deeper look inside:

This was the easy case when we have square matrix and an unique solution.

### Generalized inverse:

Many times we don't have square matrices, it could be that we have more reference stars than our translation matrix need, they are called to be over-determined. Or the reference points maybe depends on each other, maybe we by mistake have chosen the same star twice.

We can solved that too, but this time it's a mean value more than exact. This is the most common situation, the real life.

Take the example of a warp matrix from the first page:

Z t = X'

Lets say that we have taken 50 reference stars, much more than needed for our translation matrix t, in the example with second degree it's only needs 12 equations, not 50.

You cant just use the inverse of Z like (left side): Z-1 Z t = Z-1 Z t = (Z-1 Z) t = I t = t.

The generalized inverse of Z is the Z-1left matrix or it's components (ZT Z)-1 ZT. ZT is the transpose of the matrix Z. There is an Z-1right too.

Then we have that: Z-1left Z t= Z-1left X' : t = (ZT Z)-1 ZT X'.

In Matlab this is very simple, looks like this: t = X' \ Z.

Transpose of a matrix, in depth:

Generalized inverse, in depth:

 Next part: V, Determinant