# Examples¶

## Simulation of EUCLID observations¶

We provide an example of TIPS usage which an observation of one field of view of the spectrometer of EUCLID/NISP with the current strategy.

The sky sources of this example come from the COSMOS Mock Catalog (Jouvel et al. 2009 and Zoubian et al in prep).
The sky background assumed in this example is constant and is the zodiacal light model of Aldering et al. 2002.

The instrument model assume:
• a constant dispersion equal to 0.54 Angstrom/um (= 9.8 Angstrom/pixel)
• a constant scattering equal to 10% zodiacal light in the detector plan
• a constant thermal noise equal to 10% zodiacal light in the detector plan
• 4x4 detectors in the focal plan :
• gap in the X direction is 3mm
• gap in the Y direction is 6mm
• 2040x2040 pixels for each detector
• a pixel size equal to 18um
• a pixel scale equal to 0.3 arcsec
• a constant read noise equal to 6.0 electron/pixel
• a constant quantum efficiency equal to 0.75
• a constant dark current equal to 0.1 electron/pixel/second
The observation strategy is:
• 560s exposure with NISP/Gblue (0deg)
• shift (100, 50) arcsec
• 560s exposure with NISP/Gblue (90deg)
• shift (100, 0) arcsec
• 560s exposure with NISP/Gred (0deg)
• shift (100, 0) arcsec
• 560s exposure with NISP/Gred (90deg)

### Run the example¶

The data needed to run the example is available online:
http://www.cppm.in2p3.fr/renoir/public/Euclid/TIPS/example/tips_example.tar.gz (5.6G)

You can take advantage of this time to install TIPS (is it's not already done), see the Installation guide, or to read the User guide.

When the download is finished, you can decompress the archive with the following command :

tar xvzf tips_example.tar.gz

You should obtain a directory "tips_example" which contain:
• a source catalog "tips_example/DATA/CMC150811_bright_1x1_rand.fits"
• a spectra file "tips_example/DATA/CMC150811_bright_1x1_rand.spc.fits"
• a python script "tips_example/sim_EUCLID.py"

To run the example, go in the directory "tips_example" and launch the python script :

python sim_EUCLID.py


The script will simulate observations with the spectrometer of EUCLID/NISP.
Simulate the 16 images of one observation with the grism Gblue needs typically 6h.
Simulate the 16 images of one observation with the grism Gred is longer and needs typically 12h.
So the script should run during typically 36h.
(The current version of the code is absolutely not optimized.)

### Results¶

One time the simulation is done, the output images are in the directory "tips_example/OUTSIM/".
The name of the images produced by TIPS contains explicitly the information of the input catalog name, the instrument name, the grism used and the detector identifier.
For example, the image of the detector "23", with the grism Gblue and an dispersion orientation of 90 degree will be named :

CMC150811_bright_1x1_rand_NISP_GBLUE_90.0_23_IMG.fits


The format of the images is the standard HST/aXe format.
See the User guide for more details.

#### Images of detector 23¶

For example, the four simulated exposures of the detector 23 will produce this four files :
• "tips_example/OUTSIM/CMC150811_bright_1x1_rand_NISP_GBLUE_0.0_23_IMG.fits"
• "tips_example/OUTSIM/CMC150811_bright_1x1_rand_NISP_GRED_0.0_23_IMG.fits"
• "tips_example/OUTSIM/CMC150811_bright_1x1_rand_NISP_GBLUE_90.0_23_IMG.fits"
• "tips_example/OUTSIM/CMC150811_bright_1x1_rand_NISP_GRED_90.0_23_IMG.fits"

The science images of these files should look like :