##*************************************
##
## E.S.O. - VLT project
##
## "@(#) $Id: ShortMan.txt,v 3.24 2004/12/18 04:04:12 vltsccm Exp $" 
##
## ShortMan.txt"
## 
## who      when     what
##-------- -------- ------------------
##vimosmgr 04/05/00 created for cmm
##
Start working with VMMPS package

VMMPS is based on SKYCAT package. Here we don't assume you are a SKYCAT user,
so also SKYCAT native operations useful to prepare ADP files are described.
The ADP files are the ADFs (Aperture Definition File) in pixel, which are used
to prepare the VIMOS masks.

VMMPS handle two kinds of catalogs:
VIMOS catalogs, which are produced by VIMOS instrument and
USER catalogs, which are supplied by the user himself.

These catalogs are supposed to be in FITS format (*.fits) or SKYCAT format (*.cat).

VMMPS starts with the command: "vmmps &".

----------------------------------------------------------------------------------

### 1.a step: Load a VIMOS catalogue ###

From main menu of SKYCAT choose "VIMOS_MPS" and then "Load FITS catalogue" or
"Load ASCII catalogue".
Then an information box is opened:"Select the corresponding VIMOS image", click "OK".
A file selecion box is opened, select the image and click "OK".
The VIMOS image is dispayed and the catalogue is loaded in its window. This window
is not the standard one of SKYCAT but a row of 6 new buttons has been added in the
bottom: "Ref", "Comp", "Forb", "UnSel", "Curved Slit", "SPOC".

### 1.b step: Load a user's catalogue ###

From main menu of SKYCAT choose "VIMOS_MPS" and then "Load FITS catalogue" or
"Load ASCII catalogue".
Then an information box is opened:"Select the corresponding VIMOS image", click "OK".
A file selecion box is opened, select your file and click "OK".
The VIMOS image is dispayed.
Then an information box is opened:"Select the VIMOS star catalogue", click "OK".
A file selecion box is opened, select the catalogue and click "OK".
A window is open to perform the cross correlation between objects from star and
user's catalogue, and transform astronomical coordinates in VIMOS image coordinates.
You can make a tunning of the cross correlation parameters. Then click "OK".
The user's catalogue is than transformed into a VIMOS catalogue and renamed
by adding an "_vm", e.g. usercat.cat becomes usercat_vm.cat.
Click on "Close" to close the cross correlation window and go to step 1.a to load
the trasformed catalogue (but you will not be asked for a VIMOS image because it
is already loaded.
 
-----------------------------------------------------------------------------------

### 2.1 step: Reference Compulsory and Forbidden objects ###

It is recommanded to select 1 or two objects per VIMOS quadrant for mask
alignment. These objects are called Reference objects.
Compulsory objects are the ones you absolutely want to observe.
Forbidden objects are the ones you absolutely don't want to observe.
To "flag" an object as Reference, Compulsory or Forbidden is enough to
click on the object and then click the relative button ("Ref", "Comp",
"Forb").
Note that only plotted (i.e. objects marked on the image display by an
overlay symbol) can be selected.

To cancel a flagged object is enough to select it and click on "UnSel"
button.
    
Selection criteria on catalog column (i.e. MinVal < Mag_iso < MaxVal)
can be applied by clicking "Option" in the main menu of the "catalog" window
and by clicking on "Set Search Columns...". A window showing the catalog column
names is opened. Click on the required column and click on the left arrow.
The selected column should be displayed now on the left box, then click "OK".
The window is closed and two entry boxes are added in the upper section of the
catalog window, then click on "Search" button in the catalog window.


### 2.2 Curved Slit ###

To define a curved slit, click on "Curved Slit" button, a zoom window
is opened.
Click on your object, then choose, by cursor, some points (about 10
or more) in the Zoom window to define the shape and position of your
curved slit.
Then click on"View/Fit" button to compute the fit and display it.

If you don't like the fit you can make another one by
clicking on "Clear" button and by choosing other points.

If the fit is good but you need a different slit width you can change it
by the scale widget (Slit Width...) and by clicking on "View/Fit" button.

Also the zoom window factor can be changed in order to enlarge the useful
area needed for the fit.

When everything is OK you can save the fitting parameters in your catalog by
clicking on "Save" button.

To delete a curved slit from your catalog click on "Curved Slits" button,
then choose the object associated to the curved slit to be deleted and
click on "Del" button.

When you click on "Save" or "Del" buttons, the Curved Slit window is closed.
If you want to close it before, click on "Close" button.

----------------------------------------------------------------------------

### 3 step: SPOC ###

SPOC (Slit Positioning Optimization Code) is the core of the package.
This program places and numerically optimizes slits starting from a catalog
of astronomical objects.

SPOC works in two different modalities: Biased and Unbiased.
Biased mode is more efficient in terms of number of placed slits, but
smallest objects are favorites.

Unbiased mode is less efficient but no bias on object dimension is introduced
in the produced slit catalog.
These modalities can be chosen by Bias/Unbias radio buttons.

Grisms can be chosen by "Grism" menu button.
Grisms are defined in the /xxx/xxx/vimos/config/vmmps_grism.cfg

Slit width can be chosen by "Slit Width" scale widget.
"Sky Region" scale widget is used to define the minimum width of sky per
slit side you want. Data Reduction needs at least 1.8 arcsec. Wider slits
encrease the probability to get a good sky subtraction but decrease the
number of positionable slits.

User can also reduce the spectrum range you want to observe. It is useful
when high resolution grisms are used. In fact in this case produced spectra are
about of the same length of CCDs and a cut off is necessary in order to observe
them. You can limit lower or higher part of spectrum range by using Low Cut and
High Cut widgets. 

You can choose to make more observations of the same field (image), i.e.
to produce more then one mask per image.
The number of different masks you want to produce is set by the "Number
of Mask" scale widget.

The used input catalog name is shown in the "Input Catalog" entry widget.

To run SPOC, click on "Make ADP" button.
The output statistics of SPOC is shown in the lower text widget.

To close the window click on "Close" button.

Produced files are the following:
ASCII  INPUT  SPOC catalog <inputCatalogName>.dat
ASCII  OUTPUT SPOC catalog <inputCatalogName>Quad<n1>Mask<n2>.dat
SKYCAT OUTPUT SPOC catalog <inputCatalogName>Quad<n1>Mask<n2>.cat
PAF    OUTPUT SPOC catalog <inputCatalogName>Quad<n1>Mask<n2>.adp
ASCII  OUTPUT SPOC catalog <inputCatalogName>Quad<n1>Mask.log

Where <inputCatalogName> is the name of the SPOC SKYCAT input catalog
without extension, <n2> is a digit identifing the VIMOS quadrant of the
actually loaded image and <n2> is a digit identifing the mask number.

### 4 step: Load ADP catalogue

To plot the placed slits you have to load the ADP catalog:
select "VIMOS-MPS" and "Load ADP calalogue (<inputCatalogName>Mask<n>.cat) 

### END




    