== Example of a PV phase script translated from its IST phase structure == ''' Header's informations''' {{{ // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the phot filter wheel // // Author : PR // // Arguments : // // Description : // // Comments : // // Version : 0.1 // History : 0.1 12-Jun-2007 Initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // }}} Declaration of script type as observation (inc. a pointing request) {{{ obs PacsEng_CONF_phot_fltw { /* No variables to call PacsEng_CONF_phot_fltw */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_phot_fltw */ } }}} Declaration of internal variables, timing computation {{{ { // Four arguments needed for "no_pointing" // 1. Execute the pointing request bool execute = true; // 2. Initial hold // Write OBSID during initial hold int tih = duration(WriteOBSID($OBSID)); // 3. Final hold // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // 4. Duration of "stable" pointing int tp = imax(1,duration(CONF_phot_fltw())); }}} Pointing request: this is a `PacsEng` script so a `no_pointing` request is necessary, because the system expects a pointing request of some sort nontheless {{{ // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); } }}} State Machine: even though there is no actual pointing, the observation made during the tests require the telescope to be "On SRC" {{{ { // Start observation. // STATE_MACHINE logic. // OBSID is handled during initial and final hold times. Otherwise, consider // only stable pointing int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { // Declare start of OBS WriteOBSID($OBSID); } if(state[0] == 3) { // Call the required procedure CONF_phot_fltw(); } if(state[0] == 5) { // Declare end of OBS WriteEndID(); } } // End of observation }