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
- You need to select "distortion correction" in all cases. Only
after correcting the distortion, you can change the center position of
the mask for more flexible designing.
- Since only the target "positions" are essential in designing the
masks, only rough image reduction (even just overscan subtraction) will
give a good result in most cases. However, if your targets are faint,
you
must take care of the proper data reduction.
- Overscan correction is always performed even with the "Bias
subtraction" option. Never choose "bias subtraction" and "overscan
subtraction" options at a same time.
-
Never select "CCD -> Sky coordinate
transformation" option to make images for MDP since MDP do the design
in the CCD coordinates.
-
When you perform your own data reduction,
take
care not to change the geometry of the images. For example, never
remove
the overscan region. This would cause the wrong combined images since
the
"bigimage" software assumes the original image dimension.
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:
-
Use your favorite FITS image viewer (e.g.,
SAOimage, ds9, Skycat) to find out the object coordinates.
-
Use "Sextractor" program for automatic target
extraction. Then use a simple AWK program to convert the format of the
sextractor output file (cat) to the MDP format. A sample AWK program is
provided with the FOCAS data reduction package.
-
Any other ways of the target selection can be
used. Do it in your favorite way.
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.
-
Mask design file (*.mdp) is a simple ASCII
file specifying object coordinates (x, y in pixel unit), slit width,
length, and the slit position angle.
-
Priorities of the slits are also specified in
this file which will be used (if you wish) in the automatic slit
rejection procedure within the MDP.
- Format of the MDP file:
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...
-
One object per line, and number of lines
equals to the number of slits + holes.
- PA is defined in the CCD coordinates (not in the SKY
coordinates) and is expressed in degree whose positive/negative
direction is in a normal geometry (counter-clockwise). For example,
PA=0 for normal slit (perpendicular to the dispersion axis), and 45
degree for the tilted slit whose right side is raised by 45 degree in
the MDP.
- In case of the tilted slit, the slit width means the slit width
projected into the dispersion direction (to keep the effective velocity
resolution to the same for all slits with various tilt angle), and the
slit length means the projected length on the X coordinate. Be careful.
- Although PA for the alignment holes has no meaning, explicitly
specify "0" in the file for consistency. Also, you need to specify two
diameters for the alignment stars.
-
Slit/Hole shape is specified by "B" for
box=slit or "C" for circular=alignment hole.
-
Alignment holes can be added within the
MDP, and you do not have to specify the alignment holes in *.mdp file.
-
All remaining characters after the end of
the shape determination (B or C) are regarded as a comment. Comments
can be reviewed within the MDP while editing the mask, and might be
useful in
deciding which slits to be chosen.
-
Priority can be used when doing automatic
slit rejection within the MDP. See below for the detail.
-
Smaller number means higher priority.
-
Priority of alignment holes added
within the MDP is zero (0), i.e., higher priority than newly added
slits.
-
Priority of slits added within the MDP
is three (3), i.e., lower priority than that for alignment stars.
-
If you do not want to perform automatic
slit rejection, set all priorities to one (1) in *.mdp file.
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
Summary of the display
A) Pull-down menus
File: Tasks for file I/O
Option: Grism selection, Set parameters for slits used in adding slits
interactively within the MDP, etc.
Special menu: Tasks for data reduction software. Out of service in
version 3.
Print: Print out menu: Out of service in version 3.
B) Main window
Your FITS big-image is shown in the CCD coordinates (i.e., CCD pixel
coordinates), not in the sky coordinates (NSEW).
Wavelength is in vertical direction. (upper = bluer, lower = redder)
Items shown:
Main FITS image display (entire view of the image at reduced size)
Slit marker (small elongated rectangle on targets)
Spectra marker (long rectangle elongated vertically)
0th-order light marker (small rectangle at upper side of the slit.
No 0th-order light in a certain combination of the grism used. optional)
Slit ID number (small number just right of the slit pointers: optional)
FOV circle (large circle showing the available area for MOS design:
optional)
CCD Chip position (large square showing the available CCD chip area:
available when FOV circle option is chosen)
Gap between chips (a long rectangle elongated vertically showing the
insensitive area just right of the FOV center: optional)
Bad columns (some narrow vertical lines. There are several bad columns
in the chip 1, and one in the chip 2. Note that only big (worse) bad
columns are shown.)
C) Mode selection switches
Object pick-up mode (apply Gaussian fitting on the image around
the clicked position, or simply adopt the clicked position as a final
position)
FOV circle display switch
Slit ID display switch
D) Zoom image display
Display for zoomed (non-reduced) FITS image around the selected region
for slit review. This display is also used for object selection by
mouse.
E) Buttons for controlling the image display
Display intensity adjustment, image redraw button, etc.
F) Buttons for slit editing
Buttons for editing slits and alignment holes.
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
- Click a "Draw FOV" button. (Sometimes you need to click it twice.)
- 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:
- Choose at least four (4) stars within the FOV.Try to locate
alignment stars evenly over the FOV, i.e., locate two stars per chip,
two stars
at upper half and other two at lower half of the chips. See the
following illustrations.
- Avoid locating stars closer to the FOV edge or near the CCD gap.
[Our experience shows that it is more dangerous to place them around
the
CCD gap.] There might be a chance for them to be out of the observable
area due to telescope pointing error, etc.
- To avoid damages of the alignment hole/star images due to bad
columns, create the holes well away from the bad columns.
- Choose more than four (4) stars if possible in case of some
unexpected troubles such as comic rays or bad columns of CCDs hitting
some alignment stars/holes.
- Try placing alignment holes isolated. If holes are located at
very close to the adjacent holes/slits, MOS pointing software may
easily fail to detect them automatically. Place a hole 2" (which
is a typical hole diameter) or more away from its nearest hole/slit. If
you can not do so, put a hole anyway there.
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:
- Push "Add Alignment Hole" button.
- Click on the alignment star in a main image display for choosing
the region around the star.
- 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.
- Selected star is displayed at the center of the zoom display as
well as a small square (not a circle) if the fitting was successfully
done.
- "Click-object" mode is not available for the alignment star since
Gaussian fitting is required for better accuracy.
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
- 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.
- 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.
- Push "Add slit by click" button.
- Click on the object on the main image display.
- 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.
- In "click point" mode, click on your favorite position on the
zoom display, and the image is re-displayed around the clicked position.
- 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.
- 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.
- 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
- 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.
- 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
- Push "Slit overlap check" button to find out any slits where
slits/holes overlapping is detected. The results are shown on a pop-up
window.
- If the slit priorities are specified within the *.mdp file, slits
with lower priority are automatically rejected when slit overlapping is
detected.
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
-
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.
-
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.
-
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:
-
Push "Del Nearest Slit" button.
-
Click the region around the slit you want to
delete on the main image display. The nearest slit is automatically
selected, and deleted.
-
Push "Redraw" button to see the updated slit
design.
Case 2
-
Push "Display Slit ID" button to see slit IDs
on the image.
-
Push "Show Slit List" button. A slit list
will
show up.
-
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.
-
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.