MDP Manual

2024.3.28 Ver.1.1 Kentaro Aoki
2002.3.27 Ver.0.9 Yoshihiko Saito
2002.4.3 Ver.0.9e Youichi Ohyama
2002.12.31 Ver.1.0e Youichi Ohyama (for tilt slit version)


0. Introduction

"MDP" is an abbreviation of "Mask Design Program". This software provides a graphical interface for interactive designing of the custom slit mask of the FOCAS Multi-Object Spectroscopy "MOS" mode observation, and will be used by open-use observers.

This document describes the usage of the MDP program.


1. Preparation

1.0 Software requirement

1.1 Preparing the images

A pair of two images is obtained per single exposure since two 2Kx4K CCDs (hereafter, chip1 and chip2) are simultaneously read out to form 4Kx4K image. One need to use a n accurately combined "big" image for the mask design, and is made in the following way.

1. Type "idlde" on your computer where IDL is installed. (idlde = IDL Developing Environment)

2. Type "bigimage" within the command-line box at the bottom of the IDLDE window, and then press <return> key.

3. Choose the appropriate bigimage options on the check-button window:


Description

Options to be set

Almost no calibration

Input raw FITS images, and apply only overscan subtraction.

overscan subtraction

distortion correction

Simple calibration

Do simple bias subtraction and flat fielding within the bigimage

bias subtraction

flat fielding

distortion correction

Full-calibration

Reduce the chip1 and 2 images separately by yourself.

Use the bigimage just for combining the two pre-reduced images.

distortion correction

4. Within the window "Input Distortion Data File", select an appropriate distortion data file. Currently use the data file for MIT chip (*MIT*.dat).

5. Just click "OK" in the "dialog_input" window.

6. In "Objects" window, input two filenames for chip1 and chip2 in selection box as "<chip1_filename>,<chip2_filename>", or select two files at once by dragging the mouse.

7. Input a output filename in "Output File Name" window.

8. Wait for a while for image processing (~5-10 min.).

See here for more detail of the bigimage software.

Notes

1.2 Target selection

Choose your targets on the combined image. It is better to think about the priority of your targets at this step since some objects might need to be removed due to slit-overlapping etc.

Find CCD coordinates of your targets on the combined (chip 1+2) images:

1.3 Creating *.mdp file

Make your input file for the MDP program. This file contains information of your targets and their slit shape. Note, however, this file is not always required: You can design all slits interactively within the MDP.

Obj1-X[PIX] Obj1-Y[PIX] Length1[PIX] Width1[PIX] PA1[DEG] Priority1 B comments...
Obj2-X[PIX] Obj2-Y[PIX] Length2[PIX] Width2[PIX] PA2[DEG] Priority2 B comments...
...
Objn-X[PIX] Objn-Y[PIX] Lengthn[PIX] Widthn[PIX] PAn[DEG] Priority B comments...
Star1-X[PIX] Star1-Y[PIX] HoleDiameter1[PIX] HoleDiameter1[PIX] 0 Priority1 C comments...
Star2-X[PIX] Star2-Y[PIX] HoleDiameter2[PIX] HoleDiameter2[PIX] 0 Priority2 C comments...
...
Starn-X[PIX] Starn-Y[PIX] HoleDiametern[PIX] HoleDiametern[PIX] 0 Priority C comments...
 

2. MDP start-up

1. Type "idlde" in your computer.

2. Type "wmdp3" (mdp version 3 using widget) within the command line box at the bottom of IDLDE, and press <return>. A window with several buttons show up.

3: Click on "*MIT*.dat". Within the window "Input Distortion Data File", select an appropriate distortion parameter file.

Currently use the data file for MIT chip (DATA/*MIT*.dat).

4: Click on "badpixel.dat". Within the window "Input CCD Bad Pixel Table*, select an appropriate bad pixel file ("currently badpixlst.dat").

5. Select "File/Read FITS image" from a pull-down menu, and select a combined FITS image in "Input Bigimage" window. A FITS image will show up.

6. Select "File/Read MDP file", and select a MDP file you created as shown above in "Input MDP file" window.

If you do not have a MDP file, just push "Cancel" button for interactive mask design for all slits. In this case, one dummy slit will be set.

7. Select "Option/Grism select", and select an appropriate grism-order sorting filter combination in "Grism Selection" window.

8. Click on "Redraw" or "Draw Slit" buttons to see the image and the slits.

9. Now you are ready to start editing the masks.

2.1 Explanation of the Main MDP window

WMDPSNAP_MIN_MARKS_MIN.JPG - 416,771BYTES

Summary of the display

G) Information panel

Panel showing default slit parameters used when adding slits within the MDP, and current mouse positions.


3. Mask Design

In the followings, detailed procedures on how to design the mask interactively is described.

We recommend to design your masks following the order as we show below. Of course, you may repeat any tasks until you are satisfied with your design.

3.1 Adjusting intensity scale

You may want to adjust the intensity scale of the FITS image display to see faint targets. In this case, push "Change Intensity Scale" button, and input new MIN and MAX cut-off levels for the image display. This setting is for both the main and sub (zoom) windows.

3.2 Set the mask center position

Set the center coordinates of the mask. Sometimes you may want to shift the mask FOV center position for optimal slit distributions within a mask, e.g., to avoid any spectra fall out of the CCD or on the insensitive gap between the chips and to maximize the number of slits.

You can change the mask center position later if you wish.

If you change the FOV center position, then the RA, DEC coordinates for the MOS pointing in the observing nights also need to be modified accordingly. You need to submit a list of new RA, DEC coordinates together with mask design files (see below) at the end of the mask design.

Note: currently the FITS WCS coordinates of the bigimage do not work correctly. Please check the coordinates carefully.

Operation

  1. Click a "Draw FOV" button. (Sometimes you need to click it twice.)
  2. Input center coordinates (X, Y in pixel) of the FOV in Xcen and Ycen boxes. You do not have to change the radius of the FOV since it is set to the 6 arcmin FOV by default. This option is only for experts.

3.3 Design of alignment holes

Bright stars are used for pointing the MOS slits on fainter targets. For this purpose, small "alignment holes" are used to find the "alignment stars" at the center of each hole during pointing the MOS mask. Therefore, designing the alignment holes is as important as designing the slits. We recommend to design the alignment holes before starting the slit design since MOS observation is impossible without such stars/holes. You can change them later if you wish.

Please select stars with 18 < [V, R, I] < 20 mag. Stars with [V, R, I]=17 or brighter will saturate on the chip. Fainter stars are not recommended, but if you do not have any other good stars for forth or fifth alignment stars, you may try 21mag stars. It is much better than nothing. A mask with alighmentstars with similar brightness makes the MOS pointing easier, although this is not a requirement.

Diameter of the alignment holes should be 2.0" (or 20 in the MDP file) for best pointing accuracy.

Tips for designing the alignment holes

In principle, only two alignment stars are required to find out the RA, DEC, and PA offsets between the mask and the target. For robust pointing with better accuracy, we recommend the followings:
Example of BAD alignment hole distribution
Only one star on the left chip
and no stars at upper half of the chips.
Example of GOOD alignment hole distribution
Stars are distributing over entire FOV evenly.

Operation

Case 1:
Place the alignment star information in *.mdp file as shown above.
Case 2:
  1. Push "Add Alignment Hole" button.
  2. Click on the alignment star in a main image display for choosing the region around the star.
  3. Click again on the alignment star in a zoom image display. Position of the alignment star is determined by Gaussian fitting with the initial guess of the clicked position.

3.4 Design of slits

Just after starting the MDP, you will find that several slits are close in both space (X) and dispersion (Y) directions, and are overlapping on each other. You may also find that some targets are out of the FOV, or on the CCD gap. Slit design is to add/delete/modify slits to avoid such confections while searching for the best possible slit multiplex advantage.

3.4.1 Add slits interactively

  1. Select [Option]-[Change Default Parameters] from the top menu bar, and input "Default Slit Width" and "Default Slit Length" in arcsec unit in a "Parameter setting" window. Both length and width of each slit can be modified after locating the slits. The PA of the slits will be fixed to 0 here, but you may change it later.
  2. Select a mode for the target selection at upper left of the MDP window. You may choose "pick-object" mode in which Gaussian fitting is used to find the object coordinates, or "click-point" mode in which mouse click position itself is used as the object coordinates. (If you are familiar with the skycat FITS viewer, you may understand why we call the Gaussian fitting as the Pick-object mode. "Pick-object" mode is suitable for point or compact sources, and "click-object" mode is for diffuse and extended sources.
  3. Push "Add slit by click" button.
  4. Click on the object on the main image display.
  5. Region around the clicked position is shown on the zoom image display, and click on the target again on the zoom display. In "pick-object" mode, Gaussian fitting is performed around the clicked position, and the detected source is shown at the center of the zoom display as well as the rectangles for the calculated slit position.
  6. In "click point" mode, click on your favorite position on the zoom display, and the image is re-displayed around the clicked position.
  7. Regions occupied by the spectrum will be shown as an elongated rectangle both on the zoom and the main window.

3.4.2 Check/modify the slit/hole parameters.

There are four ways to check /modify the slit/hole parameters.

  1. Click the region of your interest on the main image display, and the zoom image around the selected region is shown in the zoom image display.
  2. Push "Show nearest slit" button and click on the image near your interest slit on the main image display. Nearest slit is found automatically, and the zoom image around the slit is shown in the zoom image display. A small pop-up window shows the slit information as well as the slit ID selected
  3. Push "Show slit (ID)" button and then input the slit ID number shown beside the slit (this ID is shown only when the "show slit ID" switch is selected). The zoom image around the selected slit is shown in zoom image window. A small pop-up window shows the slit information as well as the slit ID selected.
  4. Push "Show Slit List" button to make a slit list which displays all slit information as well as comments (if any). Radio buttons at the left of each slit ID number can be used to activate/delete slits/holes. Deleted slits/holes can be re-activated from this slit list later if you wish.

3.4.3 Slit overlap check

3.4.4 Adjusting the slit length

You may want to reduce the slit length to avoid the slit overlapping instead of deleting slits, or expand a slit length if no targets are found around it. In these cases, you can change the slit length manually.

Manual operation

  1. Push "Change Slit Params" button and click near the slit you want to modify on the main image display. The nearest slit is automatically selected.
  2. Input the new slit coordinates (X coordinates of the left and right side of the slit) and/or slit width/angle in the new popup window.
  3. Push "redraw" button to see the updated slit design

Automatic operation

Automatic slit expansion can be applied to fill in the available space near the slit. MDP searches for any available space toward right from each slit, and expand the right edge of the slit to just left of the next slit. You can set the separation between the slits in "default parameter set" window (from the top menu bar).

Select [Option]-[Auto Slit Expansion] from the top menu bar.

Important

You can NOT undo this operation. Save the *.mdp file before applying the automatic expansion.

3.4.5 Deleting slits/holes

There are two ways to delete slits/holes. Note that "delete" means "deactivate", and you may still see the slit information in the slit list to re-activate it.

Case 1:

  1. Push "Del Nearest Slit" button.
  2. Click the region around the slit you want to delete on the main image display. The nearest slit is automatically selected, and deleted.
  3. Push "Redraw" button to see the updated slit design.

Case 2

  1. Push "Display Slit ID" button to see slit IDs on the image.
  2. Push "Show Slit List" button. A slit list will show up.
  3. Disable the slits you want to delete by clicking on the radio button just left of the slit. Then press "accept" button at the bottom of the list.
  4. Push "Redraw" button to see the updated slit design.

3.5. Saving the results

There are two types of the output data file.

First is the *.mdp file which can be used as an input of MDP. Users are recommended to save this file frequently to avoid the unexpected loss of the information due to MDP crush, etc. You can re-start the MDP with the *.mdp file saved during the previous MDP session.

Another is the *.sbr file which is used in the slit cutting machine. Save this file after finishing the design.

3.5.1 Save *.mdp file

Select [FILE]-[Save MDP] from the top menu bar. Input the file name (*.mdp), and push OK button.

Users are asked whether you want to keep the information on deleted slits or not in the saved file. Comments indicating "this is the deleted slit" will be added to the *.mdp file when you keep the information. This might be useful when checking the mask design later.

3.5.2 Save *.sbr file

Select [FILE]-[Save Sbr] from the top menu bar. Input the file name with an extension of *.sbr.

You are asked to input the coordinate of the FOV center. The (X, Y) values you inputted in the "Draw FOV" button will be shown as default values, and you do not normally have to change the values.


Note

While writing the *.sbr file, MDP checks the slit positions whether slits are out of the FOV or on the CCD gap. When MDP finds any possibly wrong slits, warning messages are shown in the warning pop-up window. If you find such a message, check the slit design again to find out the cause of the warning. If you have intentionally put the slits near the FOV edge or the CCD gap, there will be no problem, and just ignore the warning. If you find something wrong in the mask design, try to delete/modify the slits, or move the FOV center. Note that *.sbr will be created even when there are warning messages.

3.6 Quitting the MDP

Select [File]-[Quit] in the top menu bar.

3.7 Other notes

3.7.1 Dummy slit (0th slit)

When you start the MDP without *.mdp file, a dummy slit is automatically created whose slit ID is zero (0). Delete this slit after adding other slits.

3.7.2 Coordinate system convention

MDP's coordinates start from zero (0), not one (1). FITS viewers such as SAOimage and Skycat use the coordinate start from one (1). Therefore be careful in making the *.mdp file based on the coordinates measured with these viewers.

3.7.3 Care for extremely out-of-FOV slits

Slits far out of the FOV may cause some serious troubles in the slit cutting machine. Check your *.mdp file or *.sbr file before submitting them to the observatory. Check the warning message when saving the *.sbr file.


4. Take a snapshot image of MDP

We ask the MDP user to take a snapshot image of the MDP at the end of the design. The image will be used to check the fabricated mask and be useful as a "finding chart of the alignment stars" during the MOS pointing.

Use your favorite snapshot software. (e.g., xv, snapshot) Any standard image formats are acceptable (such as jpeg and gif).


5. Submitting the results

Submit the followings to the support scientist.

6. Acknowledgment

We thank Dr. Ichi Tanaka and his collaborators who gave us their useful comments.
We also thank Drs. Bo Milvang-Jensen, Alfonso Aragon-Salamanca and Chisato Ikuta for various comments/suggestions/encouragement in making the wmep3 incorporating the design with the tilted slits.