Dim cam ' "The" Camera object Dim Telescope, Util Dim startnum, totalexposures, nexposures, sequencenum, exptime_f0, exptime_f1, exptime_f2, exptime_f3, exptime_f4 Dim file_string Dim shutter Dim filternum0, filternum1, filternum2, filternum3, filternum4, filter_string Dim binning_f0, binning_f1, binning_f2, binning_f3, binning_f4 Dim rootpath Dim obsdate Dim fullpath Dim targetname, targetRA, targetDec ' ' Change the obsdate subdirectory name to write to a new night ' ' Please ask the observing specialist to create a new folder for your observing date in ' the images directory for AS04 ' obsdate = "20220208" ' pathname = "C:\Users\Public\Documents\ACP Web Data\Doc Root\images\bketzeba\" pathname = "C:\Users\Public\Documents\ACP Web Data\Doc Root\images\AS04\" fullpath = pathname & obsdate ' ' Change the following variables for your target and exposure ' target info: targetname, targetRA, targetDec ' startnum is the inital image number in a sequence, usually 0 or 1 but could start at any integer ' totalexposures is number of exposures you want to take ' nexposures is sequence number to end with startnum + totalexposures ' exptime_f0 is exposure time in seconds for filter 0 (ex: integration time for u) ' exptime_f1 is exposure time in seconds for filter 1 (ex: integration time for g) ' : ' : ' exptime_f4 is exposure time in seconds for filter 4 (ex: integration time for g) ' shutter is 1 for light (open shutter) or 0 for darks ' filternum0 is the number of the filter0 in the wheel 0 to 9 (sdss_u is poition 1) ' filternum1 is the number of the filter1 in the wheel 0 to 9 (sdss_g is position 2) ' : ' : ' filternum4 is the number of the filter4 in the wheel 0 to 9 (sdss_g is position 2) ' binning_f0 is the bin factor for the camera (1,2, 3, etc) while using filter 0 (in case you want different binning) ' binning_f1 is the bin factor for the camera (1,2, 3, etc) while using filter 1 ' : ' : ' binning_f4 is the bin factor for the camera (1,2, 3, etc) while using filter 4 targetname = "ADLeo_seq7" targetRA = "10:19:31.28" targetDec = "+19:52:66.01" startnum = 2 totalexposures = 997 nexposures = startnum + totalexposures exptime_f0 = 20 exptime_f1 = 1 exptime_f2 = 3 exptime_f3 = 2 exptime_f4 = 1 shutter = 1 filternum0 = 1 filternum1 = 2 filternum2 = 3 filternum3 = 4 filternum4 = 5 binning_f0 = 2 binning_f1 = 2 binning_f2 = 2 binning_f3 = 2 binning_f4 = 2 ' ' Create an ACP object for telescope and utility functions ' Set Telescope = CreateObject("ACP.Telescope") Set Util = CreateObject("ACP.Util") ' ' Slew to your target coordinates and track ' Telescope.TargetRightAscension = Util.HMS_Hours(targetRA) Telescope.TargetDeclination = Util.DMS_Degrees(targetDec) 'wscript.echo "Current position", Util.Hours_HMS(Telescope.RightAscension), Util.Degrees_DMS(Telescope.Declination) Util.Console.Clear Util.Console.PrintLine "" Util.Console.PrintLine "Start observing script" Util.Console.PrintLine "" Util.Console.PrintLine "Slewing to " & targetname & " ..." Telescope.SlewToTarget Do While Telescope.Slewing Util.WaitForMilliseconds(1000) LOOP 'wscript.echo "Slew complete" Util.Console.PrintLine "Slew Complete" ' Wait 15 seconds to settle the telescope and update the position Util.WaitForMilliseconds(15000) 'wscript.echo "" 'wscript.echo "Current position", Util.Hours_HMS(Telescope.RightAscension), Util.Degrees_DMS(Telescope.Declination) ' ' Create the camera object and see if it is connected ' Set cam = CreateObject("MaxIm.CCDCamera") cam.LinkEnabled = True if Not cam.LinkEnabled Then 'wscript.echo "Failed to start camera." Quit End If Util.Console.PrintLine "Starting exposure sequence.... " sequencenum = startnum Do While sequencenum < nexposures ' ' Setting up time, binning and filter for first exposure in sequence ' filter_string = "u" Util.Console.PrintLine "Setting up the camera binning and filterwheel for " & filter_string cam.BinX = binning_f0 cam.BinY = binning_f0 cam.Filter = filternum0 file_string = fullpath & "\" & targetname & "_" & filter_string & "_" & sequencenum & ".fits" Util.Console.PrintLine "Camera is ready, Exposing for " & exptime_f0 & " seconds" 'wscript.echo "Camera is ready, Exposing for " & exptime_f0 & " seconds." cam.Expose exptime_f0, shutter, filternum0 Do While Not cam.ImageReady Loop cam.SaveImage file_string Util.Console.PrintLine "Exposure " & sequencenum & " of " & nexposures & " for filter " & filter_string & " is done, Image saved" 'wscript.echo "Exposure is done, Image saved as " & file_string ' ' Setting up time, binning and filter for second exposure in sequence ' filter_string = "g" Util.Console.PrintLine "Setting up the camera binning and filterwheel for " & filter_string cam.BinX = binning_f1 cam.BinY = binning_f1 cam.Filter = filternum1 file_string = fullpath & "\" & targetname & "_" & filter_string & "_" & sequencenum & ".fits" Util.Console.PrintLine "Camera is ready, Exposing for " & exptime_f1 & " seconds" 'wscript.echo "Camera is ready, Exposing for " & exptime_f1 & " seconds." cam.Expose exptime_f1, shutter, filternum1 Do While Not cam.ImageReady Loop cam.SaveImage file_string Util.Console.PrintLine "Exposure " & sequencenum & " of " & nexposures & " for filter " & filter_string & " is done, Image saved" 'wscript.echo "Exposure is done, Image saved as " & file_string sequencenum = sequencenum + 1 ' ' Setting up time, binning and filter for third exposure in sequence ' filter_string = "r" Util.Console.PrintLine "Setting up the camera binning and filterwheel for " & filter_string cam.BinX = binning_f2 cam.BinY = binning_f2 cam.Filter = filternum2 file_string = fullpath & "\" & targetname & "_" & filter_string & "_" & sequencenum & ".fits" Util.Console.PrintLine "Camera is ready, Exposing for " & exptime_f2 & " seconds" 'wscript.echo "Camera is ready, Exposing for " & exptime_f2 & " seconds." cam.Expose exptime_f2, shutter, filternum2 Do While Not cam.ImageReady Loop cam.SaveImage file_string Util.Console.PrintLine "Exposure " & sequencenum & " of " & nexposures & " for filter " & filter_string & " is done, Image saved" 'wscript.echo "Exposure is done, Image saved as " & file_string sequencenum = sequencenum + 1 ' ' Setting up time, binning and filter for fourth exposure in sequence ' filter_string = "i" Util.Console.PrintLine "Setting up the camera binning and filterwheel for " & filter_string cam.BinX = binning_f3 cam.BinY = binning_f3 cam.Filter = filternum3 file_string = fullpath & "\" & targetname & "_" & filter_string & "_" & sequencenum & ".fits" Util.Console.PrintLine "Camera is ready, Exposing for " & exptime_f3 & " seconds" 'wscript.echo "Camera is ready, Exposing for " & exptime_f3 & " seconds." cam.Expose exptime_f3, shutter, filternum3 Do While Not cam.ImageReady Loop cam.SaveImage file_string Util.Console.PrintLine "Exposure " & sequencenum & " of " & nexposures & " for filter " & filter_string & " is done, Image saved" 'wscript.echo "Exposure is done, Image saved as " & file_string sequencenum = sequencenum + 1 ' ' Setting up time, binning and filter for fifth exposure in sequence ' filter_string = "z" Util.Console.PrintLine "Setting up the camera binning and filterwheel for " & filter_string cam.BinX = binning_f4 cam.BinY = binning_f4 cam.Filter = filternum4 file_string = fullpath & "\" & targetname & "_" & filter_string & "_" & sequencenum & ".fits" Util.Console.PrintLine "Camera is ready, Exposing for " & exptime_f4 & " seconds" 'wscript.echo "Camera is ready, Exposing for " & exptime_f4 & " seconds." cam.Expose exptime_f4, shutter, filternum4 Do While Not cam.ImageReady Loop cam.SaveImage file_string Util.Console.PrintLine "Exposure " & sequencenum & " of " & nexposures & " for filter " & filter_string & " is done, Image saved" 'wscript.echo "Exposure is done, Image saved as " & file_string sequencenum = sequencenum + 1 Loop ' ' Turn off tracking once the script is done ' If Telescope.CanSetTracking Then ' Turn tracking off If Telescope.Tracking Then ' Avoid needless change Util.Console.PrintLine " (tracking off)" Telescope.Tracking = False End If End If Util.Console.PrintLine "Script complete" ' Wait 5 seconds to read the message Util.WaitForMilliseconds(5000)