COSMOS Observing

This page gives basic information on COSMOS observing strategies. The information covered in this observing guide is:

  1. Detector Orientation on the Sky
  2. Tilt of the Spectrum on the Detector
  3. Focusingthe Camera Optics
  4. Daytime Calibrations
  5. Telescope Zero-Point
  6. Telescope Focus
  7. Object Acquisition Scripts
  8. Offset Calculation Scripts in IRAF

Detector Orientation:

COSMOS is mounted in the Cassegrain cage at the Blanco 4-m telescope such that the slit position angle is the Cassegrain rotator angle. The figure below shows the position of the slit for some common rotator angles. Please note that the rotator angle for COSMOS excludes the range from 88-92 deg due to a physical limit of the rotator mechanism.

If the observer has made finding charts where East is left and North is up, one can orientate the ds9 viewer so that East is left and North is up by clicking on the "Zoom" menu button and selecting the "Pan Zoom Rotate Parameters" button. In the field for "Rotate", put 270 + Rotator Angle. So, if the rotator angle is 270 degrees, the angle that you should enter in the "Pan Zoom Rotate Parameters" field for "Rotate" is 270 + 270 = 540.

Spectrum Tilt:

With COSMOS, we acquire the object on the slit by taking a series of field images and slit images. When a direct image of the field and slit show that the desired object is centered in the slit, we move the grisms and slit into the beam to take a spectrum. The COSMOS grisms are tilted with respect to the beam such that the spectrum is offset in x-pixel values from the location of the object in direct imaging mode and that spectrum is tilted as shown in the figure below.

From our tests on the sky, one can position an object on the slit at the coordinates of x-object and y-object where y-object is the center of the slit. With the tilt of the grisms, the position of the spectrum is offset and tilted with respect to the object in the acquisition image. For example with COSMOS, we can acquire an object (point-source) on the slit at an x-pixel value of 900 at the parallactic angle. Using the blue grism and center slit, we find that the spectrum of the object is displaced in x-pixels: ~50pixels (blue-end), ~60 pixels (center), and ~70 pixels (red-end). Using the red grism and center slit, we find that the spectrum of the object is displaced in x-pixels: ~20 pixels in the blue-end, center, and red-end of the spectrum. If an observer desires to keep the spectrum of their source in the same amplifier for each grism and use both grisms for their observations, it is recommended that the object ispositioned near x-pixel=1024+/-125in imaging mode so that the resulting spectrum falls completely on amp1 (1024pix - 125pix) or amp2 (1024pix + 125pix). This should provide sufficient sky on either side of the object spectum in the same amplifier. The shifts calculated above are for data obtained with the object acquisition in "2k x 2k" mode and the spectrum taken in "2k x 4k" (Full Frame) mode. Observers using the "320 x 4k" spectroscopic readout mode should note that there are only 160 x-pixels in each amplifier and needto position the target accordingly in imaging mode if they want the entire spectrum to be on one amplifier.

Camera Optics Focus:

This step should be done for each grating and slit combination that the observers plan on using during the night. The observers should noteone of the two "OpticalBench" temperatures that aregiven in the C/KOSMOS Observing Monitor window. As discussed in Section 5.5 of the C/KOSMOS Instrument Manual, the camera focus has a temperature dependence of -10 micron/deg. Focus shifts of ~25 microns will start to affect image quality. It is recommended that you re-check the camera focus if the bench tempertaure changes by much more than 2 deg. In short, if the bench teperature increases by 2 deg, the camera focus should be decreased by 20 microns. If the bench temperature decreases by 2 deg, the camera focus should be increased by 20 microns.

One of the first tasks in the daily setup of COSMOS is to focus the internal camera optics. The observer will need to ask the Telescope Operator to put the comparison lamp mirror into the "IN" or "ISPI" position and to turn on one of the wavelength calibration lamps (e.g., HgAr, HgNe, or Hollow Cathode [CuHeAr]). The observer will then need to use the NGUI "NOAO KOSMOS Spectrograph - Mayall 4m Telescope" script tool to write a script for "Camera Spectral Focus".

This will open a script editing window for"CAMSFOCUS". The observer should then selectthe filter, disperser,slit, and source options in the new window. The observer should also select the "SpectraFocus Start", "Camera Focus Step", and "Camera Focus Iterations" values as shown in the following image:

for the open filter, blue (b2k) disperser, 3 pixel (0.9") center slit with the HgAr lamp, starting at a camera focus value of 1600 with 9 increments of 50. Once these spectra are taken one needs to run IRAF.MSCRED.CCDPROC on the images so they are overscanned-corrected, trimmed, and merged. One can then use the IRAF task IRAF.OBSUTIL.SPECFOCUS to determine the best COSMOS camera focus value as seen below:

This gives a best focus value of 1856. One should then display the image closest to the determined focus value and use IRAF.IMEXAM to determine the FWHM of the spectral lines from the blue end to the red end on the spectrum. Look at the spectra on either side of the image with the best determined focus usingIRAF.IMEXAM to look for the camera focus value that best represents the FWHM of the slit in the blue, center, and red end of the spectra. As seen in the example below, the spectrum with the camera focus value closest to the best focus determined by IRAF.OBSUTIL.SPECFOCUS has spectral lines with a FWHM of ~3.8pixat the blue end of the spectrum andwith aFWHM of ~2.7 at the red end of the spectrum.

In order to determine the best focus for the entire spectral range, we can use IRAF.OBSUTIL.SPECFOCUS but we change the number of dispersion samples to three (ndisp = 3). After SPECFOCUS has started, one can press the "s" key to obtain plots like the following:

 

 

 

We can see for the spectrum with a camera focus of 1800, that the FWHM of the spectral lines are 3.9, 2.8, and 2.8pixels at the blue, central, and red regions of the spectrum, respectively. For a camera focus of 1850, the FWHM of the spectral lines are 3.4, 2.8, and 2.6 pixels from blue to red. For a camera focus of 1900, the FWHM ofthe spectral lines are 3.0, 3.1, and 2.8 from the blue end to the red end of the spectrum. For a camera focus of 1950, the FWHM of the spectral lines are 2.9, 3.6, and 3.2 pixels from blue to red. You can use diagnostic plots like this to determine the best camera focus to achieve your science goals.

Daytime Calibrations:

After the camera focus has been determined for each of the observer's grating and slit configurations, the observer and telescope operator should begin daytime calibrations for Dome Flats and Bias Frames. Calibration lamp exposure times and intensities for the 3 pixel (0.9") slits are given here.

TelescopeZero-Point:

During twilight, once the telescope operators have everything ready, one of the first tasks the observer will need to perform is the Telescope Zero-Point calculation. During this procedure, the telescope operator will point the telescope at a "bright" star. For the purposes of C/KOSMOS, we recommend using a spectrophotometric standard where 10

Edit the "Slit/Mos Acquisition" SCRIPT CONFIGURATION windowwith the relevant details as shown below:
Script Name: ZEROPOINT
Object Name: Zero Point
Filter - normally "Open"
Slit - "Center"
Integration Time: 0.3 sec
ROI Area: 2k x 2k

In this example, we choose the 3 pixel Center slit (3pxC) as shown below.

Go to the "exec" directory as observer at cosmos-4m and run the script ZEROPOINT.sh as:

exec> ./ZEROPOINT.sh

This script will take a 0.3 second exposure of the 3 pixel (0.9") center slit anda 0.3 secondimage of the central 2k x 2k pixels of the field in that order. Once the images are taken, you can use one of the provided IRAF offset scripts, either kosmos_offset.cl or koffset3.cl, to position the star used for the zero-point at the desired slit position. Tell the telescope operator the desired offset and execute the acquisition script again to verify that the object is at the desired positionon the slit. See the "Offset Calculation" section of this guide for more details on how to execute the IRAF offsetscripts. Repeat this step as necessary. In general, you should only need to perform one or two zero-point offsets to get the object close to the desired slit position.

Telescope Focus:

The telescope focus should also be performed during twilight. To do this, select the Telescope Focus button in the NGUI window as shown below.

Edit the "TelFocus" SCRIPT CONFIGURATION window with the details shown below.

Since COSMOS has been commissioned, we have found that the telescope focus value has been close 13000 microns +/- 500 microns. Choose a "Telescope Focus Start" value, change the "Telescope Focus Step" value to "100", and select the "Telescope Focus Iterations" value to be "7" or "9". If you perform the telescope focus at the same position as you performed the telescope zero-point using one of the spectrophotometric standard stars, you will want to choose an exposure time of at least 1second so you can accurately sample the seeing. After you have clicked on "OK", the TELFOCUS.sh script will be written to the "exec" directory. COSMOS observers at the Blanco 4-m will then need to edit the TELFOCUS.sh script to add a "sleep 10" command after each change of the telescope focus. To do this, search for the string "ntcs_focus". You should see commands in the TELFOCUS.sh file that look like:

ditscmd ntcs ntcs_focus Argument1="12900"
checkReturnValue $? ntcs ntcs_focus "12900"

add the "sleep 10" command after the lines containing "checkReturnValue $? ntcs ntcs_focus "xxxxx" so that the lines look like the following:

ditscmd ntcs ntcs_focus Argument1="12900"
checkReturnValue $? ntcs ntcs_focus "12900"
sleep 10

An example of this can be found in the PERMSCRIPTS directory and has a filename of 'TELFOCUS_EXAMPLE.sh". We need to put the "sleep 10" command into the TELFOCUS.sh script because we have changed the gears that move the Blanco secondary mirror. The "sleep 10" command is used to make sure that the secondary is in position before the exposure is started.

After the "TELFOCUS.sh" script has been edited, you will want to change the telescope focus so that it is a few hundred microns below the starting value in the script. That is, if the "TELFOCUS.sh" script has a "Telescope Focus Start (micron)" of 12900, ask the telescope operator to change the telescope focus to 12500. The ask the telescope operator to change the telescope focus to your start value. This is done to eliminate backlash in the telescope focus mechanism. You are now ready to run the "TELFOCUS.sh" script.

exec> TELFOCUS.sh

After the script is completed, you will need to run IRAF.MSCRED.CCDPROC on image so that the amplifiers are merged. Afterwards, you will want to edit the parameters of IRAF.OBSUTIL.STARFOCUS. With starfocus, you can display the image and mark stars to measure their FWHM and ellipticity as a function of telescope focus value. An example of the starfocus parameter file is shown below.

Once starfocus has been run, you should see an irafterm window displaying information about the best computed telescope focus value by using the "f" keyas seen below.

In the example above, starfocus has determined that the best telescope focus value is 22 microns above the initial telescope focus value. You can also check the FWHM and ellipticity of individual stars using imexam.

The telescope focus changes by -90 units per degree of temperature change. If the temperature decreases, the telescope focus increases.

Note:Sometimes IRAF will send an error message stating that the starfocus task has no param file. To load the param file, type "bye" on the command line to exit MSCRED and then type "epar starfocus". Make sure to load MSCRED after this so you can continue to ccdproc data.

Object Acquisition Scripts:

In practice with COSMOS, one creates the acquisition scripts using the "Slit / MOS Acquisition" button in the NGUI window.

This will open a SLITACQ script configuration window as shown below. The SLITACQ script generator will write a single script that takes two exposures: (1) one of the slit and (2) one of the field. The exposure parameters, e.g., filter, integration time, and ROI area, will be the same forthe slit and field images.

After the script is executed, two sequentially numbered FITS files will be written to the current data directory. The FITS file with the lower sequence number is the slit image. The provided offset calculation scripts require that the desired position on the slit is known before the current position of the target. The most commonly used offset calculation scripts are: kosmos_offset, koffset1, koffset3, and koffset4 which will be described in detail below.

In some cases, it may be desired by the observer to have separate scripts to perform the acquisition sequence. It may be that the sky is very bright such as during observations close to full Moon or that the object is very faint. Therefore, you may want a shorter integration time for the slit image than for the target image. The observer may also have a very bright target and a dark sky. In this case, the observer may want a longerintegration time for the slit than for the image. This can be done if one creates separate scripts for the slit image and the field image. In the case that the observer desires different exposure times for the slit image and field image, we need to create two scripts. The only conditions are that the script that takes an image of the slit is able to move the slit into the optical path. The easiest way to do this is to use the NGUI window to create a "Telescope Flat" script.

As seen in the "TFLAT" script configuration window, an observer can select among the filters, dispersers, slits in addition to selecting the integration time, binning, and ROI area. In order not to confuse the observer, we recommend calling the new script, "SLITIMAGE".

After the slit image script has been created, the obserer will need to create a script to take an image of the field. In this case, the observer can select the "Image" button in the NGUI window to take a direct image as shown below.

This opens a script configuration tool to take an imaging script. With this tool the observer can select the filter, in addtion to the integration time, binning, and ROI area. With the exception of the integration time, these values should be that same that the observer chose for the slit image. Again, to avoid confusion, we call this script, "FIELDIMAGE".

After the slit image script and the field image script have been written, the observer can create their own acquisition script using a text editor of their choosing. To do this, open a text editor in the /home/observer/exec directory and call the script "MyAcq.sh". Put the following lines in the MyAcq.sh script:

./SLITIMAGE.sh
./FIELDIMAGE.sh

At the command prompt in the exec directory run:

exec> chmod u+x MyAcq.sh

Execute the MyAcq script from the exec command line

exec> ./MyAcq.sh

to take an image of the slit followed by an image of the field that one can use in the IRAF offset calculation scripts: kosmos_offset,koffset1,koffset3, or koffset4.

NOTE: The detector ROI Area needs to have the same value if you are using the Slit/MOS Acquisition script and the FIELDIMAGE and SLITIMAGE acquisition scripts. They should all either be an ROI of 2kx2k or 1kx1k.

Offset Calculation Scripts in IRAF:

COSMOS does not have a slit viewing camera. Therefore, in order to place an object at the desired position on the slit an observer should take at least two exposures for target acquisition: (1) an image of the slit and (2) an image of the field. An offset can then be calculated using (1) the x and y values of the target center and the desired position on the slit, (2)the pixel scale in arcsec, and (3) the position angle of the instrument.

As mentioned in the section on Object Acquisition scripts section,we have developed a few offset calculation scripts that serve the needs of most observers. These commonly used scripts are:

  1. kosmos_offset.cl;
  2. koffset1.cl;
  3. koffset3.cl;
  4. koffset4.cl.

All of these scripts can be usedto position the target on the slit, but vary slightly in their implementation. All of these scripts require that the desired position of the object on the slit is calculated first. The kosmos_offset script requires that the x and y positions of the desired slit position be determinedbefore running the script. An image is then displayed and the telescope offsets are calculated. The koffset#scripts use the slit image and the field image interactively to determine the desired slit position and the calculated offset. Thekoffsetscripts vary in that koffset1 makes one pass through the images, calculates an offset, and exits.The koffset3 script makes multiple passes through a series images and exits when the observer decides that the calculated offset is below some threshhold. The koffset4 script is identical to the koffset3 script butwill also send the calculated offset values directly to the Blanco TCS without intervention of the telescope operator.

KOSMOS_OFFSET:

We begin with the kosmos_offset.cl script. In this case we have taken a slit image with a filename of "n1.28676.fits" and a field image with a filename of "n1.28677.fits".

1) Display the slit image and use imexam and the "k" key to determine the desired position on the slit as shown below.

2) This gives the x-position of the slit as x=900 (from the "Columns" in the irafterm window)and the y-position of the slit as y=1040.6 (from "center" in the irafterm window).

3) Edit the kosmos_offset script (i.e., epar kosmos_offset) to input the x and y slit positionvalues as the"xref" and "yref" values and the field acquisition image name.

4) Run the kosmos_offset script. This will automatically ccdproc and display the field acquisition image and also starts imexam. After imexam has started, use the "a" or the "r" keys to measure the x and y pixel values of the target in the field acquisition image.

5) The offset is calculated after the observer presses the "q" key to quit the imexam task. The offset in RA and Dec is displayed in the xgterm window.

6) Tell the offset vauesto the telescope operator and wait for confirmation that the guide star has beenre-acquired.

7) Take another slit image or field image to verify that the object is on the slit and continue performing offsets until the object is centered. This generally depends on the slit width, seeing, and observer's preference. It is recommended that the maximum offset is ~0.5 pixel (0.15") with the 3-pixel slit.

KOFFSET1.CL

The koffset1script is a more interactive, modified version of the kosmos_offset script. The main difference is that koffset1first displays the slit image and then displays the field image. The koffset1 script must be used with a pair of images where the first image is the slit image and the second image is the field image. This script will ccdproc both the slit and field images.

1) Edit the koffset1 script (i.e., epar koffset1) to enter the filename base and sequence number (exposure number) of the slit image.

2) Run the koffset1 script. The slit image will be displayed and imexam will start. Mark the desired slit positionusing the "k" key and enter "q" to quit.

3) Afterwards, the field image is automatically displayed and imexam will start. Mark the position of the target using either the "a" or the "r" key and type "q" to quit.

4) The offset is calculated after the observer presses the "q" key and the offset in RA and Dec is displayed in the xgterm window and the koffset1 script ends.

5) Tell the offset values to the operator and wait for confirmation that the guide star has been re-acquired.

6)Take another pair of slit image andfield images to verify that the object is on the slit and continue performing offsets until the object is centered. This generally depends on the slit width, seeing, and observer's preference. It is recommended that the maximum offset is

KOFFSET3.CL

The koffset3 script is more interactive than the koffset1 script. Instead of terminating after the slit image and field image pair are examined and an offset calculated, the koffset3 script enters a loop and where the observer can decide to take another field image until the offset is below some desired threshold. After the imaging sequence, the koffset3 script can take a final image of the object on the slit for verification. As with the koffset1 script, the koffset3 script runs ccdproc on each image before displaying it.

Note: It is important to note that the koffset3 script will start with any two images as long as the slit image if first and the field image is second. In order to take another field image, the observer must have already written a script called "FIELDIMAGE.sh" in the exec directory. In order to take a final slit image for verification, the observer must have written a script called "SLITIMAGE.sh" in the exec directory. The creation of these scripts is discussed in the section on object acquisition scripts.

NOTE: The detector ROI Area needs to have the same value if you are using the Slit/MOS Acquisition script and the FIELDIMAGE and SLITIMAGE acquisition scripts. They should all either be an ROI of 2kx2k or 1kx1k.

1) Edit the koffset3 script (i.e., epar koffset3) to enter the filename base and sequence number (exposure number) of the slit image.

2) Run the koffset3 script. The slit image will be displayed and imexam will start. Mark the desired slit positionusing the "k" key and enter "q" to quit.

3)Afterwards, the field image is automatically displayed and imexam will start. Mark the position of the target using either the "a" or the "r" key and type "q" to quit.

4) The offset is calculated after the observer presses the "q" key and the offset in RA and Dec is displayed in the xgterm window.

5) Tell the offset to the operator and wait for confirmation that the guide star has been re-acquired. The observer will then be asked if another image of the field is desired. Another image will be taken if the answer is "yes". Any other response will exit the loop.

6) The observer will then be asked if the image has finished reading out. Watch the DHS vnc viewer until the readout is complete and answer "yes".

7) Another image will be displayed. Mark the "a" or the "r" key and type "q" to calculate a new offset.

8) Ifthe offset is less thanthe observer defined tolerance, answer "no" when prompted if another image is desired. As seen in the offset calculations shown in step 7, the offset in RA is 0.62" and the offset in Dec is 0.24". This particular field was observed with a the Cassegrain rotator value of 270 degrees. As discussed in the detector orientation section of this guide, this rotator angle corresponds to a slit aligned from West to East. Therefore, the calculated RA offset does not reflect how well-centered the target is on the slit. In this case, only the Dec offset matters. Because the Dec offset is slightly less than 1 pixel, it was decided to stop field image loop by answering "no" to the question if another image should be taken. Please note that one can only disregard one of calculated offsets if the rotator angle is 0, 90, 180, or 270 degrees. For other rotator angle values, both the RA offset and the Dec offset need to be considered.

9) The observer will now be asked if a confirmation image of the object on the slit is desired. Answer "yes" at the prompt if this is wanted.

10) A new image of the slit will be taken. The slit image will be displayed and imexam will start. Examine the image to determine if the object is on the slit. In this example, the ds9 window does not provide one with enough information because of the z-scale. Instead, one can use the "k" key to make a series of plots along the slit near the expected object position. As seen in the irafterm window from step 9, the peak intensity of the sky in the slit is 250 ADU. As seen in the first image shown below, at the expected position of the object the peak intensity is 1500 ADU. This confirms that an object is on the slit approximately at the desired position.

One can be more cautious and use the "e" key in imexam to display a contour plot as shown in the image below. This contour plot shows the outline of the slit with a brighter object near the expected position. It is always better to check this before taking a long spectrum of a target.

KOFFSET4.CL

As previously mentioned, the koffset4 script is identical to the koffset3 script except that it automatically sends the calculated offsets to the Blanco TCS. The observer should tell the telescope operator that the offsets will be performed automatically and when an offset is being performed. This will allow the operator to watch the guide star camera to make sure that the guide star is re-acquired. At present the command to automatically perform the offset in the koffset4 script is commented out and koffset4 will be indistinguishable from koffset3. If the observer decides to use the automatic offset function, the "#" must be removed from the line containing the string "!./toff.csh".

Because of its similarity to koffset3, no examples of koffset4 are given here.

Updated on May 21, 2021, 6:04 am