<p>I have an Excel spreadsheet that will take certain keywords from a FITS image header. Image centre RA, Dec, rotation, x centre, y centre, x scale, y scale.
I enter the pixel coordinates of an object and the spreadsheet returns the RA and DEC coordinates.
Close to the centre of the image the results are good, but an error increases towards the outer parts of the frame.
I believe there are Python programs for doing this but my experience with Python,  C++ is zero.</p>

<p>Does anyone know how accurate coordinates can be obtained, using arithmetic suitable for excel and Visual Basic?</p>

CC BY-SA 4.0
2019-09-08T08:57:53.647Z
Do you take into account the projection used in the fits file? Especially for large fields of views this can have a big impact.
samcarter_is_at_topanswers.xyz
CC BY-SA 4.0
2019-09-08T10:02:42.737Z
That was a new one to me! I had a look and my system uses               
CTYPE1   = 'RA---TAN'           / X-axis coordinate type                         
CTYPE2   = 'DEC--TAN'           / Y-axis coordinate type
George Carey
CC BY-SA 4.0
2019-09-08T10:33:01.923Z
https://arxiv.org/abs/astro-ph/0207413 gives an overview on the different projections used by fits
samcarter_is_at_topanswers.xyz
CC BY-SA 4.0
2019-09-08T14:32:44.087Z
If these are images taken through a camera or telescope you'll probably need to correct for lens distortion also.
Greg Miller
CC BY-SA 4.0
2019-09-08T19:15:57.363Z
This may be pushing the bounds of what makes sense to do in a spreadsheet. There are lots of tutorials for astronomy Python out there including [Python4Astronomers](https://python4astronomers.github.io/index.html) which has one specifically on [WCS transformations](https://python4astronomers.github.io/astropy/wcs.html) which is what trying to do (map x,y pixels to RA,Dec or viceversa)
astrosnapper
CC BY-SA 4.0
2019-09-09T08:41:56.953Z
Thanks. I was trying to avoid Python as I have no experience with it. But I have downloaded it and will have a look.
George Carey
CC BY-SA 4.0
2019-09-27T15:22:24.050Z
Also maybe try IRAF
CourageousPotato
<astrometry>
Right Ascension, Declination from pixel coordinates
George Carey
# Right Ascension, Declination from pixel coordinates

(Asked by: username_0 on 2019-09-08)

I have an Excel spreadsheet that will take certain keywords from a FITS image header. Image centre RA, Dec, rotation, x centre, y centre, x scale, y scale.
I enter the pixel coordinates of an object and the spreadsheet returns the RA and DEC coordinates.
Close to the centre of the image the results are good, but an error increases towards the outer parts of the frame.
I believe there are Python programs for doing this but my experience with Python, C++ is zero.

Does anyone know how accurate coordinates can be obtained, using arithmetic suitable for excel and Visual Basic?

**Tags:** astrometry
> **Comments:**
> **username_1**: Do you take into account the projection used in the fits file? Especially for large fields of views this can have a big impact.  
> **username_0**: That was a new one to me! I had a look and my system uses                CTYPE1   = 'RA---TAN'           / X-axis coordinate type                          CTYPE2   = 'DEC--TAN'           / Y-axis coordinate type  
> **username_1**: https://arxiv.org/abs/astro-ph/0207413 gives an overview on the different projections used by fits  
> **username_2**: If these are images taken through a camera or telescope you'll probably need to correct for lens distortion also.  
> **username_3**: This may be pushing the bounds of what makes sense to do in a spreadsheet. There are lots of tutorials for astronomy Python out there including [Python4Astronomers](https://python4astronomers.github.io/index.html) which has one specifically on [WCS transformations](https://python4astronomers.github.io/astropy/wcs.html) which is what trying to do (map x,y pixels to RA,Dec or viceversa)  
> **username_0**: Thanks. I was trying to avoid Python as I have no experience with it. But I have downloaded it and will have a look.  
> **username_4**: Also maybe try IRAF  

---

## 0 answers

