' 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 necessay 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. CreateImagesDir Atlas.Open Atlas.OpenMinorPlanets if connectInstruments then Camera.Connect Camera.SetTemperature(-25) Wheel.Connect filter = "R" Focuser.Connect Focuser.SoftwareCompensation(1) Telescope.Connect 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 lon = Observatory.Longitude lat = Observatory.Latitude print "Observatory Coordinates:"; lon; lat '*********************** Main cycle on all objects ********************** 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 ra,de = ObjectCoordinates(rawname) print "Object "; rawname + " " + name, "RA "; ra, "DEC "; de PHD.Stop Telescope.Goto(ra,de) Atlas.Goto(ra, de, 0.4, 7) Telescope.Wait(ra, de, 10) Pause(15) 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) TakeSequence(10, 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 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 function CalcExposure(objectMag) if Objectmag < 12 Then return 30 if Objectmag < 14 Then return 60 if Objectmag < 15 Then return 120 if Objectmag < 16 Then return 180 return 240 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 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 if al < 15 or al > 65 then print info, "Altitude Not in range:"; al accept = false end if 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