Print "+--------------------------+" Print "| AstroArt Auto Mosaic |" Print "| |" Print "| (C) Steve Hill, 2005 |" Print "+--------------------------+" Print "" rac = Telescope.RA * 60 * 15 decc = Telescope.DEC * 60 Print "RA :" + RA$(rac / 60 / 15) Print "DEC:" + DEC$(decc / 60) Print "" size = 0 While size <= 0 Input "Object dimensions (arcmin)", size Endwhile cam = 0 While cam <> 1 And cam <> 2 Input "Camera (1 = MX716, 2 = MX5C)", cam Endwhile ' ' Fields of view for cameras on 10 inch F10 LX200 ' If cam = 1 Then xfov = 8.7 yfov = 6.5 Endif If cam = 2 Then xfov = 6.6 yfov = 4.9 Endif ratio = 0 While ratio <= 0 Input "f-ratio", ratio Endwhile ' Natural f-ratio is 10 ' xfov = xfov * 10 / ratio yfov = yfov * 10 / ratio ' Compensate for declination xfov = xfov / Cos(DegToRad(decc / 60)) Print "CCD field of view: " + Left$(Str$(xfov),5) + " by " + Left$(Str$(yfov), 5) base$ = "" While base$ = "" Input "Object name", base$ Endwhile ' ' Obtain exposure time ' exposure = 0 While exposure = 0 Input "Exposure (sec)", exposure Endwhile ' ' Obtain number of exposures ' numExposures = 0 While numExposures = 0 Input "Number of exposures", numExposures Endwhile ' ' Obtain filter names ' filter$ = "" While filter$ = "" Input "Filters (eg. RGB)", filter$ Endwhile filter$ = UCase$(filter$) ' ' Calculate the origin of the mosaic ' raOrg = rac - size / 2 decOrg = decc - size / 2 ' ' How much of the images overlap ' overlap = 0 While overlap <= 0 Or overlap >= 100 Input "Overlap %", overlap Endwhile ' ' Calculate the steps required in x an y ' overlap = overlap / 100 effective = 1 - overlap fsteps = (size - overlap * xfov) / (xfov - xfov * overlap) xsteps = Int(fsteps) If fsteps <> xsteps Then xsteps = xsteps + 1 Endif If xsteps <= 0 Then xsteps = 1 Endif fsteps = (size - overlap * yfov) / (yfov - yfov * overlap) ysteps = Int(fsteps) If fsteps <> ysteps Then ysteps = ysteps + 1 Endif If ysteps <= 0 Then ysteps = 1 Endif ' ' Contants for delays between movements and filter changes ' wheelPause = 2 shortTelescopePause = 3 longTelescopePause = 6 ' ' Calculate and print details of mosaic ' mosaicSize = xsteps * ysteps frames = mosaicSize * Len(filter$) * numExposures time = frames * exposure Print "Mosaic sides : " + Str$(xsteps) + "x" + Str$(ysteps) Print "Number of frames : " + Str$(frames) Print "Exposure time (hh mm ss) : " + RA$(time / 60 / 60) frameCount = 0 dec = decOrg ra = raOrg ' ' Give opportunity to quit proceedings before moving scope ' ok$ = "" While ok$ = "" Input "OK to start? (Y/N)", ok$ Endwhile ok$ = Left$(UCase$(ok$), 1) If ok$ = "N" Then Print "Program aborted" Goto 1000 Endif ' ' Everything is set up. Cycle over each image, each filter and for the ' number of exposures. Save results. ' For x = 1 To ysteps ra = raOrg For y = 1 To xsteps Print "Seeking ..." Telescope.Goto(ra / 60 / 15, dec / 60) If y = 1 Then Pause(longTelescopePause) Else Pause(shortTelescopePause) Endif For f = 1 To Len(filter$) f$ = Mid$(filter$, f, 1) Print "" Print "Selecting filter " + f$ Wheel.Goto(f$) Pause(wheelPause) For e = 1 To numExposures frameCount = frameCount + 1 Print "Taking exposure " + Str$(frameCount) + " of " + Str$(frames) Camera.Start(exposure) Camera.Wait file$ = base$ + "_" + f$ + "_(" + Str$(x) + "," + Str$(y) + ")_" + Str$(e) + ".fit" Print "Saving image as " + file$ Image.Save(file$) Image.Close Next e Next f ra = ra + xfov * effective Next y dec = dec + yfov * effective Next x Print "Returning to centre of object" Telescope.Goto(rac / 60 / 15, decc / 60) ' ' Exit point ' 1000 Print "Mosaic program finished"