=== Example of calibration PV phase type script including pointing requet === ''' Header information''' {{{ // $Id$ // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration and instrumental profile // Author : HF // // Arguments : // string fltPOS Filter wheel position (0="POS A", 1="POS B") // int grat_start Grating start position for scan // int grat_stepsize Grating step size // int grat_numsteps Number of grating steps in one direction // int grat_numramps Number of ramps per grating position // int chop_def Chopper position during grating scan // int nb_rdout_ramp Number of readouts per ramp // int num_updown Number of grating updown scans // int grat_def Position of grating after the scan // int capa_red Red capacitor // int capa_blu Blue capacitor // double bias_r_blu Bias "r" blue // double bias_r_red Bias "r" red // double bias_d_blu Bias "d" blue // double bias_d_red Bias "d" red // int nb_samp_subramp_blu Nb of blue samples per sub-ramp // int nb_samp_subramp_red Nb of red samples per sub-ramp // // Prerequisite : PACS must be on and configured for spectroscopy // // Description : Uses OBCP28 for executing a parameterized scan of any length, // stepsize etc. Represents a generic non-chopped grating scan : // Comments : // // Version : 0.2 // History : 0.1 10-sep-2007 Converted into Eng OBS by DAC // 0.2 14-jan-2008 DAC Added bias_r... input variables // 0.3 15-jan-2008 Renamed WaveCalProc to WaveCalNoChop // Renamed this module to PacsEng_WaveCalNoChop // 1.0 15-feb-2008 DAC Use FinePointing mode instead of dummy // Renamed to PacsCal_xxxx // 1.1 DAC Will have to add SPEC_aot_epilogue to "final hold" // and PacsSpecSlewCal to "slew" phase. // }}} Declaration of script type as observation (i.e. including a pointing request) and X-HSPOT readable variables {{{ obs PacsCal_WaveCalNoChop { /* Needed variables to call WaveCalNoChop */ string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" int grat_start = 500000; // grating start position for scan\ int grat_stepsize = 200; // grating step size int grat_numsteps = 50; // number of grating steps in one direction int grat_numramps = 3; // number of ramps per grating position int chop_def = 648; // chopper position during grating scan int nb_rdout_ramp = 64; // number of readouts per ramp int num_updown = 1; // number of grating updown scans int grat_def = 496000; // position of grating after the scan int capa_red = 12; // Red capacitor int capa_blu = 12; // Blue capacitor double bias_r_blu = 0.01; // Bias "r" blue double bias_r_red = 0.01; // Bias "r" red double bias_d_blu = 0.198; // Bias "d" blue double bias_d_red = 0.069; // Bias "d" red int nb_samp_subramp_blu = 64; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 64; // Nb of red samples per sub-ramp int naifid = 0; // non Solar System source = 0, >0 if fast tracking required (Solar System Source) double yoffset = 0.0; // yoffset [arcsec] double xoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC } }}} Internal variables declaration and timing computation {{{ { // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = 0; //Initial hold int tih = 0; //Final hold int tfh = 0; //Duration of "stable" pointing int tp = duration(WaveCalNoChop(fltPOS,grat_start,grat_stepsize, grat_numsteps,grat_numramps,chop_def,nb_rdout_ramp, num_updown,grat_def,capa_red,capa_blu, bias_r_blu,bias_r_red,bias_d_blu,bias_d_red, nb_samp_subramp_blu,nb_samp_subramp_red)); //Use SPECTRO virtual aperture string ib = "P02_0"; //Non-solar source int naifid = 0; }}} Pointing request(s): may include logical statements with different pointing requests {{{ //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib, naifid,ra,dec,yoffset,xoffset,tp); } }}} State machine: each state corresponds to a telescope pointing status. An observation is a sequence of telescope states determined by '''a''' pointing request {{{ { int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 3) { // Call the WaveCal procedure WaveCalNoChop(fltPOS,grat_start,grat_stepsize,grat_numsteps,grat_numramps,chop_def,nb_rdout_ramp,num_updown,grat_def,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red); } } } }}}