Macros for the PMIS CCD System

Edition 1.9 of 2001-05-26

Alan Watson (alan@astrosmo.unam.mx)
Michael Richer (richer@astrosen.unam.mx)


Table of Contents


Introduction

CCD data is acquired at the OAN/SPM using the PMIS CCD control software. We have written a new set of macros for PMIS. This document describes these new macros.

The old macros are still available for those who wish to coninue using them; see below.

The new macros are based on the macros written several years ago by Steve Levine and subsequently modifed by Gaghik Tovmassian. The new macros offer the following improvements:

  1. The CCDs have 48 columns of overscan.
  2. It is easy to change the binning and the gain of the CCD and to use only a subsection of the CCD. The ability to bin easily is especially important, as it reduces the effective read noise, reduces the size of the images, and reduces the time taken to read and write the images.
  3. It is possible to acquire data using just the macros in the User menu and the Toolbox; no other menus should be necessary.
  4. The parameters for images (number, exposure time, name, filter, RA, dec, and epoch) have a consistent order. The windows used to obtain these parameters have prompts that remind the user of the required order and format.
  5. It is possible to request multiple images of any kind.
  6. The FITS images are written with file names consisting of a number from a single sequence followed by a single letter denoting the image type. Thus, both the order and the type of the images are immediately obvious from their names. This scheme is described in more detail below.
  7. The FITS image headers now contain comprehensive entries for use by ccdproc in IRAF

We originally used Spanish throughout the new macros. However, at the request of several native Spanish speakers, we changed to English. Two reasons were given. First, the observatory is regularly used by observers who do not speak Spanish. Second, even among Spanish speakers, the jargon of observational astronomy is English.

We welcome comments and suggestions on the new macros and on this document. We are grateful to Steve Levine and Gaghik Tovmassian for writing the original macros, to Armando Arellano, Alfredo Franco, and José Luis Ochoa, and all of the observers who took the time to comment on these new macros, and to Almudena Bullejos for correcting the Spanish version of this manual.

News

This section will contain news of changes to the macros, so you can quickly determine what has changed since the last time you used the macros.

Using the Old Macros

While we believe that the new macros are a significant improvement over the old ones, we understand that some people will wish to continue using the old macros. The old macros are still available; our only change has been to rename the icons used to start PMIS with the old macros to "Old CCD Tek1 1k", "Old CCD Tek2 1k", "Old CCD SITe 1k", and "Old CCD Thomson 2k".

Using the New Macros

No matter which CCD you are using, start PMIS by double clicking on the "New CCDs" icon on the desktop.

You are then asked which CCD and telescope you are using.

After this, the "Setup" macro is run to determine the CCD format, CCD gain, the observers, the instrument, the directory and number used to save the FITS images, and (optionally) to take a test image.

The new macros are available in the User menu of the main PMIS window and the image window. The macros are:

  1. Object
  2. Bias
  3. Flat
  4. Dark
  5. Arc
  6. Scaling: min/max
  7. Scaling: nonlinear
  8. Image
  9. Movie
  10. Focus image
  11. Set up
  12. Status

Object

Take one or more object images and save the images as FITS files.

You will be asked for the parameters for the exposures. In order, these are:

  1. Number of images
  2. Exposure time in seconds
  3. Object name (optional)
  4. Filter name (optional)
  5. RA (optional; not at 2.1-m)
  6. Dec (optional; not at 2.1-m)
  7. Epoch (optional; not at 2.1-m)

Parameters may not contain spaces (e.g., NGC-7029 is allowed but NGC 7027 is not). The RA and Dec may be written as you please (e.g., 3h40m22.3s or 03:40:22.3).

At the 2.1-m, the right ascension, declination, and epoch are automatically supplied. The epoch supplied is the current epoch.

Bias

Take one or more bias images and save the images as FITS files.

You will be asked for the parameters for the exposures. There is only one parameter:

  1. Number of images

Flat

Take one or more flat field images and save the images as FITS files.

You will be asked for the parameters for the exposures. In order, these are:

  1. Number of images
  2. Exposure time in seconds
  3. Flat field source (e.g., "Twilight") (optional)
  4. Filter name (optional)

Parameters may not contain spaces (e.g., Twilight-Flat allowed but Twilight Flat is not).

Dark

Take one or more dark images and save the images as FITS files.

You will be asked for the parameters for the exposures. In order, these are:

  1. Number of images
  2. Exposure time in seconds

Arc

Take one or more arc lamp images and save the images as FITS files.

You will be asked for the parameters for the exposures. In order, these are:

  1. Number of images
  2. Exposure time in seconds
  3. Arc lamp (e.g., "HeNeAr") (optional)

Parameters may not contain spaces (e.g., HeNeAr is allowed but He Ne Ar is not).

Scaling: min/max

Display the image between its minimum and maximum values. This is useful for focusing.

Scaling: nonlinear

Display the image with a nonlinear mapping. This is useful for seeing both bright and faint objects.

Image

Take a single image, but do not save it as a FITS file.

You will be asked for the exposure time in seconds.

Movie

Take repeated images of the Region of Interest (ROI), but do not save them as FITS files. Stop the sequence by pressing ESCAPE.

You will be asked for the exposure time in seconds.

Focus image

Take a focus image, consisting of several exposures of the same field.

You will be asked for the exposure time in seconds.

The macro takes a first exposure. After this, it repeatedly asks if you wish to take another exposure. If you answer yes, the macro shifts the image in the CCD a certain number of rows towards the read out, and then takes another exposure. The shift between the first and second exposures is twice that between subsequent exposures. If you answer no, the CCD is read and the image is written as a FITS file called focus.fit. Note that the image is not read out until you answer no, i.e., that you do not want another exposure.

The purpose of this macro is to produce an image with multiple exposures at different focus positions. Set the focus to one side of the expected focus, make a note of the focus, and take the first exposure. Move the focus, take a note of the focus reading, and take a second exposure. Repeat. If the star is centered on the CCD, then 8 exposures should fit on the CCD. Finally, determine the best focus by examining focus.fit with imexamine in IRAF on the workstation.

This macro is only useful at the 2.1-m and the 1.5-m, where there is a digital display of the telescope focus. It is more useful at the 2.1-m, as the focus there is less sensitive to the position of the secondary.

Set up

Set up defines the CCD format and gain, the directory and numbers used for the FITS files, and names of the observers, telescope, and instrument.

First, the CCD gain and format are defined. A window appears to ask for the CCD gain mode. The gain mode can be either 1 or 4. Next three windows appear to ask for the binning in columns, the first binned column to be read, the last binned column to be read, and then another three to ask the binning in rows, the first binned row to be read, and the last binned row to be read. This makes it easy to bin the CCD or only read out a subsection of the CCD.

Next, windows appear to ask for the names of the observers and the instrument. These are written in the FITS header.

Next, windows appear to ask for the image directory and sequence number used to construct file names for the FITS images. The default directory is "L:\", which by default corresponds to /imagenes/ on grulla (84-cm), /scratch2/imagenes/ on agua (1.5-m), and /usr/local/compartido/ccds/ on router2m (2.1-m), which is also mounted as /home2/observa/imagenes/ on sonaja (2.1-m). The image sequence number must be smaller than 32768. If it is less than four digits, the image names will be padded with zeros (e.g., a sequence number of 100 will produce image names of the form 0101f.fit, 0102o.fit).

Finally, a window appears to ask if a test image should be taken. This provides a check that PMIS can talk to the camera and that it can write to the image directory.

Status

Show the UT date and time, the name, format, gain mode, gain, and read noise of the CCD, the directory and number used to construct file names for the FITS images, and the names of the observers, telescope, and instrument.

Aborting Exposures

If the exposure is longer than 10 seconds, a window will appear showing the progress of the exposure. You can abort the exposure from this window. When an image is aborted, the camera shutter is closed. The CCD is not read and no image is written to disk. The sequence number is deliberately incremented, however, so there will be a gap in the sequence numbers of the images on disk. If you prefer to avoid a gap in the sequence numbers, you may redefine the image sequence number by typing

	vdefine image_number X

on the command line in the main PMIS control window (whose title bar states "PMIS Image Processing Software") and where X is the number of the last image successfully taken.

Log Files

The macros no longer write a log file (i.e., PMIS.LOG). However, a log file can be generated by issuing the following IRAF command

    imhead *.fit >pmis.log long+

If the file pmis.log exists, you will have to first delete it with

    delete pmis.log

FITS Files

Names

The names of the FITS files written by the Object, Flat, Bias, Dark, and Arc macros consist of a number followed by a single letter followed by ".fit". A single sequence of numbers is used for all image types. The letter indicates the type of image: "o" for object images, "f" for flats, "d" for darks, "b" for biases, and "a" for arcs. This scheme is based on the scheme used at the CFHT.

For example, if three flats, two biases, an object, and an arc are taken, the FITS file names might be:

    1001f.fit
    1002f.fit
    1003f.fit
    1004b.fit
    1005b.fit
    1006o.fit
    1007a.fit

Thus, the order and the type of the image are immediately obvious from the file names.

Overscan Sections

The new macros allow the inclusion of an overscan section with all of the CCDs. The inclusion of an overscan section does not eliminate the need to obtain bias images, but it does allow for changes in the mean bias level to be corrected.

This overscan section is up to 48 columns wide (assuming no binning) and is obtained by reading out more columns than are physically present on the CCD. Effectively, each row is read out in full, and then a further 48 imaginary columns are read out. However, an image will only have an overscan section if the format used to read the image includes these imaginary columns. For example, consider the Tek1 1k CCD. There are 1024 real columns, but up to 1078 columns may now be read out. If the binning in columns is 1, then CCD formats that read columns 1 to 1078 or 307 to 1078 will contain 48 columns of overscan. However, CCD formats that read columns 1 to 408 or 300 to 1024 will not.

For direct imaging applications, the full CCD will normally be read out, so an overscan section can be included easily. For spectroscopic observations with the Boller & Chivens spectrograph, however, including an overscan section requires some consideration. Presently, the CCDs are normally mounted with the dispersion direction along the columns. In this orientation, the spectrum falls only on the central part of each row. Defining the CCD format to include the an overscan section then requires reading out a large part of the CCD that is not used, which increases the read out time. It is possible to install the CCDs so that the dispersion direction falls along the rows, in which case an overscan section may be included easily, but you will have to request this specifically.

The reason for mounting the CCDs with the dispersion direction along the columns is that, if there are charge transfer problems, a bright object contaminates only itself.

Data

PMIS writes the pixel values in "signed short" number format, that is, instead of running from 0 to 65535, the values run from 0 to 32767 and then from -32768 to -1. Thus, it will be necessary to read the files with rfits in IRAF using the parameter

datatype=ushort

or using chpixtype in IRAF with the parameters

newpixty=real
oldpixty=all

Headers

The FITS files written by Object, Flat, Bias, Dark, and Arc have the following header entries:

SIMPLE, BITPIX, NAXIS, NAXIS1, NAXIS2, and NAXIS3
Standard entries describing the size and format of the data.
EXPTIME
The exposure time in seconds.
FILTER
The filter name (given by the user).
IMAGETYP
One of OBJECT, FLAT, BIAS, DARK, or ARC.
CCDSUM
The binning in columns and rows.
CCDSEC
The section in the unbinned whole CCD that corresponds to DATASEC, given in physical (unbinned) pixels.
DATASEC and TRIMSEC
The section in the image corresponding to the exposed part of the image, given in logical (binned) pixels.
BIASSEC
The section in the image corresponding to the overscan, given in logical (binned) pixels.
OBJECT
The name of the object, arc lamp, or flat field source (given by the user).
RA, DEC, and EPOCH
The object coordinates (given by the user or supplied automatically at the 2.1-m).
UT and DATE-OBS
The UT time and date of the start of the exposure.
DATE
The UT date the FITS file was written.
OBSERVAT, LATITUDE, LONGITUDE, ALTITUDE
The name (SPM) and position of the observatory.
OBSERVER, TELESCOP, and INSTRUME
The names of the observer, telescope, and instrument (given by the user in the Set up macro).
DETECTOR, GAINMODE, GAIN, and RDNOISE
The name of the CCD ("Tek1 1k", "Tek2 1k", "SITe 1k", or "Thomson 2k"), gain mode (1 or 4), gain in electrons/ADU, and read noise in electrons.

Index

a - b - d - e - f - i - l - m - n - o - p - s

a

  • Aborting exposures
  • Arc macro
  • b

  • Bias macro
  • d

  • Dark macro
  • Data
  • e

  • English, use of
  • f

  • FITS files, data
  • FITS files, headers
  • FITS files, names
  • Flat macro
  • Focus image macro
  • i

  • Image macro
  • l

  • Log files
  • m

  • Macros, Arc
  • Macros, Bias
  • Macros, Dark
  • Macros, Flat
  • Macros, Focus image
  • Macros, Image
  • Macros, Movie
  • Macros, Object
  • Macros, Scaling, Macros, Scaling
  • Macros, Set up
  • Macros, Status
  • Macros, using
  • Movie macro
  • n

  • New macros, advantages
  • New macros, using
  • o

  • Object macro
  • Old macros, using
  • Overscan
  • p

  • PMIS.LOG
  • s

  • Scaling: min/max macro
  • Scaling: nonlinear macro
  • Set up macro
  • Spanish, use of
  • Status macro

  • This document was generated on 26 May 2001 using texi2html 1.56k.