The Arcon-IRAF Interface: 4m R-C
Spectroscopy with the 4.0-m R-C Spectrograph
This manual covers the ARCON-IRAF software interface that is used for acquiring images and controlling the spectrograph.
A Preliminary User's Guide
13 April 1994
This is a preliminary guide to using CTIO's new CCD controller, Arcon, in conjunction with the 4.0-m RC Spectrograph to obtain spectroscopic data.
Both the hardware and software for Arcon are still under development and are consequently a little buggy. This manual is pretty buggy too. The mountain Observer Support staff, have, as yet, little experience with the system and thus will be less able to help with problems than is usual, and will often have to refer to the "experts" in La Serena. Please bear with us during this transition phase. But please also be diligent about reporting any problems and bugs you may encounter and please feel free to make any suggestions or criticisms you may have.
The IRAF based user interface allows observing commands to be sent to Arcon from within the IRAF cl. This results in a single uniform user interface for data taking and data reduction and allows the Arcon user to employ features of the cl such as the parameter mechanism and the history editor. It also allows advanced users to write cl scripts which freely mix data acquisition and data reduction operations. It is nonetheless simple enough, that users need very little knowledge of IRAF in order to obtain their data. As far as possible the user interface is modeled on the ICE software in use at KPNO; the present manual also owes more than a little to the KPNO ICE manual. However, users should be aware that the two systems are NOT identical, so that parameter lists may differ and data acquisition scripts written for ICE will require some modification.
2 Logging in and Logging Out
2.1 Computers and Peripherals
Figure 1 shows a block diagram of the various computers and peripherals which make up the data acquisition system at a typical CTIO telescope. You should find a version of this diagram for your specific telescope, showing the names of the actual computers and peripherals involved, posted in the console room. At least some of the key pieces of hardware are labeled; if you have trouble locating, for instance, the exabyte drive, at your telescope ask observer support.
In the console room of the 4.0-m telescope you will find two Sun Computers. One of these, a SPARC-station 10/41, is the Arcon data acquisition computer. You must log on to this machine in order to use Arcon and, in general, will also want to use it for all your data reduction. The other machine is an older VME-bus based Sun 4/330; currently peripherals such as the 9-track and exabyte tape drives and laser printer are attached to this second Sun. If more than one observer is present at the telescope, or if you find a single Sun screen to be too restrictive, you may wish to use this second machine for your reductions. However, if you do so we recommend you treat it as an "intelligent terminal" from which you log on to the data acquisition machine. Accessing images across the network imposes a very stiff penalty in the form of increased I/O overheads when reducing your data.
2.2 Starting From Scratch
When you first log on to the data acquisition computer using your visitor account, you will be asked which windowing system you prefer -- both Sunview and Openwindows are available -- as follows(1):
- What windowing system do you want?
0 -- No windowing system
1 -- SunView
2 -- OpenWindows
Enter selection (1): 1
Pick whichever you are most comfortable with, or select SunView if you know neither (in this case you may want to refer to Appendix C). The system remembers your answer, so you will only be asked to make this choice the first time you log on to a given machine. You will then be asked if you want to start up the data acquisition program, or just to reduce data as follows:
- What type of IRAF setup do you want?
1 -- IRAF for data reduction
2 -- IRAF with Arcon
Enter selection (1): 2
If you select "2", as in the example, your chosen window system will start up and several windows will open so that your screen should look something like Figure 1; the function of these various windows will be explained in Section 2.2. An automatic start-up procedure will also be run which initialize the controller hardware and software. This takes some time; when it finishes the message "Array Controller ready for user commands ..." will appear along with a beep. Wait until you see this message and hear the beep before continuing.
At present there are a few additional steps which you must carry out manually by typing the following in the specified windows (as a reminder, the necessary commands are shown in the parentheses in the title bars of most of these windows):
In the window labeled Arcon STATUS: type astro1_up
In the very small green window: type countdown
The IRAF cl will automatically start up in the blue window labeled "IRAF, Acquisition (arcon......)". You must first load the arcon package, and then the specific package for the instrument you are using -- csccd for Cassegrain focus CCD spectroscopy. To do so proceed as follows:
Connecting to the controller...
abort dflat maskfocus preview shutter
comp disconnect more recover specseq
compin enablespec movie restorespec stop
compout gainchange object resume tchange
connect initspec observe savespec teloffset
dark instrpars@ obspars@ setspec telpars@
detector instrument pause sflat ufbolt@
detpars@ lfbolt@ pflat showspec zero
Loading the instrument package automatically establishes the connection to the controller, as indicated by the "Connecting to the controller...." message hidden amongst the package menus. Exiting from the package with bye or (usually inadvertently!) ctrl-z breaks the connection.
You are now ready to start taking data. However, before you begin doing so in earnest, you should check that everything is set up and working properly: (i) Check you know where your home directory is (show home); (ii) Check where your imdir is (show imdir), that it really exists (cd imdir) and that you have the necessary privileges (copy home$login.cl imdir$junk; delete imdir$junk); (iii) check there is plenty of disk space (disks); (iv) carry out the basic tests of the operation of the detector and controller described in the instrument manual. If there are problems with any of this seek help from observer support.
A further word about image directories is in order at this point. Each of the data acquisition machines has several 2-3Gb capacity disks for bulk data storage. On each of these there will be a directory, /iraf, containing sub-directories for each visitor account. At the start of your run all these disks will be cleared. However, especially if you are using the Tek2048 CCD, you will have no trouble filling the available space in a few nights of typical observing. From time to time you should use the command disks to see how much space is free on each disk. Arcon uses the value of the IRAF environment variable imdir in order to decide where to write the pixel files for newly created images.
You can change the value of this variable "on the fly" with the command
cl> reset imdir = /ua12/iraf/v19/
Note that the trailing "/" character is necessary. This variable will be restored to its original default value when you log out of IRAF. Also the values in the acquisition and reduction windows are independent and must be set separately. To change imdir permanently and insure the two windows use the same value, you must edit your .cshrc file as follows,
cl> edit home$.cshrc
# DEFAULT OBSERVER/VISITOR CSHRC FILE.
# Image pixel directory definition. This is the ONLY place where this
# variable should be defined and changed.
setenv imdir "/ua12/iraf/$USER/" <----- Change this line as required
You must then log out of IRAF and back in again, for the change to take effect.
2.3 A Guided Tour of the Windows
Once you have completed the initialization procedure, your screen should appear similar to Figure 2. The key windows for taking data with Arcon, identified by the names given in their title bars, are as follows:
Arcon CONSOLE -- As its name implies this window serves as a console for Arcon. While you are observing you will see many messages appear here, only some of which will be repeated in the IRAF acquisition window. This window takes up a lot of screen space so you will probably prefer to close it. But don't quit from it. In the event that something goes wrong, the diagnostic messages appearing in this window may tell you (or at least us) what happened.
Arcon STATUS -- This very important window gives several lines of information summarizing the status of the controller, the instrument, and any ongoing exposures (see Figure 3). The first line shows what the controller is currently doing. if you have just brought the system up, it should read "CONTINUOUSLY_ERASING" indicating that the CCD is idle and is continuously running the erase cycle; if it doesn't, chances are something went wrong in the initialization and you should seek help. During exposures this line should read "INTEGRATING", and should change to "READING" as the CCD is read out. Other messages which may occur will be described later as appropriate. Just below the status line are counters showing the number of seconds left in the current exposure, the number of exposures left in the current sequence, and, during read out, the number of buffers of data successfully transferred to the Sun. Also shown are parameters of the current exposure such as the title, picture name etc. Finally the bottom three lines of the status window show, during readout, the values of various statistics of the image. These numbers are generated on the fly by the real time display program (see Section 6) and are used in setting the display look up table. You, however, may find this information useful when adjusting exposure times during sequences of sky flats, etc.
COUNTDOWN --This is the very small window with the very large font. It provides a copy of the exposure time counter for the visually handicapped.
IRAF Acquisition -- This blue colored window is one of two running the IRAF cl. We recommend you type all data taking commands here, so that your data taking and data reduction activities are well separated and don't interfere with one another.
IRAF Reductions -- This window (colored a dirty brick red) is the other IRAF window. We suggest that normal IRAF commands, used to examine or reduce your data are entered in this window.
IRAF Display Window -- depending on your choice of window environment there will be either an
"SAO Image" (Open Windows) or "Imtool" (Sun View) window which will be used when displaying your images from IRAF.
2.4 Shutting Down and Logging Out
Before you log out, for whatever reason, you must first stop the various processes, related to the controller running on the Sun. If you don't do this they will continue running and cause all sorts of entertainment for you or whoever else next tries to bring up the system. To do so first, in the blue "IRAF, Acquisition" window, break the connection to the controller by either typing disconnect or by exiting from the instrument package by typing bye. Then in the "Arcon CONSOLE" window type:
arsh> arsh stop
This last command should clean-up all the processes related to Arcon; unfortunately it doesn't always. To see if it worked type:
If you get "No match." three times in a row, as above, all is well. If instead you see something like
root 2227 0.0 3.0 2664 844 p6 S 17:32 0:05 muxnex
arcon 2229 0.0 .6 172 160 p2 S 17:32 0:00 arsh -c 0 -e 20
arcon 2228 0.0 .0 144 0 p2 IW 17:32 0:00 arsh -c 0-e20
-rw--rw- 1 arcon 0 Jul 13 17:32 /tmp/xpim2229.1
-rw-rw-rw- 1 arcon 0 Jul 13 17:33 /tmp/xpim2245.1
then there are some leftover processes which you must kill by hand as follows,
ctioa1% kill -9 2227 2229 2228
In this command the list of numbers after the -9 are the pid's of the leftover processes as displayed by NexUp. The files with names like /tmp/xpim2229.1 are the spool files used by Arcon to transfer data to the Sun. If any of these are owned by you and have a size other than zero (the number just before the date), then they may contain your missing data! See section 3.1.2 for information on how to retrieve this. It is common to see a few zero length files as shown in the example, but these can be ignored.
Now you can exit from the windowing system and log out completely, by moving the mouse to a blank area of the screen, then hold down the right mouse button, and select "exit" from the menu which will appear.
2.5 Warm Starts
Rather more often than we would like, currently about once a night, something or other happens which causes the system to hang requiring that the software be reloaded.
Before doing so it is worth testing to see if the problem is confined to the IRAF interface layer, by proceeding as follows:
Disconnecting from Nexus ....
Connecting to Nexus ....
This re-establishes and initializes the connection to the Arcon and, for good measure, flushes out any brain-damaged executables locked into the IRAF process cache. Having done this, test to see if the problem has gone away by taking a "zero" frame.
If this fails, or if the status window or real time display have stopped functioning, then the problem is probably in Arcon itself and it is best to reload the software from scratch. This takes very little time. First follow the steps in Section 2.3 for shutting down the system, but do not perform the very last step of exiting from the window system. Instead restart the Arcon software as follows:
In Arcon CONSOLE type arcon_visitor, then wait until you see the message "Array Controller ready for user commands ..." and hear a beep before continuing.
In Arcon STATUS type astro1_up or simply "!!"
In green font window type countdown or simply "!!"
In the blue IRAF window type connect or reload the instrument package (cfccd, pfccd, nfccd)
Also in the IRAF window type setdetector force+ to ensure that all parameters of the detector match the values you have selected in the detpars pset (see Section 5.3)
2.6 If All Else Fails
Just once in a while a problem will occur which just refuses to go away even when you reload the Arcon software. This may be due to a hardware failure. However, it may also be that the Sun has got irremediably confused, in which case the rather drastic step of rebooting it may be called for. Should this prove necessary contact observer support. They can show you how to reboot the Sun safely, cleanly, and without having to know the superuser password.
3. Taking Data
3.1 Observe - the only command you really need to know
All data taking can be done by using a single command: observe. This command takes one or more ccd exposures, as in the following example:
Exposure type (|zero|dark|object|dflat|sflat|pflat|comp|) (comp): obj
Number of exposures to take (1:) (3): 1
Exposure time (0.:) (5.): 600
Have you switched OFF the lamp ?????!!!!!
comparison lens OUT enabled
Title of picture (comp at ngc1097): ngc1097 nuc
Image obj060 written to disk
You will be prompted for all the information required which includes:
exposure type: can be "zero" (sometimes referred to as bias), "dark", "object", "dflat", "sflat" or "comp" (used for taking comparison lamp exposures). Note that when selecting from a list of options like this you may enter any unique abbreviation as shown in the example.
number of exposures to take: a sequence of this number of pictures, all having the same parameters, will be taken.
exposure time: is in seconds, and will not be requested in the case of exposures of type "zero" for which it is 0.0 by definition.
picture title will be included as the title in the IRAF image header.
Note that in each parameter query you will be supplied with a default value, which you can accept by simply hitting <cr>; these values are just the previous entries.
If you make a mistake, or change your mind, you can abort the command during the parameter entry stage by typing ctrl-c; having done so you should always enter the command flpr, as a means of warding off the evil eye. Once the exposure has started it can be terminated using the abort command (see Section 3.2).
The program automaticaly sets the comparison optics appropriately for the type of exposure being taken: for exposures of type "comp" and "pflat" the mirror carriage in the instrument rotator will be moved to the comparison position ("mirror 4") and the comparison lens will be moved into the beam; for exposures of types "object", "dflat" and "sflat" the rotator mirror is moved to the object position ("mirror 2") and the comparison lens is moved out of the beam; for exposures of type "zero" and "dark" these mechanisms are not moved. Currently the comparison lamps must be turned on and off manually with a switch located near the observer's position. The program prints out a reminder to do this. These hardware actions are performed between the prompts for the exposure time and the title.
As soon as you enter the title, the CCD will be prepared, and then the exposure will begin. The first line in the status window will change from "CONTINUOUSLY_ERASING" to "INTEGRATING" and the status window will also show parameters of the exposure such as the picture title. A counter in the status window, and more legibly the countdown window will begin counting down the time remaining in the exposure. At present these counters are not exactly synchronized with the internal clock in the controller so for very long exposures they may indicate that a few seconds remain when the exposure is in fact complete. A further counter in the status window will count up the dark time -- the time since the CCD stopped being erased. This may be slightly greater than the elapsed exposure time due to overheads in the controller, and will of course be very much longer if you paused the exposure.
Note that the observe command terminates as soon as the exposure starts and you can enter other commands in the IRAF acquisition window. While you could type any IRAF command you like, we suggest you keep this window free for entering the special exposure control commands described in Section 3.2
When the exposure finishes the CCD will be read out. The first line in the status window will change to "READING" and the "buffers read" counter will indicate the number of buffers of data successfully transferred to the Sun. The data is initially written in the controllers internal format to a spool file on /tmp, but it is automatically converted into an IRAF image within a few seconds of the exposure finishing. The message "Image ...... written to disk" appears as soon as this process is complete and shows you the name of the new IRAF image. This name is derived from the exposure type by appending a running number (see section 5.1 for how to adjust this number) which is automatically incremented after each exposure. The image header will be in the current directory (at the time the observe command was issued) and the pixel file will be located in your imdir.
During readout the image will also be displayed on the real time display (see Section 6). This occurs independently from and in parallel with the transfer of the data to disk on the Sun. You need not wait for the real time display to finish before starting another exposure.
If you requested that observe take only a single exposure, the message "observation finished ....." will appear in the IRAF interface window as soon as the readout is complete; things are then ready for you to start another exposure. If, instead, you requested a sequence of several pictures, the next exposure will start automatically. You may immediately examine or process the resulting image even though the sequence is not complete. Note that the "pictures remaining" counter in the status window shows how many exposures remain in the sequence. Once the final picture has been readout the message "sequence finished ......" will appear in the IRAF interface window. Should you miss the end of sequence or end of exposure message, note that the CCD is idle and things are ready for you to initiate new exposures, whenever the top line of the status display reads "continuously_erasing".
3.1.2 What to do if Your Picture Doesn't Show Up -- Recover
Sometimes Arcon will successfully transfer your data to the spool file on /tmp but the picread program which converts this to an IRAF image will fail. Usually there is an error message, but you should be suspicious that this has happened if the exposure completes normally, but you can't find the output image. The command recover will assist you to retrieve your valuable images in such cases. It searches /tmp for any spool files owned by you and for any of these that are complete will show the FITS header and ask if you want to recover the image or not. If you reply yes then picread will be run to convert the xpim file to an IRAF image. A single spool file occasionally contains more than one image. In this case recover will list how many images are present, but will only show you the header of the first. All images will be recovered if you tell the program to go ahead. Spool files are not removed from /tmp until successfully converted by picread. However, we suggest you run recover immediately if you encounter this problem, so that you don't forget later, and so that /tmp doesn't get filled to overflowing with unprocessed spool files.
Sometimes a failure occurs during the transfer of the data from the controller to the Sun. In this case a partial spool file results which cannot be used to resurrect the data. Recover will give you the option of deleting any such files, and you should do so to avoid filling /tmp with debris.
But, don't give up hope yet! There is a 2.5M-byte internal buffer in the controller itself, so you can still rescue your data, provided the entire image fits in this space; a Tek1024 CCD image fits, a full unbinned Tek2048 image does not. To attempt this, reload the Arcon software by following the "warm start instructions" (See Section 2.5). Wait for the message
Array Controller ready for user commands ....
then type the following in the Arcon console window:
arsh> macro NoData
Now take a picture as you normally would. The picture will be read from
the memory buffer, NOT from the CCD. Once you have done this successfully
arsh> macro DetectorData
(again in the Arcon console window) to restore things to normal.
3.2 Exposure Control Commands
The following commands can be used to modify an ongoing exposure:
pause - Pause the exposure e.g. while waiting out passing clouds.
resume - Resume a paused exposure.
tchange - Change exposure time. You will be prompted for the amount by which to change the exposure which may be positive or negative. If used during a sequence the duration of the present exposure and all subsequent exposures is changed.
stop - Stop the exposure early, read out the CCD and save the data to disk. If used during a sequence, the sequence is also terminated.
abort - Abort the exposure. The CCD is not read out and any data collected during the exposure is irrevocably lost. If used during a sequence, the sequence is also terminated.
Note that, currently, it is not possible to cleanly terminate the process of reading out the CCD. If you issue an abort command during readout it will not take effect until the current exposure has been completely read out (i.e stop and abort are equivalent under these circumstances). For very large chips like the Tek2048, it may be faster to just re-initialize the controller (see Section 2.4).
3.3 Other Commands For Taking Data
In addition to observe, there are specific commands to take one or more pictures of each type:
comp - Take one or more comparison lamp exposures
dark - Take one or more exposures of type dark
dflat - Take one or more exposures of type dome flat
object - Take one or more exposures of type object
sflat - Take one or more exposures of type sky flat
zero - Take one or more exposures of type bias
Except, of course, for the exposure type these commands take the same parameters (and prompt for them in the same order) as does observe. Apart from saving you entering that one extra parameter, use of these commands allows one to set default parameter values, and also select which parameters are prompted for according to picture type.
Another useful command is:
more - Take one or more exposures exactly like the previous one
The more command is slightly unusual in the way it prompts for parameters (it is patterned after commands like directory and help). If you type
you will not be prompted for the number of exposures (as one might expect) but rather a single exposure will be taken (which more often than not is what you actually wanted to do). Conversely
cf> more 10
will take ten more exposures.
Frequently one wants to take one or more exposures of the same object bracketed by comparison exposures, for instance to monitor flexure of the spectrograph. This can be done very conveniently with the command specseq as shown in the following example
number of object exposures per sequence (1:) (1): 3
Number of times to repeat basic sequence (1:) (2): 1
Exposure time for object exposures (0.:) (600.):600
Title for pictures (test): NGC 1068
Have you switched ON the lamp ?????!!!!!
comparison lens IN enabled
Image comp060 written to disk
Have you switched OFF the lamp ?????!!!!!
comparison lens OUT enabled
Image obj061 written to disk
This will take a comparison exposure followed by three (answer to first prompt) exposures of the object and finish up with another comparison exposure. The answer to the second prompt determines how many times this basic comparison-object-comparison sequence is to be repeated. Note that because the comparison lamp must be turned on and off manually you cannot go to sleep completely while the command is executed. This task has two hidden parameters which should be set using epar before it is run for the first time.
cs> epar specseq
I R A F
Image Reduction and Analysis Facility
PACKAGE = csccd
TASK = specseq
npics = 1 number of object exposures per sequence
nsequenc = 2 Number of times to repeat basic sequence
exposure = 600. Exposure time for object exposures
title = test Title for pictures
(comptim = 10.) Exposure time for comparison exposures
(sequenc = both) Take comparison exposures at
(mode = ql)
Comptime sets the exposure time for the comparison exposures. Sequence determines where comparison exposures should be taken in the sequence and can be set to "start", "end" or "both".
3.4 And Two That Take No Data - Preview and Movie
Two commands which may be useful when centering your object on the detector or for establishing rough focus, are:
preview - Take a CCD exposure and display it on the real time display but does not write any data to disk.
movie - Loop continuously taking and displaying preview exposures until terminated by stop.
Both commands prompt for a single parameter the exposure time; since the readout time in quad mode is 15-20 seconds for the Tek1024 CCD some degree of real-time feedback can be obtained using movie with exposure times of a few seconds. In the near future preview and movie will optionally use special waveforms which reduce the readout time at the expense of increased noise &/or reduced spatial resolution.
4 Spectrograph Control
The most important functions of the 4.0-m RC Spectrograph --including the slit width, grating tilt, and collimator focus -- are motorized and can be adjusted under computer control. There are a few important and perhaps surprising exceptions; the comparison lamps have to be turned on and off using a switch near the observers positions, and one must go to the cassegrain cage in order to select between the various lamps available. Also the spectrograph camera focus is set manually in the cage.
As you might guess from the whirring and grinding noises which go on when any of these motors are moving, the hardware is antique, but it still (mostly) works. Currently the spectrograph is controlled using a program written in FORTH running on an LSI-11 (this same software is used with CTIO's VEB's). However, this has been tied in to the Arcon-IRAF interface by having the Sun send commands to the LSI-11 over a serial line. Thus data taking and spectrograph control appear to be fully integrated from the point of view of the user, and full information on the spectrograph configuration gets included in the image headers.
4.1 Moving the comparison lens and rotator mirror
As described in Section 3.1 the comparison optics (rotator mirror and comparison lens) are automaticaly positioned as required whenever you take an exposure. The commands compin and compout can be used to insert or remove the comparison optics, respectively, without having to take an exposure.
4.2 Setting up the spectrograph
The remaining components of the spectrograph are controlled by the setspec command. Executing this command will bring up a parameter editor screen as shown below
I R A F
Image Reduction and Analysis Facility
PACKAGE = csccd
TASK = setspec
slitwidt = 300 Slit width (microns)
decker = open decker position
(grating = kpgl2) Grating identification
tilt = 6200 grating tilt (hundredths of degrees)
(collima = blue) Collimator identification
colfocus = 440 Collimator focus position
(camera = FoldedSchmidt) Spectrograph camera identification
camfocus = 1.2,2.4,0.,1.2 Spectrograph camera focus
ufilter = open upper filter position
lfilter = GG495 lower filter position
mask = south Newall mask / slow shutter
skysuppr = open Sky suppressor position
rsviewer = out rear slit viewer
(complamp = "HeNeAr") Comparison lamp
(mode = m)
($nargs = 0)
There is a parameter for each mechanism in the spectrograph. To reposition the corresponding motor, move the cursor up and down with the arrow keys until you are on the correct line and then simply type the new value followed by <cr>. When you are done editing the parameters type cntrl-z. All the motors you have edited will then be moved to the requested positions. For many of these motors several tens of seconds are required to move from one end of the range of travel to the other, and only one motor can be moved at a time, so be patient. If you mess up and want to exit from the command without moving any motors type cntrl-c
The parameters grating, collimator, camera, camfocus and complamp(2), do not correspond to actual motors. Changing their values will not cause anything to be moved. However, these values are recorded in the image header so you may wish to set them correctly in order to keep track of the spectrograph configuration used for each observation.
If you only want to position one or two motors a useful shortcut is to run the command as in the following example
cs> setspec slit=150 mode=h
slit 150 enabled
where only the slit width was adjusted. The mode=h tells IRAF to run the command without bringing up the parameter editor.
To check that all the motors are positioned as you want, for instance before starting an observation, use the showspec command:
Comparison lamp : off
Grating identification : kpgl2
Collimator identification : blue
Spectrograph camera identification : FoldedSchmidt
Spectrograph camera focus : 1.22,0.0,2.45,1.22
R-C Spectrograph Hardware status
sky suppressor ??? enabled
filter bolts #1 `1' enabled
#2 `1' enabled
newall mask OPEN enabled
slit viewer OUT enabled
decker OPEN enabled
slit 300 enabled
collimator 440 enabled
comparison lens OUT enabled
grating 6202 enabled
Note that there is a significant pause after the "R-C Spectrograph Hardware status" line while the program goes out and reads all the encoders. Its a good idea to run showspec from time to time to ensure that setspec has not got confused about the true configuration of the spectrograph (see Section 4.6).
4.5 Saving and restoring the spectrograph configuration
If your program calls for more than one set up of the spectrograph -- for instance if you change
gratings or grating tilts during the night -- then you can save time and avoid mistakes by saving the parameters for each configuration in a file. When you have the spectrograph set up to your satisfaction type
cs> savespec red_setup
this will save the configuration in a file called red_setup (you can include a full pathname if you want this file to be somewhere other than the current directory). Subsequently you can restore the spectrograph to exactly the same configuration by typing
cs> restorespec red_setup
An important shortcoming of the present arrangement for spectrograph control is that the setspec program is not able to read the encoders in order to determine the actual configuration of the spectrograph. Rather it just remembers the last position to which it moved each motor and assumes they have not subsequently been moved by some other agency. The program will thus be fooled if the configuration of the spectrograph is changed manually, or if the motors are moved by someone logged in under a different user name. Also of course setspec has no way of knowing the initial state of the spectrograph the very first time it is run. The command initspec moves all the motors in the spectrograph so that their positions match those shown in the parameter file of the setspec command. If setspec is only confused about the position of a few motors you can initialize these individually as in the following example.
cs> initspec tilt,slit
where the grating tilt and slitwidth are the parameters to be reset.
Note that the positions of the various motors given by the showspec command are the true values as determined by reading the encoders. A mismatch between the values listed by that command and those in the setspec parameter file indicates that you need to run initspec.
5 The Parameter Files
As with ICE many of the nitty-gritty details of taking your data are hidden from your immediate view in four parameter files:
obspars This contains several parameters which you, the astronomer, can use to tailor the behavior of observe to your liking.
instrpars This parameter file contains information relating to the instrument being used -- the RC Spectrograph in this case.
detpars This parameter file controls the fundamentals of how the CCD is readout -- binning, gain, regions of interest, etc.
telpars The 4.0-m telescope is run by a control program which is interrogated by Arcon, at the start of each exposure, in order to obtain information such as the time, telescope coordinates, etc. for inclusion in the image header. This parameter file currently does nothing and has only been retained to maintain compatibility with ICE.
You should review these parameter files, and may want to change some values, at the start of your run, but will probably leave them alone thereafter.
These parameter files can be listed by using the lpar command, eg.,
cf> lpar obspars
and may be edited using the parameter editor, epar, or by simply typing the name of the parameter set e.g.,
cf> epar obspars -OR-
To change a value, in either case, move the cursor up and down with the arrow keys until you are on the correct line and then simply type the new value followed by <cr>. When done editing the parameter file type cntrl-z
The parameter file obspars is shown below:
I R A F
Image Reduction and Analysis Facility
ccdtype = zero Exposure type
npics = 1 Number of exposures to take
picture = 1 Picture number of first exposure
exposure = 0. Exposure time
title = Title of picture
(autopic = yes) Generate picture number automatically ?
# POSITION COMPARISON OPTICS FOR EACH EXPOSURE
(setcomp = auto) Query and set complens & rotator mirror
(mode = ql)
($nargs = 0)
It is not necessary to set the values of the majority of these parameters, since they are prompted for as needed. The values appearing in obspars are simply the values entered the last time observe was run. The parameter autopicnum determines whether observe will prompt you for the running picture number, picture, which forms part of the name of your images on disk. The value of picture is always incremented after each exposure. If autopicnum=yes (the default) the automatically derived value will always be used and you will not be prompted. If autopicnum=no you will be prompted for a new value of picture for every exposure, the automatically derived value being supplied as the default. In either case you can reset the sequence by just changing the value of picture in obspars. Note that picture will get out of step if you abort an exposure or sequence; the value used will be the one which would have been appropriate if the exposure or sequence had completed normally.
The only other parameter you might want to change is setcomp which controls the positioning of the comparison optics at the start of each exposure. The default value "auto" will cause the comparison optics to be positioned appropriately for the type of exposure being taken as described in Section 3.1. If this parameter is set to "yes" you will be prompted for the desired position of the rotator mirror and comparison lens for every exposure. If it is set to "no" the comparison optics will not be moved at the start of the exposures although they can still be moved with the compin and compout commands.
The instrpars parameter set contains all the parameters of the spectrograph as shown below:
I R A F
Image Reduction and Analysis Facility
rotatorm= Rotator mirror position
complens= out Comparison lens
(complam= HeNeAr) Comparison lamp
(slitwid= 300) Slit width (microns)
(decker = open) decker position
(grating= kpgl2) Grating identification
(tilt = 6200) Grating tilt (hundredths of degrees)
(collima= blue) Collimator identification
(colfocu= 440) Collimator focus position
(camera = FoldedSchmidt) Spectrograph camera identification
(camfocu= 1.3,1.6,1.0,1.3) Spectrograph camera focus
(ufilter= 1) Upper filter position
(lfilter= 1) Lower filter position
(ufbolt = ) Filter info. pset for Upper filter bolt
(lfbolt = ) Filter info. pset for Lower filter bolt
(mask = south) Newall mask / slow shutter
(skysupp= open) Sky suppressor position
(rsviewe= out) Rear slit viewer
(instrna= rcspec) Instrument name
(mode = ql)
These parameters are normally changed using the commands setspec, compin and compout. You should merely verify that the last parameter instrname is set to "rcspec" and leave everything else alone.
5.3 detpars and the setdetector command
The detpars pset holds parameters related to the CCD detector itself such as the section of the chip to be readout, the binning factors and so on. The detpars file is slightly different for each detector, because each has its own personality. At the start of your run, and before you begin customising any parameters in detpars you should do the following
cf> unlearn detpars odetpars
(N.B. there is no coma). This ensures that the private copy of the pset stored in your uparm directory is appropriate for the detector you are using. You must repeat this command if you change detectors part way through your run.
As with any pset you can edit the contents of detpars by typing epar detpars or just detpars. However, any changes you make this way will not be immediately downloaded to the controller. To make your changes effective you must run the command setdetector
this will first bring up the parameter editor allowing you to review and make any additional changes to detpars. Once you are happy exit with cntrl-z and your changes will be sent down to the controller. If you change your mind or make a mistake, and want to exit without changing anything, type ctrl-c. For some parameters only a single command is sent to the controller to change the value stored internaly. Others require that the waveforms which control the clocking of the CCD are recompiled and downloaded into the controller, a process which takes some time and generates several dozen lines of output. Eventualy when all is done the package prompt (e.g. cf>) will be output.
Normaly setdetector only downloads new parameter values to the controller if these have changed since the last time it was run. When the controller software is reloaded (by running arcon_visitor see Sections 2.2 and 2.5) the internal variables in the controller are reset to their initial values. The information stored by setdetector about the parameter values in the controller is then incorrect. A similar confusion will arise if setdetector has been run from a different account (e.g. by observer support). To force setdetector to update all parameters ensuring that everything is in sync. type
cf> setdetector force+
IMPORTANT: If you are not using the default values for all the parameters in detpars then you must do this each time you reload the controller software.
The complete detpars pset for the Tek1024 CCD is shown below:
I R A F
Image Reduction and Analysis Facility
PACKAGE = csccd
TASK = detpars
(preflas= 0.) Preflash time (seconds)
(xsum = 1) pixels summed in X direction
(ysum = 1) pixels summed in Y direction
(xstart = 1) Start of ROI in X
(ystart = 1) Start of ROI in Y
(xsize = 1024) Size of ROI in X
(ysize = 1024) Size of ROI in Y
(extend = separate) Method of extending ROI to include overscan
(noversc= 18) Number of overscan pixels (physical)
(xskip1 = 3) X pixels to skip at start of overscan
(xskip2 = 0) X pixels to skip at end of overscan
(xtrim1 = 0) X pixels to trim at start of data
(xtrim2 = 0) X pixels to trim at end of data
(ytrim1 = 0) Y pixels to trim at start of data
(ytrim2 = 0) Y pixels to trim at end of data
(amplifi= quad) Readout amplifiers to be used
(pixsize= 24.) Pixel size in microns
(nxpixel= 1024) Detector size in X
(nypixel= 1024) Detector size in Y
(detname= Tek1024-2) Detector identification
the function of the various groups of parameters are described in the following sub-sections.
5.3.1 Selecting which amplifier(s) to use - amplifiers. Also a word or two on multiple readout images.
Many of CTIO's CCD's have more than one, typically four, working amplifiers. A major advance achieved with Arcon is the ability to read out the CCD using more than one of these amplifiers in parallel, leading to substantially faster read-out. Once properly reduced, such data is virtualy indistinguishable from that obtained when reading out through only a single amplifier. However, raw multi-readout images do look decidedly strange(3). Firstly, each read-out will typically have a slightly different, zero level, gain, and readout noise, and may differ slightly in its departures from perfect linearity. As a result both zero frames and uniformly illuminated exposures will show a characteristic chequer board pattern, the sections of the data read through each amplifier having different levels. Secondly, there will be a separate overscan strip, used to monitor the zero level, for each readout. The location of these overscan strips within the image depends on which amplifiers are selected as illustrated in Figure ?.
The combination of amplifiers to be used is set by the parameter amplifiers. The available choices are
quad - Use all four amplifiers. The resulting image is split horizontaly and verticaly into four equal quadrants the overscan regions forming a vertical stripe down the centre of the picture.
upper, lower - Use the upper or lower pair of amplifiers. The resulting image is split in two horizontaly, the overscan strips running side by side down the centre of the picture.
right, left - Use the right hand or left hand pair of amplifiers. The resulting image is split in two verticaly. The overscan strips lie one above the other along the side of the picture furthest from the amplifiers in use ( i.e. at the left if amplifiers = right and conversely).
ll, lr, ul, ur - Use single amplifier in the lower left, lower right, upper left and upper right corner respectively. The overscan strip runs verticaly down the edge of the picture farthest from the amplifier (i.e. down the right edge for ll and ul and the left edge for lr and ur).
Theoreticaly there are another two cases, using the pairs of amplifiers at opposite corners of the chip, but we haven't had reason to impliment these yet. Not all choices are available with every CCD; enter ? as the value of amplifiers when editing detpars to see a list of the ones appropriate for the particular chip you are using.
The Thomson (Arcon 2.1 and Arcon 3.1) and Tek1024-2 (Arcon 3.2) chips each have four working amplifiers and you should in general choose quad for these detectors. Due to a broken bond wire, only the upper two amplifiers on the Tek 2048 (Arcon 3.3) can be used and one should in general select upper in this case. If the very small residual differences between the properties of the data in the segments that remain after data reduction would be a problem for your program you might wish to select a single amplifier. Consult Alistair Walker for advice on this and on which amplifier to use if you do.
This parameters sets the number of seconds for which the preflash leds should be illuminated at the start of each exposure. Currently none of the CCDs used with Arcon require a preflash, although the preflash leds are sometimes used when performing diagnostic tests on the CCD. You should in general just check that the preflash is set to 0.0 and leave it that way.
5.3.3 Binning - xsum, ysum
These parameters specify the number of adjacent detector pixels to be combined in the X and Y directions respectively. Use of binning is inapropriate for most spectroscopic applications.
5.3.4 Region of Interest - xstart, ystart, xsize, ysize, extend
These parameters specify the rectangular sub-section of the CCD which is to be readout (see Figure ?). The length of the spectrograph slit does not fill the full size of the detector in the spatial direction. Thus you can speed up the readout and save space on disk by only reading out the data for the part of the chip covered by the slit. If you do this you should leave a generous margin at either end of the slit to allow for measurement of the scattered light (See the CTIO cookbook CSCCD, available on line and in the red binders, for advice). The amount of time and space that can be saved in this way is small, and this is just one more thing you have to get set up properly. Therefore, our advice is that you do not do this unless the redout time overhead is a critical factor for your program (e.g. you are doing time resolved spectroscopy).
The coordinates of the bottom left hand corner of the region you want to read out are given by xstart and ystart, while its size is given by xsize and ysize. These values must be specified in physical pixels on the CCD, not binned pixels. The parameter extend controls how the region is to be extended to include the overscan strip. The default value separate causes any pixels between the trailing edge of the ROI and the overscan strip to be skipped -- this is usualy what you want. If you select extend the interveening pixels will be read out and included in the output image. If you select none there will be no overscan strip at all; this can be useful for test exposures but don't do this if you hope ever to reduced your data.
The actual portion of the CCD that will be read out will include the entire region you specify, however additional pixels may be included for a number of reasons. Firstly, if you are binning, the coordinates of the ROI will be automaticaly adjusted to be a whole number of binned pixels. Secondly, if the overscan is included by extending extra pixels will be read between the end of the region and the start of the overscan. Thirdly for some CCDs it is necessary to read a few extra gaurd pixels around the edges of the region to avoid contamination of the data by electronic transients. Finaly, if you are using more than one readout amplifier, additional pixels and/or "phantom regions" will be readout for reasons of symmetry (see Figure ?). The trimsection information recorded in the image header will be set so that all these extra pixels are excised when the image is reduced.
5.3.5 The overscan parameters - noverscan, xskip1, xskip2
The parameter noverscan sets the number of overscan pixels to be read for use in determining the DC-bias level of the CCD. This parameter should be given in binned pixels. There is an overscan strip for each amplifier used so that if the CCD is split in the horizontal direction there will be twice this number of overscan pixels in total. The parameters xskip1 and xskip2 are supposed to be used in setting the biassection information in the image header (see Figure ??); xskip1 pixels will be ignored at the leading edge of the overscan strip and xskip2 pixels at the trailing edge. Unfortunately the controller is currently not doing this calculation correctly and the header values are incorrect. You must in any case overide the header values when you actualy reduce the data with quadproc. Thus you need not set these parameters now.
5.3.6 The trim parameters - xtrim1, xtrim2, ytrim1, ytrim2
These parameters control the trimsection information written in the image header (see Figure ??) which is used when processing the data. These values must be given in physical CCD pixels, not binned pixels. The default values will normaly be what you want. In any case you will have the opportunity to overide the header values when you actualy reduce the data.
5.3.7 Some informational parameters - detname, nxpixels, nypixels, pixsize
The final group of parameters in detpars are purely for information and you will be unable to change their values. These are intended to be read by programs which need to know information about the characteristics of the detector, but currently this information is not being used anywhere.
5.3.8 Setting the Gain
In Arcon the parameter which determines the number of e-/ADU is the slope time of the "double-correlated-sampler" -- usually erroneously referred to (by astronomers) as the gain. Currently, however, this is not done via entries in detpars, but rather by running the program gainchange (at least at CTIO, programmers do what astronomers tell them to do, even when its wrong), as follows:
Gain setting (0 for list) (0): 2
*** Regenerating waveforms ***
csh /pxp/run/macro/wdl Tek1K_1 -I..
WDL revision 2.18
*** Suspending the sequencer ***
*** Reloading new waveforms ***
You will be prompted for the gain setting, which must currently be one of a pre-defined list of values. The CCD readout waveforms are then edited, recompiled, and down loaded into the controller. This all takes about 12s. To get the list of acceptable gain settings, and also (one day soon) to find out the corresponding number of e-/ADU, readout noise, and readout time, enter a gain setting of 0, as follows:
cs> gain 0
dcsT Delay ____Read_Noise_____ _______1/Gain______ ____Read_Noise_____ Read
T (ADU) (e-/ADU) (e-) Time
(us) LL LR UL UR LL LR UL UR LL LR UL UR (s)
--- ---- ------------------- ------------------- -----------------------
1: 9 5 1.54 1.53 1.59 1.56 3.39 4.36 4.36 4.40 14
2: 12 5 2.85 3.27 3.27 3.30 15.5
3: 15 4 2.00 1.86 1.77 1.91 2.28 2.62 2.62 2.64 4.56 4.87 4.64 5.04 17
4: 20 4 2.64 2.37 2.32 2.45 1.71 1.96 1.96 1.98 4.51 4.65 4.56 4.84 20.5: 39 4 5.49 4.26 4.45 4.37 0.88 1.01 1.01 1.02 4.82 4.29 4.48 4.43 29
* *** Select gain setting from the first column ***
*** Current gain setting is 4
For advice on what gain is right for you, refer to the appropriate users manual, or consult observer support.
This parameter set is not used at this time.
6. The Real Time Display
Arcon includes a real-time display which automatically shows each picture as it is being read out on a separate Sun-style monitor next to the data Acquisition computer. This occurs independently from, and in parallel with, the transfer of the data to disk on the Sun and does not slow down this process. You need not wait for the real time display to finish before starting another exposure. The real time display offers a number of convenient features:
Display of the picture begins substantially before all the data has been transferred to the Sun and converted into an IRAF image.
Various picture statistics are accumulated on the fly and are used to optimally map the 16-bit CCD data into the 256 grey-levels shown by the display. These statistics are also shown in the status window (see Section 2.3) and may be useful when estimating exposure levels for sky flats.
Saturated pixels (data value 65535) are shown in red.
Quad readout pictures are automatically overscan subtracted and trimmed for the display.
The cardinal directions are labeled on the display monitor. You will soon be able to specify any rotation and flipping necessary to have the display match your finding charts.
These features mean that you can always see the last picture taken to verify that the picture looks reasonable, is the field you want, and that no important objects are saturated.
The display itself takes place in two stages. A first fast pass keeps up with the readout but the data is shown at slightly reduced spatial resolution. A second, slower full resolution pass is then performed once the entire picture is available. Since the ideal mapping from 16 to 8 bits can't be known until the readout is finished the second pass may modify the look up table unless you specify otherwise (see Section 6.2).
6.1 Changing the look of the displayed picture
You can change the way the mapping from 16 to 8 bits is performed and also whether the picture is shown in normal, reversed or false color mode. You can also show the pixels above and below the mapped range in green and blue, respectively. The commands to control these settings are temporarily contained in the contributed package (a sub-package of arcon):
lut - Change the look up table.
video = "reverse" (normal|reverse|falsecolor)
Show stars as white ("normal"), black ("reverse") or use false-color ("falsecolor").
colors = "nocolor" (nocolor|3color)
Disable ("nocolor") or enable ("3color") the use of colors to mark pixels outside the mapping range. When enabled pixels below the range are shown in blue and those above the range are shown in green. Note this does not affect the marking of saturated pixels which are always shown in red.
map - Defines the way the 16-bit CCD data is to be mapped to the 8-bit display. The default parameter values (algorithm = "mode", low = 0.2, high = 2.0) work well for normal star fields. Try low = 0.2 and high = 1.3 to bring out nebulosity.
algorithm = "mode" (mode|stdev|minmax|constant|show)
The mapping algorithm to use. Options are:
mode - Map range is specified number of standard deviations below mode and above mean.
stdev - Like mode, except bottom of range is specified number of standard deviations below mean.
minmax - Map range has specified percentages of pixels above picture minimum below picture maximum. (e.g. 0.5 and 1 would have 0.5% of the pixels below the map range and 1% above the map range.)
constant - Set map range to specified values.
show - Display current picture with specified values, but do not change the map parameters for subsequent picture displays.
low = 0.2
Low value for mapping algorithm. This is expressed as a number of standard deviations for the mode and stdev algorithms, the percentage of pixels below the bound for minmax and the absolute level in ADU's for constant and show.
high = 2
High value for mapping algorithm. This is expressed as a number of standard deviations for the mode and stdev algorithms, the percentage of pixels above the bound for minmax and the absolute level in ADU's for constant and show.
6.2 Controlling when display and remapping take place
The 16-to-8-bit mapping is performed based on image statistics accumulated as the picture is read out. However, it is necessary to wait until enough of the picture data is available, so that these statistics are meaningful, before using them for the mapping. Until then the mapping from the previous exposure is used. This works well when sequential exposures are of the same type and comparable duration. In the future the system will be made smarter so that the preliminary mapping used is based on information from the previous exposure of the same type scaled according to exposure time.
The remap task (also temporarily in the contributed package) controls how soon remapping is performed:
remap - Set remapping options for real time display.
delaydisplay = no
Do not start displaying until percent of the picture has been read. This prevents starting to display pictures with the mapping from the previous picture, but delays any feedback on the current picture.
percent = 43
The percentage of the picture which must be read out before the mapping for the first display pass is changed from that used for the previous picture.
redraw = yes
Perform final high resolution display pass.
With the default value of percent repainting of the screen with the new look-up table will finish bef ore CCD read-out completes. A smaller value will result in earlier re-mapping, but an increased risk that incomplete sampling of the field will result in a poor choice of look-up table. In some cases such as when an isolated bright star or a compact star cluster are placed near the center of a quad readout detector, the correct mapping cannot be known until the end of the readout. When the new look-up table is poorly chosen, the display may be repainted three times; once at the start using the look-up table from the previous exposure, then again based on statistics accumulated from the top and bottom edges of the image, and finally when the readout is complete based on statistics from the entire picture. This final remapping is done at the same time that the image is displayed at full spatial resolution. Some people find this repeated repainting of the screen confusing. If you decide you do not want any remapping, set percent = 100. and delaydisplay = yes. Display of the picture will then not start until the read-out is complete, at which time you will see a fast, medium spatial-resolution display, followed by a second slower pass at full resolution, but there will be no change in the mapping.
7. Data Reduction
Appendix A: Software Summary - The Only Page(s) You Really Need to read.
Loading packages etc.
arcon - Load main Arcon package
cfccd - Load instrument specific package for Cassegrain focus CCD direct
pfccd - Load instrument specific package for Prime focus CCD direct
nfccd - Load instrument specific package for Newtonian focus CCD direct
connect - Make connection to detector controller (automatically done by cfccd etc)
disconnect - Break connection to detector controller (automatically done on bye from cfccd)
Data taking commands
observe - Take one or more exposures prompting for type
dark - Take one or more dark exposures
dflat - Take one or more dome flat exposures
object - Take one or more object exposures
sflat - Take one or more sky flat exposures
zero - Take one or more zero exposures
focus - Take a focus frame
more - Take more exposures of the previous type
preview - Take an exposure preview frame. Data is shown on real time display but not saved to disk.
movie - Continuously take preview exposures until stopped with abort
Exposure Control Commands
abort - Stop exposure and do not readout detector
stop - Stop exposure and readout detector
tchange - Change exposure time
pause - Pause current exposure
resume - resume paused exposure
obspars - Observing parameters
detpars - Detector parameters
telpars - Telescope parameters
instrpars - Instrument parameters
ufbolt - filter info parameters for upper filter bolt
lfbolt - filter info parameters for lower filter bolt
initspec - Initialise spectrograph motor control and settings
setspec - Set all spectrograph settings
showspec - Show all spectrograph settings
compin - Set comparison lens & rotator mirror ready for comp or pflat
compout - Set comparison lens & rotator mirror ready for object
savespec - Save current spectrograph settings in a file
restorespec - Restore spectrograph settings from a file
1. In examples like this, text entered by the user will be shown in bold type in order to distinguish it from prompts and other output from the program.
2.In particular note that changing complamp does not select which comparison source is used. This has to be done manually in the Cassegrain cage.
3. Note that these oddities are not apparent when the data is viewed on the real time display, because this automatically trims the overscan and applies an offset and gain correction to each quadrant to crudely equalize the DC levels.
Updated on May 28, 2021, 3:42 pm