ConvertCoordinates : a script to convert from image to celestial coordinates

mikeoday

Active member
Hi All

I have been trying to work out how to use Pixinsight, FIND_ORB, and various websites to identify asteroids/comets in my images and determine their orbital parameters. 

Having collected a number of images, aligning and using ImageSolve on each of them, I then ran the DynamicPSF script on the object in each image to generate a set of image coordinates ( to three decimal places ) for the object.  My next step was to run the AnnotateImage script on each image and read off the celestial coordinates (at the bottom of the preview pane ) for the object's image coordinates.  This had two issues, firstly it took a great deal of fiddling to get the cursor in the preview window over the DynamicPSF generated object coordinates and secondly, even at maximum zoom, the celestial coordinates obtained were only available in 1/2 pixel steps ( ie. not the 3 decimal places generated by DynamicPSF ). I overcame the second of these difficulties by interpolating the coordinates around the exact point.  It worked but more than doubled the necessary effort.

Anyway, I decided to see if I could modify a couple of existing scripts in order to be able to convert directly from image coordinates ( XXXX.XXX, YYYY.YYY ) to ( RA, Dec ) for an image that had already been plate solved ( that is, has a set of WCS coordinates ).  The scripts I used were AnnotateImage / PreviewControl ( for the conversion code ) and ColorMask ( for the user interface, etc. ).

It is a very simple script, it seems to work ( at least for me ), so I thought someone else might like it.

The link to the file is:  https://www.dropbox.com/s/mt4hzdqh13r1d28/ConvertCoordinates.js?dl=0

The script needs to be placed in  \PixInsight\src\scripts\AdP  in order for it to find the other scripts it needs.

This is my first attempt at coding in JS ( and nearly 20 years since I did any coding at all ) so please be gentle  :embarassed:



 
Back
Top