Script commands in AA8 SP2

Scripts and programs to automate Astroart
Post Reply
fabdev
Posts: 500
Joined: 03 Dec 2018, 21:43

Script commands in AA8 SP2

Post by fabdev » 15 Oct 2022, 15:06

Hello, here are some examples with the new script commands of AA8 SP2:

HourAngle(ra, longitude, [jd])
Calculates the hour angle (in hours, positive if West)

Code: Select all

sub TestHourAngle(ra,lon)
  h = HourAngle(ra,lon,JD)
  if h > 0 then
     print h ; "Object at West of meridian"
  else
     print h ; "Object at East of meridian"
  end if
end sub

lon = Observatory.Longitude
TestHourAngle(7.5, lon)
TestHourAngle(15.5, lon)
TestHourAngle(23.5, lon) 
Script.Execute(name)
Launches another script. The name can be a filename with full path, or just a filename from the Script folder, or the name of one of the 8 default scripts in the menu.

Code: Select all

Script.Execute("D:\temp\MySequence.txt")

Script.Execute("MySequence")
Script.Stop
Terminates the script, it's equivalent to the the command: End

Script.Pause(seconds)
Pauses the script, it's equivalent to the command: Pause(seconds)

StarNet.Execute
Launches the StarNet plugin. Before executing this command the plugin must be already activated (clicking in the menu Plugin). The dialog window can be closed by the way.

Code: Select all

StarNet.Check
.... <your code>
StarNet.Execute
StarNet.Check checks if the plugin is present and active. It's suggest to add this command at the beginning of the script.

Focuser.SoftwareCompensation(enable) Focuser.ASCOMCompensation(enable)

Enable or disable the automatic temperature compensation, software or hardware (if available).

Code: Select all

Focuser.SoftwareCompensation(True)
Image.Header
Gets the full FITS header of the image.

Code: Select all

h = Image.Header
print h
Image.Maximize , Image.Minimize , Image.Cascade
Modify the placement and size of the image window.

Emilio
Posts: 13
Joined: 08 Jan 2019, 07:22

Re: Script commands in AA8 SP2

Post by Emilio » 16 Oct 2022, 06:09

Thanks Fabio
Emilio

astrojohn
Posts: 4
Joined: 23 Aug 2019, 15:07
Location: Selsey Chichester UK
Contact:

Re: Script commands in AA8 SP2

Post by astrojohn » 20 Nov 2022, 11:06

Hi MSB Software team. I cannot find a PDF or list of the current script commands with the format of the command. I know there are new ones for example to set parameters in AA8, like gain and offset etc. This sort of setup script would be useful to switch between telescopes. I imagine you can also change the plate solve parameters using a script.
All the best
John Mallett

Iver
Posts: 113
Joined: 08 Jan 2019, 04:32
Location: Monterey county, Ca.

Re: Script commands in AA8 SP2

Post by Iver » 20 Nov 2022, 16:23

The only list I am aware of, open AstroArt, at the top of the window go to help then help topics then scripts.
Iver

astrojohn
Posts: 4
Joined: 23 Aug 2019, 15:07
Location: Selsey Chichester UK
Contact:

Re: Script commands in AA8 SP2

Post by astrojohn » 21 Nov 2022, 15:52

Iver,
Thanks I know the help has some of the script commands but not the ones I need.
It does not even state the changes to
Image.Stars.fwhmx(i)
Image.stars.fwhmy(i)
Which I use.
What I need is all the new script commands.
Like:
SetStarAperture(aap,gap,bap)
sr = Image.Roundness()
Image.Stars.PREF(s_count)
Plus all the ones that gas set all the options parameters.

Regards,
John

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

Re: Script commands in AA8 SP2

Post by fabdev » 22 Nov 2022, 14:32

Hello, all the script commands are included in the documentation, but:
Image.Stars.fwhmx() and Image.Stars.fwhmy() are no longer supported (because they could not detect diagonal elongation in AA7). They remain in AA8 for backward compatibility, but they are still not reliable. Replace them with Image.Stars.Roundness() and Image.Stars.fwhm().
SetStarAperture() and Image.Stars.PRef() are included in the "Stars" paragraph of the script functions. To update the PDF manual use the same private link, if you lost it just write me by email or PM.
Clear skies,
Fabio.

Post Reply