' From a list of objects in a text file (C:\Users\Public\Documents\Astroart\Script\ARPS 2026 Asteroid list.txt)
' check if they are within within limits then GoTo object
' Fabio is creating some new commands for the Star ATLAS and some of these are used in this
' script these open the ATLAS and also the MPCOrb file and also centre the image.
' I use an LX200 GPS but always do an initial sychronise on an object even if nothing is visible just point it
' due South (or North if in the Southern hemisphere) and at around 45 degrees above the hoirizon then find a
' star that is within say 30 degrees of this location and synchronise the scope to it, it may not be in view
' but it gives the scope something to work with.
' If you can see an object sychronise the telescope position to the object this may not be necessary for your setup.
' I use PHD2 and have not tested this using the AstroArt Guider and you will have to alter the guiding section if you use AA.
logsDir = "V:\Astroart\Script\Z09 images"
imagesDir = "V:\Astronomical Images from SX Trius Pro 694"
' (mine is in the V drive but just change this to wherever suits you)
' it will create a folder eg "20260110" The script will also add files to it based on the object number and
' name and use the JD to ensure if you add more images into the same folder of the same object they are not overwritten
objectFile = "C:\Users\Public\Documents\Astroart\Script\ARPS 2026 Asteroid list.txt"
' Change the file location to suit your needs
connectInstruments = true
doAutofocus = true
doAutocenter = true
' change these depending your needs. to speed up the operation of the script and to see what is happening set doAutofocus to false
CreateImagesDir
'The following two commands are only availabloe in SP4 which is not yet released, if you want to use these contact Fabio who has agreed to send them out.
Atlas.Open
'You need to have downloaded a recent version from MPCOrb and stored it on you computer, and also set where it is stored in the Options Star Atlas settings
Atlas.OpenMinorPlanets
' To make this run with the Simulator set everything to work with the simulator in effect it will use you last selected options so you dont have to physically do this everytime.
if connectInstruments then
Camera.Connect
Camera.SetTemperature(-25)
Wheel.Connect
filter = "R"
Focuser.Connect
Focuser.SoftwareCompensation(1)
Telescope.Connect
' Dont worry if you dont use PHD2 the script will ignore it during the demonstration
PHD.ConnectDevices
print "Number of filter positions "; Wheel.Filters
Wheel.Goto(filter)
Wheel.Wait
print "Filter Type "; Wheel.PositionName;" "; "Filter Position "; Wheel.Position
end if
Telescope.List.Clear
Telescope.List.Open(objectFile)
' Telescope.List.Sort
n = Telescope.List.Count
print "Number of Objects in the List"; n
' This picks up the latitude and longitude you have set in the Options Observer set up of the main program
lon = Observatory.Longitude
lat = Observatory.Latitude
print "Observatory Coordinates:"; lon; lat
'*********************** Main cycle on all objects i.e. the number of times to run through the Asteroid target list **********************
nCycles = 10
for cycle = 1 to nCycles
print "Cycle:" ; cycle ; "/" ; nCycles
for i = 1 to n
rawname = Telescope.List.Name(i)
name = ObjectName(rawname)
objectmag = ObjectMagnitude(name)
print rawname; name; objectmag
exposeformag = CalcExposure(objectMag)
rawname = FixFilename(rawname)
' Objects not observarble are skipped here:
if not AcceptObject(rawname, name, Objectmag, lon, lat) then
print "Object:" ; rawname ; "not observable"
continue
end if
' The line below finds the current position of the object, so the target list file does not need to have accurate RA and Dec if you look at the ARPS 2026 Asteroid file the coordinates are all the same.
ra,de = ObjectCoordinates(rawname)
print "Object "; rawname + " " + name, "RA "; ra, "DEC "; de
PHD.Stop
Telescope.Goto(ra,de)
'The last two figures below are to suit my system, this may also be part of the yet to be released SP4
Atlas.Goto(ra, de, 0.4, 7)
Telescope.Wait(ra, de, 10)
'I have reduced the settling time from 15 to 5 seconds to speed up the demonstration
Pause(5)
print "Telescope GOTO completed"
if doAutofocus then
print "Autofocus in Progress"
Camera.FullframeAutofocus(5)
print "Autofocus completed"
end if
if doAutocenter then AutoCenterField
PHD.Guide(1.5,0.5,50)
' Ihave set the number of images down to 2 to speed things up for demonstrating how it works
TakeSequence(2, exposeformag , 2, "R")
print "Sequence completed"
next i
next cycle
' ******************************** End of script ******************************
end
sub TakeSequence(images,expo,binning,filter)
Camera.Binning(binning)
for im = 1 to images
if filter <> "" then
Wheel.Goto(filter)
Wheel.Wait
Print "taking image "; im; " of ";images
end if
Camera.Start(expo)
expoJD = JD
'The command below is part of the yet to be released SP4, it refreshes the SkyAtlas so that the moving objects (asteroids and comets) are correctly displayed
' Over time they would otherwise be shown incorrectly positioned
Atlas.SetJD(jd)
Camera.Wait
' the lines below show some of the parameters you can get from the image FITS header to use if required,
' I am using them to create a tab delimited file for each image as it is taken.
' the FILTER is already defined earlier in this program but if you want to
' you can use filter=Image.GetKey$("FILTER")
exptime=Image.GetKey$("EXPTIME")
temperat=Image.GetKey$("TEMPERAT")
ambtemp=Image.GetKey$("AMBTEMP")
focuspos=Image.GetKey$("FOCUSPOS")
dateobs=Image.GetKey$("DATE-OBS")
objctra=Image.GetKey$("OBJCTRA")
objctdec=Image.GetKey$("OBJCTDEC")
origin=Image.GetKey$("ORIGIN")
observer=Image.GetKey$("OBSERVER")
JD$=Image.GetKey$("JD")
FWHM=Str(Image.FWHM)
Roundness=Str(Image.Roundness)
Inclination=Str(Image.Inclination)
PSNR=Str(Image.PSNR)
' object=Image.GetKey$("OBJECT")
object = rawname + " "+name
AppendText(LTrim(JD$)+","+date+","+time+","+object+","+observer+","+LTrim(exptime)+","+ucase$(filter)+","+objctra+","+objctdec+","+FWHM+","+Roundness+","+Inclination+","+PSNR+","+LTrim(temperat)+","+LTrim(ambtemp)+","+LTrim(focuspos),"V:\Astroart\Script\Z09 images\" + newyear + ".txt")
AppendText(crlf$,logsDir + "\" + newyear + ".txt")
AppendText(LTrim(JD$)+","+date+","+time+","+object+","+observer+","+LTrim(exptime)+","+ucase$(filter)+","+objctra+","+objctdec+","+FWHM+","+Roundness+","+Inclination+","+PSNR+","+LTrim(temperat)+","+LTrim(ambtemp)+","+LTrim(focuspos),"V:\Astroart\Script\Z09 images\" + "\" + "All Images" + ".txt")
AppendText(crlf$,logsDir + "\" + "All Images" + ".txt")
JDDate = Replace(JDToDateISO(JD),":","_")
JDDate = Replace(JDDate,"-","")
JDDate = Replace(JDDate,"_","")
JDDate = Replace(JDDate,"T","_")
fileName = rawname + " "+name+"_" + JDDate + "_" +LTrim(exptime)+ "s_" + filter + ".fit"
Image.Save(fileName)
Image.ClosePrevious
next im
end sub
sub CreateImagesDir
newday = Replace(Date," ","")
newyear = Mid(Date,1,4)
newtime = Replace(Time," ","")
newdir = imagesDir + "\" + newyear + "\" + newday
CreateDir(newdir)
SetCurrentDir(newdir)
print newdir
print GetCurrentDir()
end sub
sub AutoCenterField
print "Checking " + rawname + " " + name;" is centered on the image"
Camera.Start(5)
Camera.Wait
nstars = 6
Image.FindCoordinates(ra,de,nstars)
dist = Image.DistanceFrom(ra,de)
if dist > 0.02 then
print "Centering telescope..."
Telescope.SyncTo(Image.RA,Image.DEC)
Telescope.Goto(ra,de)
Telescope.Wait
Pause(10)
Atlas.Goto(ra, de, 0.4, 7)
end if
Image.Close
end sub
' For demonstration purposes I have shortened all the calculated exposure times
function CalcExposure(objectMag)
if Objectmag < 12 Then return 1
if Objectmag < 14 Then return 2
if Objectmag < 15 Then return 3
if Objectmag < 16 Then return 4
return 5
end function
function AcceptObject(rawname, name, mag, lon, lat)
accept = true
ra,de = ObjectCoordinates(name)
ha = HourAngle(ra, lon)
info = rawname + " " + name
print info, " hour angle " ; ha
print name
print "Distance From Moon"; DistanceFromMoon(ra,de)
if DistanceFromMoon(ra,de) < 15 then accept = false
print "Distance From Sun"; DistanceFromSun(ra,de)
if DistanceFromSun(ra,de) < 20 then accept = false
'For my observatory four hours before and 1 hour after objects cross the meridian are good but just change these to suit your situation
if ha < -4 or ha > 1 then
print info, "Not within range of meridian:"; ha
accept = false
end if
az,al = EquatToAltaz(ra,de,lon,lat)
print "az" ; az ; "al" ; al
' I have limited the altitude range to between 15 and 65 degrees to suit my observatory
if al < 15 or al > 65 then
print info, "Altitude Not in range:"; al
accept = false
end if
' You may want to change the maximum magnitude figure to suit you needs
if mag > 18 then accept = false
print info, "Object Magnitude in range:"; mag
return accept
end function
function FixFilename(rawname)
rawname = Replace(rawname, "\", "_")
rawname = Replace(rawname, "/", "_")
rawname = Replace(rawname, "*", "_")
rawname = Replace(rawname, "<", "_")
rawname = Replace(rawname, ">", "_")
return rawname
end function
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Here is the Target list file and yes it does contain one comet 29P Schwassmann-Wachmann. Please note this script will work just as well for things such as the Messier or Caldwell objects or any
other list of objects, variable stars, exoplanets etc.
"29P" 07 56 53.3 +60 21 00
"2109" 07 56 53.3 +60 21 00
"2387" 07 56 53.3 +60 21 00
"2068" 07 56 53.3 +60 21 00
"2490" 07 56 53.3 +60 21 00
"2545" 07 56 53.3 +60 21 00
"310" 07 56 53.3 +60 21 00
"383" 07 56 53.3 +60 21 00
"431" 07 56 53.3 +60 21 00
"586" 07 56 53.3 +60 21 00
"846" 07 56 53.3 +60 21 00
"930" 07 56 53.3 +60 21 00
"1014" 07 56 53.3 +60 21 00
"1082" 07 56 53.3 +60 21 00
"1124" 07 56 53.3 +60 21 00
"1497" 07 56 53.3 +60 21 00
"1569" 07 56 53.3 +60 21 00
"1638" 07 56 53.3 +60 21 00
"1669" 07 56 53.3 +60 21 00
"1678" 07 56 53.3 +60 21 00
"1860" 07 56 53.3 +60 21 00
"1964" 07 56 53.3 +60 21 00
"2123" 07 56 53.3 +60 21 00
"2264" 07 56 53.3 +60 21 00
"2270" 07 56 53.3 +60 21 00
"2386" 07 56 53.3 +60 21 00
"2525" 07 56 53.3 +60 21 00
"2862" 07 56 53.3 +60 21 00
"2882" 07 56 53.3 +60 21 00
"2976" 07 56 53.3 +60 21 00
"3054" 07 56 53.3 +60 21 00
"3172" 07 56 53.3 +60 21 00
"3175" 07 56 53.3 +60 21 00
"3392" 07 56 53.3 +60 21 00
"3406" 07 56 53.3 +60 21 00
"3909" 07 56 53.3 +60 21 00
"3972" 07 56 53.3 +60 21 00
"4445" 07 56 53.3 +60 21 00
"5650" 07 56 53.3 +60 21 00
"6975" 07 56 53.3 +60 21 00
"7731" 07 56 53.3 +60 21 00
"8087" 07 56 53.3 +60 21 00
"8151" 07 56 53.3 +60 21 00
"10304" 07 56 53.3 +60 21 00
"10416" 07 56 53.3 +60 21 00
"12069" 07 56 53.3 +60 21 00
"21910" 07 56 53.3 +60 21 00
"152637" 07 56 53.3 +60 21 00
"162882" 07 56 53.3 +60 21 00
"164216" 07 56 53.3 +60 21 00
"217628" 07 56 53.3 +60 21 00
"221455" 07 56 53.3 +60 21 00
"363790" 07 56 53.3 +60 21 00
"374038" 07 56 53.3 +60 21 00