# Automatic Observing Logs

## A Quick Overview

• To use automatic logging, you'll need to work in the Data Acquisition window, or any other window using the CCDACQ package (except for Mosaic, where you use the Data Reduction window)
• loginit: run loginit at the start of the run, or night, or any other time you want to start a new set of logs
• The logging program works automatically: intervene to add additional information to the logs only when you care to
• Test exposures are not logged
• addlog: exposures can be added to the logs explicitly by running addlog image, where image gives the name of the observation that you wish to add. Addlog can also be used to log any observations that may have been taken before loginit was called for the first time
• remark: use remark at any time to fill in comments, seeing, or any other notes that you want to add to the logs
• Use remark with no arguments to annotate the last observation recorded
• Use remark image to annotate or revise the logs for the observation called image
• viewlog: use viewlog to see the logs on the screen
• printlog: use printlog to make hardcopies of the logs
• TeX is used to format the logs. You can use TeX macros as desired in your entries
• The logs are generated in Postscript and TeX form as well as paper hardcopies

## More On Getting Started: loginit

loginit is an IRAF command that asks for the stuff that goes in the header section on the logsheets. This is the stuff that stays constant over a run, night, or some such observation set.

You must always run loginit at the start of your program. You can run it again later as desired (such as at the start of subsequent nights). You can also rerun loginit at any time to revise the page headings for any existing logs if you specify the identifying name of the logs (see below).

The first time that you run loginit after an obsinit, you will be asked to select the instrument-specific logsheet format. Current choices include "direct", "mosaic", "feed" and "gcam". You will not be asked this again (unless you run obsinit again), but can "epar loginit" to change the format explicitly.

loginit asks for a convenient identifying name for the logs (like "night1", for example). This name should be something handy to help you sort out one set of logs from another. You actually don't need to refer again to the name in routine use, but it serves as the root for all of the files generated by the logging programs, such as the Postscript and TeX outputs.

You can also specify the number of the first log page. This gives you the flexibility to number your pages consistently with logs from previous nights, runs, or so on. You can use TeX macros for formatting. For example, you might enter a filter as H$\alpha$ to get a nicely printed "H alpha" on the logsheets.

## Annotating the Log Entries: remark

Most of the information on the log sheets is obtained automatically from the observation headers. Use remark to enter comments, notes, seeing, focus, or other information external to the data-taking system. Typing remark with no other words invokes its default operation, which is to ask you to fill in information for the last exposure completed.

remark will not work on exposures in progress.

Type remark image to fill in information for the observation specified by image. This can be done at any time.

remark overwrites any old information, and thus can be used to revise old comments. The old comments and information are shown for convenience.

You can use TeX macros for formatting.

Test observations, as well as any observations recorded before the logs are initialized by loginit, will not be logged. addlog can be used at any time to add any observation to the logs.

Use addlog image to add the observation named image to the logs. Several images can be specified at once by use of wildcards.

WARNING: the name image should be unique, so that remark can locate its record for later annotation. For example, if several images called "test" are added to the logs, remark will only locate the first one.

## Looking at the Logs on the Screen: viewlog

Use viewlog to look at the formatted logs on the screen. viewlog invokes the Unix xdvi command. You can type n' to move forward one page, and p' to move back one page. The man entry for xdvi lists more capabilities.

Use viewlog oldlog to see the logs named oldlog from a previous night, or whatever (the TeX file for oldlog must still be available for this option to work).

## Making Hardcopies of the Logs: printlog

Use printlog to print the formatted log sheets on the laser printer.

Use printlog oldlog to print the logs named oldlog from a previous night, or whatever (the TeX file for oldlog must still be available for this option to work).

A Postscript file is generated at the same time. It will have the form logname.ps, where logname is the name that you entered with loginit. A TeX logname.dvi file is also generated.

Always leave a copy of your logs on the mountain. There are multi-ring holepunches in the operators' office and in several domes.

## How the Logging Programs Work

The loginit IRAF routine starts things off and does the following:
• It gets the identifying name logname for the logs, and hides it in the .kpccdlog file in your main directory. This hidden file is looked at by all other programs to figure out how to name the other files.
• It fills out the page headings on the logsheet, making a TeX file called lognamehead.tex.
• It gets the page number of the first logsheet page and puts it in a TeX file called lognamepage.tex.
Running loginit again does not affect the record of observations itself, only the page heading information. You can thus use loginit at any time to revise the headings without any effect on the observation record itself, if you take care to specify the same logname.

The parameters from the actual observations are obtained by addlog, which is called by postproc.cl at the completion of the observations. The parameters are saved in a file logname.lis in the main directory - this is the real record of the observations.

The remark command updates the entries in logname.lis. The logname.lis file can be edited directly like any other text file, although you are warned to be very careful if you try this, as the formatting programs expect a specific number and form for the entries.

Both viewlog and printlog build the TeX version of the logs. Both routines then call TeX to complete the final formatting. This means that if new observations have been obtained after formatting the logs, the TeX and Postscript files will be "stale", until either viewlog or printlog is run again. Only logname.lis is updated as the observations are obtained.

The use of TeX to format the logsheets gives you the advantage of making your own use of TeX macros to format your inputs, at the risk of making TeX mistakes. While it's not possible to check the validity of TeX macros outside of TeX itself, the logging programs do provide some simple checks. In developing the programs, we often found ourselves wanting to use some of the special characters that TeX reserves for itself, such as #, %, &, ~, and outside of TeX math mode, _ and ^. The logging routines check for these characters and build the proper TeX escapes around them if they are not already present, on the assumption that you really intended to use them literally. The routines also look for a non-terminated math-mode, which would happen if you left the final \$ off a math expression.

Posted: 25Jan2000