AngularDistance Script

enzodb

PixInsight Ambassador
Hello,

I want to introduce you to the first version of a script that I have been working on. This new script allows to measure the angular distance and the position angle of two points (stars or arbitrary) in an image that has previously been astrometrically solved. The distance and position angle are measured from the first point to the second point selected, and are calculated using spherical trigonometry. Successive clicks changes the points, latest two are used.

AngularDistance Script

Basic usage
  • CTRL + click to select the points/stars.
  • Mouse wheel to zoom.
  • Drag and drop to scroll.
Settings
  • Selection Mode
    • Star Detection: Use the StarDetector engine to calculate the star's centroid. For this type of measurement is required a star like point, and preferably unsaturated. The click coordinates are not critical, the script will search the closest centroid to clicked point inside a region (detection box). Limitations: If the function does not detect the star, the search for the centroid could fail or fall on another detected star. Stars too close to the edge (half detection box size) will not be well placed (script limitation).
    • Arbitrary Point: Any point in the image, regardless of whether or not there are stars. The script will use exactly the clicked coordinates (subpixel resolution, so, zoom in to better accuracy)
  • Detection Box: Size of the square centered on the clicked point where matching stars will be searched (increase to include big stars). Only for Star Detection.
  • RA Format, Dec Format: Format to show the positions of the stars.
Known issues
  • Zoom and scroll need improvement (I have found it quite difficult to handle that part of the interface)
Next versions ideas
  • More StarDetector configs (sensitivity, peak response...)
  • Output improvement (like only export selected measurements)
  • One point measurements (no distance and position angle, only RA and Dec, useful for asteroids and other objects?)
  • Images without the need to be solved astrometrically (measurements of distance and angles based on image px, useful for double stars?)

I want to thanks @Juan Conejero for the tremendous tools available on the platform. The potential in astrometry is by far beyond my scripting skills :geek:

Zip file attached. I hope you find it interesting. It is a first version, be gentle :giggle:

Best regards,

Enzo.

Updates:
  • 2021-04-27: version 1.1.0
 

Attachments

Last edited:

robyx

PixInsight Staff
Jul 17, 2019
173
43
44
Zurich
Wow it looks great! out of my curiosity does it take into account model distortions for wide fields?

I love it, the manual star selection opens my mind to a lot of potential astrometry stuff :) how nice!
 

enzodb

PixInsight Ambassador
Hello,

I have updated the script, introducing some improvements. The file was updated in the original post.

AngularDistance-01.png

Updates:
  • Auto Stretch button (for preview purposes only, measurements are made on the original image)
  • Results table:
    • Button Store Result to save the result to the table.
    • Button Remove Unchecked to remove the unchecked results from the table.
  • Export
    • Select a Output directory
    • Button Export Results to CSV to save the results table to CSV file.
  • Layout Toggle: change the sizes of the preview and the table of results, to facilitate the visualization of the data.
Best regards,

Enzo.