Integrate ASTAP Platesolving into application

Issue #129 resolved
Stefan B repo owner created an issue

ASTAP, the Astrometric STAcking Program, astrometric solver and FITS viewer is another alternative to plate solve images. Especially for blind solving this seems to be a fast solution. We should consider to integrate this for the next version.

Documentation: http://www.hnsky.org/astap.htm

CLI Description: http://www.hnsky.org/astap.htm#astap_command_line

Comments (16)

  1. Han K

    Maybe two parameters should be made adjustable for using ASTAP as astrometric solver. The search field in degrees -r and the binning -z [1,2,3,4]. Binning set it default at 2. If NINA executes ASTAP with a path to a FITS file the command could be

    astap.exe -f c:\Users\h\AppData\Local\NINA\image.fits -r 50 -z 2

    An ASTAP version able to read the object ra, dec from the NINA FITS header will be released this afternoon (v0.9.180)

    If FITS is not available, preference is a non lossless image format like .PNG or .TIFF or RAW like .CR2. If possible in 16 bit or original 12 bit format. Not stretched or saturated, as raw as possible. JPEG format is lossy and not recommended. Then the position and -fov (image HEIGHT in degrees !!) should be added. For the solution output format, see the ASTAP webpage.

    astap.exe -f c:\Users\h\AppData\Local\NINA\image.png -ra 359.000 -dec 89.000 -fov 1.3 -r 50 -z 2

    For other ASTAP settings, just execute the ASTAP program without parameters. They are in menu "stacking settings", tab "alignment".

    You can also use ASTAP to add deep sky annotations to the image using a 30.000 object database.

  2. Han K

    DEC with negative values are not read correctly by ASTAP. Command line looks okay. I'm investigating.

  3. Han K

    There is no solution for negative values. The library routine I use doesn't allow it. So unfortunately the interface has to be adapted. I have chosen to use the so called "south pole distance" This is a new parameter. -spd (instead of -dec) Just add 90 to the value and change parameter to -spd. I will release ASTAP 0.9.192 for this in 5 minutes.

  4. Han K

    Four requests/remarks: 1) Since the old ASTAP version can't be fixed, (tried several commandline methods) could you add a temporary warning message in NINA's ASTAP menu to download ASTAP version 0.9.192 dated 201-9-3-14 or later? 2) I noticed the solution and result file astap_tmp.jpg? and .ini are deleted immediately after the solution. For debugging this is inconvenient. I would suggest to leave the files, In future you could request an user to send them for analysis. 3) JPG works fine but for the long term 12/16 bit RAW, PNG, TIFF or FITS works better. If not possible set lowest compression. 4) The number of decimals send in the command line is large. 6 decimals is more then enough. If possible send a shorter formatted position. It looks nicer if the popupnotifier pops up if distance is more then 2 degrees.

    note that ASTAP accepts post comma's and dot's as decimal separator.

  5. Stefan B reporter

    Hi Han,

    thank you for providing a fast solution for this issue.

    As for your requests: 1. I will add this note for the minimum required version 2. Deletion is done to prevent solving a previous image when the file writing failed silently for whatever reason, but I can change it so it will get deleted prior to solving and not afterwards. 3. the jpg file uses lowest compression right now. currently the interface to call plate solvers creates this image upfront and jpg is the only format that overlaps all (fits would also do, but until 1.8 this format was really slow to save, so now we could consider it) 4. No problem. Will round up the decimals to 6.

  6. Han K

    Hi Stefan,

    I want to make it a success not a failure. This failure is frustrating.

    P.s. I noted that NINA reports the "Dec Error" in degrees wrongly. The error in pixels is correct. The error in degrees should be multiplied with the pixel size. In screenshot below the Dec error was 10 degrees=14464*2.49. The error is wrongly reported as 04° 37' 52".

    And finally maybe you should report Center RA as 5.692h end Center Dec as -2.643° I will do the same for my popupnotifier.

    nina1.png

  7. Han K

    And radius is reported as 0.000 deg. Maybe it is also better to be consistent in units, so all in ° or deg and "/pixel rather then arcsec/pixel but I assume that's all a matter of personal preference. After using more then 10 year terms RA, DEC I switched to α and δ but most people can't pronounce these greek letters so it is probably better to stick to RA, DEC. :)

  8. Han K

    The interface to call plate solvers creates this image upfront and jpg is the only format that overlaps all (fits would also do, but until 1.8 this format >>was really slow to save, so now we could consider it

    I assume modern DSLR camera produce huge FITS files so that could slow down the whole process. If so then lets stick to JPG.

  9. Stefan B reporter

    I've created a branch to test the new version and it looks good.

    As for the wrong dec error i need to check the logic, it's some old code that might have a naive approach that is just wrong ;-)

  10. Stefan B reporter

    A new build is available with the required changes.

    The RA and Dec Error btw is just the substraction of target and plate solve result. so it is more of a coordinate separation than distance in degrees.

  11. Han K

    Hi Stefan,

    Thanks looks all good! I would skip the delta RA and DEC calculation and just present the angular distance. E.g. by (sorry Pascal):

    1. procedure ang_sep(ra1,dec1,ra2,dec2 : double;var sep: double);{calculates angular separation. according formula 9.1 old Meeus or 16.1 new Meeus}
    2. var sin_dec1,cos_dec1,sin_dec2,cos_dec2,
    3. cos_sep:double;
    4. begin
    5. sincos(dec1,sin_dec1,cos_dec1);{use sincos function for speed}
    6. sincos(dec2,sin_dec2,cos_dec2);
    7. cos_sep:=sin_dec1 * sin_dec2+ cos_dec1 * cos_dec2 * cos(ra1-ra2);
    8. sep:=arccos(cos_sep);
    9. end;
  12. Stefan B reporter

    CLI seems to be working properly and the plate solve errors should display properly in the next build (1.9 - Nightly 003 and above)

  13. Log in to comment