Joint Astronomy Centre
Show document only
JAC Home
JCMT
UKIRT
Contact info
JAC Divisions
OMP
Outreach
Seminars
Staff-only Wiki
Weather
Web Cameras
____________________

Observing at UKIRT
Service Observing
UKIDSS Survey Operations
Target of Opportunity
Calibration & Utilities
UKIRT Archive
Public wiki
Accessing Flexed Data
Accessing UKIDSS Data
Reduction Cookbooks
Telescope
Site Quality
Instruments
Newsletter/Publications
UKIRT Faults
JAC Safety Manual
The CGS4 Data Reduction
JACH | JCMT | UKIRT | Computer Services | CGS4  
Up: CGS4 Handbook 

SIMPLE CGS4 REDUCTION STEPS

This document provides a "recipe" for doing basic reduction steps. It is intended as a quick "get you by" guide, not a substitute for the data reduction users guide.

WARNINGS

If you set the data reduction up eg. to subtract a dark and it cannot find a suitable dark because one has not been observed then the data reduction will report an error message and pause.

You need to sort problems out before attempting to resume the reduction - or errors will accumulate. For example the first observation of a set of object-sky pairs must be of type object, and so if the first observation in your group is not reduced because of a mistake in the reduction set up you must re-reduce it in order to get a co-added group of object-sky pairs. This may include having to re-insert observations in the queue - if this happens and you are not sure what to do, pause the data reduction and ask the TO for help.

Getting Started

1) Run up the data reduction :

  • Log onto KIKI using your UKIRTnn username
  • Open an xterm on KIKI : click the right mouse button on the background and select xterm from the menu.
  • Enter the command cgs4dr_ukirt .
CGS4DR will startup 5 widgets. Three of these will be opened and two of them iconised. The three opened ones are called
Display Widget (Disp4)
Mission Control (Cred4)
Queue Manager (Qman)
The two iconised ones appear at the bottom of the screen and are called:
Plotting Task (Plot4)
Reduction Monolith (Red4)
Each Widget deals with specific types of task: - the display widget is the plotting window and makes hard copy files, the mission Control Widget controls the reduction setup, the queue manager allows you to enter observations into the reduction queue, the plotting task controls plot setups and the Reduction monolith does manual reduction steps, defines ratioing stars etc.

It is a VERY good idea not to open up very many more windows on KIKI : it has finite resources and also you will run out of real estate on the display. If you want to run lots of applications, especially "X" ones, use IOKEPA.

The data reduction will run up in a STOPPED state. To start reduction click on the start button, in the mission control window.

2) When the acquisition is ready, run the EXEC ARRAY_TESTS.

The data reduction will reduce the bias and darks and plot the results. When all the array_tests data has been reduced, there is a procedure to monitor the read noise and dark current. To run this
  • Double click on the RED4 icon to open it.
  • Scroll through the list at the top until you find the array_tests item.
  • Double click on array_tests.
  • A dialogue box will appear for you to enter the first observation number of the array_tests data. (usually 1).
The calculated read noise and dark current will be printed to the window.

The array_tests EXEC loads the data reduction config called standard which sets the data reduction up for general reduction of observations as follows :

  • a) co-add as appropriate
  • b) subtract a bias if doing stare observations
  • c) apply the default bad pixel mask fpa46_short
  • d) Normalise flat fields with a third order polynomial
  • e) divide by a flat
  • f) interleave according to the oversampling
  • g) wavelength calibrate with an estimated calibration
  • h) add observations as object-sky pairs into groups if your exec included a startgroup command.
  • i) Produce basic useful plots which are :
    • an image of each reduced observation
    • a cut through each reduced observation
    • an image of the reduced group every time a new pair is added to it.
    • a cut along row 29 (the recommended peak row) every time a new pair is added.
Note that adding more plots will slow CGS4DR down.

NB. Because this standard reduction config expects to divide by a flat field you MUST observe a flat at the appropriate wavelength before observing arcs, objects or skys. You are now ready to observe and auto-reduce your data. If you would prefer some other reduction sequence use the SETUP menu to define your own - you can then save this for easy recall later.

How to ratio by observations of a standard:

After observing a standard star, to define the result as a standard for the data reduction to use for ratioing you have to do the following things on the data reduction side :

1) Define it to be a standard by doing the following:

In the RED4 Data Rection Monolith Widget, scroll down to File_Standard. (it is about halfway down the alphabetical list of menu items).

Double click on file_standard. You may get a dialogue box telling you that the task is busy. Just click on OK to proceed.

Enter the file name rgyymmdd_nn , where nn is the group number for the reduced group of the star (ie the observation number of the first observation of the star by your exec), provide a suitable effective temperature (eg 5000), reference wavelength (usually the central wavelength of your spectrum eg 2.2), and which rows to extract. Entering the same value for start_row and end_row will extract just that one row. (e.g. 29 and 29). When everything is set correctly click on OK. It is wise to extract the standard over three rows, ie rows 28-30. The standard is written to a file called st950402_nn.

Watch for the message to say that the standard has been successfully filed.

2) Now turn on ratioing

After you have done the above steps to convert your observation into a standard you need to turn on the ratioing by doing the following:
  • Go to the Mission Control Centre
  • Click on SETUP
  • Set "Divide_by_standard_source", to YES, by clicking on the button
  • Click on OK
  • Notes:

    When you have divide_by_standard = yes, the data reduction looks for a file called st.... at the same wavelength as you are observing the source at. If there is more than one of them it picks the one taken closest in time to your object. So whenever you observe a standard star you have to go through the above procedure in order to use it for ratioing.

    If you change wavelength remember to set "Divide_by_standard_source" = NO in the SETUP menu until you have observed a standard at the new wavelength and filed it as a standard as above -otherwise the DR will look for a standard at your new wavelength, which of course you have not yet observed and it will then refuse to reduce your observations of the new standard because it could not find and appropriate st file to divide by.

How to make extra plots of your data:

  • Double click on the PLOT4 icon to open it.
  • Enter the name of the file to plot in the data box at the top.
  • Select a port to plot in by clicking on the picture of the one you want to use. If you select a port that is already in use for auto-plots and change its setup, the autoplots will revert to the previous setup, but the plot widget will show the last thing you setup, unless you click on the port button again to update the widget.
  • Setup the type of plot you want, scaling etc by clicking on the buttons and entering values in the boxes as appropriate.
  • click on the plot button, or hit return afer entering the data file name.
The name of the file will be rg950202_nn (where nn is the observation number of the first observation in a group - ie the first one your exec took) if you want to look at the sum of the obj-sky pairs. If you have divide by standard turned on then the ratioed file will be called "rg950202_n_dbs".

How to Make Hard Copies of the plots:

To make a hard plot click on the print button at the bottom of the Display Widget. A dialogue box will pop up, allowing you to select a hard copy type (usually b/w postscript) and a file name. The hard copy file will be written in your top level directory.

To print the file, enter the command lp filename from an xterm on KIKI. Your TO or support scientist can show you where the printer is.

How to use the cursor to look at Data values

  • Double click on the Plot4 icon to open it.
  • Click on the picture of the port you want to use the cursor on
  • Click on Cursor - the cross hairs will appear
  • Move them to the point you want a value for and click the mouse button.
Note that at the moment the cursor only works on images.

More Information

There is on line help if you click the right mouse button on any menu item.

System defaults will be restored to any menu if you click the middle mouse button.

See also the CGS4 data reduction users guide for more details on the above and for more sophisticated techniques. Copies of the user guide can be found in the control room at UKIRT and the JAC terminal rooms in Hilo and at Hale Pohaku. It is also available from the UKIRT software group WWW pages by clicking here

HOW TO RUN DOWN CGS4DR

  • On the mission control window, click on File at the top of the menu
  • Select Exit . A dialogue box will prompt for confirmation.
  • now you can logout the terminal and quit the session on KIKI

KNOWN PROBLEMS

Very few problems have been seen to-date. Please report any that you find. There may still me simple bugs in some menu choices, but all the most frequently used ones have now been thoroughly tested. The most common problems have been where the windows for all, or a particular task, seem to be hung or locked up. The windows spontaneuously disappeared once.

If you get into a situation where the windows or menus appear to be hung, first of all try the following to see if it is really locked up :

  • Iconise cgs4dr windows, xterms etc, and check that the problem is not just that there is a small dialogue box open that is prompting for input, which has accidently been hidden behind something else.
  • If a dialogue box (eg one with an error message from red4, or one prompting for input) is not responding to to clicking on OK, check the values are sensible if appropriate. If that doesnt work try clicking on the top menu bar and this will give you a choice of kill this popup, or kill all popups. Choose kill this popup. Often (but not always) you will then be able to carry on with the reduction or run down cgs4dr in the normal way.
If neither of the above solves the problem and you have to crash out of cgs4dr, or if cgs4dr has crashed anyway, then use the following procedure
  • Note down what observation number the problem occured on, and whether it was at the object or sky position. Note whether the previous observation was object or sky too.
  • Open an xterm on KIKI or log into KIKI using the same username as was being used to run cgs4dr.
  • enter the command cgs4dr_nuke This will remove all remaining cgs4 tasks, windows, adamnet, files used by cgs4dr etc. You will see some error messages get printed, all of which can be ignored. (they are a consequence of just killing everything at once).
  • enter the command cgs4dr_nuke again. This time there should be no error messages.
  • Now enter the command cgs4dr_ukirt to run the data reduction up again.
When the data reduction has run back up you will need to re-enter into the data reduction queue any observations that were missed. To do this: make sure the reduction is stopped, activate the Qman window, and then do the following :
  • click on remove all queue entries to make sure the queue is empty.
  • now renter the observations making sure the sequence begins "object sky" or "sky object" by doing one or other of the following :
    • If the observation the crash occured on is of type object and the last frame reduced before the crash was also of type object, Or if the observation it crashed on is of type sky and the previous one was also sky. The use the enter observation button to enter observation numbers starting with the one the crash occured on and ending with the most recent completed observation into the newest position in the queue.
    • OR
    • If the observation the crash occured on is on of type object and the preceding one was of type sky, or if the crash occured on a type sky and the preceding one was of type object. Use the enter observation menu to enter observations starting with the observation number before the crash occured and ending with the most recent completed observation into the newest position in the queue.
  • List the queue and make sure it looks sensible.
  • start the reduction going again from "mission control".
Obviously please report any problems. If you do get crashes or lockup try to write down the sequence of the last few things you did on KIKI either to cgs4dr or in any other window so that we can investigate what the cause was.

Adamnet3 Crashes

We believe that the problem described below has been fixed. It has not recurred after updated software was installed. However the instructions for recovery are still included here, just in case. It is easier to deal with than the above varieties because you do not need to run anything down. If you think there has been an adamnet3 crash please report it !

If it fails then you will see a message in the scrolling region of the acquisition menus reporting : WARNING Failed to send string to DR system

And the data reduction will have stopped because it is not getting any reduce commands across the network.

To fix the problem :

  • Make a note of what observation number it failed on.
  • Pause the data reduction by clicking the pause button in mission control.
  • On an xterm on KIKI enter the command stop_adamnet
  • Then enter the command start_adamnet
  • Check to see what observation number is currently being taken.
  • Use the queue manager to enter the missing observations into the queue in the newest position. See the instructions above for advice on making sure the queue starts with an acceptable sequence. List the queue to make sure it looks sensible.
  • Unpause the data reduction by clicking on the paused button in mission control.
Remember - even if you get the data reduction into a total mess by getting the observations out of order, continue to take data if movie looks Ok. The next time you start a new exec which has a startgroup command in it, then all will be OK for the new set of data. (just delete all queue entries before starting the new exec) 

Last Modification Date: 1998/09/10 - Last Modification Author: Tom Kerr, Original Author: Gillian Wright
Tom Kerr (tkerr) 

Contact: Tom Kerr. Updated: Wed Oct 6 11:58:03 HST 2004

Return to top ^