OmegaCAM p2 Tutorial

IMPORTANT: ESO is now offering use of the web application p2 for Phase 2 preparation for all Paranal observing runs from Period 102 onward.  The web application p2 fully replaces the use of P2PP for the preparation of the Phase 2 observing material for all telescopes/instruments for both Service and Visitor Mode runs on Paranal. Please check our help section about p2 for instructions on how to notify ESO when your material is ready.

This tutorial provides a step-by-step example of the preparation of a set of OBs with OmegaCAM at the ESO-VLT. The specifics of this tutorial pertain to the preparation of OBs for Period 101 onward.  Please note that all the figures shown below can be clicked on to get higher resolution versions.

To follow this tutorial you should have familiarity with p2 : the web-based tool for the preparation of Phase 2 materials.  Please refer to the main p2 webpage (and the items in the menu bar on the left of that page) for a general overview of p2 and generic instructions on the preparation of Observing Blocks (OB).  Screenshots for this tutorial were made using the demo mode of p2, but should not differ in any way from one's experience in preparing your own OBs under your run.

0: Goal of the Run

In this tutorial we will prepare OBs for a simple example observing run, consisting of 3x3deg mosaic observation around the Orion Nebula Cluster center (RA=05:35:00.000; Dec=-05:28:59.900). The tutorial is moslt focused on how to import a  pointing positions xml file created with the Survey Area Definition Tool (SADT). 

1: Getting Started

The Phase 2 process begins when you receive a communication of the ESO Observing Programmes Office (OPO) communicating to you that the allocation of time for the coming period has finalized and that the results can be consulted in the corresponding Web page. You follow the instructions given by ESO and find that time was allocated to your run with OmegaCAM. Therefore, you decide to start preparing your Phase 2 material.

First, please familiarize the necessary documentation:

2: Making OBs

2.1: p2

For the sake of this tutorial, we will use the p2 demo facility:

This is a special facility that ESO has set up so that users who do not have their own p2 login data can still use p2 and prepare example OBs (for example, while writing a proposal to get the overheads right!).  You cannot use it to prepare actual OBs intended to be executed.  When you prepare such OBs you should use your ESO User Portal credentials for p2 (with

After directing your browser to the p2 demo facility the main p2 GUI will appear as follows:

Click to see the fullsize image.

Runs for a number of instruments appear in the lefthand column, since the p2 demo facility is used for all of them.  Similarly, if you log into p2 (instead of p2demo) with your own ESO User Portal credentials, you will get the list of all the runs for which you are PI, or for which you have been declared as a Phase 2 delegate by the respective PI(s).


Open the folder corresponding to the OMEGACAM tutorial run, 60.A-9252(L) by clicking on the + icon next to it.  In this tutorial we assume that time was allocated in Service Mode.  This is indicated by the small wrench icon that appears next to the RunID.  "Inside the run" you will see (at least) one folder, called "OmegaCAM tutorial". That folder contains the final product of the tutorial you are now reading. You can refer to the contents of that folder at any time, perhaps to compare against your own work.


You can now start defining your observations.  In the p2 demo you must first start by creating a folder, within which you will put your own content.You can create a folder by clicking on the icon New Folder. Please notice that a folder named by default New Folder will appear at the bottom of the list of items in the run.

You can give the folder a new name by clicking on the blue 'New folder' text on the top, in this tutorial the name will be "The Tutorial", but you can set the name of your folder to be (almost) anything you like.

Important: because the p2 demo is on-line and accessible to anyone you may see folders belonging to other people here, though after-the-fact clean-up is encouraged and possible.



2.2: Creating Containers and OBs

You can now start creating your OBs. Since we want 2 OBs to be executed in sequence, we must define them inside a Concatenation container. Open the new folder you created by clicking on the + icon next to it and then click on the purple C icon to create a Concatenation container.

The newly created concatenation will automatically be selected and displayed in the main part of the window. As for the case of the new folder you must click on the blue name field near the top to rename the Concatenation.

Hence, please rename the concatenation to "ONC_ri"


To create the first OB, open the Concatenation by clicking on the + icon next to it and then click on the blue OB button of the Concatenation.

This creates the OB inside the Concatenation and it will be automatically selected and displayed in the main part of the window. Please notice the new OB has the default name No Name. It is always a good idea to give meaningful names to OBs, so that you can browse through the list and easily recognize them. In our example, we will define OBs to take a set of r and i images in a 3x3deg around the center of the ONC.

2.3: Editing the OBs

When an OB is selected on the left hand side of the p2 window, it's content is displaied on the right hand side. On the snapshot above, the OB "ONC_r" is selected (highlighted in blue). The relevant fields to be edited to finalize the creation of an OB are included in the "Obs. Description/Target/Constrain Set/Time Intervals/Finding Charts/Ephemeris" tabs. Select these tabs to design the OB by editing templates, target information, constraint set information, uploading FCs and Ephemeris files. A check of the Target Visibility is also possible. 


2.4: Setting the target information

By default, the newly selected OB is displayed in the "Obs. Description" tab. To enter the target information, click the "Target" tab near the top of the window. In the Name field, type the target name "ONC". In the Right Ascension, Declination fields, type the ICRS or FK5 coordinates. Since the coordinates are given for both Equinox J2000 and Epoch 2000, leave these fields with their default values. Wherever possible provide the Proper Motions of target, preferrably from Gaia DR2 (or newer) -- remember the units required in p2 are arcsec/yr where as most catalogues list milli-arcsec/yr. Differential tracking of the telescope is not needed for ONC since this is not a moving Solar System target. Therefore, you can leave the last two fields in the Target tab set to their default values of zero.

2.5: Setting the constraint set

If your programme is in Visitor mode, you can ignore this section since you do not need to set the constraints for Visitor Mode OBs. We assume for the purposes of this tutorial that the program has been allocated time in Service Mode. You thus need to specify a constraint set for your OBs. You can do this by clicking on the "Constraint Set" tab and filling the fields accordingly.

First, give a descriptive name to the constraint set about to be defined. In this case we choose "ONC-THN" for the Name field.

Your actual constraints then need to be set to be compatible with what you specified in your Phase 1 proposal, and at the same time consistent with the scientific goals of you project, the awarded time and the OPC ranking of your run. As a rule, you can not set stricter constraints than you specified in your proposal, but you can relax the constraints compared to your proposal (see the policy here). In general you should try to relax the constraints as much as possible (in order to maximise the chances for execution) whilst balancing the constraints and exposure times in order to still achieve the S/N you need to achieve your science goals.

Also consider that while we guarantee that IF your Obs are executed, they will be executed within 10% of your constraints, they could well be executed in significantly better conditions. So if you have very relaxed constraints, you may wish to consider nonetheless several short exposurs, rather than one long exposure, in order to avoid the possibility of saturation in case the OB(s) is(are) executed in significantly better constraints than specified -- Alternatively, you can note in your README strategies that the observatory could employ to avoid saturation in such cases (e.g. "If executing in significantly better conditions than the constraints please decrease expsoure times to avoid saturation whilst maintaining the targeted S/N.")

Since in your proposal you specify "Seeing", i.e more or less the image quality at the zenith in V-band, but in your OBs you must specify Image Quality, the number you put in the Image Quality field of the OBs will not in general be the same as the Seeing value you specified in the proposal. In general for observations bluer than V-band you will eed to specify a poorer image quality than the Phase 1 seeing you specified, while for observations redder than V-band, you can often specify and Image uality constraint better than the Phase 1 seeing you specified.

You can use the ETC to check what is the appropriate Image Quality constraint to specify for the phase 1 seeing you specified. it is also often useful to experiment with the ETC with different combinations of airmass, moon illumination and distance, sky transparency and perhaps image quality to see how to best optimise the probability for successful execution of your OBs.

Alternatively you can also use the Check function of p2, which will tell you if you have specified an Image Quality that is not consistent with your Phase 1 seeing, though you can't do this till the OB has at least a basic complete definition (see below).

So having experimented with the ETC for our present case  we set the constraints as follows in order to achieve our science goals: Sky Transparency = "Variable, thin cirrus", Airmass = 2.4,  Image Quality = 1.2, Lunar illumination = 1.0, Twilight (min) = 0 and Moon Angular Distance = 30 (degrees).

2.6: Designing the Observations: OB templates in the Obs. Description

After clicking on the Obs. Description tab you see three free-text fields at the top: Observation Description Name (or OD for short), User Comments, and Instrument Comments.  

It may be useful in many cases to have an easy way of identifying an OD, like when having observations of a number of targets performed with identical instrument configuration and exposure times. The OD Name field in the OB window allows you to define names for the ODs.   

For example, if the OD will consist of a a single spectrum of eta Car at a specific position angle, one can thus appropriately name it eta Car at 37.5 deg. 

The User Comments field can be used to communicate brief details of the observations (which should be explained in more detail in the README).  Finally, in the Instrument Comments field you should enter the expected signal-to-noise ratio and the preferred spectral type for the telluric standard star (only if requeted in Phase 1), using the following syntax: S/N=XYZ @ xyz nm; preferred telluric: xx-star.

2.7: Defining the acquisition and science template

An OB is defined in a set of one or more templates that form the Observation Description, or OD for short. It may be useful in many cases to have an easy way of identifying an OD, like when having observations of a number of targets performed with identical instrument configuration and exposure times. The OD Name field in the OB window allows you to define names for the ODs. The OD name appears in turn in one of the columns of the p2 main UI, thus allowing the identification at a glance of all OBs having ODs with the same name.


In this example OB, the OD will consist of a a single r-band image of the ONC. We can thus appropriately name it ONC r. We enter this name in the OD Name field.


The first template that must be part of any OB that requires a definite pointing is the acquisition template, so let us define it first. In the Template Type pull-down menu, make sure that the acquisition entry is selected. This will list all the acquisition templates available for OmegaCAM in the Template list behind it.

After reading the description of the templates in the OmegaCAM User Manual, you have determined that the OMEGACAM_img_acq is the acquisition template you have to use for this particular observation. You thus click on this template in the Template list, and then on the Add Template button next to it.

Similarly, you have to choose an observation template from the science entry of the Template Type pull-down menu. In our case we select the OMEGACAM_img_obs_offset template from the Template list and add it via the Add Template button.


You need to decide now on the template parameters for acquisition and science. This is a very simple pointing strategy. We will acquire the field with the r_SDSS filter. Moreover, since the exposure time is 25s only, we will disable the Autoguiding while keeping the Image Analysis loop activated.The set of parameters that you choose in your acquisiton and science templates is shown in the previous figure. Please take a look at the instrument User Manual and Template Manual for a detailed guidelines on how to optimize your observations.

You can now compute the execution time clicking on the Exec. Time button .

NOTE: after each modification in the OB, the execution time field is not updated automatically, and you need to click on the Recalculate button to display the correct value.

This completes your first OB! If you followed all the indications given so far, the OB window should look like the image above.

2.8: Attaching Finding Charts and the README file

Finding charts and README file are directly attached to the OBs. Please, see the respective tutorials on Finding Charts and README for instructions on how to do that.

2.9: Making more OBs

We want to add one more OB to our Concatenation in order to take an image with the i_SDSS filter. Since most of the OB parameters will be identical, the easiest is to duplicate the OB we've already made. In the main p2 GUI window, select the OB and click the Duplicate button. See picture:


This will add an identical OB to the concatenation. We rename this new OB to "ONC_i". We now only need to change the Observing Description to ONC i and the filter in the science template to i_SDSS.


3: Importing the XML file created with the SADT 

As explained at the beginning of this tutorial, we are here aiming at a 3x3deg mosaic observation around the center of the ONC. We assume that you have prepared the pointing positions for each tile using the Survey Area Definition Tool (SADT). In the picure above we have designed a set of observations with SADT and produced the XML file called ONC.xml.


A confirmation window will appear to inform you about the number of OB or Container duplications and will ask you to confirm. You can confirm by pressing the Import button.


You will create 9 identical copies of the template Concatenation. The new concatenations will be properly renamed following the tiles of the foreseen pointings. You can now compute the execution time of a single or multiple Concatenation(s) by clicking on the Exec. Time button.

NOTE: after each modification in the OB, the execution time field is not updated automatically, and you need to click on the Recalculate button to display the correct value.

This completes your first OBs! If you followed all the indications given so far, the OB window should look like the image above.

4: Finishing the preparation: Check, Certify and Notify ESO

Please see here a description on how to conclude your preparation.

Instrument selector