Page 1 of 1

Script commands in AA8 SP2

Posted: 15 Oct 2022, 15:06
by fabdev
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.

Re: Script commands in AA8 SP2

Posted: 16 Oct 2022, 06:09
by Emilio
Thanks Fabio
Emilio

Re: Script commands in AA8 SP2

Posted: 20 Nov 2022, 11:06
by astrojohn
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

Re: Script commands in AA8 SP2

Posted: 20 Nov 2022, 16:23
by Iver
The only list I am aware of, open AstroArt, at the top of the window go to help then help topics then scripts.

Re: Script commands in AA8 SP2

Posted: 21 Nov 2022, 15:52
by astrojohn
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

Re: Script commands in AA8 SP2

Posted: 22 Nov 2022, 14:32
by fabdev
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.