Plate solving problems using script

Scripts and programs to automate Astroart
Post Reply
Uhde
Posts: 5
Joined: 29 Aug 2020, 08:52

Plate solving problems using script

Post by Uhde » 08 Sep 2020, 15:47

Hello,
unfortunately I have some problems with plate solving using the script function "image.findcoordinates" in Astroart 6.
This is the code I used:
image.open("D:\test\M31_frame1.fit")
ra = 10
de = 40
res=image.findcoordinates(ra,de,5,3)
if res then
rap=image.ra
dep=image.dec
print "plate center coordinates:"; rap;dep
endif
image.close()
If I open the same image in the GUI, plate solving with the "search coordinates" tool is possible (same starting values of Ra and Dec and search field = 3° x 3°). The parameters for the image field, rotation angle, etc. are stored.
Where is the bug?

Best regards
Gerd

fabdev
Posts: 503
Joined: 03 Dec 2018, 21:43

Re: Plate solving problems using script

Post by fabdev » 08 Sep 2020, 17:47

Hello,
RA in scripts is always expressed as 0..24, so the RA of andromeda is 0.7 (0 + 42/60) or just (10° / 15).

By the way, if the telescope saves the approximate coordinates in the FITS header (OBJCTRA, OBJCTDEC, etc.), there's no need to prepare the coordinates, just use:

ra,de = Image.EstimateRaDec
res = Image.FindCoordinates(ra, de, 5, 3)
...

Does this solve?

Uhde
Posts: 5
Joined: 29 Aug 2020, 08:52

Re: Plate solving problems using script

Post by Uhde » 08 Sep 2020, 21:27

Dear Fabio,
thank you, ra in hours not degrees, that solves my problem.
Can you please explain, why the "Image.EstimateRaDec" function does not work with my fits-headers:

RA = 10.8009865294237 / Object Right Ascension in degrees
DEC = 41.3728821732891 / Object Declination in degrees
CRVAL1 = 10.8009865294237 / RA at image center in degrees
CRVAL2 = 41.3728821732891 / DEC at image center in degrees
OBJCTRA = '00 43 12.237' / Object Right Ascension in hms
OBJCTDEC= '+41 22 22.376' / Object Declination in degrees

Best regards
Gerd

fabdev
Posts: 503
Joined: 03 Dec 2018, 21:43

Re: Plate solving problems using script

Post by fabdev » 09 Sep 2020, 02:47

Hello, this may happen because in AA6 also RA and DEC keywords are used for EstimateRaDec, and they have higher priority, so RA is read in degrees but it's expected in H,M,S. You may solve with:

ra = Image.GetKey("CRVAL1") / 15
de = Image.GetKey("CRVAL2")
print ra,de
res = Image.FindCoordinates(ra, de, 5, 3)
...
...

Uhde
Posts: 5
Joined: 29 Aug 2020, 08:52

Re: Plate solving problems using script

Post by Uhde » 09 Sep 2020, 08:37

Hello Fabio,
thank you again for your prompt reply.
It would be nice to have a complete documentation of the actual AA script language including examples.
Here I found an "unofficial guide to AA script commands" (refers to AA4), which should be updated by an experienced user:
https://manualzz.com/doc/6553563/unoffi ... t-commands
Due to the possibility of running scripts, AA has become an indispensable astro software for me.
Gerd

Post Reply