Put simply, this book is about helping you to write your own data reduction software. This is achieved by showing you how to access and manipulate astronomical data files.
This book is partly for people who haven’t got the tool to do the job. For example, existing software may not work on a particularly non-standard data set. They are in the position of having to write their own data reduction software to get around the problem. This isn’t always an easy task, especially for the inexperienced programmer.
Alternatively, this book can be used by people who have an idea for a new data reduction algorithm. They might even want to pass it on to a larger audience and want to be sure that it will work on a variety of machines with a wide variety of data formats.
Before you go any further:
Make absolutely sure you need, to write new software.
Use the findme command (SUN/188) to see if the job has already been done. Ask your site manager. Ask a Starlink programmer (you’ll find their email addresses on the back of the Starlink Bulletin or on the Starlink home page). Above all, don’t waste your valuable time on writing software that already exists.
This cookbook comes in two parts.
The first part leads you through a series of examples of very simple programs which handle data files. It tries to expose you to the absolute minimum of “inside trickery”, Much non-essential information is sacrificed to help you get basic jobs done quickly.
The second part of this book delves a little deeper. It takes an approach which involves writing more complex code than that seen in part one, but it’s code that can do more stuff. We’ll also start looking at how to write software packages i.e. a toolbox to keep your tools in.
This book is not for people who want to know the in-depth workings of data mapping, format conversion and the like (although you will certainly find the references to the appropriate documents here). It is therefore not recommended that you use this guide as a manual.
Hopefully, this book will show you how to do stuff you didn’t know how to do before. For example, after part one you’ll be able to write simple software which can:
After reading part two of this book, you’ll be able to:
This first section of the cookbook follows a tutorial style. Its aim is to get you creating very simple applications. Because of its tutorial style, more confident programmers might find it more useful to skip the explanatory text and go straight to the sample source codes.
However, I recommend that even the experienced programmer should read the sections on interface files and the alink command.