There are two varieties of source code here. The first variety are 'modular' routines that can be used as fundamental building blocks for writing your own scripts. The second are code fragments that demonstrate techniques for solving certain problems or providing certain features.
Many of the items on the Software page are also available as complete open-source applications.
All software and source code samples available from this site are licensed under the GNU General Public License except where otherwise specified. Please note that this license requires that if you release your modified versions, you must release them as free software. Contact me and I will be happy to host your modifications here if you don't have a way of serving them.
This section seeks to provide a set of routines that do specific jobs that are widely used at robotic and remote observatories. All the routines can be put into the same script and will work together with little or no tweaking.
The origin of this section is my own script-writing activities. I've put together a couple dozen scope-control scripts since 1999, mostly for friends who wanted to do something a bit differently than the other guy. It became much easier to identify "standard" activities (such as "take an image" and "slew the telescope to the target") and write "standard" routines to accomplish these activities, and incorporate these as "modular" building blocks into the new scripts. Where necessary, they could be altered and tweaked to get the desired performance without having to re-invent the wheel every time I sat down to write a new script.
The idea here is to give you some raw material to work with when devising your own scripts. You can use whatever tools are needed, change them however you need to change them, and otherwise tinker with the operation of a script without having to know a lot about writing source code and without having to conceive everything from the ground up. You can use as much or as little as you want from the collection modular routines.
There are certain limitations:
The modules:
Spiral Search (zip file) - Occasionally an image will be taken that isn't pointed precisely. In these cases, a straightforward attempt to solve the image in PinPoint will fail, simply because the image isn't within the star matching area. This function provides a spiral search algorithm that will hunt thruogh an ever-increasing checkerboard of possible fields for a solution to the FITS image. It can be plugged into or adapted to larger scripts. Requires PinPoint 3+. This is an adaptation of one of Bob Denny's subroutines.
Spiral Search - a better way of doing the spiral searching described above. Requires PinPoint 3.
Guide Star Acquisition (zip file) - This is a subroutine that autoguides an image. It picks a guide star from a user-specified star catalog, rather than searching for one randomly. Requires PinPoint 3+ and Maxim DL/CCD 2.1+. By John McClusky.
Waiting for Camera to Cool - This is a short code snippet that demonstrates a straightforward way to have a script wait for a CCD camera to come to a predetermined temperature before continuing with the execution of the script. Requires Maxim 2.1+ but is definitely adapatable.
Using a Non-Integrated Guider - When using a guider that is distinct from the imaging camera - say, an ST-6 guiding an AP8 imager - the guider can be timed out or crashed when the imager is downloading. This code sample deminstrates a simple VBScript technique that avoids the problem, by suspending the guider just before the image is downloaded. Written for Maxim DL/CCD 2.1+ and ACP 1.3+, but is adaptable.