Script control of images

Scripts and programs to automate Astroart
Post Reply
VAastro
Posts: 19
Joined: 07 Jan 2019, 18:32

Script control of images

Post by VAastro » 25 Apr 2020, 16:36

Hi,

I am trying to automate my telescope to image a list of objects.
How can I safely stop imaging a particular object if the object sky is cloudy and move on to the next object?

I am using the script function Image.FindCoordinates(ra,de,nstars)
If I set a conditional so that if the number of stars is less than nstars the script would move on to the next object
or is there a more elegant approach?

Thanks
Erik

VAastro
Posts: 19
Joined: 07 Jan 2019, 18:32

Re: Script control of images

Post by VAastro » 01 May 2020, 17:25

The problem has been solved using the return value of FindCoordinates:

....
....
nstars = 5
ok = Image.FindCoordinates(ra,de,nstars)
if not ok then continue
....
....

so when the function fails, the script continues to the next object.

Post Reply