1.2m Minicam System Primer

Created: 09/16/04 by TG
Updated: 05/16/05 by EF

When you see this  (back arrow) icon, you can click on it to return to this point.

Table Of Contents

Click on the section that you wish to read:


Introduction

This primer instructs users of the Minicam CCD system on the 1.2-meter telescope. The username to use Minicam remains 4obs, the old 4shooter account, we may update it once we switch to Keplercam. We keep the 4obs computer account unchanged, except for necessary updates. We STRONGLY discourage operating the telescope from accounts other than 4obs. If you make minor changes in 4obs directories, please advise us. The 4obs account is restored periodically from a frozen disk version. (To restore, type restore.4sh and log out and then back in.) If you don't like its setup, or wish to make lasting changes, please ask for your own account. Note that we plan to move to a new username, mini (and new password to be determined), as soon as the Minicam system stabilizes.

 (back arrow) To Table Of Contents


Getting Started

Log in to the Sun computer named flwo48, using the name 4obs. The password should be printed on the monitor. You will soon see several windows appear, including a blue one called Main Login, a maroon one called Iraf, a clock, and the FVWM Icon Manager (lower right of each screen). The blue and maroon windows are simply unix xterm windows. You might use the second monitor to display the images (it is display flwo48:0.1)

At this point, you need to learn how to use the mouse. It has 3 buttons: left, middle and right. The mouse serves many functions, only a few of which will be described here.

The location of the mouse brings focus, i.e. directs keyboard characters to the appropriate window. You simply place the mouse cursor (looks like a capital I) on the window you want to work in. Often, if nothing happened after you typed a command, it was because the mouse was not in the right window. A simple action you can achieve is to click with the left button on a window just about anywhere on it, except on the little boxes at top right: that brings it to the foreground. Other actions, such as clicking, dragging to select, and inserting, are standard X. At the top margin of each window is a bar; clicking a mouse button there once results in one of these actions:

Beware: clicking the left mouse button twice on the bar shrinks the whole window into the bar; repeating that on the shrunk bar restores the window.

  • The vertical bar area attached to the left of each window is the scroll bar.

     (back arrow) To Table Of Contents


    Taking Data

    First, the telescope PC must be working, as well as the guide PC. To start these up, go to
    Startup and TCS.

    To start the Minicam system, mouse the cursor over to the Main Login window and type

    gomin
    Three windows will appear:
    1. The Min.err Window (small blue)
    2. The Tedsh Command Window (blue xterm)
    3. The ntcs (Telescope Control System) Window
    The Min.err window for is the error debugging output for the processes. It may be useful when problems occur, but you can iconify it for now.

    The Tedsh (rtshell of old) or command window accepts all commands for system control of the CCD, telescope, filters and guider. It has the basic functions of tcsh (command line editing) as well as custom functions. It also has commands built-in to control the telescope, filter positions and guider functions, which duplicate many of the TCS functions.

    The basic parameters of the CCDs are changed with command "ccd" and several different parameters. You only need a few of these, and there are aliases for the most frequently-used ones:

    It is important to monitor the status of the CCDs, especially their temperatures. To view this status, start a vncviewer session to the computer that controls the CCDs, called miniccd. On any xterm, type:

    vncviewer miniccd.sao.arizona.edu:1
    

    You will be prompted for a password and you may put the job in the background once it's running. The password is posted in the 1.2m control room, or you may obtain it from the remote observer at the 1.5m. A window like this snapshot will appear on your screen. The color-coded temperatures appear in the lower-right window; green is good, red is not, yellow at the upper right is OK. Watch the bottom 2 temperatures, which should be near -120C. If you see a view similar to the snapshot, the system is behaving properly; if you see any red, you should restart the system, as described here. You should leave the vncviewer running so you can monitor the status of the CCDs throughout each night.

  • Startup aliases and definitions for the system are in the file /home/4obs/.miniccd.rtrc, which is executed when you type gomin. If you want different aliases or conditions at startup, edit that file and change or add commands (very carefully). This will ensure that every time you exit and return to the system the size will be the same. You can always enter the binning commands in the tedsh window.
  • You must first decide what CCD format you want, binned 2x2 or unbinned. In the rtshell window, type small, which will result in 2x2 binning, or type large, which will result in full resolution. Small is the default on startup.

    If you want a different size at startup, edit the file /home/4obs/.mini.rtrc and insert the appropriate command. This will ensure that every time you exit and return to the system the size will be the same. You can always enter the binning commands in the command window.

  • Normally, both CCDs are read out. If you are interested in only one of the chips, say chip 1, you should issue the command "ccd selchan 1" and to return to normal "ccd selchan 0" (the default). You only save disk space this way, not readout time. If in doubt, typing "ccd selchan ?" in the command window will return the status, 0 being the default, both CCDs. The binned (unbinned) pixels are about 0.60" (0.30") on the sky.

  • You may also want to change the number of channels that are read out. You can choose between 2 and 4 channels. split will result in 4 channels (2 per chip), while nosplit results in 2 channels (1 per chip). We plan not to implement the split option unless there is a failure in one of the CCD amplifiers (see the staff if you have any questions).
  • Click here for more info on the Minicam CCD Chips. For QE curves, click here.

    The images are stored in a directory named /mini/yyyy.mmdd, for example /mini/2004.0916 for 2004 Sep 16. The directory changes and appears automatically at noon MST. Data are stored as FITS EXTENSION files (see chip characteristics).

    There are thankfully only a few commands you need to know to take an exposure:

    bias n
    Takes n zero-second exposures and names them ``BIAS''.
    total n
    Will do a fast clear of the CCDs, open the shutter for time n, where n is seconds, reads out the CCDs and store the data. No prompt will be made for comments - you must enter a name via "object" otherwise file is named after last object name, or seqno.miniccd.fits if no object has yet been set. If you loaded your object from a catalog through TCS, it will set theobject name as well. Total can not be used to change the exposure time in the middle of one already in progress. There is currently no way to change an exposure time for an exposure in progress.
    dark [ n ]
    Same as total except the shutter isn't opened. The exposure is named ``DARK''. (Equivalent to the old "godark", which still exists for old-timers.)
    flat [ n ]
    Takes an exposure of length n, labels it ``FLAT'', and notes in the header that the exposure is a calibration flat field. (Equivalent to the old "goflat", which still exists for old-timers.)
    repeat n XX m
    Repeats n times CCD command XX. XX can only be one of these: total, dark or flat. Argument m is the desired exposure time for XX. For example: "repeat 7 flat 10" will acquire 7 10-second exposures labeled FLAT (see above). Notice that there is no feedback on the repetitions in the command window, although ntcs will show information about each exposure as usual.
    obs
    Prompts for a title, and an exposure time (in seconds). Will do a fast clear of the CCD, open the shutter, read out the CCDs and store the data. Information contained in the comment block is automatically store in the data header.
    go [ n ]
    Does a fast camera clear, opens the shutter for time n. The shutter will close at the end of time, No storage occurs, so this will work for multiple exposure frames.
    abort
    Stops the current exposure (no readout) or sequence of repeat commands.
    dstore
    Reads out the CCD and stores the image on disk.
    clear [ n ]
    Clear charge from ccd n times
    cc [ n ]
    clears the camera (fast read) n times.
    comment
    puts you in the comment editor. If a change is made, the comment block is stored as comments in the disk fits header.
    object name
    gives the next file a name, puts that name in the FITS keyword OBJECT, but does not put that name in the comment field, nor does the comment field get stored in the next file, unless the comment command is also explicitly invoked.
    setcom miniccd Object name
    Puts that name in the comment file field Object, but does not set the File name or FITS keyword Object. Allows for two levels or Object reference.

     (back arrow) To Table Of Contents


    Comment Editor

    The comment block can be edited by typing the command comment. Here's how the comment-editing window appears:

    When the window appears, move the cursor to the right side of the window where the changeable parameters are. On the 1.2m, the coordinates, airmass, times and filter are transferred from the telescope computer, so the only things you might want to enter are a secondary object name, your name and the weather conditions.

     (back arrow) To Table Of Contents


    Telescope and Top Box Control

    The TCS window allows control of the movement of the telescope, telescope focus, top box filter wheel and guider functions. It also displays the current telescope position, focus and filter position, and telescope times if the PC communication is on (set by clicking on the PC Comm button). For a more detailed listing of the use of this window, see the TCS manual .

    Here is a sample TCS window:

    Filters
    Filters can only be loaded by Wayne, Ted, Bob or other qualified people. To move to a particular filter, simply click the left mouse button on that filter button. The longest time required move to a filter is 15 seconds, for a 4 position move. The filter currently over detector is displayed in the TCS window. You should blow the dust off the filters using a canister of dry air before your run begins, or perhaps even every afternoon. There is an access port that makes this easy.

    We have 4" UBVRI, Sloan and narrow-band filters. Note that 2" filters will vignette at the edges of the CCD field, in a curious way that causes astigmatic star images. NOT recommended with Minicam.

    Telescope Focus
    Telescope focus uses the hexapod under control of the TCS program on the Sun computer (flwo48). To change the focus manually, click the left mouse button on the TCS Focus Move button. A smaller window will pop up with buttons for movement in or out. The movement step size can be changed with the Focus Set button. Movement to larger numbers is against gravity. The focus position is displayed in the TCS window, and is stored in the data header.

    To measure with Minicam and set the focus, please try the mfindfwhm script. This script is fully automatic; it estimates the focus and sets it, estimates the seeing, and records its results along with mirror temperatures in a file we are using to monitor the seeing and its correlation with temperature.

    If you prefer to use the old methods to focus, click here.

    Slewing
    Use the TCS New Coords button to enter your next position, using spaces or colons to separate h:m:s and d:m:s. The epoch may be omitted, in which case 1950.0 will be used. The coordinates may also be selected from a catalog (see the TCS manual). Once coordinates are loaded, then click on the Slew Enable button. The STOP button will abort a move or a new coords command, but hitting the cancel button on the DFM rack is faster.
    Other Features:
    One can also offset the telescope from the present position an arbitrary number of arcsecs, change the track rates, set the time, and basically do all of the TCS functions from the command window as well as the TCS window via special commands. See the TCS manual) for details. The command window also allows script control of the system, see the Rtshell Users Guide and the Rtshell Script Writers Bible for further information.

     (back arrow) To Table Of Contents


    Telescope Focusing (old style)

    If your roots are very deep, follow the old method and take manual focus frames thusly:

    1. Determine the appropriate exposure time for a star in your favorite field and place the star in the middle of the CCD. Make sure the star is NOT one of the entries in the bright star catalog!
    2. Move the focus 60 units lower than the suspected true focus. Please visit the HEXAPOD description.
    3. In the command window, type go n, where n is the exposure time.
    4. After the beep, offset the telescope about 15" west, and move the focus up about 20 units.
    5. type go n again. repeat 3 & 4 about six times, leave a double offset for the last exposure.
    6. for the last exposure type total m*n, where m*n is the total exposure you expect (the TCS will tell you this). If you don't want any more exposures, make m*n equal or less than the current exposure time.
    7. The chip will now be read out. You have created multiple exposures of the star at different focus settings, which can be inspected via the imexamine routine for the best focus.
    You might also use a script called testfoc which takes 3 arguments, numframes, exptime and stepsize. For example, testfoc 8 2 15 will produce a frame name 0002.FineFoc.fits which contains eight exposures of two seconds each, with a focus offset of 15 steps between each frame, and will then prompt the user for the number of the in-focus image and set the focus to the correct value. The command nfoc is equivalent to testfoc 8 2 15.

    The telescope focus changes with outside air temperature in a predictable way (more at the seeing link). After slewing to extreme hour angles, the focus may also change. If you see unusual changes in focus values, please report that in detail, in the nightly logs.

    Once you've tried the old way, please try using mfindfwhm to measure and set the focus. This script is fully automatic, estimates the focus, sets it, estimates the seeing, and records its results along with mirror temperatures to a file we are using to monitor the seeing.

    Guider Focusing

    After focusing the telescope, put the guider on-axis, then in the guider's acquire window adjust the focus value. The guider will remember ANY change to guider focus while on-axis, and store this for use in the future. If the telescope focus was correctly set, you only need to change the on-axis guider focus once. When the telescope comes out of focus, just refocus the telescope, and the guider will be back to focus.


     (back arrow) To Table Of Contents


    Scripts

    The command window allows many manual commands to be automated. For instance, scripts have been written that will execute a sequence of commands that will take flat field exposures in various filters. Likewise, scripts can be written to move to a standard star and take exposures in several filters. Check the scripts subdirectory in the 4obs directory for sample scripts. For details on writing your own scripts, go to the Rtshell Script Writers Bible for further information.

    It is not easy to kill a script, for the shell is occupied during the script and will not accept commands like "kill". Typing CNTRL-C during readout will sometimes kill each exposure individually, and thus is useful if there are only a few exposures left. Otherwise, you must kill the command window (using the 3rd mouse button to bring up "Destroy Window"), and then restart the Realtime system. This problem may be avoided by putting in 5 second delays between each sequenced exposure in the script used, during which time one can type a CNTRL-C which will kill the sequence. The sample scripts listed here have such a feature.

     (back arrow) To Table Of Contents


    Dome flats

    Click here for instructions.

    Twilight flats

    The script mdotwilight script allows you to create sky flats automatically. It determines the date of observation and calculates the appropriate exposure times, given the readout time of the Minicam. It also determines which filter is in place, and uses it to expose. Follow the link above for more details and instructions.

     (back arrow) To Table Of Contents


    Data Archiving

    You can either create a fits tape using iraf, or use unix tar in the data directory. The csh command backup is a user friendly version of tar. (Does NOT work yet for MINICAM!)
    1. To use IRAF:
      To write to a new DAT tape use mscwfits *.fits mta newtape+
      To write on a tape containing files use mscwfits *.fits mta newtape-

     (back arrow) To Table Of Contents


    Purging Files

    Eventually, you will need to remove your files from disk, either because you are running out of room, or your run is over. To check the data disk space available, in an xterm window enter the command df /rdata (/rdata is the remotely mounted disk from miniccd), which will produce the output:
    Filesystem            kbytes    used   avail capacity  Mounted on
    miniccd:/data        76177864 30550724 45627140    41%    /rdata
    
    and note the space available on the data disk, about 70 gigabytes in this example.

    The Iraf command to delete files is imdelete. You can use it for IRAF or FITS files. You may wish to edit the parameter file for imdelete (via epar imdelete) to turn on the safety measures.

    You can also use delete for fits files. Unix rm can also be used, as can rmdir. Your data will be subject to deletion the afternoon following your last night of observing. However, if there is ample space to start your run, you might consider postponing such deletion until it becomes necessary (especially on weekends). You may want to check the data disk to see what garbage is left over from the previous observer.

     (back arrow) To Table Of Contents


    Exiting (gracefully and otherwise)

    You don't have to logout, but if you want to, first exit the Realtime system. Type exit in the command window, or use the alias bye. The windows will go away after a while. If you accidentally get out of the Realtime system (by typing a lot of CTRL-C's for instance), you can re-enter by typing gomin (after all windows are gone!). in the login window, which is the official way to bring up the system.

    After exiting Realtime system, you can exit the computer by typing exit in the Main Login window

     (back arrow) To Table Of Contents


    Problems

    If the CCDs are misbehaving (e.g., stuck in the readout, unusually noisy or incomplete images) you need to restart the CCD system on the PC that controls Minicam (miniccd). To achieve that, follow these steps:

    If the command window on flwo48 echoes gobbledygook when you type something sensible, the cause is likely to be an attempt to stop a script while it is still exposing by typing CONTROL-C at least once. Another possibility is that tcs just becomes unresponsive on flwo48. Click here for instructions to recover from either event.

    If you get into bad trouble, for example the complete screen locks up on you and you get no response for several minutes, you will have to reboot the system. You may also have to do this to restart after being shutdown because of maintenance work or power problems.

    There are three possible ways to reboot:

    1. If you can still type commands into some window somewhere (ON FLWO48!) , type godown -r, which is a link into shutdown, and will flush all disk buffers to disk and shutdown as gracefully as possible. If the computer has been crashing on its own, you may want to power down the computer at this point (in the computer room), to reset various modules.
    2. On the Sun console keyboard, press the `Stop' key in the upper left corner (also marked `L1') while simultaneously pressing the `a' key. This is also called `pressing L1/A' in some documentation. Possible file system corruption may occur, as disk buffers are NOT flushed.
    3. Turn the power off on flwo48, wait 5 seconds, then back on. The power switch is located on the back of flwo48's pizza box. Possible file system corruption may occur, as disk buffers are NOT flushed.
    The number 1 method should always be attempted first, but if it won't work try 2, then 3.

    After shutting down the machine via either of the first 2 methods, you reboot by typing a `b' at the `<' prompt. In the third case, the computer should reboot automatically without user intervention.

    Within a few minutes, after a lot of messages, the login window should be back.

     (back arrow) To Table Of Contents


    Useful UNIX Commands

    (aliases are put in parentheses) (arguments inside [] are optional)

      ls -l[dirname]    (dir)   - lists the contents of a directory
      rm file          (del)   - deletes file
      mv file1 file2             - renames file1 to file2
      cp file1 file2              - copies file1 into file2
      cat file                  - lists the contents of a file
      lpr filename              - prints file named filename
      xterm &                 - creates another window 
      vi[filename]             - an editor
      emacs[filename]          - another editor
      cd directory             - change to directory directory
      mail                   - To read your mail
      mail name[@host.domain]  - To send mail to user 
      ssh [user@hostname]        - Connect securely to hostname
      sftp [user@hostname]     - secure file transfer program
    
    Unix device names: Unix commands can be executed in the command window, but in general it is better to execute them in the login or other windows.

    It is wise to not use the login window for remote logins or transfers via ssh or sftp.

     (back arrow) To Table Of Contents


    Using IRAF

    Once you have taken an image, move over to the IRAF window to look at the data. In that window, type cd; cl as usual. You will need to cd to the data directory, for example cd /mini/2004.0916. Type dimtool for ds9, *the preferred display method*, simtool or ximtool, then type flwo48:0.0 (flwo48:0.1) at the IRAF prompt to display on the right (left) monitor. If you are displaying unbinned images, you will need to change the stdimage in IRAF: type set stdimage=imt2048 to view your full images.

    If you want to use the left monitor to display images, there are a few tricks. To use saoimage (ds9), type simtool (dimtool) as above, but type flwo48:0.1 to the IRAF prompt. This will place the saoimage (ds9) window on the left monitor. To use ximtool, you must find an xterm in the left monitor (to open an xterm, move the cursor there, and click on the left button). Start up IRAF, type ximtool, and answer flwo48:0.1 to the prompt. You can now display images from either that IRAF window, or one on the right monitor.

    Use mscdisplay (in the mscred package) to display images (ex. mscdispl 0004.M31 1); mscexamine to examine them (like imexamine but for mosaics). Caveat: although mscexamine appears to work to some degree, imexamine on individual frames (see below for an example) is reliable or, if you use ds9 and load the array directly from this program, imexamine will work on the full array. Make sure you have set stdimage=imt1024. Other mosaic commands can be found in the package "mscred" (loaded at startup). Warning. A "feature" of the mscred package is that coords are always in detector units, in this case one unbinned pixel. So, if you take binned data, and use mscdisplay or mscexamine, the pixel values shown in your imtool (saoimage, ximtool etc) and in your fwhm as gotten from radial profile fits will seem to be twice as big as they should be. Single frames can be displayed thus: "display 0001.M31[1] 1", for example. This method is sometimes more useful since the coordinates are more easily understood. Many other commands can be executed on these files by using the image extension value [1]-[4] for nosplit mode, [1]-[8] for split mode (so rare, you'll never see it).

    Help can be found in the TDC web page in its "Data Analysis Software" section. Click on saoimage's Color menu button and you will enable the lookup table, altered by holding a mouse key down and then moving the mouse. The most useful iraf packages for analyzing your image are imexamine or mscexamine which place a cross shaped cursor on the image, allowing line and column plots (l or c keys), and radial profile plots of stars (r key). These graphs will come up in a separate graphics window. Use q to exit imexamine. The implot package also comes in handy.

    If for some reason another saoimage, ds9 or ximtool is still running, IRAF will not display in the new one. If you suspect this has occurred, as evidenced by display not doing anything, go to the main login window and type ps auxw |grep -i saoimage, ps auxw |grep -i ximtool or ps auxw |grep -i ds9. Kill any processes named saoimage, ds9 or ximtool with command kill -9 procnumber, then try simtool, dimtool or ximtool again. If it won't let you kill them (not owner), use godown to reboot.

    Hardcopies can be printed by going to the etc menu, and clicking on print.

    It is best to perform the necessary debiasing and flatfielding of the Minicam data with IRAF. The necessary IRAF package is mscred.

     (back arrow) To Table Of Contents


    Miscellaneous

    The command window has a useful help command, describing all of the commands listed above, plus those that change the readout pattern of the CCD and other similar properties.

     (back arrow) To Table Of Contents