David's Astronomy Pages
Scripting

Computer Control
Computer
Control
  Home
Home
Page
  Image Gallery
Image
Gallery
 

Bullet Introduction I've been writing and using Visual Basic script programs for Image Acquisition and Analysis since 2002 and these have proved to be a significant enabler for my astronomical work.

Several programs have been written during this time, each building upon the foundation of the previous program and reusing main code components and introducing improved functionality.  My program's access and utilise CCDSOFT and THESKY software programs using method/property calls.

The current program (AIS) is written in VB.Net and using it I have functionality which pretty well matches any of the commercially available telescope/imaging control programs which have sprung onto the market place in recent years.  

Scripting/programming is not for everyone, but for me it provides me with the flexibility to add almost any new functionality/feature just as quick as I come up with a need or new idea and then write/adapt and test the necessary new subroutines.

This page summarises the various phases of program/script  development over the period 2002 to 2012.

Bullet CCD Imaging Script Program (2002-2003)
Bullet VMA Program (2003)
Bullet Telescope and CCD Imaging Scripts (2004)
Bullet Telescope and CCD Imaging Scripts (2005)
Bullet Astronomical Imaging Support (AIS) Program - 2006
Bullet Astronomical Imaging Support (AIS) Program - 2012
 
 
 
 
 
 
 
 
 

Introduction

In October 2002 I began a project to record the variations of about 15 variable stars in the constellations Andromeda, Lacerta and Pegasus. The stars were some that were suggested in David Levy's book "Observing Variable Stars - a guide for the beginner". Most of the stars were long period variables which appeared to suite my observing environment where nights can be clouded out for 2 weeks at a time, which would ruin attempts at observing shorter range variables which need to followed every night or two.

I commenced by "manually" aligning on about 15 variable stars. "Manually" acquiring each star in turn and waiting for images to be taken is quite time consuming and a promised to be a little monotonous if repeated regularly for the same set of stars, even with the aid of software aids such as TheSky and CCDSoft.  I therefore looked at methods for automating the process.  I was also very much interested in developing a quicker methods to manage and analyse the megabytes of image data that I was beginning to shoot each observing session.

The Software Bisque product Orchstrate was considered, and although purchased and initially used for automating the acquisition of Mosaic Images via links with TheSky, it did not offer sufficient flexibility for the tasks that I had in mind.

With the benefit of previous programming experience and the useful .VBS script examples provided with CCDSoft vn 5.00.072 onwards and on Tom's Corner at Software Bisque web site, I quickly adapted or knocked together some scripts that began to perform some of the tasks that I required.  However managing them together during further development became difficult and I therefore chose the route of combining them into a single menu driven script, with sections/subroutines for each specific task. 

By November 2002 I had pulled together an integrated script control program named "CCD Imaging Scripts & Utilities".  This was operated from late 2002 to the end of 2003.   

During 2004 I began developing a new front-end using HTML Application (HTA) interface, which reused major code sections from the 2002-2003 program.  Two programs were initially developed -  "VMA Program" (for performing rapid batch photometric analysis of images of variable stars) and "Telescope and CCD Imaging Scripts" (for automating image acquisition and image analysis).  The VMA program was developed to assist an observing programme being conducted by Dale Mais (USA) examining  potential flare-up in Mira type variables    In early 2005 the two programs were combined into a single program "Telescope and CCD Imaging Scripts"  version 2.5.   

Two particular factors held back further development of the HTA based program despite the introduction of specific workarounds. These factors were the inability to have multiple program threads (preventing the ability to control refresh of status information and preventing easy program pause/interrupt) and the practical difficulties in managing the growing code which by this stage had reached some 17300 lines in length.  

In late 2005 I began porting the code into VB.Net. This took some time to perform as several new programming techniques and workarounds had to be mastered.  However by beginning of 2006 the new program, "Astronomical Imaging Support (AIS)" was ready to take over duties in the observatory. Further development has occurred through 2006, including a Job Control screen which now lies at the heart of my image acquisition workflow.    Further developments have occurred in the years since.   The current version dates to 2012.

The following sections summarizes the main phases of program development in chronological order.

Back to Top


CCD Imaging Scripts & Utilities Program (2002-2003)

In November 2002 I wrote an integrated script control program named "CCD Imaging Scripts & Utilities".  The program was written in VBScript and operated via Windows Script Host (VSH) . It was used from late 2002 to end of 2003.  The following screen captures show the Welcome Screen and Main Menu.  

Image


Further details on the program, including further screen shots and information on specific scripts/utilities is contained at the following link :
"CCD Imaging Scripts & Utilities" program (2002-2003)

Back to Top


VMA Program (2003)

In 2003 I began collaborating with Dale Mais (USA) who was embarking on an observing programme to look for potential flare-up in Mira-type variables stars and required assistance to develop a tool that would perform rapid batch photometric analysis of images. This led to the development of the "VMA Program" (Variable star Magnitude Analysis).  

This software program comprised a set of visual basic (VBS) scripts that were accessed through a HTML Application (HTA) user interface.   The picture below shows the VMA program (version 1.5) in operation. 

Image

The main program scripts were "1.2 Analysis" for performing differential photometry and "1.3 Analysis" for performing absolute (all sky) photometry.

The tool is referred to in publications describing the status and results of the mira variable star monitoring programme.
Monitoring of Mira Variable Stars Mais, D. E.; Stencel, R. E.; Richards, D., JAAVSO. Vol 33, No 1, 2004
 http://www.aavso.org/publications/ejaavso/v33n1/48.pdf

Back to Top


Telescope and CCD Imaging Scripts (2004)

During late 2003 / early 2004 I incorporated my previous VBS script within a new program that was operated through a HTML Application (HTA) user interface.    The picture above shows the main menu screen from the ' program version ('2.3') as it appeared in July-August 2004.

Image

Although the VB/HTA programming methods did not provide any threading capability a workaround was developed to allow the program to be paused or gracefully aborted. The following screen shot shows the Script Controller tool that was used to provide this functionality. The script controller would write a small file to disk in a location monitored by the main program and used to signal whether a pause, resume or abort was required..

Image

In around October 2004 I began working on a program version (2.4) which incorporated the "VMA program" within the "Telescope and CCD Imaging Scripts" program.   The VMA interface was updated to allow separate reference and results files for the two  VMA analysis scripts (1.2 & 1.3). The following shows the VMA Screen from this time. 

Image

Back to Top


Telescope and CCD Imaging Scripts (2005)

2005 saw the continued development of scripts written in VBScript and operated through a HTML Application (HTA) user interface.  Two parallel products of my Telescope and CCD Imaging Scripts program were maintained (a "Released' program" and a "Private Program").  

The picture above shows the main menu screen from the 'Released' program version ('2.5.4') as it appeared in May 2005. 

Image

The "released version" was operated by Dale Mais as part of a Observing Programme looking at potential flare-up in Mira-type variables. It includes an upgraded version of the 2004 VMA Analysis sub-program for doing rapid batch photometric analysis of images of variable stars.  Upgrades in 2005 included ability to use PinPoint Engine as alternative means of obtaining a plate solution besides the CCDSOFT method. A user guide was written -  User Guide for 2.5.4 version.

A second version of the program was used for development and use in my own observatory. It incorporated additional scripts related to my own workflow.   The following picture shows the main menu screen from the script in its final form in October 2005

Image

The following screen shot shows the Image Targets sub program in action

Image

 

Back to Top


Astronomical Imaging Support (AIS) Program - 2006

In late 2005 I began porting the code into VB.Net. This took some time to perform as several new programming techniques and workarounds had to be mastered.  However by beginning of 2006 the new program, "Astronomical Imaging Support (AIS)" was ready to take over duties in the observatory.  The following picture shows the main menu screen :

Image

 

All the previous program components from 2002-2005 where incorporated included Observatory/Target Imaging, Image Analysis and VMA Analysis.  The VMA sub-program screen is shown below :

Image

Extra features and enhancements have been added throughout 2006.  These have included a Job Control screen which now lies at the heart of my image acquisition workflow.

Image

a new facility to allow selection of object from TheSky's virtual sky  to permit target compilation/planning, 

Image

and a new script for automating the astrometric analysis of specific stars 

Image 

 

Back to Top


Astronomical Imaging Support (AIS) Program - 2012

Between 2005 and 2011 there were a number of gradual improvements and enhancements to the AIS program and the code was ported first to VB express 2008 and then to  VB Express 2010.   The following picture shows the main menu screen in program in 2012.

Image

A description of the various AIS programs is given below, with emphasis on new features added since 2006. 

Session Planner Program (or Target List Editor)
This is a new program section which was added since 2006.   

The Reference List tab allows access to user defined reference lists and previous session target lists to use/reuse imaging plans for specific objects or add new ones/edit existing ones.  Lists can be saved by same name or saved as a new list.  Individual Targets or All Targets can be moved to the Observing Plan.

Image

The Observing Plan tab allows use to build up a list of targets for observation/imaging  along with their imaging details.   Targets can either be moved into the plan from reference list tab or added as a new item.   Rows can be added, duplicated , edited, deleted, moved up, moved down, sent to top of list, sent to bottom of list.  The plan can be either saved or sent to Live List in the Observatory Program.

Image

Observatory Program

The observatory program is used to run the observatory and execute an automated target acquisition and imaging job queue. 

The Observatory Tab provides a visualisation of the observatory and its equipment along with a series of Connect/Disconnect buttons.   Traffic lights and text show the status of various items of equipment such as the telescope, CCD camera, focuser and laptop.  

Image

The software has been written to allow the future control and visualisation of an observatory dome. Control is via an Arduino board & dome controller.

Image

The Session Tab sets up a new Session.

The Scope Tab deals with alignment of the scope , with tools to aid polar alignment, T Point mapping , and other things.

The Camera Tab deals with adjustments of the focuser to provide optimal focus for the CCD images (including taking a focus profile and setting best focus position) and the  acquisition of Dark, Bias and Flat Frames.

The Observing Tab deals with acquisition of image and images set under direct control of the user. It is also used to build Mosaic Imaging Plan and either execute it or sent it to job queue for later imaging. 

The Job Queue Tab shows the current target/imaging plan and has many of the functions of Observing Plan tab in Session Planner.  Targets can either be moved into the plan from the Session Planner or added as new items.   Rows can be added, duplicated , edited, deleted, moved up, moved down, sent to top of list, sent to bottom of list.  Control Buttons allow the Job Queue to be started, pause or stopped. 

Image

The Controller Tab has functions and options to adjust the run-time behaviour of an active Job, such as initiating or stopping guiding,  or  the building of a real-time light series.

Image

Image

The Sky Tab shows the quality of the images being taken. using traffic light coloured bars for  Sky Transparency, Sky Brightness, FWHM,  and either Star Elongation or Telescope temperature.   This can be useful for showing when sky quality is degrading (from cloud in the sky, or from dew on the telescope), for spotting when scope needs refocussing or when seeing is deteriorating/improving or how wind shake is affecting the scope. 

Image Reduction Program

This is a new program section which has been added since 2006 and is used to facilitate the reduction of raw images (by applying appropriate dark and flat frames) 

The Session Tab selects the Session to be reduced.

The Reduction Workflow Tab provides a series of controls to facilitate my workflow for rapid handling and reduction of files from an observing session.  Other buttons allow rapid access to specific folders or specific items of software.

The Reduction Tab provides a means to reduce a series of folders containing raw images of the same binning, exposure & filter.  The 'Employ Masters'/'Employ Next' buttons will copy in the raw images into a processing folder, automatically finds and copies the associated Master Dark and Master Flat frames to Master Reduction Frames and then call CCDSoft Image Reduction/Reduce Folder button to perform the actual Reduction.   These facility greater reduces the time and effort involved in reducing raw images, cutting down greatly the number of keyboard inputs and mouse actions. 

The Sky Tab shows the quality of the C filter images that have been taken, using traffic light coloured bars for  Sky Transparency, Sky Brightness, FWHM,  and either Star Elongation. (This is the same tab that is used by the Observatory program for real-time image quality monitoring).

Image Analysis Program

This program section faciliates processing and  analysis of reduced image sets and images files.

The Session Tab selects the Session to be analysed.

The Processing Tab lists the Target Image Sets collected during the session and provides various options for processing and manipulation of the image set.

The Analysis Tab provides a means to analyse the image currently open in CCDSoft (e.g perform an image link) and to perform certain other manipulations. The following picture shows a image that has been analysed to find and show Variable Star (V) and its associated Comparison (C) and Check (K) star.

 

VMA Program (Variable Magnitude Analysis)

The VMA program is used for performing rapid batch photometric analysis of images containing variable stars. The program is controlled and run from the VMA Tab.  The program is based on versions first created in 2003-2005, but has been upgraded / enhanced.

 


This Web Page: Scripting
Last Updated : 2015-05-16
Site Owner : David Richards
Home Page : David's Astronomy Web Site