// $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Exercise OBCP for chopper scan in photometry // // // // TCL author : N/A // TCL file : N/A // CUS author : TM // Script file : OBCP_chop_scan_phot_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise OBCP for chopper scan in photometry // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version 1.0 // History 0.1 09-oct-2006 TM // 0.2 10-nov-2006 Calls PHOT_spu_reset (used to be PACS_spu_reset) // 1.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_OBCP_chop_scan_phot { /* Needed variables to call PacsEng_OBCP_chop_scan_phot */ int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 80; // P#2 number of readouts on step int nb_steps_up = 163; // P#3 number of steps up int nb_steps_dn = 163; // P#4 number of steps down int step_up = 287; // P#5 relative move up int step_dn = -287; // P#6 relative move down int detector = 4; // Detector to SYNCH on int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression int chop_start = -23500; // Chopper start position int chop_def = 648; // Chopper default position /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_OBCP_chop_scan_phot */ }{ // 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(Pacs_OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PHOT_aot_epilogue.txt,v 1.2 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : // Purpose : Stop PHOTOmeter observations at end of AOT // // TCL author : // TCL file : // CUS author : Diego Cesarsky // Script file : PHOT_aot_epilogue.txt // // Input arguments // Type Name Default Description // // Description : Not much for now (just STOP SPU) // // Dependencies : PACS TCs // // Preconditions : // // Comments : // // History : 0.1 19-apr-2006 First creation // : 1.0 VDO implement data rates // procedure PHOT_aot_epilogue_Data_Rates { }{ // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); data_rate(0.0); // Sync the bus (function duration will get the "true" duration) sync(); // end of procedure } // CVS comments : $Id: PacsPhotDefaults.txt,v 1.7 2008/05/06 13:34:53 vanessa Exp $ // Purpose : Fill index=0 of OBCP and PHOTxxx tuples with known // sensible default values // // CUS author : DAC // Script file : PacsPhotDefaults_PV.txt // // Input arguments // type name Description // string srcID HSPOT define source ID // // Return values // Type Name Description // tuple confPHOTx & confOBCP electronics and OBCP default parameters // // Description : Give default values to tuples OBCP and PHOT. May // use more information from yet to be created CAL-U files. So far // only "throw" (HSPOT defined) appears necessary as a call argument // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-may-2008 DAC. Based on PacsPhotDefaults // Added name of PHOT configuration AL file {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} procedure PacsPhotDefaults_PV { string srcID = "pointSRC" in ["pointSRC","smallSRC","largeSRC"]; // SourceID string primePar = "Prime" in ["Prime","Parallel"]; // Observing mode string confphotparams = "CONF_PHOT_params"; //Configuration cal file name bool isBrightPacs = false; bool verbose = true; // Generate bla-bla }{ // Define variables to be used here {int,int,int,int,int,int,int,int,int} confPHOTblu = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int} confPHOTred = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // Open CAL-U with compression, raw pixels, etc. information // Verbose report if(verbose) { debug_print("%%PacsPhotDefaults: isBright: " + isBrightPacs); } if(!isBrightPacs) { int gain_red = ilookup(confphotparams,"gain_red",primePar); } else { gain_red = ilookup(confphotparams,"gain_red","BrightPacs"); } confPHOTred{0} = gain_red; if(!isBrightPacs) { int gain_blu = ilookup(confphotparams,"gain_blu",primePar); } else { gain_blu = ilookup(confphotparams,"gain_blu","BrightPacs"); } confPHOTblu{0} = gain_blu; if(!isBrightPacs) { int comp_mode_red = ilookup(confphotparams,"comp_mode_red",primePar); } else { comp_mode_red = ilookup(confphotparams,"comp_mode_red","BrightPacs"); } confPHOTred{3} = comp_mode_red; if(!isBrightPacs) { int comp_mode_blu = ilookup(confphotparams,"comp_mode_blu",primePar); } else { comp_mode_blu = ilookup(confphotparams,"comp_mode_blu","BrightPacs"); } confPHOTblu{3} = comp_mode_blu; if(!isBrightPacs) { int nb_raw_red = ilookup(confphotparams,"nb_raw_red",primePar); } else { nb_raw_red = ilookup(confphotparams,"nb_raw_red","BrightPacs"); } confPHOTred{6} = nb_raw_red; if(!isBrightPacs) { int nb_raw_blu = ilookup(confphotparams,"nb_raw_blu",primePar); } else { nb_raw_blu = ilookup(confphotparams,"nb_raw_blu","BrightPacs"); } confPHOTblu{6} = nb_raw_blu; // Chopper and grating expected at their default positions string calU = "SPEC_MEC_Defaults"; int chop_def = ilookup(calU,"Photometry","chopper"); confOBCP{17} = chop_def; // Position filter wheel at default position // int fw_pos = ilookup(calU,"Photometry","FW"); // Initialize to don't care/don't know int fw_pos = 1; confOBCP{19} = fw_pos; int nb_cycles_obs_cal = 1; confOBCP{0} = nb_cycles_obs_cal; int nb_SRC_OFF = 1; confOBCP{3} = nb_SRC_OFF; int nb_rdouts_plateau = 4; confOBCP{4} = nb_rdouts_plateau; int nb_CS1_CS2 = 0; confOBCP{5} = nb_CS1_CS2; // Read chopper positions [arcsec] and convert to ENG units calU = "PHOT_CHOP_params"; string convU = "PHOT_CHOP_sky"; double auxSRC = dlookup(calU,srcID,"SRC"); int onSRC = PacsReadChopSky(convU,auxSRC); double auxREF1 = dlookup(calU,srcID,"REF1"); int onREF1 = PacsReadChopSky(convU,auxREF1); double auxREF2 = dlookup(calU,srcID,"REF2"); int onREF2 = PacsReadChopSky(convU,auxREF2); // Report settings if verbose if(verbose) { debug_print("++PhotDefaults CHOPPER: " + auxSRC + " [arcsec] -> " + onSRC + " [ENG]"); debug_print("++PhotDefaults CHOPPER: " + auxREF1 + " [arcsec] -> " + onREF1 + " [ENG]"); debug_print("++PhotDefaults CHOPPER: " + auxREF2 + " [arcsec] -> " + onREF2 + " [ENG]"); } confOBCP{12} = onSRC; confOBCP{13} = onREF1; confOBCP{14} = onREF2; // chop_pos_CS1 = confOBCP[0]{15}; // chop_pos_CS2 = confOBCP[0]{16}; int detector = 1; confOBCP{18} = detector; return {confPHOTblu,confPHOTred,confOBCP}; } // Missionphase : EQM IMT // // Purpose : Record data in BOL-C test pattern mode // // Author : Bart Vandenbussche // CUS script : PHOT_TestPattern // CVS file : // // Arguments : duration : time to stay in test pattern mode // // Description : Switch to BOL-C HK+test pattern data mode // wait seconds // Switch to BOL-C HK + bolometer data mode // // Dependencies : // // Preconditions : PACS is switched on with configured BOLC // // Comments : // // Version : 1.0 // // History : 1.0 13-apr-2005 BV - First version // block PHOT_TestPattern PACS 204 { int time_in_testmode = 60; //time to stay in test pattern mode (sec) }{ // Register with environment WriteBBID($BBID); Pacs_BOLC_SET_DATA_MODE("Test_Pat_HK"); delay(time_in_testmode); Pacs_BOLC_SET_DATA_MODE("Bolo_HK"); // Mark End of Block WriteEndBB(); } // Missionphase : FM-ILT // // Purpose : Prepare MEC for spectrometer, including filterwheel, // chopper, grating and calibration sources *REDUNDANT parameters* // // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will switch on and set all required // REDUNDANT parameters for // - chopper // - spectrometry filter wheel // - grating, and // - calibration sources. // This script should be executed just after the // switch-on procedure and the bolometer setup // // Dependencies : // // Preconditions : // // Comments : // // Version 10 // History // 1.0 BV 11-04-2007 First version based on SPEC_dmc_setup // 1.1 DAC 20-jun-2007 Call CONF_spec_fltw_redundant procedure SPEC_dmc_setup_redundant { string spec_fltw_id = "POS A" in ["POS A","POS B"]; // Photometer filter ID int chop_def_pos = 0; // Chopper default position double temp_CS1 = 48.0; // Temperature 55K for the PACS calibration source 1 double temp_CS2 = 58.0; // Temperature 60K for the PACS calibration source 2 }{ //------------------- // CHOPPER // Configure diagnostics HK for chopper // Read out every 5 ms int diag_hk_period_cho = 5; // DMC_CHOP_CTRL_ST 209 // DMC_CHOP_CUR_POS 244 // DMC_CHOP_SETPOIN 245 // DMC_CHOP_TARGET 246 // DMC_CHOP_PID_ERR 247 // DMC_CHOP_PID_ACC 248 // DMC_CHOP_MAX_DIT 249 // DMC_CHOP_OUTPUT 258 // DMC_CHOPPER_TEMP 407 // DMC_CHOP_VA 557 // DMC_CHOP_IA 561 // DMC_CHOP_VB 565 {int}[] parlist_cho = [{209},{244},{245},{246},{247},{248},{249},{258},{407},{557},{561},{565},{0xffff}]; int[] aux_cho = [209,244,245,246,247,248,249,258,407,557,561,565,0xffff]; int check_sum_cho = checksum("int",aux_cho); int diag_hk_length_cho = 13; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_cho,parlist_cho,check_sum_cho); Pacs_DMC_START_DIAG_HK(diag_hk_period_cho); // DMC_WRT_CHOP_CONF_PAR (now modified for 20 parameters) CONF_chopper("CONFChopper","red_sky"); CHOP_on_off("ON"); Pacs_DMC_MOVE_CHOP_ABS(chop_def_pos); delay(1); // Pacs_DMC_STOP_DIAG_HK(); //------------------------- // PACS CALIBRATION SOURCES CONF_cs("Both"); CS_on_off("CS1","ON"); CS_temp("CS1",temp_CS1); CS_on_off("CS2","ON"); CS_temp("CS2",temp_CS2); // Grating // NOTE: The grating default position is set in CONF_grating int diag_hk_period_grat = 1; // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_GR_IND_SINE 539 // DMC_GR_IND_COS 540 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_GRAT_CTRL_ST 208 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_GRAT_PID_ERR 253 // DMC_GRAT_OUTPUT 452 // DMC_GRAT_IND_READ 512 {int}[] list_tuple = [{539},{540},{256},{257},{556},{564},{560},{567},{208},{250},{251},{252},{253},{452},{512},{0xffff}]; int[] list_int = [539,540,256,257,556,564,560,567,208,250,251,252,253,452,512,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); Pacs_DMC_START_DIAG_HK(diag_hk_period_grat); CONF_grating("CONFGrat","FMILT_R_Fast"); // Stop HK Pacs_DMC_STOP_DIAG_HK(); //------------------- // FILTERWHEEL // Configure diagnostics HK for filterwheel // Read out every 5 ms int diag_hk_period_fw = 5; // DMC_WRT_DIAG_HK_LIST // DMC_FW_SPEC_CTRL 210 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FWSP_CUR_POS 255 // DMC_FPU_T_SEN_ST 404 // DMC_FW_SPEC_TEMP 405 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_IMOTA 560 // DMC_FWSPEC_POS_A 555 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTB 567 // DMC_FWSPEC_POS_B 559 {int}[] parlist_fw = [{210},{256},{257},{255},{404},{405},{556},{560},{555},{564},{567},{559},{0xffff}]; int[] aux_fw = [210,256,257,255,404,405,556,560,555,564,567,559,0xffff]; int check_sum_fw = checksum("int",aux_fw); int diag_hk_length_fw = 13; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_fw,parlist_fw,check_sum_fw); Pacs_DMC_START_DIAG_HK(diag_hk_period_fw); // CONFigure controller CONF_spec_fltw_redundant(); // and move SPEC_fltw_move(spec_fltw_id); // Move to demanded position Pacs_DMC_STOP_DIAG_HK(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : just to execute Phot_prepareEMC_direct // // Author : Koryo Okumura / Thomas Mueller // // CUS script : procedure Phot_prepareEMC_direct_OBS // // Argument : None // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + CSs are cold (connected only to the slow drifting satellite L1-level) // // Description : // // Dependencies : None // // Comments : // // Version : 1.0 //History : 0.1 Mon Jun 18 2007 // : 1.0 translated into PV scipt VDP // obs PacsEng_Phot_prepareEMC_direct { /* Needed variables to call PacsEng_Phot_prepareEMC_direct */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_prepareEMC_direct */ }{ // 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(Phot_prepareEMC_direct())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Phot_prepareEMC_direct(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // Script : PACS_Chopper_uk_move_18000_ast_OBS.cus // // // Missionphase : IST Chopper Day // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-18000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on the commanding during the CQM/FM ILT. // // Version : 4.0 // // History : 1.0 02-03-07 HD. Script to do simple chopper cycle // // 2.0 05-07-07 HD. IST Chopper Day // 3.0 05-07-07 MN. edited for SVT/PV conformance // 4.0 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Chopper_uk_move_18000_ast { /* Needed variables to call PacsEng_Chopper_uk_move_18000_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_uk_move_18000_ast */ }{ // 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(PACS_Chopper_uk_move_18000_NoConf_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_uk_move_18000_NoConf_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_CS_SFT_Cold { /* No variables to call PacsEng_CS_SFT_Cold */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_CS_SFT_Cold */ }{ // 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(PACS_CS_SFT_Cold())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_CS_SFT_Cold(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS script : OBCP_spec_freq_switch.txt // Author : Helmut Feuchtgruber // CUS script : Thomas G. Mueller // // Arguments needed to call OBCP // Type Name DefCal Description // // int nb_obs_cal number of full sequences // int chop_pos_start initial chopper position // int nb_cycles nb of grating/readout cycles on the line // int grat_pos_LINE: grating position 1 // int nb_ramps_grat number of ramps per grating position // int grat_pos_REF1 grating position 2 // int grat_pos_REF2 grating position 3 // int nb_CS1 number of cycles on CS1 // int chop_pos_CS1 chopper position on CS1 // int nb_CS2 number of cycles on CS2 // int chop_pos_CS2 chopper position on CS2 // // int detector 1 Synchronize on this detector 1:Blue 2:Red // int grat_time 40000 Time for grating to move to start position // int comp_mode_blu 16 Blue compression // int comp_mode_red 16 Red compression // int grat_def 500000 Grating default position // int chop_def 0 Chopper default position // int grat_def_time 20000 Gratting time to move to grat_def position // int nb_rdouts_ramp 64 Number of readouts per ramp // // Description: // Wavelength switching will be required on extended sources. No chopping // will be done. Instead, the grating will be moved in a 2 or 3 position // pattern around the spectral line to be observed. The frequency of // internal calibrations is adjusted by the top loop around observation // and calibration loops. // It is of course possible to have also calibrations outside the // sequence, just before and/or after. // // Dependencies : Calls "DMC_spec_freq_switch" DEC // MEC sequence 4.2.7, DMC_spec_freq_switch // Comments : // // Version : 0.1 17-Aug-2004 Creation by TM // History : // int[] block OBCP_spec_freq_switch PACS 22 { int nb_obs_cal = 1; // number of full sequences int chop_pos_start = 1000; // initial chopper position int nb_cycles = 8; // nb of grating/readout cycles on the line int grat_pos_LINE = 461000; // grating position 1 int nb_ramps_grat = 3; // number of ramps per grating position int grat_pos_REF1 = 454600; // grating position 2 int grat_pos_REF2 = 467400; // grating position 3 int nb_CS1 = 1; // number of cycles on CS1 int chop_pos_CS1 = -25000; // chopper position on CS1 int nb_CS2 = 1; // number of cycles on CS2 int chop_pos_CS2 = 25000; // chopper position on CS2 int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_time = 40000; // Time for grating to move to start position int comp_mode_blu = 16; // Blue compression int comp_mode_red = 16; // Red compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Register with environment WriteBBID($BBID); // Variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // duree of this OBCP (computed and returned in [msec]) int duree_msec = 0; // OBCP pseudo code // OBCP_WAVELENGTH_SWITCHING(seq, seq_time, P#1, ..., P#11, // detector, grat_time, cmp_par_blue, cmp_par_red, // grat_def, chop_def, grat_def_time) // begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(P#4) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) // ; (all parameters filled by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the execution time int[] duree1 = DMC_spec_freq_switch(nb_obs_cal,nb_cycles,nb_ramps_grat,nb_CS1,nb_CS2); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // WAIT(seq_time) // duree_msec(seq_time) duree_msec = duree_msec + t_cmd; duree_msec = duree_msec + seq_time; // ; check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8) + event // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) // duree_msec(grat_def_time) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // Issue TM(1,7) // end // Duration: 9 x 200ms + grat_time + grat_def_time + 0.5s // This procedure calls the sequence described in sec. 4.2.7. // Now trigger execution of OBCP // This OBCP is number 22, requires 20 parameters and calls DEC/MEC #10 string obcp_ID = "WAVE_SWITCH_GRAT"; int obcp_par_nb = 20; int seq_DMC = 10; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_obs_cal},{4,chop_pos_start},{5,nb_cycles},{6,grat_pos_LINE},{7,nb_ramps_grat},{8,grat_pos_REF1},{9,grat_pos_REF2},{10,nb_CS1},{11,chop_pos_CS1},{12,nb_CS2},{13,chop_pos_CS2},{14,detector},{15,grat_time},{16,comp_mode_blu},{17,comp_mode_red},{18,grat_def},{19,chop_def},{20,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } delay(time_array[0]); // Return the array of times return time_array; } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_1.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_3 { int grpNb = 3 in [3,3]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G3(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G3(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_2.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_2 { int grpNb = 2 in [2,2]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G2(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G2(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_1.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_1 { int grpNb = 1 in [1,1]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G1(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G1(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // $Id$ // Missionphase : PACS PV Phase // // Script : PACS_Chopper_uk_move_3000_ast_OBS.cus // // // Missionphase : IST Chopper Day // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-3000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on the commanding during the CQM/FM ILT. // // Version : 3.0 // // History : 1.0 02-03-07 HD. Script to do simple chopper cycle // 2.0 05-07-07 HD. IST Chopper Day // 3.0 05-07-07 MN. edited for SVT/PV conformance // : 4.0 04-mar-2008 Converted into Eng OBS by VDP // obs PacsEng_Chopper_uk_move_3000_ast { /* Needed variables to call PacsEng_Chopper_uk_move_3000_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_uk_move_3000_ast */ }{ // 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(PACS_Chopper_uk_move_3000_NoConf_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_uk_move_3000_NoConf_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_1.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_6 { int grpNb = 6 in [6,6]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G6(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G6(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_1.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_4 { int grpNb = 4 in [4,4]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G4(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G4(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // Missionphase : // // Purpose : Send the appropriate TC to set a determined bias voltage // for a group 1 matrix. The bias voltage is expressed in // volts // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_bias_group_1.txt // // Arguments : // string biasName The bias name in accordance with the MIB convention // float bias The corresponding bias voltage [volts] // // Description : Extremely unsatisfactory code to find the bias name and // issue the corresponding TC. If bias name is not found, // the procedure sets an error condition // // Dependencies : // // Preconditions : // // Comments : The code is awful since it has to use dedicated TCs for // each bias of each group, namely 20 different TCs. There // are similar CUS procedures for each of the other 5 groups. // There are two "sanity checks": // 1- group number has to agree with procedure name // 2- bias number has to agree with bias name // // Version : 0.1 07-aug-2006 Creation by DAC // History : // : procedure PHOT_bias_group_5 { int grpNb = 5 in [5,5]; // The group number (sort of sanity check) int biasNb = 1; // The bias number (sort of sanity check) string biasName = "VH"; // The corresponding bias name as per MIB double bias = 1.62312; // The bias voltage to be set for biasName }{ // // Assume failure bool sentTC = false; // Start stupid "if" code // Bias name Pacs_BOLC_SET_VH if(biasName == "VH" && biasNb == 1) { Pacs_BOLC_SET_VH_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VL if(biasName == "VL" && biasNb == 2) { Pacs_BOLC_SET_VL_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VRL if(biasName == "VRL" && biasNb == 3) { Pacs_BOLC_SET_VRL_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VINJ if(biasName == "VINJ" && biasNb == 4) { Pacs_BOLC_SET_VINJ_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VCH if(biasName == "VCH" && biasNb == 5) { Pacs_BOLC_SET_VCH_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL if(biasName == "VDL" && biasNb == 6) { Pacs_BOLC_SET_VDL_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS if(biasName == "VSS" && biasNb == 7) { Pacs_BOLC_SET_VSS_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL if(biasName == "VGL" && biasNb == 8) { Pacs_BOLC_SET_VGL_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLH if(biasName == "CKRLH" && biasNb == 9) { Pacs_BOLC_SET_CKRLH_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_CKRLL if(biasName == "CKRLL" && biasNb == 10) { Pacs_BOLC_SET_CKRLL_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_H if(biasName == "VDECX-H" && biasNb == 11) { Pacs_BOLC_SET_VDECX_H_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDECX_L if(biasName == "VDECX-L" && biasNb == 12) { Pacs_BOLC_SET_VDECX_L_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_H if(biasName == "VSMS-H" && biasNb == 13) { Pacs_BOLC_SET_VSMS_H_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSMS_L if(biasName == "VSMS-L" && biasNb == 14) { Pacs_BOLC_SET_VSMS_L_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGG if(biasName == "VGG" && biasNb == 15) { Pacs_BOLC_SET_VGG_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDD if(biasName == "VDD" && biasNb == 16) { Pacs_BOLC_SET_VDD_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VSS_BU if(biasName == "VSS-BU" && biasNb == 17) { Pacs_BOLC_SET_VSS_BU_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VDL_BU if(biasName == "VDL-BU" && biasNb == 18) { Pacs_BOLC_SET_VDL_BU_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VGL_BU if(biasName == "VGL-BU" && biasNb == 19) { Pacs_BOLC_SET_VGL_BU_G5(bias); sentTC = true; } // Bias name Pacs_BOLC_SET_VH_BLIND if(biasName == "VH-BLIND" && biasNb == 20) { Pacs_BOLC_SET_VH_BLIND_G5(bias); sentTC = true; } // Error condition if no bias was set if(!sentTC) { error("The combination " + biasName + "/" + biasNb + " is not correct"); } } // File : PACS_Spec_Curing_Explore.cus // Missionphase : PACS FM ILT tests // // Purpose : Flasher curing : short flashes with dead times -> Temp & signal evolutions // Third part of the Flashers Performance check (curing schemes) // // Author : P. Royer // // Arguments : flasher current for the curing // number & duration of flashes // idle time between the flashes // // Prerequisite : spectrometer detectors & chopper configured // // Description : SPU Setup // position chopper on BB2 (reasonnable signal when trying to estimate quality of curing), grating supposed at default position, FW position not critical // Flexible scheme for flasher curing : short flashes with dead times // chopper to default position // SPU reset // // Dependencies : SPEC_spu_setup // SPEC_spu_reset // PACS_Spec_Flash_SWON // PACS_Spec_Flash_Setup // PACS_Spec_Flash_SWOF // // Comments : // // Version : 1.1 // History : 1.0 / 12-Mar-2008 initial version by PR // 1.1 / 01-Jul-2008 introduced CRE Setup & corresponding CALU, "final_delay" & grat_pos // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Flasher curing : short flashes with dead times -> Temp & signal evolutions // @comment - // procedure PACS_Spec_Curing_Explore { int blue_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int nflash = 1; // Number of flashes int flash_time = 60; // Duration of each flash int idle_time = 120; // Idle time between the flashes int nflash_fine = 6; // Number of flashes int flash_time_fine = 10; // Duration of each flash int idle_time_fine = 60; // Idle time between the flashes int final_delay = 120; // Idle time at the end of the test (flasher cooldown, detector stabilisation), }{ // // Internal parameters // ------------------- int chop_pos_BB2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); //int chop_pos_BB2 = 21200; // // SPU RESET // PACS_Spec_SPU_Reset(); delay(1); // // Setup CREs --> Largest Capacitance (No command to the heaters) // string calUname = "CONFCRECuring"; // Calibration Table string calUrow = "PV"; // Row in table = Instrument Configuration double bias_d_blue = dlookup(calUname,calUrow,"bias_d_blue"); double bias_d_red = dlookup(calUname,calUrow,"bias_d_red"); double bias_res_blue = dlookup(calUname,calUrow,"bias_res_blue"); double bias_res_red = dlookup(calUname,calUrow,"bias_res_red"); int ramp_blue = ilookup(calUname,calUrow,"ramp_blue"); int ramp_red = ilookup(calUname,calUrow,"ramp_red"); int capacity_blue = ilookup(calUname,calUrow,"capacity_blue"); int capacity_red = ilookup(calUname,calUrow,"capacity_red"); // CURING PARAMETER int curing_mode = 0; // SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // SPU SETUP (default = slope fitting) // int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = ilookup(calUname,calUrow,"ramp_blue"); // Nb of blue samples per sub-ramp int nb_samp_subramp_red = ilookup(calUname,calUrow,"ramp_red"); // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // SEND CHOPPER TO BB2 PACS_Chop_Move_Abs(chop_pos_BB2); delay(1); // // Start Flashers DiagHK // // 1: synch w/ BLUE DET 2: synch w/ RED DET >4: period in ms 0: 1KHz (not to use w/ science) int diag_hk_period = 100; PACS_Spec_FlashHeat_Diaghk_Setup(diag_hk_period); delay(10); // // SWON FLASHERS // PACS_Spec_Flash_SWON(); delay(10); // // // Flashers Loop I : Coarse curing, 1 minute / iteration // ------------- for(int loopin = 1 .. nflash) { PACS_Spec_SPU_Reset(); delay(1); curing_mode = 1; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); delay(1); PACS_Spec_Flash_Setup(blue_flasher_current,red_flasher_current); delay(flash_time); PACS_Spec_Flash_Setup(0,0); curing_mode = 0; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(idle_time); } // // Flashers Loop II : Fine tuning, 10 sec / iteration // ------------- for(int loopin2 = 1 .. nflash_fine) { PACS_Spec_SPU_Reset(); delay(1); curing_mode = 1; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); delay(1); PACS_Spec_Flash_Setup(blue_flasher_current,red_flasher_current); delay(flash_time_fine); PACS_Spec_Flash_Setup(0,0); curing_mode = 0; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(idle_time_fine); } // // SWOF FLASHERS // PACS_Spec_Flash_SWOF(); delay(10); // // Detector stabilisation / cooldown / recovery // -------------------------------------------- delay(final_delay); // // SEND CHOPPER TO DEFAULT PACS_Chop_Move_Abs(0); delay(1); // // RESET DIAGHK // PACS_Diaghk_Reset(); // // RESET SPU // PACS_Spec_SPU_Reset(); delay(1); // // SYNC //= = = sync(); } // Script : PacsEng_Chopper_AutoOpt.txt // Missionphase : Commissioning // // Purpose : Check a series of different chopper controller settings by // chopping between +/- 12000 units (~4 deg) // // Author : Markus Nielbock/Helmut Dannerbauer // CUS author : MN/HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions: PACS switched on and Chopper switched off. // // Comments : This script is based on the commanding script // PACS_Chopper_uk_move_12000_OBS.cus // // Version : 1.2 // // History : 1.0 20-Nov-2007 (MN) Script to do simple chopper cycle // 1.1 10-Mar-2008 (MN) adopted extended CUS naming conventions // 1.2 19-May-2008 (MN) added +3 to all parameters (XHSPOT bug) // // Initialise input parameters: // Defines control parameter range, loops run from k(p,i,c,f)min to // k(p,i,c,f)max defining the inverse of the ratio of parameter change w.r.t. // the default value. obs PacsEng_Chopper_AutoOpt_bug { int kpmin = 3 in [0,6]; //min Kp+3 int kpmax = 3 in [0,6]; //max Kp+3 int kimin = 3 in [0,6]; //min Ki+3 int kimax = 3 in [0,6]; //max Ki+3 int kcmin = 3 in [0,6]; //min KiCurr+3 int kcmax = 3 in [0,6]; //max KiCurr+3 int kfmin = 3 in [0,6]; //min Kf+3 int kfmax = 3 in [0,6]; //max Kf+3 }{ // duration int tOPT = duration(Pacs_Chopper_AutoOpt_bug(kpmin,kpmax,kimin,kimax,kcmin,kcmax,kfmin,kfmax)); int tOBSID = duration(WriteOBSID($OBSID)); int tEndID = duration(WriteEndID()); int tp = tOPT + tOBSID + tEndID; // Issue the pointing request int[] fromPntReq = no_pointing(true,0,0,tp); }{ // The state machine int[] stateVar = [0]; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 3) { // Get OBSID from environment //Send OBSID to DMC WriteOBSID($OBSID); data_rate(120.0); Pacs_Chopper_AutoOpt_bug(kpmin,kpmax,kimin,kimax,kcmin,kcmax,kfmin,kfmax); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } ///////////////////////////////////////////////////////////////////////////// /// $Id: PacsCal_FieldDistort.txt,v 1.4 2008/11/12 11:40:20 vanessad Exp $ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsCal_PacsLineSpec // // CUS author : DAC // // Input arguments: see after module identification // // Return values // {int,int,int} {totalDuration,slewDuration,obsOverPACSandSC} // // Comments : // // History: // 22-may-2008 0.1 DAC PV version based on PacsLineSpecObs // - reads PV version of EstimatorOBCP27 // - removed most of AOT features // - only one line per AOT // - either raster or scan w/off pointing modes // - chopping without nodding for both pointing modes // - chopper throw is user defined // Be ready to find several unused variables, inherited // from the AOT code; some variables are forced to a fix // value (user defined for the AOT code) // 14-jul-2008 0.2 DAC // - Move unused input parameters away from input list // - Allow use of repeatOBS // - set grating step to zero; i.e. confOBCP{1}=confOBCP{2}=0 // - Deal with chopper offset and S/C offsets // - Renamed from PacsCal_PacsLineSpec to PacsCal_FieldDistort // 18-jul-2008 0.3 DAC // - Add user defined "fixed" for pointing requests, called // skyCoord // 03-nov-2008 0.4 VD // - Swapped chopSRC and chopREF in confOBCP to fix the // fact that on Hspot the OFF position appears on the source // and the "on source raster/ scan? appears on OFF position // {int,int,int} obs PacsCal_FieldDistort { string lineId = "Alessandra lonely line"; //Line ID double lWave = 82.0 in [55.0,210.0]; //Rest wavelength [micron] int repeatOBS = 1; //Number of up/down grating cycles (SRC) int repeatOFF = 1; //Number of up/down grating cycles (OFF) double lineFlux = 1.0; //Expected line flux double contFlux = 2.0; //Expected continuum flux [mJy] double lineWdth = 30.0; string fluxUnit = "Jy/m2"; string wdthUnit = "kms"; string orderSel = "order2" in ["order2","order3"]; //Used to select FILTER /* Define default values for SCAN mode */ string pmode = "raster" in ["raster","scan"]; //Choose RASTER or line SCAN int noOFF = 0; //0 for noOFF, READ DOCS for noOFF>0 /* Raster parameters */ int m = 7 in [2,32]; //Number of points int n = 7 in [1,32]; //Number of lines double pointStep = 2.3 in [2.0,480.0]; // Raster point step [arcsec] double lineStep = 2.3 in [2.0,480.0]; // Raster line step [arcsec] /* Scan parameters */ double rateScan = 3.0; // Scan rate [arcsec/sec] double legScanLength = 15.0 in [1.0,1200.0]; //Scan leg [arcmin] int numScanLegs = 4 in [1,1500]; //Number of scan legs double mapScanAngle = 0.0 in [0.0,360.0]; double separationScanLeg = 2.3 in [2.0,480.0]; //Scan leg separation [arcsec] double chopthrow = 90.0; // Chopper throw [arcsec] double chopoffset = 45.0; // Chopper offset [arcsec] double mapRasterAngle = 0.0 in [0.0,360.0]; double[] planetOffsets = [0.0,0.0]; //PlanetOffsets: Extra y,z offsets for naifid>0 [arcmin] bool skyCoord = true; //TRUE for sky coordinates; false for S/C coordinates double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; bool refSelected = false; // OFF position needed int naifid = 0; // RA,DEC or SSO }{ // Formerly as input parameters // "lines" is defined as an array; its elements (and hence its dimension) // are provided by HSPOT in the AOT version. Here they are filled in-situ // {id,redshifted wavelength,repeat factor,line flux,continuum flux, // line width,line flux unit,line width unit} {string,double,int,double,double,double,string,string}[] lines = []; int userNODcycles = 1; bool faintLines = true; bool chopper = true; bool nodding = false; int obsOverhead = 180; // Slew overhead lines[0] = {lineId,lWave,repeatOBS,lineFlux,contFlux,lineWdth,fluxUnit,wdthUnit}; // Start of "Pointing" section // // Overall control of debugging messages bool verbose = true; // New variable to start at nodded position bool startAtOFF = false; // extraConf: whatever affects PACS default configuration // Currently: the option faintLines calls for an extraConf string extraConf = "normal"; // For bright lines if(!faintLines) { extraConf = "bright"; } // Set messages for HTML format message(""); message(""); // Need switching boolean bool chopNod = true; bool switching = !chopNod; // Decode more HSPOT information int nbLines = length(lines); int nbLines1 = nbLines - 1; // Cannot call with empty "lines" if(nbLines == 0) { error("STOP!! There are no spectral lines defined!"); } // Chopping always true; nodding slways false nodding = false; chopper = true; // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto) // Set pointing mode is undefined. If it remains undefined at the end of // the next tests, then there is a problem with the source definition int pointCase = 0; // Based on the definitions of PacsPhoto, and since there is no staring case, // pointCase is of the form 31 (raster no nod), 32 (raster w/nod) or 33 (scan // mode) if(pmode == "raster") { pointCase = 31; string pointMode = "raster_pointing"; string userMode = "Raster, no chopper, no nodding"; if(chopper) { userMode = "Raster, chopper, no nodding"; } } if(pmode == "scan") { pointCase = 33; pointMode = "line_scan_pointing"; userMode = "ScanChopNoNod"; } // Establish pointing offsets (index into PACSyzoffsets CAL file) string yzoffsetROW = "S" + pointCase; // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. The chopperthrow will be used to compute yzoffsets yzoffsetROW = yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Define array of wavelengths (will be needed by the SORT procedure) double[] lineWave = [55.0]; // Populate the array of wavelengths (inherited from AOT where several lines // are allowed) lineWave[0] = lines[0]{1}; // For each line obtain the grating order and the grating position int[] orders = [0]; double[] grat_pos = [0.0]; // Fill the tuple waveTuple {waveLen,order,gratPos,nbStep,gratStep} {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; waveTuple[0] = SPEC_get_grat_info_PV(lineWave[0],"HI",switching,extraConf,orderSel,verbose); // Create vector of intermediate results orders[0] = waveTuple[0]{1}; grat_pos[0] = double(waveTuple[0]{2}); // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 int filter = 1; // Determine filter based on HSPOT input if(orderSel == "order2") { filter = 2; } if(orderSel == "order3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders); } // Filter below will be set by SPEC_aot_prologue via SlewCal if(verbose) { debug_print("MAIN:The full OBS will be performed with filter " + filter); } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 chop_pos_CS1 // chop_pos_CS2 chop_def detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC contains: // capa, nb_rdouts_ramp, nb_rdouts_subramp, comp_mode, // glitch_det, ramp_fit_alg, nb_raw, bias_r, bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} // Reunite all three tuples into paramsSPECdef {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // AOT code uses "throwUsage" as a description of allowed chopper throws // Here the throw is user defined. Use "large" to please the script and // compute the ENG throw below. paramsSPECdef = PacsSpecDefaults("large",extraConf,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Convert chopperthrow into into ENG values // Take account of desired chopper offset (all in arcsec) double chopSRC = chopoffset + chopthrow / 2.0; double chopREF = chopoffset - chopthrow / 2.0; string convU = "SPEC_CHOP_sky"; // DAC ?? // confOBCP[0]{12} = PacsReadChopSky(convU,chopREF); // confOBCP[0]{13} = PacsReadChopSky(convU,chopSRC); // SRC on REF??? SRC back to where it should be confOBCP[0]{13} = PacsReadChopSky(convU,chopREF); confOBCP[0]{12} = PacsReadChopSky(convU,chopSRC); confOBCP[0]{14} = confOBCP[0]{13}; if(verbose) { debug_print("CHOPPER SRC: " + chopSRC + " [arcsec]==> " + confOBCP[0]{12}); debug_print("CHOPPER REF: " + chopREF + " [arcsec]==> " + confOBCP[0]{13}); } // Here comes the module(s) to estimate OBS times as a function of the // input given by the HSPOT user. // Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // Need more info... create paramsSPECext (zut alors!) // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,timeOBS,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("MAIN.confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; // Accumulator total OBS time int totalOBS = 0; // For each demanded wavelength compute minimum duration (only one wave // in PV version) // Always use OBCP27 // Here we perform chopping // SCR-2942: consider case of faintLines = false string forDEBUG = "chop/nod"; paramsSPECext = PacsLineSpecEstimatorOBCP27_PV(lines[0],waveTuple[0],paramsSPEC,nodding,faintLines,verbose); // Copy estimates to respective tuples confSPECblu[1] = paramsSPECext{0}; confSPECred[1] = paramsSPECext{1}; confOBCP[1] = paramsSPECext{2}; // Save nb_SRC_REF int nb_SRC_REF = confOBCP[1]{3}; // SPECIAL FOR SINGLE GRATING POSITION confOBCP[1]{1} = 0; confOBCP[1]{2} = 0; // Accumulate total OBS time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("MAIN.Wavelength: " + lines[0]{1}); debug_print("MAIN.confOBCP[" + 1 + "]: " + confOBCP[1]); debug_print("MAIN.confSPEC[" + 1 + "]: " + confSPECblu[1]); debug_print("MAIN.Minimum required time: " + totalOBS + " [sec]"); } if(nodding) { // Here we perform nodding/chopping nbNods = userNODcycles; if(verbose) { debug_print("MAIN.The PointReq will contain " + nbNods + " nod cycles"); } } else { // Here we perform freq switch nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

Minimum required OBStime: " + totalOBS + " [sec]

"; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(nodding) { msgLine[lineCnt] = "

With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Since no NOD was specified the total OBS time is equal" + " to the minimum required time. The time can be changed" + " by changing the line(s) repeat factor

"; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

Red channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Blue channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths // MODIF: this leads to redundancy when Lines are selected both in // the norder+1st order: hence 1KWL per Filter: i.e. in practice 1 // per "blue order double keyW = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyW]; // int nbKeyWAVE = length(keyWAVE); == 1 int nbKeyWAVE = 1; // With current versions of CommandOBCP27 and CommandOBCP32, the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:waveTuple: " + waveTuple); debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOT // prologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // CAL for HOLD doAOTprologue = false; int timeHoldCal = duration(PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,0,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during HOLD: " + timeHoldCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration could be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation // Different OBCP for wavelength switch if(!switching) { // Here we perform chopping int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); // Compute timeOFF (uses repeatOFF). // Save OBS value, use OFF one, and replace OBS value int saveOBS = confOBCP[1]{0}; confOBCP[1]{0} = repeatOFF; int timeOFF = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); confOBCP[1]{0} = saveOBS; if(verbose) { debug_print("Duration OBCP27 OBS: " + timeOBS + " [sec] per pointing"); debug_print("Duration OBCP27 OFF: " + timeOFF + " [sec] per pointing"); } } else { // Here we perform freq switch timeOBS = duration(PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP32: " + timeOBS + " [sec] per pointing"); } } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbLines per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one will use time during // slew to perform SlewCal. // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Here since the chopper throw is user defined, compute the yoffset // DAC CHECK in flight that sign below is correct double yoffset = chopSRC; double zoffset = 0.0; // For planets, add user given offsets to y,z offsets if(naifid > 0) { yoffset = yoffset + 60.0 * planetOffsets[0]; zoffset = zoffset + 60.0 * planetOffsets[1]; } double skewCorrec = 0.0; if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = noOFF; // DAC Test ONLY int thold = timeHoldCal; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = skyCoord; if(pointCase == 21 || pointCase == 31) { // RasterMode repeated_raster_with_hold_and_OFF, section 3.5 ib = "P02_0"; // Raster in sky/instrument coordinates fixed = skyCoord; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = noOFF; int top = timeOFF; int nrepeat = 1; int trepeatmin = 0; int tloadmin = 0; nload = 0; // SPR-3237 (map orientation parameter) applies only to raster if(pointCase == 31) { fixed = skyCoord; patt = mapRasterAngle; } int[] fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 33) { // for Alessandra boresight to spec ib = "P02_0"; // Use sky/instrument coordinates fixed = skyCoord; // Scan orientation patt = mapScanAngle; n = numScanLegs; // Only for message info m = 1; // Perform OFF at begin and end k = noOFF; d1 = 60.0 * legScanLength; d2 = separationScanLeg; thold = timeSlewCal; nhold = 0; nload = 0; nrepeat = 1; tloadmin = 0; // Use modified confOBCP for the OFF measurement top = timeOFF; fromPntReq = line_scan_with_off_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rateScan,k,top,raoff,decoff,nrepeat,thold,nhold,tloadmin,nload); // Define tdwell for the scan mode (dwell time = leg time). The OBCP should // be parametrized to last at least tdwell seconds int tdwell = fromPntReq[4]; if(verbose) { debug_print("SCAN: tdwell must be " + tdwell + " seconds"); } // Estimate duration of OBCP as a function of np_SRC_REF // Use "rule of three" // nb_SRC_REF = 1 confOBCP[1]{3} = 1; int timeOBS1 = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); // nb_SRC_REF = 20 confOBCP[1]{3} = 20; int timeOBS2 = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 19.0; double offset = double(timeOBS1) - slope; // Compute nb_SRC_REF so that OBCP runs during the whole scan leg nb_SRC_REF = iceil((double(tdwell) - offset) / slope); // Logic to make sure timeOBS3 is smaller than tdwell: reduce nb_SRC_REF // until durstion condition is met bool foundDwell = false; confOBCP[1]{3} = nb_SRC_REF; nb_SRC_REF = nb_SRC_REF + 1; while(!foundDwell) { nb_SRC_REF = nb_SRC_REF - 1; confOBCP[1]{3} = nb_SRC_REF; int timeOBS3 = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(timeOBS3 <= tdwell) { foundDwell = true; } if(verbose) { debug_print("Needed nb_SRC_REF to fill scan leg: " + nb_SRC_REF); debug_print("OBCP duration: " + timeOBS3); } } } // Parameters returned by PointReq if(verbose) { debug_print("++++++++++++++++++++++++ Issue PointRequest now"); debug_print("Return from PointReq: " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + userMode); int tNOW = time(); debug_print("=====Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); data_rate(120.0); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { // Save OBS value, use OFF one, and replace OBS value saveOBS = confOBCP[1]{0}; confOBCP[1]{0} = repeatOFF; // Use nb_SRC_REF = 1 confOBCP[1]{3} = 1; PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); confOBCP[1]{0} = saveOBS; confOBCP[1]{3} = nb_SRC_REF; } else { /// obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOFF = nbOFF + 1; if(verbose) { tNOW = time(); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== LINE starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { debug_print(" SumUpObsTime: " + sumUpObsTime); int tLINE = tNOW + tdwell; debug_print("=== LINE ends at: " + tLINE); tNOW = time(); debug_print("=== OBCP ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print("Ending with NbOFF: " + nbOFF); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL lines). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // // and a per wavelength array: // [waveSTART,waveEND,order,gratStep,nbGratStep,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill 1st dimension of infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int wait1 = 1; // but there is no wait in FreqSwitch // Count the WAIT=1 for grating as a useful SRC if(switching) { wait1 = 1; } int nbRampPlateau = confOBCP[1]{4} + wait1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime : " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbLines1) { // for some reason it has to be "initialized" infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the START wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{0} = lines[loop3]{1}; // copy the END wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{1} = lines[loop3]{1}; // copy the grating order infoArray[1]{1}[loop3]{2} = waveTuple[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = waveTuple[loop3]{4}; infoArray[1]{1}[loop3]{3} = (confOBCP[loop3 + 1]{2} - confOBCP[loop3 + 1]{1}) / 2; // copy the number of grating steps infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from sumUpObsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Also data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTimeTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of lines observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbLines; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal; // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Fill 3rd dimension of infoArray with global timing and AOT information // timeObsEnd is the total duration of the AOT // Pass details of AOT // We use OBCP27: OBCP_grat_scan_chop2 (unless FreqSwitch) string aotName = "GratScanChop2"; // Special "sky time" for FreqSwitch and SmallSourceDither. if(switching) { aotName = "FreqSwitch"; } // Special "sky time" for ScanChopNoNod. if(pmode == "scan") { aotName = "GratScanChop2"; } // Define source to please AOT code string source = "point"; if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } infoArray[2] = {{aotName,0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; infoArray[2]{0}{5} = nbNods; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } // For scan mode use m & n to convey the area of the mapped area [arcsec**2] and the // detecting element area if(pmode == "scan") { // Assume detector size is HxW (height,width). The time spent on one sky area is // H/scan, where scan is the scan rate [arcsec/sec]. The repetion factor due to // scan legs is W/step + 1, where step is the scan leg separation. Hence time // spent on any scanned sky is (H/scan) * (W/step + 1). Another approximate formula // is // timeSKY = tOBS*detAREA/surfSCAN // Detector size (all values here in arcsec) double detSIZE = 47.0; // Surface of one of the 5-detector columns double oneCOL = legScanLength * 60.0 * detSIZE; double surfSCAN = double(numScanLegs - 1) * legScanLength * 60.0 * separationScanLeg + oneCOL; double timeOBS0 = double(numScanLegs) * legScanLength * 60.0 / rateScan; double fracDET = detSIZE * detSIZE / surfSCAN; double timeSKY = timeOBS0 * fracDET; // Pass timeSKY using infoArray[1]{0}{1} infoArray[1]{0}{1} = timeSKY; if(verbose) { debug_print("Surface oneCOL: " + oneCOL); debug_print("Surface Scan: " + surfSCAN); debug_print("timeOBS: " + timeOBS0 + "; ratio det/map: " + fracDET); } } // If switching if(switching && source == "Large") { infoArray[1]{0}{0} = "RasterOFF"; } else { if(switching && source == "Point") { infoArray[1]{0}{0} = "Pointed"; } infoArray[2]{0}{5} = userNODcycles; } // Process the information contained in infoArray (pass also lines) PacsProcessInfoArrayLine(infoArray,lines,confOBCP,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); // Compute the total time SRC + REF int accumSrceRef = 0; for(int loopL = 0 .. nbLines - 1) { // Add up Srce and Ref times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopL]{6} + infoArray[1]{1}[loopL]{7}; } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; // Return demanded tuples return {accumSrceRef,fromPntReq[1],overPACSandSC}; } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OnBoardControlProcedure to perform // staring photometry // // OBCP author : Helmut Feuchtgruber // CUS script : Thomas G. Mueller // // Arguments: // Type Name Description // int nb_loops p01 Number of loops // int comp_mode_blu Compression mode BLUE // int comp_mode_red Ditto RED // // // Description : This script mimics the Staring Photometry OBCP // pseudo script, section 3.3 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DMC_phot_staring // WriteBBID // Comments : // // Version : 1.0 18-Apr-2005 Creation by TM // History : 1.0 18-Apr-2005 Creation by TM // 1.1 09-oct-2008 VD&DAC: Add sync() // // int[] block OBCP_phot_staring PACS 7 { int nb_loops = 60; // p01 Number of loops int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duration_msec = 0; // OBCP Pseudo Code starts here (accumulate duration_msec [msec] as it goes) // OBCP_STARING_PHOTOMETRY(seq, seq_time, P#1, cmp_par_blue, cmp_par_red) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all filled by DPU based on seq parameter) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call CUS version of DECMEC sequence to obtain duration // Returns array with [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR] int[] duree1 = DMC_phot_staring(nb_loops); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // DMC_SYNCHRONIZE_ON_DET(4) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(seq_time) // ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // Issue TM(1,7) // End // Duration: 6 x 200ms + seq_time + 0.5s // This procedure calls the sequence described in sec.4.1.3. // // Now trigger execution of OBCP // This OBCP is number 7, requires 5 parameters and lasts seq_time [msec] string obcp_ID = "STARING_PHOT"; int obcp_par_nber = 5; int seq_DMC = 3; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_loops},{4,comp_mode_blu},{5,comp_mode_red}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return WriteEndBB(); // Add sync sync(); return time_array; } // Filename : Pacs_Spec_Prepare_EMC // Purpose : EMC preparation // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : SPEC_Prepare_EMC.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Sets chopper, grating and the SPU // // // // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // // Comments : // // Version : 2.0 // History : 1.0 29-Mar-2005 creation by HF // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Spec_Prepare_EMC { int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] int chop_pos = -21350; // Chopper position int grat_pos = 500000; // Grating position }{ // Configure and start both SPUs SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Move the Chopper and the Grating to the defined position for "most sensitive" mode SPEC_MOV_CHOP_and_GRAT(chop_pos,grat_pos); } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // detector test PTD 0.7.6 in spectroscopy. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up housekeeping parameter for diagnostic housekeeping // of the detector. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy. // // Comments : // // Version : 3.0 // // History : 1.0 27-07-06 creation by HD. script test. // 2.0 27-07-06 HD. script works. // 3.0 20-06-07 HD. Prepare Test for FM-ILT3. block SPEC_chop_det_dhk_fmilt076spec_V1_bb PACS 385 { }{ // Register start of BB WriteBBID($BBID); //----------------------------------------------------- // Setup and start diagnostic HK for PTD 0.7.6 V1 //----------------------------------------------------- int diag_hk_length = 16; {int}[] parlist = [{209},{244},{245},{246},{290},{291},{298},{324},{325},{332},{358},{359},{366},{392},{393},{0xffff}]; int[] aux = [209,244,245,246,290,291,298,324,325,332,358,359,366,392,393,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length,parlist,check_sum); int diag_hk_period = 1; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // CVS file : CONF_spec_fltw_redundant.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the spectro filter wheel servo loop // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 13-Oct-2004 Creation by DAC // History : 0.2 4-jul-2006 Removed "return" statement // 1.0 11-Jun-2007 PR New scheme due to new format of configuration command // (DMC UM v.4.3) // 1.1 DAC 20-jun-2007 Use _R row // : procedure CONF_spec_fltw_redundant { }{ string calUname = "CONFFWSPEC"; // FWSPEC CALIBRATION TABLE string calUrow = "FMILT_R"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWSPEC_CONF_PAR(parlist,check_sum); } // Script file : PACS_Spec_Gra_IST_PID_Loop_Less_OBS.cus // // Purpose : Run a loop of tens of different sets of PID parameters // // Description : For each set, performs a dozen of small and two larger movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV: added MOIS comments // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Spec_Gra_IST_PID_Loop_Less { }{ mois_comment("Start of procedure: Run a grid of less daring PID parameters"); // Register start of OBS // mois_step("Configure Nominal SPEC_HK"); debug_print("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // debug_print("Configure DIAG_HK"); mois_step("Configure DIAG_HK"); int diag_hk_period = 5; PACS_Spec_Gra_Diaghk_Setup(diag_hk_period); // mois_step("Configure Grating"); debug_print("Configure Grating"); string calUname = "CONFGrat"; string calUrow = "IST"; CONF_grating(calUname,calUrow); delay(10); // mois_step("Loop over PID parameters and perform diagnostic movements"); debug_print("PID LOOP : PIDs smaller than in FMILT"); PACS_Spec_Gra_PID_loop_Short_Less(); // mois_step("Reset Diagnostic housekeeping"); debug_print("Reset DIAG_HK"); PACS_Diaghk_Reset(); // mois_step("PACS to safe mode"); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 4x9 raster on a point source // and the noise on a off pointing position. An offset in -Y allows to // measure the noise during the last 4 pointings. // // Author : Koryo Okumura // // Version : Tue Oct 21 20:48:57 CEST 2008 // // CUS script : procedure Phot_highGainBiasDirect // // Argument : // string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // According to "select" set the photometer in a configuration before a raster // - ginit or binit : // + Set a filter corresponding to the given "selection" // + Set the biases group by group // + Set the chopper on the optical center // - in geberal : // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a raster measurement by the calling obs script PacsCal_Phot_highGainBiasDirect_Fix or PacsCal_Phot_highGainBiasDirect // - final : // + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(1, "HIGH") // procedure Phot_highGainBiasDirect { string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values }{ if(select == "ginit") { // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //************************************************* // Set the biases and start SPU, then set the gain //************************************************* // PHOT_change_biases(startBiasTable,"DIRECT","HIGH"); // //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // //********************************************************************** // Measurement // Background fluxes 1.42pW on green and 2.30pW on red //********************************************************************** // // sync the bus sync(); } if(select == "g1_0") { //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.0 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2776439136414702 Volts Pacs_BOLC_SET_VRL_G1(0.2776439136414702); // Set group 1 bol bias 20 (VH_BLIND) to 1.79684126186758 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.79684126186758); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2890061866395222 Volts Pacs_BOLC_SET_VRL_G2(0.2890061866395222); // Set group 2 bol bias 20 (VH_BLIND) to 1.7861581649966054 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7861581649966054); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2833384468436936 Volts Pacs_BOLC_SET_VRL_G3(0.2833384468436936); // Set group 3 bol bias 20 (VH_BLIND) to 1.8024780345788116 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8024780345788116); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2746570190871891 Volts Pacs_BOLC_SET_VRL_G4(0.2746570190871891); // Set group 4 bol bias 20 (VH_BLIND) to 1.7954818534723864 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.7954818534723864); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 1.8955949249965234 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8955949249965234); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 1.884813687356174 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.884813687356174); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g1_3") { //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.3 Volts, (Vh-Vl)rouge = 1.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.29 Volts Pacs_BOLC_SET_VH_G1(1.29); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3834061887804109 Volts Pacs_BOLC_SET_VRL_G1(0.3834061887804109); // Set group 1 bol bias 20 (VH_BLIND) to 1.9674397856703623 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9674397856703623); // Set group 2 bol bias 01 (VH) to 1.284113017296217 Volts Pacs_BOLC_SET_VH_G2(1.284113017296217); // Set group 2 bol bias 02 (VL) to -0.015886982703783047 Volts Pacs_BOLC_SET_VL_G2(-0.015886982703783047); // Set group 2 bol bias 03 (VRL) to 0.38762429390545 Volts Pacs_BOLC_SET_VRL_G2(0.38762429390545); // Set group 2 bol bias 20 (VH_BLIND) to 1.9719551021571464 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9719551021571464); // Set group 3 bol bias 01 (VH) to 1.28845151406453 Volts Pacs_BOLC_SET_VH_G3(1.28845151406453); // Set group 3 bol bias 02 (VL) to -0.011548485935469942 Volts Pacs_BOLC_SET_VL_G3(-0.011548485935469942); // Set group 3 bol bias 03 (VRL) to 0.3897844815031697 Volts Pacs_BOLC_SET_VRL_G3(0.3897844815031697); // Set group 3 bol bias 20 (VH_BLIND) to 1.9736628032604184 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9736628032604184); // Set group 4 bol bias 01 (VH) to 1.29 Volts Pacs_BOLC_SET_VH_G4(1.29); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3788656221074776 Volts Pacs_BOLC_SET_VRL_G4(0.3788656221074776); // Set group 4 bol bias 20 (VH_BLIND) to 1.986524384484408 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.986524384484408); // Set group 5 bol bias 01 (VH) to 1.09 Volts Pacs_BOLC_SET_VH_G5(1.09); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.446725098077655 Volts Pacs_BOLC_SET_VRL_G5(0.446725098077655); // Set group 5 bol bias 20 (VH_BLIND) to 2.068711017571996 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.068711017571996); // Set group 6 bol bias 01 (VH) to 1.09 Volts Pacs_BOLC_SET_VH_G6(1.09); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.43597421034823547 Volts Pacs_BOLC_SET_VRL_G6(0.43597421034823547); // Set group 6 bol bias 20 (VH_BLIND) to 1.9230617290722583 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9230617290722583); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g1_6") { //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4898228534292868 Volts Pacs_BOLC_SET_VH_G1(1.4898228534292868); // Set group 1 bol bias 02 (VL) to -0.11017714657071331 Volts Pacs_BOLC_SET_VL_G1(-0.11017714657071331); // Set group 1 bol bias 03 (VRL) to 0.3923048852555612 Volts Pacs_BOLC_SET_VRL_G1(0.3923048852555612); // Set group 1 bol bias 20 (VH_BLIND) to 1.9984545345292575 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9984545345292575); // Set group 2 bol bias 01 (VH) to 1.4711835386284415 Volts Pacs_BOLC_SET_VH_G2(1.4711835386284415); // Set group 2 bol bias 02 (VL) to -0.12881646137155855 Volts Pacs_BOLC_SET_VL_G2(-0.12881646137155855); // Set group 2 bol bias 03 (VRL) to 0.3873476091374273 Volts Pacs_BOLC_SET_VRL_G2(0.3873476091374273); // Set group 2 bol bias 20 (VH_BLIND) to 1.9716816973672475 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9716816973672475); // Set group 3 bol bias 01 (VH) to 1.4762420370347753 Volts Pacs_BOLC_SET_VH_G3(1.4762420370347753); // Set group 3 bol bias 02 (VL) to -0.12375796296522468 Volts Pacs_BOLC_SET_VL_G3(-0.12375796296522468); // Set group 3 bol bias 03 (VRL) to 0.3901157175186699 Volts Pacs_BOLC_SET_VRL_G3(0.3901157175186699); // Set group 3 bol bias 20 (VH_BLIND) to 1.973990615883269 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.973990615883269); // Set group 4 bol bias 01 (VH) to 1.4907471123371514 Volts Pacs_BOLC_SET_VH_G4(1.4907471123371514); // Set group 4 bol bias 02 (VL) to -0.10925288766284869 Volts Pacs_BOLC_SET_VL_G4(-0.10925288766284869); // Set group 4 bol bias 03 (VRL) to 0.3857241094797201 Volts Pacs_BOLC_SET_VRL_G4(0.3857241094797201); // Set group 4 bol bias 20 (VH_BLIND) to 1.9933124320850109 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9933124320850109); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.068111444935925 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.068111444935925); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.012187351127586 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.012187351127586); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g1_7") { //*********************************************************** // Bias 4 (Vh-Vl)bleu = 1.7 Volts, (Vh-Vl)rouge = 1.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.553795801377622 Volts Pacs_BOLC_SET_VH_G1(1.553795801377622); // Set group 1 bol bias 02 (VL) to -0.14620419862237788 Volts Pacs_BOLC_SET_VL_G1(-0.14620419862237788); // Set group 1 bol bias 03 (VRL) to 0.392364975433222 Volts Pacs_BOLC_SET_VRL_G1(0.392364975433222); // Set group 1 bol bias 20 (VH_BLIND) to 1.9985138885954257 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9985138885954257); // Set group 2 bol bias 01 (VH) to 1.5343261358590699 Volts Pacs_BOLC_SET_VH_G2(1.5343261358590699); // Set group 2 bol bias 02 (VL) to -0.1656738641409301 Volts Pacs_BOLC_SET_VL_G2(-0.1656738641409301); // Set group 2 bol bias 03 (VRL) to 0.38722633283032404 Volts Pacs_BOLC_SET_VRL_G2(0.38722633283032404); // Set group 2 bol bias 20 (VH_BLIND) to 1.971561857495417 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.971561857495417); // Set group 3 bol bias 01 (VH) to 1.5394208299417094 Volts Pacs_BOLC_SET_VH_G3(1.5394208299417094); // Set group 3 bol bias 02 (VL) to -0.1605791700582907 Volts Pacs_BOLC_SET_VL_G3(-0.1605791700582907); // Set group 3 bol bias 03 (VRL) to 0.390269980116275 Volts Pacs_BOLC_SET_VRL_G3(0.390269980116275); // Set group 3 bol bias 20 (VH_BLIND) to 1.9741432852987786 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9741432852987786); // Set group 4 bol bias 01 (VH) to 1.5559488846463139 Volts Pacs_BOLC_SET_VH_G4(1.5559488846463139); // Set group 4 bol bias 02 (VL) to -0.1440511153536862 Volts Pacs_BOLC_SET_VL_G4(-0.1440511153536862); // Set group 4 bol bias 03 (VRL) to 0.38713031955403265 Volts Pacs_BOLC_SET_VRL_G4(0.38713031955403265); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947039934585833 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947039934585833); // Set group 5 bol bias 01 (VH) to 1.2089586002564683 Volts Pacs_BOLC_SET_VH_G5(1.2089586002564683); // Set group 5 bol bias 02 (VL) to -0.09104139974353168 Volts Pacs_BOLC_SET_VL_G5(-0.09104139974353168); // Set group 5 bol bias 03 (VRL) to 0.445429449204345 Volts Pacs_BOLC_SET_VRL_G5(0.445429449204345); // Set group 5 bol bias 20 (VH_BLIND) to 2.067414949438398 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.067414949438398); // Set group 6 bol bias 01 (VH) to 1.2106090480442855 Volts Pacs_BOLC_SET_VH_G6(1.2106090480442855); // Set group 6 bol bias 02 (VL) to -0.08939095195571448 Volts Pacs_BOLC_SET_VL_G6(-0.08939095195571448); // Set group 6 bol bias 03 (VRL) to 0.43499214581642076 Volts Pacs_BOLC_SET_VRL_G6(0.43499214581642076); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109671694073814 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109671694073814); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g1_8") { //*********************************************************** // Bias 5 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6185298975985711 Volts Pacs_BOLC_SET_VH_G1(1.6185298975985711); // Set group 1 bol bias 02 (VL) to -0.1814701024014289 Volts Pacs_BOLC_SET_VL_G1(-0.1814701024014289); // Set group 1 bol bias 03 (VRL) to 0.39231127971620416 Volts Pacs_BOLC_SET_VRL_G1(0.39231127971620416); // Set group 1 bol bias 20 (VH_BLIND) to 1.998460850669261 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.998460850669261); // Set group 2 bol bias 01 (VH) to 1.5985355662912417 Volts Pacs_BOLC_SET_VH_G2(1.5985355662912417); // Set group 2 bol bias 02 (VL) to -0.20146443370875833 Volts Pacs_BOLC_SET_VL_G2(-0.20146443370875833); // Set group 2 bol bias 03 (VRL) to 0.38711511058871395 Volts Pacs_BOLC_SET_VRL_G2(0.38711511058871395); // Set group 2 bol bias 20 (VH_BLIND) to 1.971451951939611 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.971451951939611); // Set group 3 bol bias 01 (VH) to 1.6035629087421028 Volts Pacs_BOLC_SET_VH_G3(1.6035629087421028); // Set group 3 bol bias 02 (VL) to -0.1964370912578972 Volts Pacs_BOLC_SET_VL_G3(-0.1964370912578972); // Set group 3 bol bias 03 (VRL) to 0.39047291861295175 Volts Pacs_BOLC_SET_VRL_G3(0.39047291861295175); // Set group 3 bol bias 20 (VH_BLIND) to 1.9743441290186232 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9743441290186232); // Set group 4 bol bias 01 (VH) to 1.6212519863149641 Volts Pacs_BOLC_SET_VH_G4(1.6212519863149641); // Set group 4 bol bias 02 (VL) to -0.1787480136850359 Volts Pacs_BOLC_SET_VL_G4(-0.1787480136850359); // Set group 4 bol bias 03 (VRL) to 0.38757610486445004 Volts Pacs_BOLC_SET_VRL_G4(0.38757610486445004); // Set group 4 bol bias 20 (VH_BLIND) to 1.9951451203049169 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9951451203049169); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.0667806623904608 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0667806623904608); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.0097642426404527 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0097642426404527); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g1_9") { //*********************************************************** // Bias 6 (Vh-Vl)bleu = 1.9 Volts, (Vh-Vl)rouge = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.684314034871572 Volts Pacs_BOLC_SET_VH_G1(1.684314034871572); // Set group 1 bol bias 02 (VL) to -0.21568596512842786 Volts Pacs_BOLC_SET_VL_G1(-0.21568596512842786); // Set group 1 bol bias 03 (VRL) to 0.3921987231252084 Volts Pacs_BOLC_SET_VRL_G1(0.3921987231252084); // Set group 1 bol bias 20 (VH_BLIND) to 1.9761274500462236 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9761274500462236); // Set group 2 bol bias 01 (VH) to 1.663410895780499 Volts Pacs_BOLC_SET_VH_G2(1.663410895780499); // Set group 2 bol bias 02 (VL) to -0.23658910421950097 Volts Pacs_BOLC_SET_VL_G2(-0.23658910421950097); // Set group 2 bol bias 03 (VRL) to 0.38696454357136256 Volts Pacs_BOLC_SET_VRL_G2(0.38696454357136256); // Set group 2 bol bias 20 (VH_BLIND) to 1.9713031663695206 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9713031663695206); // Set group 3 bol bias 01 (VH) to 1.6684702792161694 Volts Pacs_BOLC_SET_VH_G3(1.6684702792161694); // Set group 3 bol bias 02 (VL) to -0.2315297207838305 Volts Pacs_BOLC_SET_VL_G3(-0.2315297207838305); // Set group 3 bol bias 03 (VRL) to 0.3907271436294628 Volts Pacs_BOLC_SET_VRL_G3(0.3907271436294628); // Set group 3 bol bias 20 (VH_BLIND) to 1.974595731657704 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974595731657704); // Set group 4 bol bias 01 (VH) to 1.6875516827707004 Volts Pacs_BOLC_SET_VH_G4(1.6875516827707004); // Set group 4 bol bias 02 (VL) to -0.21244831722929947 Volts Pacs_BOLC_SET_VL_G4(-0.21244831722929947); // Set group 4 bol bias 03 (VRL) to 0.38827019602521584 Volts Pacs_BOLC_SET_VRL_G4(0.38827019602521584); // Set group 4 bol bias 20 (VH_BLIND) to 1.9958319441608174 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9958319441608174); // Set group 5 bol bias 01 (VH) to 1.3332434971838967 Volts Pacs_BOLC_SET_VH_G5(1.3332434971838967); // Set group 5 bol bias 02 (VL) to -0.16675650281610324 Volts Pacs_BOLC_SET_VL_G5(-0.16675650281610324); // Set group 5 bol bias 03 (VRL) to 0.4442147514136051 Volts Pacs_BOLC_SET_VRL_G5(0.4442147514136051); // Set group 5 bol bias 20 (VH_BLIND) to 2.0661998167496693 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0661998167496693); // Set group 6 bol bias 01 (VH) to 1.3349423068237756 Volts Pacs_BOLC_SET_VH_G6(1.3349423068237756); // Set group 6 bol bias 02 (VL) to -0.16505769317622435 Volts Pacs_BOLC_SET_VL_G6(-0.16505769317622435); // Set group 6 bol bias 03 (VRL) to 0.4327262625724114 Volts Pacs_BOLC_SET_VRL_G6(0.4327262625724114); // Set group 6 bol bias 20 (VH_BLIND) to 2.0086986766970316 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0086986766970316); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_0") { //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.75094768124925 Volts Pacs_BOLC_SET_VH_G1(1.75094768124925); // Set group 1 bol bias 02 (VL) to -0.24905231875075018 Volts Pacs_BOLC_SET_VL_G1(-0.24905231875075018); // Set group 1 bol bias 03 (VRL) to 0.3918388258383415 Volts Pacs_BOLC_SET_VRL_G1(0.3918388258383415); // Set group 1 bol bias 20 (VH_BLIND) to 1.9757719534369664 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9757719534369664); // Set group 2 bol bias 01 (VH) to 1.7296294246267632 Volts Pacs_BOLC_SET_VH_G2(1.7296294246267632); // Set group 2 bol bias 02 (VL) to -0.2703705753732367 Volts Pacs_BOLC_SET_VL_G2(-0.2703705753732367); // Set group 2 bol bias 03 (VRL) to 0.38693824560138157 Volts Pacs_BOLC_SET_VRL_G2(0.38693824560138157); // Set group 2 bol bias 20 (VH_BLIND) to 1.9712771794265684 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9712771794265684); // Set group 3 bol bias 01 (VH) to 1.7452969724184209 Volts Pacs_BOLC_SET_VH_G3(1.7452969724184209); // Set group 3 bol bias 02 (VL) to -0.2547030275815792 Volts Pacs_BOLC_SET_VL_G3(-0.2547030275815792); // Set group 3 bol bias 03 (VRL) to 0.4019047966425416 Volts Pacs_BOLC_SET_VRL_G3(0.4019047966425416); // Set group 3 bol bias 20 (VH_BLIND) to 1.9856555083999508 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9856555083999508); // Set group 4 bol bias 01 (VH) to 1.7549351960384105 Volts Pacs_BOLC_SET_VH_G4(1.7549351960384105); // Set group 4 bol bias 02 (VL) to -0.24506480396158947 Volts Pacs_BOLC_SET_VL_G4(-0.24506480396158947); // Set group 4 bol bias 03 (VRL) to 0.38892171880861637 Volts Pacs_BOLC_SET_VRL_G4(0.38892171880861637); // Set group 4 bol bias 20 (VH_BLIND) to 1.9964766297831422 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9964766297831422); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.065121545980251 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.065121545980251); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.007847241241843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007847241241843); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_1") { //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.1 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8196920328905113 Volts Pacs_BOLC_SET_VH_G1(1.8196920328905113); // Set group 1 bol bias 02 (VL) to -0.2803079671094888 Volts Pacs_BOLC_SET_VL_G1(-0.2803079671094888); // Set group 1 bol bias 03 (VRL) to 0.3915675288160809 Volts Pacs_BOLC_SET_VRL_G1(0.3915675288160809); // Set group 1 bol bias 20 (VH_BLIND) to 1.9977261898474725 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9977261898474725); // Set group 2 bol bias 01 (VH) to 1.7968056027257062 Volts Pacs_BOLC_SET_VH_G2(1.7968056027257062); // Set group 2 bol bias 02 (VL) to -0.30319439727429376 Volts Pacs_BOLC_SET_VL_G2(-0.30319439727429376); // Set group 2 bol bias 03 (VRL) to 0.3865891681835424 Volts Pacs_BOLC_SET_VRL_G2(0.3865891681835424); // Set group 2 bol bias 20 (VH_BLIND) to 1.97093222718534 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.97093222718534); // Set group 3 bol bias 01 (VH) to 1.8128700429823483 Volts Pacs_BOLC_SET_VH_G3(1.8128700429823483); // Set group 3 bol bias 02 (VL) to -0.2871299570176517 Volts Pacs_BOLC_SET_VL_G3(-0.2871299570176517); // Set group 3 bol bias 03 (VRL) to 0.40219224384687763 Volts Pacs_BOLC_SET_VRL_G3(0.40219224384687763); // Set group 3 bol bias 20 (VH_BLIND) to 1.985939107861719 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.985939107861719); // Set group 4 bol bias 01 (VH) to 1.8240504309745234 Volts Pacs_BOLC_SET_VH_G4(1.8240504309745234); // Set group 4 bol bias 02 (VL) to -0.27594956902547685 Volts Pacs_BOLC_SET_VL_G4(-0.27594956902547685); // Set group 4 bol bias 03 (VRL) to 0.38944325059262186 Volts Pacs_BOLC_SET_VRL_G4(0.38944325059262186); // Set group 4 bol bias 20 (VH_BLIND) to 1.9969926776916185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9969926776916185); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.064200158789736 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.064200158789736); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.0287034385990768 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0287034385990768); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_2") { //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.890681494558962 Volts Pacs_BOLC_SET_VH_G1(1.890681494558962); // Set group 1 bol bias 02 (VL) to -0.3093185054410381 Volts Pacs_BOLC_SET_VL_G1(-0.3093185054410381); // Set group 1 bol bias 03 (VRL) to 0.3917523448287743 Volts Pacs_BOLC_SET_VRL_G1(0.3917523448287743); // Set group 1 bol bias 20 (VH_BLIND) to 1.9756865285070841 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9756865285070841); // Set group 2 bol bias 01 (VH) to 1.8663718692560345 Volts Pacs_BOLC_SET_VH_G2(1.8663718692560345); // Set group 2 bol bias 02 (VL) to -0.3336281307439657 Volts Pacs_BOLC_SET_VL_G2(-0.3336281307439657); // Set group 2 bol bias 03 (VRL) to 0.38636444827987804 Volts Pacs_BOLC_SET_VRL_G2(0.38636444827987804); // Set group 2 bol bias 20 (VH_BLIND) to 1.9929323817812374 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9929323817812374); // Set group 3 bol bias 01 (VH) to 1.8822555709559037 Volts Pacs_BOLC_SET_VH_G3(1.8822555709559037); // Set group 3 bol bias 02 (VL) to -0.31774442904409644 Volts Pacs_BOLC_SET_VL_G3(-0.31774442904409644); // Set group 3 bol bias 03 (VRL) to 0.40243473364556764 Volts Pacs_BOLC_SET_VRL_G3(0.40243473364556764); // Set group 3 bol bias 20 (VH_BLIND) to 1.9861783542754332 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9861783542754332); // Set group 4 bol bias 01 (VH) to 1.8950882855643336 Volts Pacs_BOLC_SET_VH_G4(1.8950882855643336); // Set group 4 bol bias 02 (VL) to -0.30491171443566656 Volts Pacs_BOLC_SET_VL_G4(-0.30491171443566656); // Set group 4 bol bias 03 (VRL) to 0.3900970801029475 Volts Pacs_BOLC_SET_VRL_G4(0.3900970801029475); // Set group 4 bol bias 20 (VH_BLIND) to 1.9976396185873586 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9976396185873586); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.074285797842026 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.074285797842026); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.027606349752427 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.027606349752427); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_3") { //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.3 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9748660405527547 Volts Pacs_BOLC_SET_VH_G1(1.9748660405527547); // Set group 1 bol bias 02 (VL) to -0.32513395944724516 Volts Pacs_BOLC_SET_VL_G1(-0.32513395944724516); // Set group 1 bol bias 03 (VRL) to 0.4024226822338744 Volts Pacs_BOLC_SET_VRL_G1(0.4024226822338744); // Set group 1 bol bias 20 (VH_BLIND) to 2.0084393426211573 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0084393426211573); // Set group 2 bol bias 01 (VH) to 1.9372456451658073 Volts Pacs_BOLC_SET_VH_G2(1.9372456451658073); // Set group 2 bol bias 02 (VL) to -0.3627543548341924 Volts Pacs_BOLC_SET_VL_G2(-0.3627543548341924); // Set group 2 bol bias 03 (VRL) to 0.3853165410903111 Volts Pacs_BOLC_SET_VRL_G2(0.3853165410903111); // Set group 2 bol bias 20 (VH_BLIND) to 1.9918968082675 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9918968082675); // Set group 3 bol bias 01 (VH) to 1.9538743684629092 Volts Pacs_BOLC_SET_VH_G3(1.9538743684629092); // Set group 3 bol bias 02 (VL) to -0.3461256315370906 Volts Pacs_BOLC_SET_VL_G3(-0.3461256315370906); // Set group 3 bol bias 03 (VRL) to 0.4025461948200347 Volts Pacs_BOLC_SET_VRL_G3(0.4025461948200347); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862883254046149 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862883254046149); // Set group 4 bol bias 01 (VH) to 1.9682290691042088 Volts Pacs_BOLC_SET_VH_G4(1.9682290691042088); // Set group 4 bol bias 02 (VL) to -0.331770930895791 Volts Pacs_BOLC_SET_VL_G4(-0.331770930895791); // Set group 4 bol bias 03 (VRL) to 0.39043591694382773 Volts Pacs_BOLC_SET_VRL_G4(0.39043591694382773); // Set group 4 bol bias 20 (VH_BLIND) to 1.9979748795440542 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9979748795440542); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.0731479067390954 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0731479067390954); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.0041427459870786 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0041427459870786); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_4") { //*********************************************************** // Bias 11 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0510755774018183 Volts Pacs_BOLC_SET_VH_G1(2.0510755774018183); // Set group 1 bol bias 02 (VL) to -0.3489244225981816 Volts Pacs_BOLC_SET_VL_G1(-0.3489244225981816); // Set group 1 bol bias 03 (VRL) to 0.4021120862067234 Volts Pacs_BOLC_SET_VRL_G1(0.4021120862067234); // Set group 1 bol bias 20 (VH_BLIND) to 2.008133671983503 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.008133671983503); // Set group 2 bol bias 01 (VH) to 2.0107886557188914 Volts Pacs_BOLC_SET_VH_G2(2.0107886557188914); // Set group 2 bol bias 02 (VL) to -0.38921134428110826 Volts Pacs_BOLC_SET_VL_G2(-0.38921134428110826); // Set group 2 bol bias 03 (VRL) to 0.38461013849643855 Volts Pacs_BOLC_SET_VRL_G2(0.38461013849643855); // Set group 2 bol bias 20 (VH_BLIND) to 1.9689764657635813 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9689764657635813); // Set group 3 bol bias 01 (VH) to 2.0388571160526703 Volts Pacs_BOLC_SET_VH_G3(2.0388571160526703); // Set group 3 bol bias 02 (VL) to -0.3611428839473296 Volts Pacs_BOLC_SET_VL_G3(-0.3611428839473296); // Set group 3 bol bias 03 (VRL) to 0.4136945413046918 Volts Pacs_BOLC_SET_VRL_G3(0.4136945413046918); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973519597252405 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973519597252405); // Set group 4 bol bias 01 (VH) to 2.0443158228280107 Volts Pacs_BOLC_SET_VH_G4(2.0443158228280107); // Set group 4 bol bias 02 (VL) to -0.3556841771719893 Volts Pacs_BOLC_SET_VL_G4(-0.3556841771719893); // Set group 4 bol bias 03 (VRL) to 0.3910064705976972 Volts Pacs_BOLC_SET_VRL_G4(0.3910064705976972); // Set group 4 bol bias 20 (VH_BLIND) to 1.9985394027048364 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9985394027048364); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.0718745871509667 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0718745871509667); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.002949534142909 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002949534142909); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_5") { //*********************************************************** // Bias 12 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.141863964173851 Volts Pacs_BOLC_SET_VH_G1(2.141863964173851); // Set group 1 bol bias 02 (VL) to -0.3581360358261492 Volts Pacs_BOLC_SET_VL_G1(-0.3581360358261492); // Set group 1 bol bias 03 (VRL) to 0.4132145913512382 Volts Pacs_BOLC_SET_VRL_G1(0.4132145913512382); // Set group 1 bol bias 20 (VH_BLIND) to 2.019136318739582 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.019136318739582); // Set group 2 bol bias 01 (VH) to 2.087688345362657 Volts Pacs_BOLC_SET_VH_G2(2.087688345362657); // Set group 2 bol bias 02 (VL) to -0.412311654637343 Volts Pacs_BOLC_SET_VL_G2(-0.412311654637343); // Set group 2 bol bias 03 (VRL) to 0.3844202473320535 Volts Pacs_BOLC_SET_VRL_G2(0.3844202473320535); // Set group 2 bol bias 20 (VH_BLIND) to 1.968788796619974 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.968788796619974); // Set group 3 bol bias 01 (VH) to 2.1160161577608605 Volts Pacs_BOLC_SET_VH_G3(2.1160161577608605); // Set group 3 bol bias 02 (VL) to -0.38398384223913934 Volts Pacs_BOLC_SET_VL_G3(-0.38398384223913934); // Set group 3 bol bias 03 (VRL) to 0.41383314214155126 Volts Pacs_BOLC_SET_VRL_G3(0.41383314214155126); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974900188654223 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974900188654223); // Set group 4 bol bias 01 (VH) to 2.123396268577534 Volts Pacs_BOLC_SET_VH_G4(2.123396268577534); // Set group 4 bol bias 02 (VL) to -0.37660373142246617 Volts Pacs_BOLC_SET_VL_G4(-0.37660373142246617); // Set group 4 bol bias 03 (VRL) to 0.39171130766035356 Volts Pacs_BOLC_SET_VRL_G4(0.39171130766035356); // Set group 4 bol bias 20 (VH_BLIND) to 1.999236774009823 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.999236774009823); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.048206027978785 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.048206027978785); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.001912280803601 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.001912280803601); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_6") { //*********************************************************** // Bias 13 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2256987621800386 Volts Pacs_BOLC_SET_VH_G1(2.2256987621800386); // Set group 1 bol bias 02 (VL) to -0.37430123781996166 Volts Pacs_BOLC_SET_VL_G1(-0.37430123781996166); // Set group 1 bol bias 03 (VRL) to 0.41334172597806756 Volts Pacs_BOLC_SET_VRL_G1(0.41334172597806756); // Set group 1 bol bias 20 (VH_BLIND) to 2.0192631495623288 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0192631495623288); // Set group 2 bol bias 01 (VH) to 2.1673874562213715 Volts Pacs_BOLC_SET_VH_G2(2.1673874562213715); // Set group 2 bol bias 02 (VL) to -0.4326125437786287 Volts Pacs_BOLC_SET_VL_G2(-0.4326125437786287); // Set group 2 bol bias 03 (VRL) to 0.38321731411378657 Volts Pacs_BOLC_SET_VRL_G2(0.38321731411378657); // Set group 2 bol bias 20 (VH_BLIND) to 1.989822118649329 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.989822118649329); // Set group 3 bol bias 01 (VH) to 2.196655238181291 Volts Pacs_BOLC_SET_VH_G3(2.196655238181291); // Set group 3 bol bias 02 (VL) to -0.4033447618187093 Volts Pacs_BOLC_SET_VL_G3(-0.4033447618187093); // Set group 3 bol bias 03 (VRL) to 0.41376523915084223 Volts Pacs_BOLC_SET_VRL_G3(0.41376523915084223); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974223811023644 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974223811023644); // Set group 4 bol bias 01 (VH) to 2.218046432212362 Volts Pacs_BOLC_SET_VH_G4(2.218046432212362); // Set group 4 bol bias 02 (VL) to -0.38195356778763806 Volts Pacs_BOLC_SET_VL_G4(-0.38195356778763806); // Set group 4 bol bias 03 (VRL) to 0.40418226637506666 Volts Pacs_BOLC_SET_VRL_G4(0.40418226637506666); // Set group 4 bol bias 20 (VH_BLIND) to 2.0115372929968998 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0115372929968998); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.0463942469570053 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0463942469570053); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.0006318376397165 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0006318376397165); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_7") { //*********************************************************** // Bias 14 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3027400499749207 Volts Pacs_BOLC_SET_VH_G1(2.3027400499749207); // Set group 1 bol bias 02 (VL) to -0.39725995002507947 Volts Pacs_BOLC_SET_VL_G1(-0.39725995002507947); // Set group 1 bol bias 03 (VRL) to 0.40272899534103074 Volts Pacs_BOLC_SET_VRL_G1(0.40272899534103074); // Set group 1 bol bias 20 (VH_BLIND) to 2.0087408018201445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0087408018201445); // Set group 2 bol bias 01 (VH) to 2.2502943789269274 Volts Pacs_BOLC_SET_VH_G2(2.2502943789269274); // Set group 2 bol bias 02 (VL) to -0.44970562107307277 Volts Pacs_BOLC_SET_VL_G2(-0.44970562107307277); // Set group 2 bol bias 03 (VRL) to 0.3821481123878546 Volts Pacs_BOLC_SET_VRL_G2(0.3821481123878546); // Set group 2 bol bias 20 (VH_BLIND) to 1.9887653273014994 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9887653273014994); // Set group 3 bol bias 01 (VH) to 2.281312093939765 Volts Pacs_BOLC_SET_VH_G3(2.281312093939765); // Set group 3 bol bias 02 (VL) to -0.41868790606023504 Volts Pacs_BOLC_SET_VL_G3(-0.41868790606023504); // Set group 3 bol bias 03 (VRL) to 0.4135199829327442 Volts Pacs_BOLC_SET_VRL_G3(0.4135199829327442); // Set group 3 bol bias 20 (VH_BLIND) to 2.019400307617367 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.019400307617367); // Set group 4 bol bias 01 (VH) to 2.3048355981797632 Volts Pacs_BOLC_SET_VH_G4(2.3048355981797632); // Set group 4 bol bias 02 (VL) to -0.3951644018202371 Volts Pacs_BOLC_SET_VL_G4(-0.3951644018202371); // Set group 4 bol bias 03 (VRL) to 0.4047108757091467 Volts Pacs_BOLC_SET_VRL_G4(0.4047108757091467); // Set group 4 bol bias 20 (VH_BLIND) to 2.0342776237002314 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0342776237002314); // Set group 5 bol bias 01 (VH) to 1.8750953709068052 Volts Pacs_BOLC_SET_VH_G5(1.8750953709068052); // Set group 5 bol bias 02 (VL) to -0.4249046290931945 Volts Pacs_BOLC_SET_VL_G5(-0.4249046290931945); // Set group 5 bol bias 03 (VRL) to 0.43370653033645856 Volts Pacs_BOLC_SET_VRL_G5(0.43370653033645856); // Set group 5 bol bias 20 (VH_BLIND) to 2.0556861431432893 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0556861431432893); // Set group 6 bol bias 01 (VH) to 1.8856741862400788 Volts Pacs_BOLC_SET_VH_G6(1.8856741862400788); // Set group 6 bol bias 02 (VL) to -0.41432581375992095 Volts Pacs_BOLC_SET_VL_G6(-0.41432581375992095); // Set group 6 bol bias 03 (VRL) to 0.42291832819761155 Volts Pacs_BOLC_SET_VRL_G6(0.42291832819761155); // Set group 6 bol bias 20 (VH_BLIND) to 1.9988851479675354 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9988851479675354); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_8") { //*********************************************************** // Bias 15 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.395507062486896 Volts Pacs_BOLC_SET_VH_G1(2.395507062486896); // Set group 1 bol bias 02 (VL) to -0.40449293751310383 Volts Pacs_BOLC_SET_VL_G1(-0.40449293751310383); // Set group 1 bol bias 03 (VRL) to 0.4022786181150652 Volts Pacs_BOLC_SET_VRL_G1(0.4022786181150652); // Set group 1 bol bias 20 (VH_BLIND) to 2.0082975625991226 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0082975625991226); // Set group 2 bol bias 01 (VH) to 2.34958994940408 Volts Pacs_BOLC_SET_VH_G2(2.34958994940408); // Set group 2 bol bias 02 (VL) to -0.45041005059591976 Volts Pacs_BOLC_SET_VL_G2(-0.45041005059591976); // Set group 2 bol bias 03 (VRL) to 0.391929253229261 Volts Pacs_BOLC_SET_VRL_G2(0.391929253229261); // Set group 2 bol bias 20 (VH_BLIND) to 1.9984307424252745 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9984307424252745); // Set group 3 bol bias 01 (VH) to 2.3707372684933423 Volts Pacs_BOLC_SET_VH_G3(2.3707372684933423); // Set group 3 bol bias 02 (VL) to -0.42926273150665745 Volts Pacs_BOLC_SET_VL_G3(-0.42926273150665745); // Set group 3 bol bias 03 (VRL) to 0.41275038580235307 Volts Pacs_BOLC_SET_VRL_G3(0.41275038580235307); // Set group 3 bol bias 20 (VH_BLIND) to 2.01863375038599 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.01863375038599); // Set group 4 bol bias 01 (VH) to 2.385042148169664 Volts Pacs_BOLC_SET_VH_G4(2.385042148169664); // Set group 4 bol bias 02 (VL) to -0.41495785183033584 Volts Pacs_BOLC_SET_VL_G4(-0.41495785183033584); // Set group 4 bol bias 03 (VRL) to 0.39415765634553757 Volts Pacs_BOLC_SET_VRL_G4(0.39415765634553757); // Set group 4 bol bias 20 (VH_BLIND) to 2.001657073771402 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001657073771402); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.0194454064367697 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0194454064367697); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 1.997491742243546 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.997491742243546); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_9") { //*********************************************************** // Bias 16 (Vh-Vl)bleu = 2.9 Volts, (Vh-Vl)rouge = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.526668083074454 Volts Pacs_BOLC_SET_VH_G1(2.526668083074454); // Set group 1 bol bias 02 (VL) to -0.37333191692554596 Volts Pacs_BOLC_SET_VL_G1(-0.37333191692554596); // Set group 1 bol bias 03 (VRL) to 0.4353877096069227 Volts Pacs_BOLC_SET_VRL_G1(0.4353877096069227); // Set group 1 bol bias 20 (VH_BLIND) to 1.9968212973244188 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9968212973244188); // Set group 2 bol bias 01 (VH) to 2.442945947627277 Volts Pacs_BOLC_SET_VH_G2(2.442945947627277); // Set group 2 bol bias 02 (VL) to -0.457054052372723 Volts Pacs_BOLC_SET_VL_G2(-0.457054052372723); // Set group 2 bol bias 03 (VRL) to 0.3922330701698321 Volts Pacs_BOLC_SET_VRL_G2(0.3922330701698321); // Set group 2 bol bias 20 (VH_BLIND) to 1.9987308858583168 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9987308858583168); // Set group 3 bol bias 01 (VH) to 2.465059889333614 Volts Pacs_BOLC_SET_VH_G3(2.465059889333614); // Set group 3 bol bias 02 (VL) to -0.43494011066638616 Volts Pacs_BOLC_SET_VL_G3(-0.43494011066638616); // Set group 3 bol bias 03 (VRL) to 0.41177362659995964 Volts Pacs_BOLC_SET_VRL_G3(0.41177362659995964); // Set group 3 bol bias 20 (VH_BLIND) to 2.017660905892856 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.017660905892856); // Set group 4 bol bias 01 (VH) to 2.4805635084624402 Volts Pacs_BOLC_SET_VH_G4(2.4805635084624402); // Set group 4 bol bias 02 (VL) to -0.4194364915375597 Volts Pacs_BOLC_SET_VL_G4(-0.4194364915375597); // Set group 4 bol bias 03 (VRL) to 0.3941180925800276 Volts Pacs_BOLC_SET_VRL_G4(0.3941180925800276); // Set group 4 bol bias 20 (VH_BLIND) to 2.023840155195675 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023840155195675); // Set group 5 bol bias 01 (VH) to 2.0172152843549696 Volts Pacs_BOLC_SET_VH_G5(2.0172152843549696); // Set group 5 bol bias 02 (VL) to -0.4827847156450306 Volts Pacs_BOLC_SET_VL_G5(-0.4827847156450306); // Set group 5 bol bias 03 (VRL) to 0.40545852941945987 Volts Pacs_BOLC_SET_VRL_G5(0.40545852941945987); // Set group 5 bol bias 20 (VH_BLIND) to 2.005198881800527 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.005198881800527); // Set group 6 bol bias 01 (VH) to 2.054760897006141 Volts Pacs_BOLC_SET_VH_G6(2.054760897006141); // Set group 6 bol bias 02 (VL) to -0.44523910299385916 Volts Pacs_BOLC_SET_VL_G6(-0.44523910299385916); // Set group 6 bol bias 03 (VRL) to 0.41996878469383536 Volts Pacs_BOLC_SET_VRL_G6(0.41996878469383536); // Set group 6 bol bias 20 (VH_BLIND) to 1.995934582950207 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.995934582950207); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g3_0") { //*********************************************************** // Bias 17 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.630480092102173 Volts Pacs_BOLC_SET_VH_G1(2.630480092102173); // Set group 1 bol bias 02 (VL) to -0.369519907897827 Volts Pacs_BOLC_SET_VL_G1(-0.369519907897827); // Set group 1 bol bias 03 (VRL) to 0.43563232543788716 Volts Pacs_BOLC_SET_VRL_G1(0.43563232543788716); // Set group 1 bol bias 20 (VH_BLIND) to 1.9970659739489551 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9970659739489551); // Set group 2 bol bias 01 (VH) to 2.540806848783851 Volts Pacs_BOLC_SET_VH_G2(2.540806848783851); // Set group 2 bol bias 02 (VL) to -0.459193151216149 Volts Pacs_BOLC_SET_VL_G2(-0.459193151216149); // Set group 2 bol bias 03 (VRL) to 0.3915670429941497 Volts Pacs_BOLC_SET_VRL_G2(0.3915670429941497); // Set group 2 bol bias 20 (VH_BLIND) to 1.9980729055318742 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9980729055318742); // Set group 3 bol bias 01 (VH) to 2.566432198930704 Volts Pacs_BOLC_SET_VH_G3(2.566432198930704); // Set group 3 bol bias 02 (VL) to -0.4335678010692957 Volts Pacs_BOLC_SET_VL_G3(-0.4335678010692957); // Set group 3 bol bias 03 (VRL) to 0.4115794454004439 Volts Pacs_BOLC_SET_VRL_G3(0.4115794454004439); // Set group 3 bol bias 20 (VH_BLIND) to 1.995245288255046 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995245288255046); // Set group 4 bol bias 01 (VH) to 2.6034961033850488 Volts Pacs_BOLC_SET_VH_G4(2.6034961033850488); // Set group 4 bol bias 02 (VL) to -0.39650389661495106 Volts Pacs_BOLC_SET_VL_G4(-0.39650389661495106); // Set group 4 bol bias 03 (VRL) to 0.4162615057139231 Volts Pacs_BOLC_SET_VRL_G4(0.4162615057139231); // Set group 4 bol bias 20 (VH_BLIND) to 2.001247804904634 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001247804904634); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 1.979399868370715 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.979399868370715); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 1.9973600513241785 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9973600513241785); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g3_1") { //*********************************************************** // Bias 18 (Vh-Vl)bleu = 3.1 Volts, (Vh-Vl)rouge = 2.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.740594801361542 Volts Pacs_BOLC_SET_VH_G1(2.740594801361542); // Set group 1 bol bias 02 (VL) to -0.35940519863845805 Volts Pacs_BOLC_SET_VL_G1(-0.35940519863845805); // Set group 1 bol bias 03 (VRL) to 0.43627325578259074 Volts Pacs_BOLC_SET_VRL_G1(0.43627325578259074); // Set group 1 bol bias 20 (VH_BLIND) to 2.0199292568429272 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0199292568429272); // Set group 2 bol bias 01 (VH) to 2.6565685093050897 Volts Pacs_BOLC_SET_VH_G2(2.6565685093050897); // Set group 2 bol bias 02 (VL) to -0.44343149069491017 Volts Pacs_BOLC_SET_VL_G2(-0.44343149069491017); // Set group 2 bol bias 03 (VRL) to 0.40334728547025434 Volts Pacs_BOLC_SET_VRL_G2(0.40334728547025434); // Set group 2 bol bias 20 (VH_BLIND) to 1.987454959689552 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.987454959689552); // Set group 3 bol bias 01 (VH) to 2.697316024074022 Volts Pacs_BOLC_SET_VH_G3(2.697316024074022); // Set group 3 bol bias 02 (VL) to -0.40268397592597777 Volts Pacs_BOLC_SET_VL_G3(-0.40268397592597777); // Set group 3 bol bias 03 (VRL) to 0.4342612489966317 Volts Pacs_BOLC_SET_VRL_G3(0.4342612489966317); // Set group 3 bol bias 20 (VH_BLIND) to 1.995630864327535 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995630864327535); // Set group 4 bol bias 01 (VH) to 2.7080390437815396 Volts Pacs_BOLC_SET_VH_G4(2.7080390437815396); // Set group 4 bol bias 02 (VL) to -0.39196095621846067 Volts Pacs_BOLC_SET_VL_G4(-0.39196095621846067); // Set group 4 bol bias 03 (VRL) to 0.4151059942714865 Volts Pacs_BOLC_SET_VRL_G4(0.4151059942714865); // Set group 4 bol bias 20 (VH_BLIND) to 2.0223268118825852 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0223268118825852); // Set group 5 bol bias 01 (VH) to 2.2255336452621894 Volts Pacs_BOLC_SET_VH_G5(2.2255336452621894); // Set group 5 bol bias 02 (VL) to -0.4744663547378106 Volts Pacs_BOLC_SET_VL_G5(-0.4744663547378106); // Set group 5 bol bias 03 (VRL) to 0.42066073283052474 Volts Pacs_BOLC_SET_VRL_G5(0.42066073283052474); // Set group 5 bol bias 20 (VH_BLIND) to 1.953699996477935 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.953699996477935); // Set group 6 bol bias 01 (VH) to 2.249863335977282 Volts Pacs_BOLC_SET_VH_G6(2.249863335977282); // Set group 6 bol bias 02 (VL) to -0.45013666402271824 Volts Pacs_BOLC_SET_VL_G6(-0.45013666402271824); // Set group 6 bol bias 03 (VRL) to 0.422993520840218 Volts Pacs_BOLC_SET_VRL_G6(0.422993520840218); // Set group 6 bol bias 20 (VH_BLIND) to 1.9989603706454033 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9989603706454033); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g3_3") { //*********************************************************** // Bias 19 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.972422360482121 Volts Pacs_BOLC_SET_VH_G1(2.972422360482121); // Set group 1 bol bias 02 (VL) to -0.32757763951787894 Volts Pacs_BOLC_SET_VL_G1(-0.32757763951787894); // Set group 1 bol bias 03 (VRL) to 0.4341517514104592 Volts Pacs_BOLC_SET_VRL_G1(0.4341517514104592); // Set group 1 bol bias 20 (VH_BLIND) to 2.0178071607966555 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0178071607966555); // Set group 2 bol bias 01 (VH) to 2.891238142334606 Volts Pacs_BOLC_SET_VH_G2(2.891238142334606); // Set group 2 bol bias 02 (VL) to -0.40876185766539386 Volts Pacs_BOLC_SET_VL_G2(-0.40876185766539386); // Set group 2 bol bias 03 (VRL) to 0.4148225819277238 Volts Pacs_BOLC_SET_VRL_G2(0.4148225819277238); // Set group 2 bol bias 20 (VH_BLIND) to 2.0210055496498964 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0210055496498964); // Set group 3 bol bias 01 (VH) to 2.9324080525236766 Volts Pacs_BOLC_SET_VH_G3(2.9324080525236766); // Set group 3 bol bias 02 (VL) to -0.367591947476323 Volts Pacs_BOLC_SET_VL_G3(-0.367591947476323); // Set group 3 bol bias 03 (VRL) to 0.43350221229296976 Volts Pacs_BOLC_SET_VRL_G3(0.43350221229296976); // Set group 3 bol bias 20 (VH_BLIND) to 2.0170951356375486 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0170951356375486); // Set group 4 bol bias 01 (VH) to 2.9354718512000026 Volts Pacs_BOLC_SET_VH_G4(2.9354718512000026); // Set group 4 bol bias 02 (VL) to -0.364528148799997 Volts Pacs_BOLC_SET_VL_G4(-0.364528148799997); // Set group 4 bol bias 03 (VRL) to 0.41382581058678997 Volts Pacs_BOLC_SET_VRL_G4(0.41382581058678997); // Set group 4 bol bias 20 (VH_BLIND) to 2.0210604284746165 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0210604284746165); // Set group 5 bol bias 01 (VH) to 2.3313030694138903 Volts Pacs_BOLC_SET_VH_G5(2.3313030694138903); // Set group 5 bol bias 02 (VL) to -0.4686969305861095 Volts Pacs_BOLC_SET_VL_G5(-0.4686969305861095); // Set group 5 bol bias 03 (VRL) to 0.4189042512283453 Volts Pacs_BOLC_SET_VRL_G5(0.4189042512283453); // Set group 5 bol bias 20 (VH_BLIND) to 1.9297132773712042 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.9297132773712042); // Set group 6 bol bias 01 (VH) to 2.358883971299675 Volts Pacs_BOLC_SET_VH_G6(2.358883971299675); // Set group 6 bol bias 02 (VL) to -0.44111602870032496 Volts Pacs_BOLC_SET_VL_G6(-0.44111602870032496); // Set group 6 bol bias 03 (VRL) to 0.4234447481405933 Volts Pacs_BOLC_SET_VRL_G6(0.4234447481405933); // Set group 6 bol bias 20 (VH_BLIND) to 1.9994117823572883 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9994117823572883); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g3_5") { //*********************************************************** // Bias 20 (Vh-Vl)bleu = 3.5 Volts, (Vh-Vl)rouge = 3.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 3.213922662427207 Volts Pacs_BOLC_SET_VH_G1(3.213922662427207); // Set group 1 bol bias 02 (VL) to -0.28607733757279297 Volts Pacs_BOLC_SET_VL_G1(-0.28607733757279297); // Set group 1 bol bias 03 (VRL) to 0.4205387999281781 Volts Pacs_BOLC_SET_VRL_G1(0.4205387999281781); // Set group 1 bol bias 20 (VH_BLIND) to 2.004221427479768 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.004221427479768); // Set group 2 bol bias 01 (VH) to 3.1388147648603084 Volts Pacs_BOLC_SET_VH_G2(3.1388147648603084); // Set group 2 bol bias 02 (VL) to -0.3611852351396917 Volts Pacs_BOLC_SET_VL_G2(-0.3611852351396917); // Set group 2 bol bias 03 (VRL) to 0.41736293504378585 Volts Pacs_BOLC_SET_VRL_G2(0.41736293504378585); // Set group 2 bol bias 20 (VH_BLIND) to 2.023521664508995 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.023521664508995); // Set group 3 bol bias 01 (VH) to 3.190616310248542 Volts Pacs_BOLC_SET_VH_G3(3.190616310248542); // Set group 3 bol bias 02 (VL) to -0.3093836897514582 Volts Pacs_BOLC_SET_VL_G3(-0.3093836897514582); // Set group 3 bol bias 03 (VRL) to 0.43212209583763345 Volts Pacs_BOLC_SET_VRL_G3(0.43212209583763345); // Set group 3 bol bias 20 (VH_BLIND) to 2.015718669049004 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.015718669049004); // Set group 4 bol bias 01 (VH) to 3.186385964106644 Volts Pacs_BOLC_SET_VH_G4(3.186385964106644); // Set group 4 bol bias 02 (VL) to -0.31361403589335596 Volts Pacs_BOLC_SET_VL_G4(-0.31361403589335596); // Set group 4 bol bias 03 (VRL) to 0.41442362576578234 Volts Pacs_BOLC_SET_VRL_G4(0.41442362576578234); // Set group 4 bol bias 20 (VH_BLIND) to 2.0216517760486266 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0216517760486266); // Set group 5 bol bias 01 (VH) to 2.575980780895392 Volts Pacs_BOLC_SET_VH_G5(2.575980780895392); // Set group 5 bol bias 02 (VL) to -0.42401921910460816 Volts Pacs_BOLC_SET_VL_G5(-0.42401921910460816); // Set group 5 bol bias 03 (VRL) to 0.4175991082084274 Volts Pacs_BOLC_SET_VRL_G5(0.4175991082084274); // Set group 5 bol bias 20 (VH_BLIND) to 1.9728464656365612 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.9728464656365612); // Set group 6 bol bias 01 (VH) to 2.596360064002986 Volts Pacs_BOLC_SET_VH_G6(2.596360064002986); // Set group 6 bol bias 02 (VL) to -0.4036399359970142 Volts Pacs_BOLC_SET_VL_G6(-0.4036399359970142); // Set group 6 bol bias 03 (VRL) to 0.4080377684177807 Volts Pacs_BOLC_SET_VRL_G6(0.4080377684177807); // Set group 6 bol bias 20 (VH_BLIND) to 2.0285233203112956 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0285233203112956); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "binit") { //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // //************************************************* // Set the biases and start SPU, then set the gain //************************************************* // PHOT_change_biases(startBiasTable,"DIRECT","HIGH"); // //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // //********************************************************************** // Measurement // Background fluxes 2.53pW on blue and 2.30pW on red //********************************************************************** // // sync the bus sync(); } if(select == "b1_0") { //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.0 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2776439136414702 Volts Pacs_BOLC_SET_VRL_G1(0.2776439136414702); // Set group 1 bol bias 20 (VH_BLIND) to 1.79684126186758 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.79684126186758); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2890061866395222 Volts Pacs_BOLC_SET_VRL_G2(0.2890061866395222); // Set group 2 bol bias 20 (VH_BLIND) to 1.7861581649966054 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7861581649966054); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2833384468436936 Volts Pacs_BOLC_SET_VRL_G3(0.2833384468436936); // Set group 3 bol bias 20 (VH_BLIND) to 1.8024780345788116 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8024780345788116); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2746570190871891 Volts Pacs_BOLC_SET_VRL_G4(0.2746570190871891); // Set group 4 bol bias 20 (VH_BLIND) to 1.7954818534723864 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.7954818534723864); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 1.8955949249965234 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8955949249965234); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 1.884813687356174 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.884813687356174); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b1_3") { //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.3 Volts, (Vh-Vl)rouge = 1.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.29 Volts Pacs_BOLC_SET_VH_G1(1.29); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3834061887804109 Volts Pacs_BOLC_SET_VRL_G1(0.3834061887804109); // Set group 1 bol bias 20 (VH_BLIND) to 1.9674397856703623 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9674397856703623); // Set group 2 bol bias 01 (VH) to 1.284113017296217 Volts Pacs_BOLC_SET_VH_G2(1.284113017296217); // Set group 2 bol bias 02 (VL) to -0.015886982703783047 Volts Pacs_BOLC_SET_VL_G2(-0.015886982703783047); // Set group 2 bol bias 03 (VRL) to 0.38762429390545 Volts Pacs_BOLC_SET_VRL_G2(0.38762429390545); // Set group 2 bol bias 20 (VH_BLIND) to 1.9719551021571464 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9719551021571464); // Set group 3 bol bias 01 (VH) to 1.28845151406453 Volts Pacs_BOLC_SET_VH_G3(1.28845151406453); // Set group 3 bol bias 02 (VL) to -0.011548485935469942 Volts Pacs_BOLC_SET_VL_G3(-0.011548485935469942); // Set group 3 bol bias 03 (VRL) to 0.3897844815031697 Volts Pacs_BOLC_SET_VRL_G3(0.3897844815031697); // Set group 3 bol bias 20 (VH_BLIND) to 1.9736628032604184 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9736628032604184); // Set group 4 bol bias 01 (VH) to 1.29 Volts Pacs_BOLC_SET_VH_G4(1.29); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3788656221074776 Volts Pacs_BOLC_SET_VRL_G4(0.3788656221074776); // Set group 4 bol bias 20 (VH_BLIND) to 1.986524384484408 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.986524384484408); // Set group 5 bol bias 01 (VH) to 1.09 Volts Pacs_BOLC_SET_VH_G5(1.09); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.446725098077655 Volts Pacs_BOLC_SET_VRL_G5(0.446725098077655); // Set group 5 bol bias 20 (VH_BLIND) to 2.068711017571996 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.068711017571996); // Set group 6 bol bias 01 (VH) to 1.09 Volts Pacs_BOLC_SET_VH_G6(1.09); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.43597421034823547 Volts Pacs_BOLC_SET_VRL_G6(0.43597421034823547); // Set group 6 bol bias 20 (VH_BLIND) to 1.9230617290722583 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9230617290722583); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b1_6") { //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4898228534292868 Volts Pacs_BOLC_SET_VH_G1(1.4898228534292868); // Set group 1 bol bias 02 (VL) to -0.11017714657071331 Volts Pacs_BOLC_SET_VL_G1(-0.11017714657071331); // Set group 1 bol bias 03 (VRL) to 0.3923048852555612 Volts Pacs_BOLC_SET_VRL_G1(0.3923048852555612); // Set group 1 bol bias 20 (VH_BLIND) to 1.9984545345292575 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9984545345292575); // Set group 2 bol bias 01 (VH) to 1.4711835386284415 Volts Pacs_BOLC_SET_VH_G2(1.4711835386284415); // Set group 2 bol bias 02 (VL) to -0.12881646137155855 Volts Pacs_BOLC_SET_VL_G2(-0.12881646137155855); // Set group 2 bol bias 03 (VRL) to 0.3873476091374273 Volts Pacs_BOLC_SET_VRL_G2(0.3873476091374273); // Set group 2 bol bias 20 (VH_BLIND) to 1.9716816973672475 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9716816973672475); // Set group 3 bol bias 01 (VH) to 1.4762420370347753 Volts Pacs_BOLC_SET_VH_G3(1.4762420370347753); // Set group 3 bol bias 02 (VL) to -0.12375796296522468 Volts Pacs_BOLC_SET_VL_G3(-0.12375796296522468); // Set group 3 bol bias 03 (VRL) to 0.3901157175186699 Volts Pacs_BOLC_SET_VRL_G3(0.3901157175186699); // Set group 3 bol bias 20 (VH_BLIND) to 1.973990615883269 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.973990615883269); // Set group 4 bol bias 01 (VH) to 1.4907471123371514 Volts Pacs_BOLC_SET_VH_G4(1.4907471123371514); // Set group 4 bol bias 02 (VL) to -0.10925288766284869 Volts Pacs_BOLC_SET_VL_G4(-0.10925288766284869); // Set group 4 bol bias 03 (VRL) to 0.3857241094797201 Volts Pacs_BOLC_SET_VRL_G4(0.3857241094797201); // Set group 4 bol bias 20 (VH_BLIND) to 1.9933124320850109 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9933124320850109); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.068111444935925 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.068111444935925); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.012187351127586 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.012187351127586); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b1_7") { //*********************************************************** // Bias 4 (Vh-Vl)bleu = 1.7 Volts, (Vh-Vl)rouge = 1.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.553795801377622 Volts Pacs_BOLC_SET_VH_G1(1.553795801377622); // Set group 1 bol bias 02 (VL) to -0.14620419862237788 Volts Pacs_BOLC_SET_VL_G1(-0.14620419862237788); // Set group 1 bol bias 03 (VRL) to 0.392364975433222 Volts Pacs_BOLC_SET_VRL_G1(0.392364975433222); // Set group 1 bol bias 20 (VH_BLIND) to 1.9985138885954257 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9985138885954257); // Set group 2 bol bias 01 (VH) to 1.5343261358590699 Volts Pacs_BOLC_SET_VH_G2(1.5343261358590699); // Set group 2 bol bias 02 (VL) to -0.1656738641409301 Volts Pacs_BOLC_SET_VL_G2(-0.1656738641409301); // Set group 2 bol bias 03 (VRL) to 0.38722633283032404 Volts Pacs_BOLC_SET_VRL_G2(0.38722633283032404); // Set group 2 bol bias 20 (VH_BLIND) to 1.971561857495417 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.971561857495417); // Set group 3 bol bias 01 (VH) to 1.5394208299417094 Volts Pacs_BOLC_SET_VH_G3(1.5394208299417094); // Set group 3 bol bias 02 (VL) to -0.1605791700582907 Volts Pacs_BOLC_SET_VL_G3(-0.1605791700582907); // Set group 3 bol bias 03 (VRL) to 0.390269980116275 Volts Pacs_BOLC_SET_VRL_G3(0.390269980116275); // Set group 3 bol bias 20 (VH_BLIND) to 1.9741432852987786 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9741432852987786); // Set group 4 bol bias 01 (VH) to 1.5559488846463139 Volts Pacs_BOLC_SET_VH_G4(1.5559488846463139); // Set group 4 bol bias 02 (VL) to -0.1440511153536862 Volts Pacs_BOLC_SET_VL_G4(-0.1440511153536862); // Set group 4 bol bias 03 (VRL) to 0.38713031955403265 Volts Pacs_BOLC_SET_VRL_G4(0.38713031955403265); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947039934585833 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947039934585833); // Set group 5 bol bias 01 (VH) to 1.2089586002564683 Volts Pacs_BOLC_SET_VH_G5(1.2089586002564683); // Set group 5 bol bias 02 (VL) to -0.09104139974353168 Volts Pacs_BOLC_SET_VL_G5(-0.09104139974353168); // Set group 5 bol bias 03 (VRL) to 0.445429449204345 Volts Pacs_BOLC_SET_VRL_G5(0.445429449204345); // Set group 5 bol bias 20 (VH_BLIND) to 2.067414949438398 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.067414949438398); // Set group 6 bol bias 01 (VH) to 1.2106090480442855 Volts Pacs_BOLC_SET_VH_G6(1.2106090480442855); // Set group 6 bol bias 02 (VL) to -0.08939095195571448 Volts Pacs_BOLC_SET_VL_G6(-0.08939095195571448); // Set group 6 bol bias 03 (VRL) to 0.43499214581642076 Volts Pacs_BOLC_SET_VRL_G6(0.43499214581642076); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109671694073814 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109671694073814); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b1_8") { //*********************************************************** // Bias 5 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6185298975985711 Volts Pacs_BOLC_SET_VH_G1(1.6185298975985711); // Set group 1 bol bias 02 (VL) to -0.1814701024014289 Volts Pacs_BOLC_SET_VL_G1(-0.1814701024014289); // Set group 1 bol bias 03 (VRL) to 0.39231127971620416 Volts Pacs_BOLC_SET_VRL_G1(0.39231127971620416); // Set group 1 bol bias 20 (VH_BLIND) to 1.998460850669261 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.998460850669261); // Set group 2 bol bias 01 (VH) to 1.5985355662912417 Volts Pacs_BOLC_SET_VH_G2(1.5985355662912417); // Set group 2 bol bias 02 (VL) to -0.20146443370875833 Volts Pacs_BOLC_SET_VL_G2(-0.20146443370875833); // Set group 2 bol bias 03 (VRL) to 0.38711511058871395 Volts Pacs_BOLC_SET_VRL_G2(0.38711511058871395); // Set group 2 bol bias 20 (VH_BLIND) to 1.971451951939611 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.971451951939611); // Set group 3 bol bias 01 (VH) to 1.6035629087421028 Volts Pacs_BOLC_SET_VH_G3(1.6035629087421028); // Set group 3 bol bias 02 (VL) to -0.1964370912578972 Volts Pacs_BOLC_SET_VL_G3(-0.1964370912578972); // Set group 3 bol bias 03 (VRL) to 0.39047291861295175 Volts Pacs_BOLC_SET_VRL_G3(0.39047291861295175); // Set group 3 bol bias 20 (VH_BLIND) to 1.9743441290186232 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9743441290186232); // Set group 4 bol bias 01 (VH) to 1.6212519863149641 Volts Pacs_BOLC_SET_VH_G4(1.6212519863149641); // Set group 4 bol bias 02 (VL) to -0.1787480136850359 Volts Pacs_BOLC_SET_VL_G4(-0.1787480136850359); // Set group 4 bol bias 03 (VRL) to 0.38757610486445004 Volts Pacs_BOLC_SET_VRL_G4(0.38757610486445004); // Set group 4 bol bias 20 (VH_BLIND) to 1.9951451203049169 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9951451203049169); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.0667806623904608 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0667806623904608); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.0097642426404527 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0097642426404527); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b1_9") { //*********************************************************** // Bias 6 (Vh-Vl)bleu = 1.9 Volts, (Vh-Vl)rouge = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.684314034871572 Volts Pacs_BOLC_SET_VH_G1(1.684314034871572); // Set group 1 bol bias 02 (VL) to -0.21568596512842786 Volts Pacs_BOLC_SET_VL_G1(-0.21568596512842786); // Set group 1 bol bias 03 (VRL) to 0.3921987231252084 Volts Pacs_BOLC_SET_VRL_G1(0.3921987231252084); // Set group 1 bol bias 20 (VH_BLIND) to 1.9761274500462236 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9761274500462236); // Set group 2 bol bias 01 (VH) to 1.663410895780499 Volts Pacs_BOLC_SET_VH_G2(1.663410895780499); // Set group 2 bol bias 02 (VL) to -0.23658910421950097 Volts Pacs_BOLC_SET_VL_G2(-0.23658910421950097); // Set group 2 bol bias 03 (VRL) to 0.38696454357136256 Volts Pacs_BOLC_SET_VRL_G2(0.38696454357136256); // Set group 2 bol bias 20 (VH_BLIND) to 1.9713031663695206 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9713031663695206); // Set group 3 bol bias 01 (VH) to 1.6684702792161694 Volts Pacs_BOLC_SET_VH_G3(1.6684702792161694); // Set group 3 bol bias 02 (VL) to -0.2315297207838305 Volts Pacs_BOLC_SET_VL_G3(-0.2315297207838305); // Set group 3 bol bias 03 (VRL) to 0.3907271436294628 Volts Pacs_BOLC_SET_VRL_G3(0.3907271436294628); // Set group 3 bol bias 20 (VH_BLIND) to 1.974595731657704 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974595731657704); // Set group 4 bol bias 01 (VH) to 1.6875516827707004 Volts Pacs_BOLC_SET_VH_G4(1.6875516827707004); // Set group 4 bol bias 02 (VL) to -0.21244831722929947 Volts Pacs_BOLC_SET_VL_G4(-0.21244831722929947); // Set group 4 bol bias 03 (VRL) to 0.38827019602521584 Volts Pacs_BOLC_SET_VRL_G4(0.38827019602521584); // Set group 4 bol bias 20 (VH_BLIND) to 1.9958319441608174 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9958319441608174); // Set group 5 bol bias 01 (VH) to 1.3332434971838967 Volts Pacs_BOLC_SET_VH_G5(1.3332434971838967); // Set group 5 bol bias 02 (VL) to -0.16675650281610324 Volts Pacs_BOLC_SET_VL_G5(-0.16675650281610324); // Set group 5 bol bias 03 (VRL) to 0.4442147514136051 Volts Pacs_BOLC_SET_VRL_G5(0.4442147514136051); // Set group 5 bol bias 20 (VH_BLIND) to 2.0661998167496693 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0661998167496693); // Set group 6 bol bias 01 (VH) to 1.3349423068237756 Volts Pacs_BOLC_SET_VH_G6(1.3349423068237756); // Set group 6 bol bias 02 (VL) to -0.16505769317622435 Volts Pacs_BOLC_SET_VL_G6(-0.16505769317622435); // Set group 6 bol bias 03 (VRL) to 0.4327262625724114 Volts Pacs_BOLC_SET_VRL_G6(0.4327262625724114); // Set group 6 bol bias 20 (VH_BLIND) to 2.0086986766970316 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0086986766970316); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_0") { //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.75094768124925 Volts Pacs_BOLC_SET_VH_G1(1.75094768124925); // Set group 1 bol bias 02 (VL) to -0.24905231875075018 Volts Pacs_BOLC_SET_VL_G1(-0.24905231875075018); // Set group 1 bol bias 03 (VRL) to 0.3918388258383415 Volts Pacs_BOLC_SET_VRL_G1(0.3918388258383415); // Set group 1 bol bias 20 (VH_BLIND) to 1.9757719534369664 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9757719534369664); // Set group 2 bol bias 01 (VH) to 1.7296294246267632 Volts Pacs_BOLC_SET_VH_G2(1.7296294246267632); // Set group 2 bol bias 02 (VL) to -0.2703705753732367 Volts Pacs_BOLC_SET_VL_G2(-0.2703705753732367); // Set group 2 bol bias 03 (VRL) to 0.38693824560138157 Volts Pacs_BOLC_SET_VRL_G2(0.38693824560138157); // Set group 2 bol bias 20 (VH_BLIND) to 1.9712771794265684 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9712771794265684); // Set group 3 bol bias 01 (VH) to 1.7452969724184209 Volts Pacs_BOLC_SET_VH_G3(1.7452969724184209); // Set group 3 bol bias 02 (VL) to -0.2547030275815792 Volts Pacs_BOLC_SET_VL_G3(-0.2547030275815792); // Set group 3 bol bias 03 (VRL) to 0.4019047966425416 Volts Pacs_BOLC_SET_VRL_G3(0.4019047966425416); // Set group 3 bol bias 20 (VH_BLIND) to 1.9856555083999508 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9856555083999508); // Set group 4 bol bias 01 (VH) to 1.7549351960384105 Volts Pacs_BOLC_SET_VH_G4(1.7549351960384105); // Set group 4 bol bias 02 (VL) to -0.24506480396158947 Volts Pacs_BOLC_SET_VL_G4(-0.24506480396158947); // Set group 4 bol bias 03 (VRL) to 0.38892171880861637 Volts Pacs_BOLC_SET_VRL_G4(0.38892171880861637); // Set group 4 bol bias 20 (VH_BLIND) to 1.9964766297831422 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9964766297831422); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.065121545980251 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.065121545980251); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.007847241241843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007847241241843); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_1") { //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.1 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8196920328905113 Volts Pacs_BOLC_SET_VH_G1(1.8196920328905113); // Set group 1 bol bias 02 (VL) to -0.2803079671094888 Volts Pacs_BOLC_SET_VL_G1(-0.2803079671094888); // Set group 1 bol bias 03 (VRL) to 0.3915675288160809 Volts Pacs_BOLC_SET_VRL_G1(0.3915675288160809); // Set group 1 bol bias 20 (VH_BLIND) to 1.9977261898474725 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9977261898474725); // Set group 2 bol bias 01 (VH) to 1.7968056027257062 Volts Pacs_BOLC_SET_VH_G2(1.7968056027257062); // Set group 2 bol bias 02 (VL) to -0.30319439727429376 Volts Pacs_BOLC_SET_VL_G2(-0.30319439727429376); // Set group 2 bol bias 03 (VRL) to 0.3865891681835424 Volts Pacs_BOLC_SET_VRL_G2(0.3865891681835424); // Set group 2 bol bias 20 (VH_BLIND) to 1.97093222718534 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.97093222718534); // Set group 3 bol bias 01 (VH) to 1.8128700429823483 Volts Pacs_BOLC_SET_VH_G3(1.8128700429823483); // Set group 3 bol bias 02 (VL) to -0.2871299570176517 Volts Pacs_BOLC_SET_VL_G3(-0.2871299570176517); // Set group 3 bol bias 03 (VRL) to 0.40219224384687763 Volts Pacs_BOLC_SET_VRL_G3(0.40219224384687763); // Set group 3 bol bias 20 (VH_BLIND) to 1.985939107861719 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.985939107861719); // Set group 4 bol bias 01 (VH) to 1.8240504309745234 Volts Pacs_BOLC_SET_VH_G4(1.8240504309745234); // Set group 4 bol bias 02 (VL) to -0.27594956902547685 Volts Pacs_BOLC_SET_VL_G4(-0.27594956902547685); // Set group 4 bol bias 03 (VRL) to 0.38944325059262186 Volts Pacs_BOLC_SET_VRL_G4(0.38944325059262186); // Set group 4 bol bias 20 (VH_BLIND) to 1.9969926776916185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9969926776916185); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.064200158789736 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.064200158789736); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.0287034385990768 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0287034385990768); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_2") { //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.890681494558962 Volts Pacs_BOLC_SET_VH_G1(1.890681494558962); // Set group 1 bol bias 02 (VL) to -0.3093185054410381 Volts Pacs_BOLC_SET_VL_G1(-0.3093185054410381); // Set group 1 bol bias 03 (VRL) to 0.3917523448287743 Volts Pacs_BOLC_SET_VRL_G1(0.3917523448287743); // Set group 1 bol bias 20 (VH_BLIND) to 1.9756865285070841 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9756865285070841); // Set group 2 bol bias 01 (VH) to 1.8663718692560345 Volts Pacs_BOLC_SET_VH_G2(1.8663718692560345); // Set group 2 bol bias 02 (VL) to -0.3336281307439657 Volts Pacs_BOLC_SET_VL_G2(-0.3336281307439657); // Set group 2 bol bias 03 (VRL) to 0.38636444827987804 Volts Pacs_BOLC_SET_VRL_G2(0.38636444827987804); // Set group 2 bol bias 20 (VH_BLIND) to 1.9929323817812374 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9929323817812374); // Set group 3 bol bias 01 (VH) to 1.8822555709559037 Volts Pacs_BOLC_SET_VH_G3(1.8822555709559037); // Set group 3 bol bias 02 (VL) to -0.31774442904409644 Volts Pacs_BOLC_SET_VL_G3(-0.31774442904409644); // Set group 3 bol bias 03 (VRL) to 0.40243473364556764 Volts Pacs_BOLC_SET_VRL_G3(0.40243473364556764); // Set group 3 bol bias 20 (VH_BLIND) to 1.9861783542754332 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9861783542754332); // Set group 4 bol bias 01 (VH) to 1.8950882855643336 Volts Pacs_BOLC_SET_VH_G4(1.8950882855643336); // Set group 4 bol bias 02 (VL) to -0.30491171443566656 Volts Pacs_BOLC_SET_VL_G4(-0.30491171443566656); // Set group 4 bol bias 03 (VRL) to 0.3900970801029475 Volts Pacs_BOLC_SET_VRL_G4(0.3900970801029475); // Set group 4 bol bias 20 (VH_BLIND) to 1.9976396185873586 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9976396185873586); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.074285797842026 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.074285797842026); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.027606349752427 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.027606349752427); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_3") { //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.3 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9748660405527547 Volts Pacs_BOLC_SET_VH_G1(1.9748660405527547); // Set group 1 bol bias 02 (VL) to -0.32513395944724516 Volts Pacs_BOLC_SET_VL_G1(-0.32513395944724516); // Set group 1 bol bias 03 (VRL) to 0.4024226822338744 Volts Pacs_BOLC_SET_VRL_G1(0.4024226822338744); // Set group 1 bol bias 20 (VH_BLIND) to 2.0084393426211573 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0084393426211573); // Set group 2 bol bias 01 (VH) to 1.9372456451658073 Volts Pacs_BOLC_SET_VH_G2(1.9372456451658073); // Set group 2 bol bias 02 (VL) to -0.3627543548341924 Volts Pacs_BOLC_SET_VL_G2(-0.3627543548341924); // Set group 2 bol bias 03 (VRL) to 0.3853165410903111 Volts Pacs_BOLC_SET_VRL_G2(0.3853165410903111); // Set group 2 bol bias 20 (VH_BLIND) to 1.9918968082675 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9918968082675); // Set group 3 bol bias 01 (VH) to 1.9538743684629092 Volts Pacs_BOLC_SET_VH_G3(1.9538743684629092); // Set group 3 bol bias 02 (VL) to -0.3461256315370906 Volts Pacs_BOLC_SET_VL_G3(-0.3461256315370906); // Set group 3 bol bias 03 (VRL) to 0.4025461948200347 Volts Pacs_BOLC_SET_VRL_G3(0.4025461948200347); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862883254046149 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862883254046149); // Set group 4 bol bias 01 (VH) to 1.9682290691042088 Volts Pacs_BOLC_SET_VH_G4(1.9682290691042088); // Set group 4 bol bias 02 (VL) to -0.331770930895791 Volts Pacs_BOLC_SET_VL_G4(-0.331770930895791); // Set group 4 bol bias 03 (VRL) to 0.39043591694382773 Volts Pacs_BOLC_SET_VRL_G4(0.39043591694382773); // Set group 4 bol bias 20 (VH_BLIND) to 1.9979748795440542 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9979748795440542); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.0731479067390954 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0731479067390954); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.0041427459870786 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0041427459870786); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_4") { //*********************************************************** // Bias 11 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0510755774018183 Volts Pacs_BOLC_SET_VH_G1(2.0510755774018183); // Set group 1 bol bias 02 (VL) to -0.3489244225981816 Volts Pacs_BOLC_SET_VL_G1(-0.3489244225981816); // Set group 1 bol bias 03 (VRL) to 0.4021120862067234 Volts Pacs_BOLC_SET_VRL_G1(0.4021120862067234); // Set group 1 bol bias 20 (VH_BLIND) to 2.008133671983503 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.008133671983503); // Set group 2 bol bias 01 (VH) to 2.0107886557188914 Volts Pacs_BOLC_SET_VH_G2(2.0107886557188914); // Set group 2 bol bias 02 (VL) to -0.38921134428110826 Volts Pacs_BOLC_SET_VL_G2(-0.38921134428110826); // Set group 2 bol bias 03 (VRL) to 0.38461013849643855 Volts Pacs_BOLC_SET_VRL_G2(0.38461013849643855); // Set group 2 bol bias 20 (VH_BLIND) to 1.9689764657635813 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9689764657635813); // Set group 3 bol bias 01 (VH) to 2.0388571160526703 Volts Pacs_BOLC_SET_VH_G3(2.0388571160526703); // Set group 3 bol bias 02 (VL) to -0.3611428839473296 Volts Pacs_BOLC_SET_VL_G3(-0.3611428839473296); // Set group 3 bol bias 03 (VRL) to 0.4136945413046918 Volts Pacs_BOLC_SET_VRL_G3(0.4136945413046918); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973519597252405 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973519597252405); // Set group 4 bol bias 01 (VH) to 2.0443158228280107 Volts Pacs_BOLC_SET_VH_G4(2.0443158228280107); // Set group 4 bol bias 02 (VL) to -0.3556841771719893 Volts Pacs_BOLC_SET_VL_G4(-0.3556841771719893); // Set group 4 bol bias 03 (VRL) to 0.3910064705976972 Volts Pacs_BOLC_SET_VRL_G4(0.3910064705976972); // Set group 4 bol bias 20 (VH_BLIND) to 1.9985394027048364 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9985394027048364); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.0718745871509667 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0718745871509667); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.002949534142909 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002949534142909); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_5") { //*********************************************************** // Bias 12 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.141863964173851 Volts Pacs_BOLC_SET_VH_G1(2.141863964173851); // Set group 1 bol bias 02 (VL) to -0.3581360358261492 Volts Pacs_BOLC_SET_VL_G1(-0.3581360358261492); // Set group 1 bol bias 03 (VRL) to 0.4132145913512382 Volts Pacs_BOLC_SET_VRL_G1(0.4132145913512382); // Set group 1 bol bias 20 (VH_BLIND) to 2.019136318739582 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.019136318739582); // Set group 2 bol bias 01 (VH) to 2.087688345362657 Volts Pacs_BOLC_SET_VH_G2(2.087688345362657); // Set group 2 bol bias 02 (VL) to -0.412311654637343 Volts Pacs_BOLC_SET_VL_G2(-0.412311654637343); // Set group 2 bol bias 03 (VRL) to 0.3844202473320535 Volts Pacs_BOLC_SET_VRL_G2(0.3844202473320535); // Set group 2 bol bias 20 (VH_BLIND) to 1.968788796619974 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.968788796619974); // Set group 3 bol bias 01 (VH) to 2.1160161577608605 Volts Pacs_BOLC_SET_VH_G3(2.1160161577608605); // Set group 3 bol bias 02 (VL) to -0.38398384223913934 Volts Pacs_BOLC_SET_VL_G3(-0.38398384223913934); // Set group 3 bol bias 03 (VRL) to 0.41383314214155126 Volts Pacs_BOLC_SET_VRL_G3(0.41383314214155126); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974900188654223 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974900188654223); // Set group 4 bol bias 01 (VH) to 2.123396268577534 Volts Pacs_BOLC_SET_VH_G4(2.123396268577534); // Set group 4 bol bias 02 (VL) to -0.37660373142246617 Volts Pacs_BOLC_SET_VL_G4(-0.37660373142246617); // Set group 4 bol bias 03 (VRL) to 0.39171130766035356 Volts Pacs_BOLC_SET_VRL_G4(0.39171130766035356); // Set group 4 bol bias 20 (VH_BLIND) to 1.999236774009823 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.999236774009823); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.048206027978785 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.048206027978785); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.001912280803601 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.001912280803601); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_6") { //*********************************************************** // Bias 13 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2256987621800386 Volts Pacs_BOLC_SET_VH_G1(2.2256987621800386); // Set group 1 bol bias 02 (VL) to -0.37430123781996166 Volts Pacs_BOLC_SET_VL_G1(-0.37430123781996166); // Set group 1 bol bias 03 (VRL) to 0.41334172597806756 Volts Pacs_BOLC_SET_VRL_G1(0.41334172597806756); // Set group 1 bol bias 20 (VH_BLIND) to 2.0192631495623288 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0192631495623288); // Set group 2 bol bias 01 (VH) to 2.1673874562213715 Volts Pacs_BOLC_SET_VH_G2(2.1673874562213715); // Set group 2 bol bias 02 (VL) to -0.4326125437786287 Volts Pacs_BOLC_SET_VL_G2(-0.4326125437786287); // Set group 2 bol bias 03 (VRL) to 0.38321731411378657 Volts Pacs_BOLC_SET_VRL_G2(0.38321731411378657); // Set group 2 bol bias 20 (VH_BLIND) to 1.989822118649329 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.989822118649329); // Set group 3 bol bias 01 (VH) to 2.196655238181291 Volts Pacs_BOLC_SET_VH_G3(2.196655238181291); // Set group 3 bol bias 02 (VL) to -0.4033447618187093 Volts Pacs_BOLC_SET_VL_G3(-0.4033447618187093); // Set group 3 bol bias 03 (VRL) to 0.41376523915084223 Volts Pacs_BOLC_SET_VRL_G3(0.41376523915084223); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974223811023644 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974223811023644); // Set group 4 bol bias 01 (VH) to 2.218046432212362 Volts Pacs_BOLC_SET_VH_G4(2.218046432212362); // Set group 4 bol bias 02 (VL) to -0.38195356778763806 Volts Pacs_BOLC_SET_VL_G4(-0.38195356778763806); // Set group 4 bol bias 03 (VRL) to 0.40418226637506666 Volts Pacs_BOLC_SET_VRL_G4(0.40418226637506666); // Set group 4 bol bias 20 (VH_BLIND) to 2.0115372929968998 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0115372929968998); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.0463942469570053 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0463942469570053); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.0006318376397165 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0006318376397165); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_7") { //*********************************************************** // Bias 14 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3027400499749207 Volts Pacs_BOLC_SET_VH_G1(2.3027400499749207); // Set group 1 bol bias 02 (VL) to -0.39725995002507947 Volts Pacs_BOLC_SET_VL_G1(-0.39725995002507947); // Set group 1 bol bias 03 (VRL) to 0.40272899534103074 Volts Pacs_BOLC_SET_VRL_G1(0.40272899534103074); // Set group 1 bol bias 20 (VH_BLIND) to 2.0087408018201445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0087408018201445); // Set group 2 bol bias 01 (VH) to 2.2502943789269274 Volts Pacs_BOLC_SET_VH_G2(2.2502943789269274); // Set group 2 bol bias 02 (VL) to -0.44970562107307277 Volts Pacs_BOLC_SET_VL_G2(-0.44970562107307277); // Set group 2 bol bias 03 (VRL) to 0.3821481123878546 Volts Pacs_BOLC_SET_VRL_G2(0.3821481123878546); // Set group 2 bol bias 20 (VH_BLIND) to 1.9887653273014994 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9887653273014994); // Set group 3 bol bias 01 (VH) to 2.281312093939765 Volts Pacs_BOLC_SET_VH_G3(2.281312093939765); // Set group 3 bol bias 02 (VL) to -0.41868790606023504 Volts Pacs_BOLC_SET_VL_G3(-0.41868790606023504); // Set group 3 bol bias 03 (VRL) to 0.4135199829327442 Volts Pacs_BOLC_SET_VRL_G3(0.4135199829327442); // Set group 3 bol bias 20 (VH_BLIND) to 2.019400307617367 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.019400307617367); // Set group 4 bol bias 01 (VH) to 2.3048355981797632 Volts Pacs_BOLC_SET_VH_G4(2.3048355981797632); // Set group 4 bol bias 02 (VL) to -0.3951644018202371 Volts Pacs_BOLC_SET_VL_G4(-0.3951644018202371); // Set group 4 bol bias 03 (VRL) to 0.4047108757091467 Volts Pacs_BOLC_SET_VRL_G4(0.4047108757091467); // Set group 4 bol bias 20 (VH_BLIND) to 2.0342776237002314 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0342776237002314); // Set group 5 bol bias 01 (VH) to 1.8750953709068052 Volts Pacs_BOLC_SET_VH_G5(1.8750953709068052); // Set group 5 bol bias 02 (VL) to -0.4249046290931945 Volts Pacs_BOLC_SET_VL_G5(-0.4249046290931945); // Set group 5 bol bias 03 (VRL) to 0.43370653033645856 Volts Pacs_BOLC_SET_VRL_G5(0.43370653033645856); // Set group 5 bol bias 20 (VH_BLIND) to 2.0556861431432893 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0556861431432893); // Set group 6 bol bias 01 (VH) to 1.8856741862400788 Volts Pacs_BOLC_SET_VH_G6(1.8856741862400788); // Set group 6 bol bias 02 (VL) to -0.41432581375992095 Volts Pacs_BOLC_SET_VL_G6(-0.41432581375992095); // Set group 6 bol bias 03 (VRL) to 0.42291832819761155 Volts Pacs_BOLC_SET_VRL_G6(0.42291832819761155); // Set group 6 bol bias 20 (VH_BLIND) to 1.9988851479675354 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9988851479675354); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_8") { //*********************************************************** // Bias 15 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.395507062486896 Volts Pacs_BOLC_SET_VH_G1(2.395507062486896); // Set group 1 bol bias 02 (VL) to -0.40449293751310383 Volts Pacs_BOLC_SET_VL_G1(-0.40449293751310383); // Set group 1 bol bias 03 (VRL) to 0.4022786181150652 Volts Pacs_BOLC_SET_VRL_G1(0.4022786181150652); // Set group 1 bol bias 20 (VH_BLIND) to 2.0082975625991226 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0082975625991226); // Set group 2 bol bias 01 (VH) to 2.34958994940408 Volts Pacs_BOLC_SET_VH_G2(2.34958994940408); // Set group 2 bol bias 02 (VL) to -0.45041005059591976 Volts Pacs_BOLC_SET_VL_G2(-0.45041005059591976); // Set group 2 bol bias 03 (VRL) to 0.391929253229261 Volts Pacs_BOLC_SET_VRL_G2(0.391929253229261); // Set group 2 bol bias 20 (VH_BLIND) to 1.9984307424252745 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9984307424252745); // Set group 3 bol bias 01 (VH) to 2.3707372684933423 Volts Pacs_BOLC_SET_VH_G3(2.3707372684933423); // Set group 3 bol bias 02 (VL) to -0.42926273150665745 Volts Pacs_BOLC_SET_VL_G3(-0.42926273150665745); // Set group 3 bol bias 03 (VRL) to 0.41275038580235307 Volts Pacs_BOLC_SET_VRL_G3(0.41275038580235307); // Set group 3 bol bias 20 (VH_BLIND) to 2.01863375038599 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.01863375038599); // Set group 4 bol bias 01 (VH) to 2.385042148169664 Volts Pacs_BOLC_SET_VH_G4(2.385042148169664); // Set group 4 bol bias 02 (VL) to -0.41495785183033584 Volts Pacs_BOLC_SET_VL_G4(-0.41495785183033584); // Set group 4 bol bias 03 (VRL) to 0.39415765634553757 Volts Pacs_BOLC_SET_VRL_G4(0.39415765634553757); // Set group 4 bol bias 20 (VH_BLIND) to 2.001657073771402 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001657073771402); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.0194454064367697 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0194454064367697); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 1.997491742243546 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.997491742243546); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_9") { //*********************************************************** // Bias 16 (Vh-Vl)bleu = 2.9 Volts, (Vh-Vl)rouge = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.526668083074454 Volts Pacs_BOLC_SET_VH_G1(2.526668083074454); // Set group 1 bol bias 02 (VL) to -0.37333191692554596 Volts Pacs_BOLC_SET_VL_G1(-0.37333191692554596); // Set group 1 bol bias 03 (VRL) to 0.4353877096069227 Volts Pacs_BOLC_SET_VRL_G1(0.4353877096069227); // Set group 1 bol bias 20 (VH_BLIND) to 1.9968212973244188 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9968212973244188); // Set group 2 bol bias 01 (VH) to 2.442945947627277 Volts Pacs_BOLC_SET_VH_G2(2.442945947627277); // Set group 2 bol bias 02 (VL) to -0.457054052372723 Volts Pacs_BOLC_SET_VL_G2(-0.457054052372723); // Set group 2 bol bias 03 (VRL) to 0.3922330701698321 Volts Pacs_BOLC_SET_VRL_G2(0.3922330701698321); // Set group 2 bol bias 20 (VH_BLIND) to 1.9987308858583168 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9987308858583168); // Set group 3 bol bias 01 (VH) to 2.465059889333614 Volts Pacs_BOLC_SET_VH_G3(2.465059889333614); // Set group 3 bol bias 02 (VL) to -0.43494011066638616 Volts Pacs_BOLC_SET_VL_G3(-0.43494011066638616); // Set group 3 bol bias 03 (VRL) to 0.41177362659995964 Volts Pacs_BOLC_SET_VRL_G3(0.41177362659995964); // Set group 3 bol bias 20 (VH_BLIND) to 2.017660905892856 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.017660905892856); // Set group 4 bol bias 01 (VH) to 2.4805635084624402 Volts Pacs_BOLC_SET_VH_G4(2.4805635084624402); // Set group 4 bol bias 02 (VL) to -0.4194364915375597 Volts Pacs_BOLC_SET_VL_G4(-0.4194364915375597); // Set group 4 bol bias 03 (VRL) to 0.3941180925800276 Volts Pacs_BOLC_SET_VRL_G4(0.3941180925800276); // Set group 4 bol bias 20 (VH_BLIND) to 2.023840155195675 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023840155195675); // Set group 5 bol bias 01 (VH) to 2.0172152843549696 Volts Pacs_BOLC_SET_VH_G5(2.0172152843549696); // Set group 5 bol bias 02 (VL) to -0.4827847156450306 Volts Pacs_BOLC_SET_VL_G5(-0.4827847156450306); // Set group 5 bol bias 03 (VRL) to 0.40545852941945987 Volts Pacs_BOLC_SET_VRL_G5(0.40545852941945987); // Set group 5 bol bias 20 (VH_BLIND) to 2.005198881800527 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.005198881800527); // Set group 6 bol bias 01 (VH) to 2.054760897006141 Volts Pacs_BOLC_SET_VH_G6(2.054760897006141); // Set group 6 bol bias 02 (VL) to -0.44523910299385916 Volts Pacs_BOLC_SET_VL_G6(-0.44523910299385916); // Set group 6 bol bias 03 (VRL) to 0.41996878469383536 Volts Pacs_BOLC_SET_VRL_G6(0.41996878469383536); // Set group 6 bol bias 20 (VH_BLIND) to 1.995934582950207 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.995934582950207); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b3_0") { //*********************************************************** // Bias 17 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.630480092102173 Volts Pacs_BOLC_SET_VH_G1(2.630480092102173); // Set group 1 bol bias 02 (VL) to -0.369519907897827 Volts Pacs_BOLC_SET_VL_G1(-0.369519907897827); // Set group 1 bol bias 03 (VRL) to 0.43563232543788716 Volts Pacs_BOLC_SET_VRL_G1(0.43563232543788716); // Set group 1 bol bias 20 (VH_BLIND) to 1.9970659739489551 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9970659739489551); // Set group 2 bol bias 01 (VH) to 2.540806848783851 Volts Pacs_BOLC_SET_VH_G2(2.540806848783851); // Set group 2 bol bias 02 (VL) to -0.459193151216149 Volts Pacs_BOLC_SET_VL_G2(-0.459193151216149); // Set group 2 bol bias 03 (VRL) to 0.3915670429941497 Volts Pacs_BOLC_SET_VRL_G2(0.3915670429941497); // Set group 2 bol bias 20 (VH_BLIND) to 1.9980729055318742 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9980729055318742); // Set group 3 bol bias 01 (VH) to 2.566432198930704 Volts Pacs_BOLC_SET_VH_G3(2.566432198930704); // Set group 3 bol bias 02 (VL) to -0.4335678010692957 Volts Pacs_BOLC_SET_VL_G3(-0.4335678010692957); // Set group 3 bol bias 03 (VRL) to 0.4115794454004439 Volts Pacs_BOLC_SET_VRL_G3(0.4115794454004439); // Set group 3 bol bias 20 (VH_BLIND) to 1.995245288255046 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995245288255046); // Set group 4 bol bias 01 (VH) to 2.6034961033850488 Volts Pacs_BOLC_SET_VH_G4(2.6034961033850488); // Set group 4 bol bias 02 (VL) to -0.39650389661495106 Volts Pacs_BOLC_SET_VL_G4(-0.39650389661495106); // Set group 4 bol bias 03 (VRL) to 0.4162615057139231 Volts Pacs_BOLC_SET_VRL_G4(0.4162615057139231); // Set group 4 bol bias 20 (VH_BLIND) to 2.001247804904634 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001247804904634); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 1.979399868370715 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.979399868370715); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 1.9973600513241785 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9973600513241785); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b3_1") { //*********************************************************** // Bias 18 (Vh-Vl)bleu = 3.1 Volts, (Vh-Vl)rouge = 2.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.740594801361542 Volts Pacs_BOLC_SET_VH_G1(2.740594801361542); // Set group 1 bol bias 02 (VL) to -0.35940519863845805 Volts Pacs_BOLC_SET_VL_G1(-0.35940519863845805); // Set group 1 bol bias 03 (VRL) to 0.43627325578259074 Volts Pacs_BOLC_SET_VRL_G1(0.43627325578259074); // Set group 1 bol bias 20 (VH_BLIND) to 2.0199292568429272 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0199292568429272); // Set group 2 bol bias 01 (VH) to 2.6565685093050897 Volts Pacs_BOLC_SET_VH_G2(2.6565685093050897); // Set group 2 bol bias 02 (VL) to -0.44343149069491017 Volts Pacs_BOLC_SET_VL_G2(-0.44343149069491017); // Set group 2 bol bias 03 (VRL) to 0.40334728547025434 Volts Pacs_BOLC_SET_VRL_G2(0.40334728547025434); // Set group 2 bol bias 20 (VH_BLIND) to 1.987454959689552 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.987454959689552); // Set group 3 bol bias 01 (VH) to 2.697316024074022 Volts Pacs_BOLC_SET_VH_G3(2.697316024074022); // Set group 3 bol bias 02 (VL) to -0.40268397592597777 Volts Pacs_BOLC_SET_VL_G3(-0.40268397592597777); // Set group 3 bol bias 03 (VRL) to 0.4342612489966317 Volts Pacs_BOLC_SET_VRL_G3(0.4342612489966317); // Set group 3 bol bias 20 (VH_BLIND) to 1.995630864327535 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995630864327535); // Set group 4 bol bias 01 (VH) to 2.7080390437815396 Volts Pacs_BOLC_SET_VH_G4(2.7080390437815396); // Set group 4 bol bias 02 (VL) to -0.39196095621846067 Volts Pacs_BOLC_SET_VL_G4(-0.39196095621846067); // Set group 4 bol bias 03 (VRL) to 0.4151059942714865 Volts Pacs_BOLC_SET_VRL_G4(0.4151059942714865); // Set group 4 bol bias 20 (VH_BLIND) to 2.0223268118825852 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0223268118825852); // Set group 5 bol bias 01 (VH) to 2.2255336452621894 Volts Pacs_BOLC_SET_VH_G5(2.2255336452621894); // Set group 5 bol bias 02 (VL) to -0.4744663547378106 Volts Pacs_BOLC_SET_VL_G5(-0.4744663547378106); // Set group 5 bol bias 03 (VRL) to 0.42066073283052474 Volts Pacs_BOLC_SET_VRL_G5(0.42066073283052474); // Set group 5 bol bias 20 (VH_BLIND) to 1.953699996477935 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.953699996477935); // Set group 6 bol bias 01 (VH) to 2.249863335977282 Volts Pacs_BOLC_SET_VH_G6(2.249863335977282); // Set group 6 bol bias 02 (VL) to -0.45013666402271824 Volts Pacs_BOLC_SET_VL_G6(-0.45013666402271824); // Set group 6 bol bias 03 (VRL) to 0.422993520840218 Volts Pacs_BOLC_SET_VRL_G6(0.422993520840218); // Set group 6 bol bias 20 (VH_BLIND) to 1.9989603706454033 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9989603706454033); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b3_3") { //*********************************************************** // Bias 19 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.972422360482121 Volts Pacs_BOLC_SET_VH_G1(2.972422360482121); // Set group 1 bol bias 02 (VL) to -0.32757763951787894 Volts Pacs_BOLC_SET_VL_G1(-0.32757763951787894); // Set group 1 bol bias 03 (VRL) to 0.4341517514104592 Volts Pacs_BOLC_SET_VRL_G1(0.4341517514104592); // Set group 1 bol bias 20 (VH_BLIND) to 2.0178071607966555 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0178071607966555); // Set group 2 bol bias 01 (VH) to 2.891238142334606 Volts Pacs_BOLC_SET_VH_G2(2.891238142334606); // Set group 2 bol bias 02 (VL) to -0.40876185766539386 Volts Pacs_BOLC_SET_VL_G2(-0.40876185766539386); // Set group 2 bol bias 03 (VRL) to 0.4148225819277238 Volts Pacs_BOLC_SET_VRL_G2(0.4148225819277238); // Set group 2 bol bias 20 (VH_BLIND) to 2.0210055496498964 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0210055496498964); // Set group 3 bol bias 01 (VH) to 2.9324080525236766 Volts Pacs_BOLC_SET_VH_G3(2.9324080525236766); // Set group 3 bol bias 02 (VL) to -0.367591947476323 Volts Pacs_BOLC_SET_VL_G3(-0.367591947476323); // Set group 3 bol bias 03 (VRL) to 0.43350221229296976 Volts Pacs_BOLC_SET_VRL_G3(0.43350221229296976); // Set group 3 bol bias 20 (VH_BLIND) to 2.0170951356375486 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0170951356375486); // Set group 4 bol bias 01 (VH) to 2.9354718512000026 Volts Pacs_BOLC_SET_VH_G4(2.9354718512000026); // Set group 4 bol bias 02 (VL) to -0.364528148799997 Volts Pacs_BOLC_SET_VL_G4(-0.364528148799997); // Set group 4 bol bias 03 (VRL) to 0.41382581058678997 Volts Pacs_BOLC_SET_VRL_G4(0.41382581058678997); // Set group 4 bol bias 20 (VH_BLIND) to 2.0210604284746165 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0210604284746165); // Set group 5 bol bias 01 (VH) to 2.3313030694138903 Volts Pacs_BOLC_SET_VH_G5(2.3313030694138903); // Set group 5 bol bias 02 (VL) to -0.4686969305861095 Volts Pacs_BOLC_SET_VL_G5(-0.4686969305861095); // Set group 5 bol bias 03 (VRL) to 0.4189042512283453 Volts Pacs_BOLC_SET_VRL_G5(0.4189042512283453); // Set group 5 bol bias 20 (VH_BLIND) to 1.9297132773712042 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.9297132773712042); // Set group 6 bol bias 01 (VH) to 2.358883971299675 Volts Pacs_BOLC_SET_VH_G6(2.358883971299675); // Set group 6 bol bias 02 (VL) to -0.44111602870032496 Volts Pacs_BOLC_SET_VL_G6(-0.44111602870032496); // Set group 6 bol bias 03 (VRL) to 0.4234447481405933 Volts Pacs_BOLC_SET_VRL_G6(0.4234447481405933); // Set group 6 bol bias 20 (VH_BLIND) to 1.9994117823572883 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9994117823572883); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b3_5") { //*********************************************************** // Bias 20 (Vh-Vl)bleu = 3.5 Volts, (Vh-Vl)rouge = 3.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 3.213922662427207 Volts Pacs_BOLC_SET_VH_G1(3.213922662427207); // Set group 1 bol bias 02 (VL) to -0.28607733757279297 Volts Pacs_BOLC_SET_VL_G1(-0.28607733757279297); // Set group 1 bol bias 03 (VRL) to 0.4205387999281781 Volts Pacs_BOLC_SET_VRL_G1(0.4205387999281781); // Set group 1 bol bias 20 (VH_BLIND) to 2.004221427479768 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.004221427479768); // Set group 2 bol bias 01 (VH) to 3.1388147648603084 Volts Pacs_BOLC_SET_VH_G2(3.1388147648603084); // Set group 2 bol bias 02 (VL) to -0.3611852351396917 Volts Pacs_BOLC_SET_VL_G2(-0.3611852351396917); // Set group 2 bol bias 03 (VRL) to 0.41736293504378585 Volts Pacs_BOLC_SET_VRL_G2(0.41736293504378585); // Set group 2 bol bias 20 (VH_BLIND) to 2.023521664508995 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.023521664508995); // Set group 3 bol bias 01 (VH) to 3.190616310248542 Volts Pacs_BOLC_SET_VH_G3(3.190616310248542); // Set group 3 bol bias 02 (VL) to -0.3093836897514582 Volts Pacs_BOLC_SET_VL_G3(-0.3093836897514582); // Set group 3 bol bias 03 (VRL) to 0.43212209583763345 Volts Pacs_BOLC_SET_VRL_G3(0.43212209583763345); // Set group 3 bol bias 20 (VH_BLIND) to 2.015718669049004 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.015718669049004); // Set group 4 bol bias 01 (VH) to 3.186385964106644 Volts Pacs_BOLC_SET_VH_G4(3.186385964106644); // Set group 4 bol bias 02 (VL) to -0.31361403589335596 Volts Pacs_BOLC_SET_VL_G4(-0.31361403589335596); // Set group 4 bol bias 03 (VRL) to 0.41442362576578234 Volts Pacs_BOLC_SET_VRL_G4(0.41442362576578234); // Set group 4 bol bias 20 (VH_BLIND) to 2.0216517760486266 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0216517760486266); // Set group 5 bol bias 01 (VH) to 2.575980780895392 Volts Pacs_BOLC_SET_VH_G5(2.575980780895392); // Set group 5 bol bias 02 (VL) to -0.42401921910460816 Volts Pacs_BOLC_SET_VL_G5(-0.42401921910460816); // Set group 5 bol bias 03 (VRL) to 0.4175991082084274 Volts Pacs_BOLC_SET_VRL_G5(0.4175991082084274); // Set group 5 bol bias 20 (VH_BLIND) to 1.9728464656365612 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.9728464656365612); // Set group 6 bol bias 01 (VH) to 2.596360064002986 Volts Pacs_BOLC_SET_VH_G6(2.596360064002986); // Set group 6 bol bias 02 (VL) to -0.4036399359970142 Volts Pacs_BOLC_SET_VL_G6(-0.4036399359970142); // Set group 6 bol bias 03 (VRL) to 0.4080377684177807 Volts Pacs_BOLC_SET_VRL_G6(0.4080377684177807); // Set group 6 bol bias 20 (VH_BLIND) to 2.0285233203112956 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0285233203112956); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "final") { //******************************** // Epilogue : Set the end biases //******************************** PHOT_change_biases(endBiasTable,"DIRECT","LOW"); // // sync the bus sync(); } } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.1bis for the Commissioning Phase // Check the bias/signal relationship using CSs // // Author : Koryo Okumura // // CUS script : procedure Phot_lowGainBias1_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // + Set the biases group by group // + Set the blue filter 100um // + Loop on CSs // + Set the chopper on a CS // + Loop over 8 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set the blue filter 70um // + Loop on CSs // + Set the chopper on a CS // + Loop over 8 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + At the end, the biases are set following a given bias table // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_CommPh_lowGainBias1(1, "LOW") // New version // // Version : Fri Apr 18 18:00:37 CEST 2008 // procedure Phot_lowGainBias1_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values }{ // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(startBiasTable,1); PHOT_set_bias_volt(startBiasTable,2); PHOT_set_bias_volt(startBiasTable,3); PHOT_set_bias_volt(startBiasTable,4); PHOT_set_bias_volt(startBiasTable,5); PHOT_set_bias_volt(startBiasTable,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain low Pacs_BOLC_SET_GAIN("LOW"); // //********************************************** // Set the PAcS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS1 at 48.0 K // corresponding to 1.20pW on the green and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.457556831416261 Volts Pacs_BOLC_SET_VH_G1(1.457556831416261); // Set group 1 bol bias 02 (VL) to -0.14244316858373907 Volts Pacs_BOLC_SET_VL_G1(-0.14244316858373907); // Set group 1 bol bias 03 (VRL) to 0.39289728144635716 Volts Pacs_BOLC_SET_VRL_G1(0.39289728144635716); // Set group 1 bol bias 20 (VH_BLIND) to 2.151471417543995 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151471417543995); // Set group 2 bol bias 01 (VH) to 1.444087138537561 Volts Pacs_BOLC_SET_VH_G2(1.444087138537561); // Set group 2 bol bias 02 (VL) to -0.1559128614624391 Volts Pacs_BOLC_SET_VL_G2(-0.1559128614624391); // Set group 2 bol bias 03 (VRL) to 0.3888592125442133 Volts Pacs_BOLC_SET_VRL_G2(0.3888592125442133); // Set group 2 bol bias 20 (VH_BLIND) to 2.1467299681244416 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1467299681244416); // Set group 3 bol bias 01 (VH) to 1.4461276964721905 Volts Pacs_BOLC_SET_VH_G3(1.4461276964721905); // Set group 3 bol bias 02 (VL) to -0.15387230352780956 Volts Pacs_BOLC_SET_VL_G3(-0.15387230352780956); // Set group 3 bol bias 03 (VRL) to 0.389702653261631 Volts Pacs_BOLC_SET_VRL_G3(0.389702653261631); // Set group 3 bol bias 20 (VH_BLIND) to 2.1440068212666743 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1440068212666743); // Set group 4 bol bias 01 (VH) to 1.461535092163816 Volts Pacs_BOLC_SET_VH_G4(1.461535092163816); // Set group 4 bol bias 02 (VL) to -0.13846490783618415 Volts Pacs_BOLC_SET_VL_G4(-0.13846490783618415); // Set group 4 bol bias 03 (VRL) to 0.38666891513104484 Volts Pacs_BOLC_SET_VRL_G4(0.38666891513104484); // Set group 4 bol bias 20 (VH_BLIND) to 2.1428402830030913 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1428402830030913); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.393205233420548 Volts Pacs_BOLC_SET_VRL_G5(0.393205233420548); // Set group 5 bol bias 20 (VH_BLIND) to 2.144845482323282 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.144845482323282); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3832953489422562 Volts Pacs_BOLC_SET_VRL_G6(0.3832953489422562); // Set group 6 bol bias 20 (VH_BLIND) to 2.130607584787264 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.130607584787264); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.585769661368119 Volts Pacs_BOLC_SET_VH_G1(1.585769661368119); // Set group 1 bol bias 02 (VL) to -0.214230338631881 Volts Pacs_BOLC_SET_VL_G1(-0.214230338631881); // Set group 1 bol bias 03 (VRL) to 0.39304515064751266 Volts Pacs_BOLC_SET_VRL_G1(0.39304515064751266); // Set group 1 bol bias 20 (VH_BLIND) to 2.151646819089764 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151646819089764); // Set group 2 bol bias 01 (VH) to 1.571162518585341 Volts Pacs_BOLC_SET_VH_G2(1.571162518585341); // Set group 2 bol bias 02 (VL) to -0.22883748141465898 Volts Pacs_BOLC_SET_VL_G2(-0.22883748141465898); // Set group 2 bol bias 03 (VRL) to 0.3888194923923588 Volts Pacs_BOLC_SET_VRL_G2(0.3888194923923588); // Set group 2 bol bias 20 (VH_BLIND) to 2.1466838588402206 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1466838588402206); // Set group 3 bol bias 01 (VH) to 1.5728976206374763 Volts Pacs_BOLC_SET_VH_G3(1.5728976206374763); // Set group 3 bol bias 02 (VL) to -0.22710237936252387 Volts Pacs_BOLC_SET_VL_G3(-0.22710237936252387); // Set group 3 bol bias 03 (VRL) to 0.39016220909623334 Volts Pacs_BOLC_SET_VRL_G3(0.39016220909623334); // Set group 3 bol bias 20 (VH_BLIND) to 2.144513683272569 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144513683272569); // Set group 4 bol bias 01 (VH) to 1.5905884509492139 Volts Pacs_BOLC_SET_VH_G4(1.5905884509492139); // Set group 4 bol bias 02 (VL) to -0.2094115490507863 Volts Pacs_BOLC_SET_VL_G4(-0.2094115490507863); // Set group 4 bol bias 03 (VRL) to 0.38773283476462383 Volts Pacs_BOLC_SET_VRL_G4(0.38773283476462383); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440552130411823 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440552130411823); // Set group 5 bol bias 01 (VH) to 1.3241923646302258 Volts Pacs_BOLC_SET_VH_G5(1.3241923646302258); // Set group 5 bol bias 02 (VL) to -0.07580763536977406 Volts Pacs_BOLC_SET_VL_G5(-0.07580763536977406); // Set group 5 bol bias 03 (VRL) to 0.40046001102514184 Volts Pacs_BOLC_SET_VRL_G5(0.40046001102514184); // Set group 5 bol bias 20 (VH_BLIND) to 2.153546375049013 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.153546375049013); // Set group 6 bol bias 01 (VH) to 1.37098688511416 Volts Pacs_BOLC_SET_VH_G6(1.37098688511416); // Set group 6 bol bias 02 (VL) to -0.02901311488583999 Volts Pacs_BOLC_SET_VL_G6(-0.02901311488583999); // Set group 6 bol bias 03 (VRL) to 0.43611847195239406 Volts Pacs_BOLC_SET_VRL_G6(0.43611847195239406); // Set group 6 bol bias 20 (VH_BLIND) to 2.1943115490461103 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1943115490461103); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7183370767248043 Volts Pacs_BOLC_SET_VH_G1(1.7183370767248043); // Set group 1 bol bias 02 (VL) to -0.2816629232751957 Volts Pacs_BOLC_SET_VL_G1(-0.2816629232751957); // Set group 1 bol bias 03 (VRL) to 0.39272615099525776 Volts Pacs_BOLC_SET_VRL_G1(0.39272615099525776); // Set group 1 bol bias 20 (VH_BLIND) to 2.151268425592528 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151268425592528); // Set group 2 bol bias 01 (VH) to 1.7019559750109217 Volts Pacs_BOLC_SET_VH_G2(1.7019559750109217); // Set group 2 bol bias 02 (VL) to -0.29804402498907834 Volts Pacs_BOLC_SET_VL_G2(-0.29804402498907834); // Set group 2 bol bias 03 (VRL) to 0.388357028089395 Volts Pacs_BOLC_SET_VRL_G2(0.388357028089395); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461470122884805 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461470122884805); // Set group 3 bol bias 01 (VH) to 1.714454188425701 Volts Pacs_BOLC_SET_VH_G3(1.714454188425701); // Set group 3 bol bias 02 (VL) to -0.2855458115742991 Volts Pacs_BOLC_SET_VL_G3(-0.2855458115742991); // Set group 3 bol bias 03 (VRL) to 0.401550404399907 Volts Pacs_BOLC_SET_VRL_G3(0.401550404399907); // Set group 3 bol bias 20 (VH_BLIND) to 2.15707892246005 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.15707892246005); // Set group 4 bol bias 01 (VH) to 1.7242793470756728 Volts Pacs_BOLC_SET_VH_G4(1.7242793470756728); // Set group 4 bol bias 02 (VL) to -0.27572065292432724 Volts Pacs_BOLC_SET_VL_G4(-0.27572065292432724); // Set group 4 bol bias 03 (VRL) to 0.3889940535267571 Volts Pacs_BOLC_SET_VRL_G4(0.3889940535267571); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454955805079967 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454955805079967); // Set group 5 bol bias 01 (VH) to 1.4496153041151667 Volts Pacs_BOLC_SET_VH_G5(1.4496153041151667); // Set group 5 bol bias 02 (VL) to -0.15038469588483347 Volts Pacs_BOLC_SET_VL_G5(-0.15038469588483347); // Set group 5 bol bias 03 (VRL) to 0.39905723488551603 Volts Pacs_BOLC_SET_VRL_G5(0.39905723488551603); // Set group 5 bol bias 20 (VH_BLIND) to 2.15186471364944 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.15186471364944); // Set group 6 bol bias 01 (VH) to 1.4970241024935167 Volts Pacs_BOLC_SET_VH_G6(1.4970241024935167); // Set group 6 bol bias 02 (VL) to -0.10297589750648331 Volts Pacs_BOLC_SET_VL_G6(-0.10297589750648331); // Set group 6 bol bias 03 (VRL) to 0.43401661473441144 Volts Pacs_BOLC_SET_VRL_G6(0.43401661473441144); // Set group 6 bol bias 20 (VH_BLIND) to 2.1918048548715423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1918048548715423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8585362347937342 Volts Pacs_BOLC_SET_VH_G1(1.8585362347937342); // Set group 1 bol bias 02 (VL) to -0.34146376520626587 Volts Pacs_BOLC_SET_VL_G1(-0.34146376520626587); // Set group 1 bol bias 03 (VRL) to 0.3925990888065586 Volts Pacs_BOLC_SET_VRL_G1(0.3925990888065586); // Set group 1 bol bias 20 (VH_BLIND) to 2.1511177079955788 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1511177079955788); // Set group 2 bol bias 01 (VH) to 1.838716500789082 Volts Pacs_BOLC_SET_VH_G2(1.838716500789082); // Set group 2 bol bias 02 (VL) to -0.3612834992109183 Volts Pacs_BOLC_SET_VL_G2(-0.3612834992109183); // Set group 2 bol bias 03 (VRL) to 0.38744902130448367 Volts Pacs_BOLC_SET_VRL_G2(0.38744902130448367); // Set group 2 bol bias 20 (VH_BLIND) to 2.1450929993071512 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1450929993071512); // Set group 3 bol bias 01 (VH) to 1.85163190367321 Volts Pacs_BOLC_SET_VH_G3(1.85163190367321); // Set group 3 bol bias 02 (VL) to -0.34836809632679006 Volts Pacs_BOLC_SET_VL_G3(-0.34836809632679006); // Set group 3 bol bias 03 (VRL) to 0.4020826639883897 Volts Pacs_BOLC_SET_VRL_G3(0.4020826639883897); // Set group 3 bol bias 20 (VH_BLIND) to 2.157667831933953 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157667831933953); // Set group 4 bol bias 01 (VH) to 1.8658389594227858 Volts Pacs_BOLC_SET_VH_G4(1.8658389594227858); // Set group 4 bol bias 02 (VL) to -0.3341610405772144 Volts Pacs_BOLC_SET_VL_G4(-0.3341610405772144); // Set group 4 bol bias 03 (VRL) to 0.39087822103495706 Volts Pacs_BOLC_SET_VRL_G4(0.39087822103495706); // Set group 4 bol bias 20 (VH_BLIND) to 2.1476476539739764 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1476476539739764); // Set group 5 bol bias 01 (VH) to 1.5900913542685013 Volts Pacs_BOLC_SET_VH_G5(1.5900913542685013); // Set group 5 bol bias 02 (VL) to -0.20990864573149876 Volts Pacs_BOLC_SET_VL_G5(-0.20990864573149876); // Set group 5 bol bias 03 (VRL) to 0.40844955554354584 Volts Pacs_BOLC_SET_VRL_G5(0.40844955554354584); // Set group 5 bol bias 20 (VH_BLIND) to 2.163093126853995 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.163093126853995); // Set group 6 bol bias 01 (VH) to 1.6276124853923464 Volts Pacs_BOLC_SET_VH_G6(1.6276124853923464); // Set group 6 bol bias 02 (VL) to -0.17238751460765359 Volts Pacs_BOLC_SET_VL_G6(-0.17238751460765359); // Set group 6 bol bias 03 (VRL) to 0.43216415132235575 Volts Pacs_BOLC_SET_VRL_G6(0.43216415132235575); // Set group 6 bol bias 20 (VH_BLIND) to 2.1895819441738285 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1895819441738285); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0202028596068895 Volts Pacs_BOLC_SET_VH_G1(2.0202028596068895); // Set group 1 bol bias 02 (VL) to -0.3797971403931106 Volts Pacs_BOLC_SET_VL_G1(-0.3797971403931106); // Set group 1 bol bias 03 (VRL) to 0.4031554178502121 Volts Pacs_BOLC_SET_VRL_G1(0.4031554178502121); // Set group 1 bol bias 20 (VH_BLIND) to 2.163634915975391 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163634915975391); // Set group 2 bol bias 01 (VH) to 1.9845954458032045 Volts Pacs_BOLC_SET_VH_G2(1.9845954458032045); // Set group 2 bol bias 02 (VL) to -0.41540455419679545 Volts Pacs_BOLC_SET_VL_G2(-0.41540455419679545); // Set group 2 bol bias 03 (VRL) to 0.38611513204716796 Volts Pacs_BOLC_SET_VRL_G2(0.38611513204716796); // Set group 2 bol bias 20 (VH_BLIND) to 2.1435447105412555 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1435447105412555); // Set group 3 bol bias 01 (VH) to 2.0091673911193446 Volts Pacs_BOLC_SET_VH_G3(2.0091673911193446); // Set group 3 bol bias 02 (VL) to -0.39083260888065513 Volts Pacs_BOLC_SET_VL_G3(-0.39083260888065513); // Set group 3 bol bias 03 (VRL) to 0.4135751200095534 Volts Pacs_BOLC_SET_VRL_G3(0.4135751200095534); // Set group 3 bol bias 20 (VH_BLIND) to 2.170378532407885 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170378532407885); // Set group 4 bol bias 01 (VH) to 2.0158037297874873 Volts Pacs_BOLC_SET_VH_G4(2.0158037297874873); // Set group 4 bol bias 02 (VL) to -0.3841962702125128 Volts Pacs_BOLC_SET_VL_G4(-0.3841962702125128); // Set group 4 bol bias 03 (VRL) to 0.3915724280149063 Volts Pacs_BOLC_SET_VRL_G4(0.3915724280149063); // Set group 4 bol bias 20 (VH_BLIND) to 2.1484406507127387 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1484406507127387); // Set group 5 bol bias 01 (VH) to 1.7225616727109463 Volts Pacs_BOLC_SET_VH_G5(1.7225616727109463); // Set group 5 bol bias 02 (VL) to -0.27743832728905365 Volts Pacs_BOLC_SET_VL_G5(-0.27743832728905365); // Set group 5 bol bias 03 (VRL) to 0.40580736393386424 Volts Pacs_BOLC_SET_VRL_G5(0.40580736393386424); // Set group 5 bol bias 20 (VH_BLIND) to 2.159935285624683 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.159935285624683); // Set group 6 bol bias 01 (VH) to 1.7622827443723812 Volts Pacs_BOLC_SET_VH_G6(1.7622827443723812); // Set group 6 bol bias 02 (VL) to -0.23771725562761872 Volts Pacs_BOLC_SET_VL_G6(-0.23771725562761872); // Set group 6 bol bias 03 (VRL) to 0.4298269773716583 Volts Pacs_BOLC_SET_VRL_G6(0.4298269773716583); // Set group 6 bol bias 20 (VH_BLIND) to 2.1867614355291423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1867614355291423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.196006753214598 Volts Pacs_BOLC_SET_VH_G1(2.196006753214598); // Set group 1 bol bias 02 (VL) to -0.4039932467854021 Volts Pacs_BOLC_SET_VL_G1(-0.4039932467854021); // Set group 1 bol bias 03 (VRL) to 0.41357184702417576 Volts Pacs_BOLC_SET_VRL_G1(0.41357184702417576); // Set group 1 bol bias 20 (VH_BLIND) to 2.1759648938728384 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1759648938728384); // Set group 2 bol bias 01 (VH) to 2.1433243650504217 Volts Pacs_BOLC_SET_VH_G2(2.1433243650504217); // Set group 2 bol bias 02 (VL) to -0.45667563494957836 Volts Pacs_BOLC_SET_VL_G2(-0.45667563494957836); // Set group 2 bol bias 03 (VRL) to 0.3850880425693594 Volts Pacs_BOLC_SET_VRL_G2(0.3850880425693594); // Set group 2 bol bias 20 (VH_BLIND) to 2.14235260562423 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14235260562423); // Set group 3 bol bias 01 (VH) to 2.1686669393324536 Volts Pacs_BOLC_SET_VH_G3(2.1686669393324536); // Set group 3 bol bias 02 (VL) to -0.43133306066754634 Volts Pacs_BOLC_SET_VL_G3(-0.43133306066754634); // Set group 3 bol bias 03 (VRL) to 0.41346974712361556 Volts Pacs_BOLC_SET_VRL_G3(0.41346974712361556); // Set group 3 bol bias 20 (VH_BLIND) to 2.17026203238048 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.17026203238048); // Set group 4 bol bias 01 (VH) to 2.1793962970285237 Volts Pacs_BOLC_SET_VH_G4(2.1793962970285237); // Set group 4 bol bias 02 (VL) to -0.42060370297147653 Volts Pacs_BOLC_SET_VL_G4(-0.42060370297147653); // Set group 4 bol bias 03 (VRL) to 0.39239244557899233 Volts Pacs_BOLC_SET_VRL_G4(0.39239244557899233); // Set group 4 bol bias 20 (VH_BLIND) to 2.149377418431709 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.149377418431709); // Set group 5 bol bias 01 (VH) to 1.8624422796333608 Volts Pacs_BOLC_SET_VH_G5(1.8624422796333608); // Set group 5 bol bias 02 (VL) to -0.3375577203666393 Volts Pacs_BOLC_SET_VL_G5(-0.3375577203666393); // Set group 5 bol bias 03 (VRL) to 0.4028017551941114 Volts Pacs_BOLC_SET_VRL_G5(0.4028017551941114); // Set group 5 bol bias 20 (VH_BLIND) to 2.156343875220547 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156343875220547); // Set group 6 bol bias 01 (VH) to 1.9050654119965236 Volts Pacs_BOLC_SET_VH_G6(1.9050654119965236); // Set group 6 bol bias 02 (VL) to -0.2949345880034766 Volts Pacs_BOLC_SET_VL_G6(-0.2949345880034766); // Set group 6 bol bias 03 (VRL) to 0.42788441761189455 Volts Pacs_BOLC_SET_VRL_G6(0.42788441761189455); // Set group 6 bol bias 20 (VH_BLIND) to 2.1844170100895375 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1844170100895375); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3796037366573897 Volts Pacs_BOLC_SET_VH_G1(2.3796037366573897); // Set group 1 bol bias 02 (VL) to -0.4203962633426101 Volts Pacs_BOLC_SET_VL_G1(-0.4203962633426101); // Set group 1 bol bias 03 (VRL) to 0.4129099400989898 Volts Pacs_BOLC_SET_VRL_G1(0.4129099400989898); // Set group 1 bol bias 20 (VH_BLIND) to 2.175181344026924 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175181344026924); // Set group 2 bol bias 01 (VH) to 2.315754480139234 Volts Pacs_BOLC_SET_VH_G2(2.315754480139234); // Set group 2 bol bias 02 (VL) to -0.4842455198607661 Volts Pacs_BOLC_SET_VL_G2(-0.4842455198607661); // Set group 2 bol bias 03 (VRL) to 0.38156757008948644 Volts Pacs_BOLC_SET_VRL_G2(0.38156757008948644); // Set group 2 bol bias 20 (VH_BLIND) to 2.138266993828065 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.138266993828065); // Set group 3 bol bias 01 (VH) to 2.3449665772192874 Volts Pacs_BOLC_SET_VH_G3(2.3449665772192874); // Set group 3 bol bias 02 (VL) to -0.45503342278071257 Volts Pacs_BOLC_SET_VL_G3(-0.45503342278071257); // Set group 3 bol bias 03 (VRL) to 0.4122322683327103 Volts Pacs_BOLC_SET_VRL_G3(0.4122322683327103); // Set group 3 bol bias 20 (VH_BLIND) to 2.1688938193526224 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1688938193526224); // Set group 4 bol bias 01 (VH) to 2.360152158437928 Volts Pacs_BOLC_SET_VH_G4(2.360152158437928); // Set group 4 bol bias 02 (VL) to -0.4398478415620719 Volts Pacs_BOLC_SET_VL_G4(-0.4398478415620719); // Set group 4 bol bias 03 (VRL) to 0.39354738531821554 Volts Pacs_BOLC_SET_VRL_G4(0.39354738531821554); // Set group 4 bol bias 20 (VH_BLIND) to 2.150696897295742 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150696897295742); // Set group 5 bol bias 01 (VH) to 2.0139550919820626 Volts Pacs_BOLC_SET_VH_G5(2.0139550919820626); // Set group 5 bol bias 02 (VL) to -0.38604490801793717 Volts Pacs_BOLC_SET_VL_G5(-0.38604490801793717); // Set group 5 bol bias 03 (VRL) to 0.39874967908065667 Volts Pacs_BOLC_SET_VRL_G5(0.39874967908065667); // Set group 5 bol bias 20 (VH_BLIND) to 2.151495860090233 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151495860090233); // Set group 6 bol bias 01 (VH) to 2.0603593375586526 Volts Pacs_BOLC_SET_VH_G6(2.0603593375586526); // Set group 6 bol bias 02 (VL) to -0.3396406624413473 Volts Pacs_BOLC_SET_VL_G6(-0.3396406624413473); // Set group 6 bol bias 03 (VRL) to 0.4254561262075288 Volts Pacs_BOLC_SET_VRL_G6(0.4254561262075288); // Set group 6 bol bias 20 (VH_BLIND) to 2.1814861909041072 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1814861909041072); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6080079699591967 Volts Pacs_BOLC_SET_VH_G1(2.6080079699591967); // Set group 1 bol bias 02 (VL) to -0.39199203004080335 Volts Pacs_BOLC_SET_VL_G1(-0.39199203004080335); // Set group 1 bol bias 03 (VRL) to 0.4353039674693117 Volts Pacs_BOLC_SET_VRL_G1(0.4353039674693117); // Set group 1 bol bias 20 (VH_BLIND) to 2.2016826896367014 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2016826896367014); // Set group 2 bol bias 01 (VH) to 2.5212704911688184 Volts Pacs_BOLC_SET_VH_G2(2.5212704911688184); // Set group 2 bol bias 02 (VL) to -0.4787295088311815 Volts Pacs_BOLC_SET_VL_G2(-0.4787295088311815); // Set group 2 bol bias 03 (VRL) to 0.39184175711517744 Volts Pacs_BOLC_SET_VRL_G2(0.39184175711517744); // Set group 2 bol bias 20 (VH_BLIND) to 2.150192531202592 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150192531202592); // Set group 3 bol bias 01 (VH) to 2.5446946302676037 Volts Pacs_BOLC_SET_VH_G3(2.5446946302676037); // Set group 3 bol bias 02 (VL) to -0.4553053697323962 Volts Pacs_BOLC_SET_VL_G3(-0.4553053697323962); // Set group 3 bol bias 03 (VRL) to 0.41118382754245053 Volts Pacs_BOLC_SET_VRL_G3(0.41118382754245053); // Set group 3 bol bias 20 (VH_BLIND) to 2.1677345299207764 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1677345299207764); // Set group 4 bol bias 01 (VH) to 2.582263974911207 Volts Pacs_BOLC_SET_VH_G4(2.582263974911207); // Set group 4 bol bias 02 (VL) to -0.4177360250887929 Volts Pacs_BOLC_SET_VL_G4(-0.4177360250887929); // Set group 4 bol bias 03 (VRL) to 0.4155747259799741 Volts Pacs_BOLC_SET_VRL_G4(0.4155747259799741); // Set group 4 bol bias 20 (VH_BLIND) to 2.1758807093660604 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1758807093660604); // Set group 5 bol bias 01 (VH) to 2.2123399887514554 Volts Pacs_BOLC_SET_VH_G5(2.2123399887514554); // Set group 5 bol bias 02 (VL) to -0.38766001124854466 Volts Pacs_BOLC_SET_VL_G5(-0.38766001124854466); // Set group 5 bol bias 03 (VRL) to 0.4257278403385899 Volts Pacs_BOLC_SET_VRL_G5(0.4257278403385899); // Set group 5 bol bias 20 (VH_BLIND) to 2.1837591130416554 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1837591130416554); // Set group 6 bol bias 01 (VH) to 2.2318001783201304 Volts Pacs_BOLC_SET_VH_G6(2.2318001783201304); // Set group 6 bol bias 02 (VL) to -0.36819982167986975 Volts Pacs_BOLC_SET_VL_G6(-0.36819982167986975); // Set group 6 bol bias 03 (VRL) to 0.423759377774352 Volts Pacs_BOLC_SET_VRL_G6(0.423759377774352); // Set group 6 bol bias 20 (VH_BLIND) to 2.1794381888209813 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1794381888209813); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PAcS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS2 at 58.0 K // corresponding to 1.55pW on the green and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4721285832931112 Volts Pacs_BOLC_SET_VH_G1(1.4721285832931112); // Set group 1 bol bias 02 (VL) to -0.12787141670688873 Volts Pacs_BOLC_SET_VL_G1(-0.12787141670688873); // Set group 1 bol bias 03 (VRL) to 0.3926297476827718 Volts Pacs_BOLC_SET_VRL_G1(0.3926297476827718); // Set group 1 bol bias 20 (VH_BLIND) to 2.151154074587398 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151154074587398); // Set group 2 bol bias 01 (VH) to 1.4563242224495716 Volts Pacs_BOLC_SET_VH_G2(1.4563242224495716); // Set group 2 bol bias 02 (VL) to -0.14367577755042849 Volts Pacs_BOLC_SET_VL_G2(-0.14367577755042849); // Set group 2 bol bias 03 (VRL) to 0.3881765529411487 Volts Pacs_BOLC_SET_VRL_G2(0.3881765529411487); // Set group 2 bol bias 20 (VH_BLIND) to 2.145937513130471 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.145937513130471); // Set group 3 bol bias 01 (VH) to 1.45972772124239 Volts Pacs_BOLC_SET_VH_G3(1.45972772124239); // Set group 3 bol bias 02 (VL) to -0.14027227875761006 Volts Pacs_BOLC_SET_VL_G3(-0.14027227875761006); // Set group 3 bol bias 03 (VRL) to 0.38988919840997094 Volts Pacs_BOLC_SET_VRL_G3(0.38988919840997094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1442125685158864 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1442125685158864); // Set group 4 bol bias 01 (VH) to 1.4747276174033868 Volts Pacs_BOLC_SET_VH_G4(1.4747276174033868); // Set group 4 bol bias 02 (VL) to -0.12527238259661322 Volts Pacs_BOLC_SET_VL_G4(-0.12527238259661322); // Set group 4 bol bias 03 (VRL) to 0.38624222870786595 Volts Pacs_BOLC_SET_VRL_G4(0.38624222870786595); // Set group 4 bol bias 20 (VH_BLIND) to 2.1423530627314813 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1423530627314813); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3734713392363535 Volts Pacs_BOLC_SET_VRL_G5(0.3734713392363535); // Set group 5 bol bias 20 (VH_BLIND) to 2.1211616404276756 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1211616404276756); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3640870527167945 Volts Pacs_BOLC_SET_VRL_G6(0.3640870527167945); // Set group 6 bol bias 20 (VH_BLIND) to 2.1074512769294307 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1074512769294307); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6005646067625168 Volts Pacs_BOLC_SET_VH_G1(1.6005646067625168); // Set group 1 bol bias 02 (VL) to -0.19943539323748327 Volts Pacs_BOLC_SET_VL_G1(-0.19943539323748327); // Set group 1 bol bias 03 (VRL) to 0.3927137250656313 Volts Pacs_BOLC_SET_VRL_G1(0.3927137250656313); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512536862532445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512536862532445); // Set group 2 bol bias 01 (VH) to 1.5835245401299414 Volts Pacs_BOLC_SET_VH_G2(1.5835245401299414); // Set group 2 bol bias 02 (VL) to -0.21647545987005867 Volts Pacs_BOLC_SET_VL_G2(-0.21647545987005867); // Set group 2 bol bias 03 (VRL) to 0.3880497715778095 Volts Pacs_BOLC_SET_VRL_G2(0.3880497715778095); // Set group 2 bol bias 20 (VH_BLIND) to 2.1457903439369534 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1457903439369534); // Set group 3 bol bias 01 (VH) to 1.5867464604266623 Volts Pacs_BOLC_SET_VH_G3(1.5867464604266623); // Set group 3 bol bias 02 (VL) to -0.2132535395733377 Volts Pacs_BOLC_SET_VL_G3(-0.2132535395733377); // Set group 3 bol bias 03 (VRL) to 0.3903025295231384 Volts Pacs_BOLC_SET_VRL_G3(0.3903025295231384); // Set group 3 bol bias 20 (VH_BLIND) to 2.144668449205875 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144668449205875); // Set group 4 bol bias 01 (VH) to 1.6044364991789073 Volts Pacs_BOLC_SET_VH_G4(1.6044364991789073); // Set group 4 bol bias 02 (VL) to -0.19556350082109264 Volts Pacs_BOLC_SET_VL_G4(-0.19556350082109264); // Set group 4 bol bias 03 (VRL) to 0.387662053519384 Volts Pacs_BOLC_SET_VRL_G4(0.387662053519384); // Set group 4 bol bias 20 (VH_BLIND) to 2.1439743820479262 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1439743820479262); // Set group 5 bol bias 01 (VH) to 1.3451907640885556 Volts Pacs_BOLC_SET_VH_G5(1.3451907640885556); // Set group 5 bol bias 02 (VL) to -0.054809235911444244 Volts Pacs_BOLC_SET_VL_G5(-0.054809235911444244); // Set group 5 bol bias 03 (VRL) to 0.40021084689056974 Volts Pacs_BOLC_SET_VRL_G5(0.40021084689056974); // Set group 5 bol bias 20 (VH_BLIND) to 2.1532482013507512 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1532482013507512); // Set group 6 bol bias 01 (VH) to 1.39 Volts Pacs_BOLC_SET_VH_G6(1.39); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.4344512926668127 Volts Pacs_BOLC_SET_VRL_G6(0.4344512926668127); // Set group 6 bol bias 20 (VH_BLIND) to 2.192323231555507 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.192323231555507); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7330644465100378 Volts Pacs_BOLC_SET_VH_G1(1.7330644465100378); // Set group 1 bol bias 02 (VL) to -0.26693555348996223 Volts Pacs_BOLC_SET_VL_G1(-0.26693555348996223); // Set group 1 bol bias 03 (VRL) to 0.3923254235050375 Volts Pacs_BOLC_SET_VRL_G1(0.3923254235050375); // Set group 1 bol bias 20 (VH_BLIND) to 2.1507930978184753 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1507930978184753); // Set group 2 bol bias 01 (VH) to 1.714453661934205 Volts Pacs_BOLC_SET_VH_G2(1.714453661934205); // Set group 2 bol bias 02 (VL) to -0.2855463380657951 Volts Pacs_BOLC_SET_VL_G2(-0.2855463380657951); // Set group 2 bol bias 03 (VRL) to 0.38771628761093724 Volts Pacs_BOLC_SET_VRL_G2(0.38771628761093724); // Set group 2 bol bias 20 (VH_BLIND) to 2.1454032366160996 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1454032366160996); // Set group 3 bol bias 01 (VH) to 1.7283831876482196 Volts Pacs_BOLC_SET_VH_G3(1.7283831876482196); // Set group 3 bol bias 02 (VL) to -0.2716168123517804 Volts Pacs_BOLC_SET_VL_G3(-0.2716168123517804); // Set group 3 bol bias 03 (VRL) to 0.40171045250948384 Volts Pacs_BOLC_SET_VRL_G3(0.40171045250948384); // Set group 3 bol bias 20 (VH_BLIND) to 2.157256007066197 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157256007066197); // Set group 4 bol bias 01 (VH) to 1.7381239240265867 Volts Pacs_BOLC_SET_VH_G4(1.7381239240265867); // Set group 4 bol bias 02 (VL) to -0.26187607597341334 Volts Pacs_BOLC_SET_VL_G4(-0.26187607597341334); // Set group 4 bol bias 03 (VRL) to 0.38896138623469356 Volts Pacs_BOLC_SET_VRL_G4(0.38896138623469356); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454582711839105 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454582711839105); // Set group 5 bol bias 01 (VH) to 1.4703496551390403 Volts Pacs_BOLC_SET_VH_G5(1.4703496551390403); // Set group 5 bol bias 02 (VL) to -0.12965034486095992 Volts Pacs_BOLC_SET_VL_G5(-0.12965034486095992); // Set group 5 bol bias 03 (VRL) to 0.39904033450461596 Volts Pacs_BOLC_SET_VRL_G5(0.39904033450461596); // Set group 5 bol bias 20 (VH_BLIND) to 2.151844445053932 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151844445053932); // Set group 6 bol bias 01 (VH) to 1.5181165758982518 Volts Pacs_BOLC_SET_VH_G6(1.5181165758982518); // Set group 6 bol bias 02 (VL) to -0.08188342410174834 Volts Pacs_BOLC_SET_VL_G6(-0.08188342410174834); // Set group 6 bol bias 03 (VRL) to 0.4343226272779045 Volts Pacs_BOLC_SET_VRL_G6(0.4343226272779045); // Set group 6 bol bias 20 (VH_BLIND) to 2.1921697898825356 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1921697898825356); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8730534488812565 Volts Pacs_BOLC_SET_VH_G1(1.8730534488812565); // Set group 1 bol bias 02 (VL) to -0.3269465511187437 Volts Pacs_BOLC_SET_VL_G1(-0.3269465511187437); // Set group 1 bol bias 03 (VRL) to 0.3922166883004623 Volts Pacs_BOLC_SET_VRL_G1(0.3922166883004623); // Set group 1 bol bias 20 (VH_BLIND) to 2.1506641222123926 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1506641222123926); // Set group 2 bol bias 01 (VH) to 1.8512060220322217 Volts Pacs_BOLC_SET_VH_G2(1.8512060220322217); // Set group 2 bol bias 02 (VL) to -0.34879397796777845 Volts Pacs_BOLC_SET_VL_G2(-0.34879397796777845); // Set group 2 bol bias 03 (VRL) to 0.3869592141320811 Volts Pacs_BOLC_SET_VRL_G2(0.3869592141320811); // Set group 2 bol bias 20 (VH_BLIND) to 2.1445244519836626 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1445244519836626); // Set group 3 bol bias 01 (VH) to 1.8654619469621685 Volts Pacs_BOLC_SET_VH_G3(1.8654619469621685); // Set group 3 bol bias 02 (VL) to -0.33453805303783174 Volts Pacs_BOLC_SET_VL_G3(-0.33453805303783174); // Set group 3 bol bias 03 (VRL) to 0.40224166318840543 Volts Pacs_BOLC_SET_VRL_G3(0.40224166318840543); // Set group 3 bol bias 20 (VH_BLIND) to 2.1578437499437477 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1578437499437477); // Set group 4 bol bias 01 (VH) to 1.8790483325189686 Volts Pacs_BOLC_SET_VH_G4(1.8790483325189686); // Set group 4 bol bias 02 (VL) to -0.32095166748103154 Volts Pacs_BOLC_SET_VL_G4(-0.32095166748103154); // Set group 4 bol bias 03 (VRL) to 0.39052544771082365 Volts Pacs_BOLC_SET_VRL_G4(0.39052544771082365); // Set group 4 bol bias 20 (VH_BLIND) to 2.1472446958154223 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1472446958154223); // Set group 5 bol bias 01 (VH) to 1.5997463742933684 Volts Pacs_BOLC_SET_VH_G5(1.5997463742933684); // Set group 5 bol bias 02 (VL) to -0.2002536257066316 Volts Pacs_BOLC_SET_VL_G5(-0.2002536257066316); // Set group 5 bol bias 03 (VRL) to 0.3972802806465645 Volts Pacs_BOLC_SET_VRL_G5(0.3972802806465645); // Set group 5 bol bias 20 (VH_BLIND) to 2.1497335299275955 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1497335299275955); // Set group 6 bol bias 01 (VH) to 1.64826517003746 Volts Pacs_BOLC_SET_VH_G6(1.64826517003746); // Set group 6 bol bias 02 (VL) to -0.1517348299625401 Volts Pacs_BOLC_SET_VL_G6(-0.1517348299625401); // Set group 6 bol bias 03 (VRL) to 0.43238698345346915 Volts Pacs_BOLC_SET_VRL_G6(0.43238698345346915); // Set group 6 bol bias 20 (VH_BLIND) to 2.189850849172478 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.189850849172478); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.034145377320728 Volts Pacs_BOLC_SET_VH_G1(2.034145377320728); // Set group 1 bol bias 02 (VL) to -0.36585462267927166 Volts Pacs_BOLC_SET_VL_G1(-0.36585462267927166); // Set group 1 bol bias 03 (VRL) to 0.4026842358176688 Volts Pacs_BOLC_SET_VRL_G1(0.4026842358176688); // Set group 1 bol bias 20 (VH_BLIND) to 2.163077213168135 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163077213168135); // Set group 2 bol bias 01 (VH) to 1.9964246373780308 Volts Pacs_BOLC_SET_VH_G2(1.9964246373780308); // Set group 2 bol bias 02 (VL) to -0.40357536262196914 Volts Pacs_BOLC_SET_VL_G2(-0.40357536262196914); // Set group 2 bol bias 03 (VRL) to 0.38543545754038677 Volts Pacs_BOLC_SET_VRL_G2(0.38543545754038677); // Set group 2 bol bias 20 (VH_BLIND) to 2.1427558304354366 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1427558304354366); // Set group 3 bol bias 01 (VH) to 2.0225756539924595 Volts Pacs_BOLC_SET_VH_G3(2.0225756539924595); // Set group 3 bol bias 02 (VL) to -0.37742434600754043 Volts Pacs_BOLC_SET_VL_G3(-0.37742434600754043); // Set group 3 bol bias 03 (VRL) to 0.41362905220735763 Volts Pacs_BOLC_SET_VRL_G3(0.41362905220735763); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704381594190805 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704381594190805); // Set group 4 bol bias 01 (VH) to 2.0286801589025623 Volts Pacs_BOLC_SET_VH_G4(2.0286801589025623); // Set group 4 bol bias 02 (VL) to -0.37131984109743765 Volts Pacs_BOLC_SET_VL_G4(-0.37131984109743765); // Set group 4 bol bias 03 (VRL) to 0.39131683434261844 Volts Pacs_BOLC_SET_VRL_G4(0.39131683434261844); // Set group 4 bol bias 20 (VH_BLIND) to 2.14814867942076 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.14814867942076); // Set group 5 bol bias 01 (VH) to 1.7436864671540049 Volts Pacs_BOLC_SET_VH_G5(1.7436864671540049); // Set group 5 bol bias 02 (VL) to -0.2563135328459952 Volts Pacs_BOLC_SET_VL_G5(-0.2563135328459952); // Set group 5 bol bias 03 (VRL) to 0.4060804936984878 Volts Pacs_BOLC_SET_VRL_G5(0.4060804936984878); // Set group 5 bol bias 20 (VH_BLIND) to 2.1602616898977316 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1602616898977316); // Set group 6 bol bias 01 (VH) to 1.7834132365202005 Volts Pacs_BOLC_SET_VH_G6(1.7834132365202005); // Set group 6 bol bias 02 (VL) to -0.21658676347979958 Volts Pacs_BOLC_SET_VL_G6(-0.21658676347979958); // Set group 6 bol bias 03 (VRL) to 0.43021242094743417 Volts Pacs_BOLC_SET_VRL_G6(0.43021242094743417); // Set group 6 bol bias 20 (VH_BLIND) to 2.1872266025341247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1872266025341247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.209416047586087 Volts Pacs_BOLC_SET_VH_G1(2.209416047586087); // Set group 1 bol bias 02 (VL) to -0.3905839524139128 Volts Pacs_BOLC_SET_VL_G1(-0.3905839524139128); // Set group 1 bol bias 03 (VRL) to 0.4134679213904496 Volts Pacs_BOLC_SET_VRL_G1(0.4134679213904496); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758418687268812 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758418687268812); // Set group 2 bol bias 01 (VH) to 2.1541915675147214 Volts Pacs_BOLC_SET_VH_G2(2.1541915675147214); // Set group 2 bol bias 02 (VL) to -0.44580843248527846 Volts Pacs_BOLC_SET_VL_G2(-0.44580843248527846); // Set group 2 bol bias 03 (VRL) to 0.38424319746039115 Volts Pacs_BOLC_SET_VRL_G2(0.38424319746039115); // Set group 2 bol bias 20 (VH_BLIND) to 2.1413720715536493 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1413720715536493); // Set group 3 bol bias 01 (VH) to 2.1813068162319285 Volts Pacs_BOLC_SET_VH_G3(2.1813068162319285); // Set group 3 bol bias 02 (VL) to -0.4186931837680716 Volts Pacs_BOLC_SET_VL_G3(-0.4186931837680716); // Set group 3 bol bias 03 (VRL) to 0.41360319513591143 Volts Pacs_BOLC_SET_VRL_G3(0.41360319513591143); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704095720713417 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704095720713417); // Set group 4 bol bias 01 (VH) to 2.202944386753124 Volts Pacs_BOLC_SET_VH_G4(2.202944386753124); // Set group 4 bol bias 02 (VL) to -0.3970556132468757 Volts Pacs_BOLC_SET_VL_G4(-0.3970556132468757); // Set group 4 bol bias 03 (VRL) to 0.40381007074137704 Volts Pacs_BOLC_SET_VRL_G4(0.40381007074137704); // Set group 4 bol bias 20 (VH_BLIND) to 2.1624292794462514 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1624292794462514); // Set group 5 bol bias 01 (VH) to 1.883738472848583 Volts Pacs_BOLC_SET_VH_G5(1.883738472848583); // Set group 5 bol bias 02 (VL) to -0.31626152715141714 Volts Pacs_BOLC_SET_VL_G5(-0.31626152715141714); // Set group 5 bol bias 03 (VRL) to 0.4028494691164935 Volts Pacs_BOLC_SET_VRL_G5(0.4028494691164935); // Set group 5 bol bias 20 (VH_BLIND) to 2.156400882301432 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156400882301432); // Set group 6 bol bias 01 (VH) to 1.9235912310846244 Volts Pacs_BOLC_SET_VH_G6(1.9235912310846244); // Set group 6 bol bias 02 (VL) to -0.2764087689153759 Volts Pacs_BOLC_SET_VL_G6(-0.2764087689153759); // Set group 6 bol bias 03 (VRL) to 0.4280070912945936 Volts Pacs_BOLC_SET_VRL_G6(0.4280070912945936); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845650655206446 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845650655206446); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3806926938420414 Volts Pacs_BOLC_SET_VH_G1(2.3806926938420414); // Set group 1 bol bias 02 (VL) to -0.41930730615795847 Volts Pacs_BOLC_SET_VL_G1(-0.41930730615795847); // Set group 1 bol bias 03 (VRL) to 0.4020155079485436 Volts Pacs_BOLC_SET_VRL_G1(0.4020155079485436); // Set group 1 bol bias 20 (VH_BLIND) to 2.162285695776181 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162285695776181); // Set group 2 bol bias 01 (VH) to 2.3371282046100963 Volts Pacs_BOLC_SET_VH_G2(2.3371282046100963); // Set group 2 bol bias 02 (VL) to -0.46287179538990364 Volts Pacs_BOLC_SET_VL_G2(-0.46287179538990364); // Set group 2 bol bias 03 (VRL) to 0.3923402298587034 Volts Pacs_BOLC_SET_VRL_G2(0.3923402298587034); // Set group 2 bol bias 20 (VH_BLIND) to 2.1507712805161225 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1507712805161225); // Set group 3 bol bias 01 (VH) to 2.356604953923699 Volts Pacs_BOLC_SET_VH_G3(2.356604953923699); // Set group 3 bol bias 02 (VL) to -0.44339504607630065 Volts Pacs_BOLC_SET_VL_G3(-0.44339504607630065); // Set group 3 bol bias 03 (VRL) to 0.4124662568673877 Volts Pacs_BOLC_SET_VRL_G3(0.4124662568673877); // Set group 3 bol bias 20 (VH_BLIND) to 2.169152536126319 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169152536126319); // Set group 4 bol bias 01 (VH) to 2.3825039100730487 Volts Pacs_BOLC_SET_VH_G4(2.3825039100730487); // Set group 4 bol bias 02 (VL) to -0.4174960899269509 Volts Pacs_BOLC_SET_VL_G4(-0.4174960899269509); // Set group 4 bol bias 03 (VRL) to 0.40493410269973024 Volts Pacs_BOLC_SET_VRL_G4(0.40493410269973024); // Set group 4 bol bias 20 (VH_BLIND) to 2.1637149679245193 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1637149679245193); // Set group 5 bol bias 01 (VH) to 2.0340896725156363 Volts Pacs_BOLC_SET_VH_G5(2.0340896725156363); // Set group 5 bol bias 02 (VL) to -0.3659103274843634 Volts Pacs_BOLC_SET_VL_G5(-0.3659103274843634); // Set group 5 bol bias 03 (VRL) to 0.3987896988621052 Volts Pacs_BOLC_SET_VRL_G5(0.3987896988621052); // Set group 5 bol bias 20 (VH_BLIND) to 2.1515438563527702 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1515438563527702); // Set group 6 bol bias 01 (VH) to 2.080247845760918 Volts Pacs_BOLC_SET_VH_G6(2.080247845760918); // Set group 6 bol bias 02 (VL) to -0.31975215423908154 Volts Pacs_BOLC_SET_VL_G6(-0.31975215423908154); // Set group 6 bol bias 03 (VRL) to 0.42577779561759777 Volts Pacs_BOLC_SET_VRL_G6(0.42577779561759777); // Set group 6 bol bias 20 (VH_BLIND) to 2.1818744401374954 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1818744401374954); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6181566702818313 Volts Pacs_BOLC_SET_VH_G1(2.6181566702818313); // Set group 1 bol bias 02 (VL) to -0.38184332971816887 Volts Pacs_BOLC_SET_VL_G1(-0.38184332971816887); // Set group 1 bol bias 03 (VRL) to 0.43545225816479755 Volts Pacs_BOLC_SET_VRL_G1(0.43545225816479755); // Set group 1 bol bias 20 (VH_BLIND) to 2.2018572484354544 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2018572484354544); // Set group 2 bol bias 01 (VH) to 2.5300933623498008 Volts Pacs_BOLC_SET_VH_G2(2.5300933623498008); // Set group 2 bol bias 02 (VL) to -0.469906637650199 Volts Pacs_BOLC_SET_VL_G2(-0.469906637650199); // Set group 2 bol bias 03 (VRL) to 0.3917176926734228 Volts Pacs_BOLC_SET_VRL_G2(0.3917176926734228); // Set group 2 bol bias 20 (VH_BLIND) to 2.1500484890692286 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1500484890692286); // Set group 3 bol bias 01 (VH) to 2.5545115967606167 Volts Pacs_BOLC_SET_VH_G3(2.5545115967606167); // Set group 3 bol bias 02 (VL) to -0.4454884032393832 Volts Pacs_BOLC_SET_VL_G3(-0.4454884032393832); // Set group 3 bol bias 03 (VRL) to 0.41136249367186684 Volts Pacs_BOLC_SET_VRL_G3(0.41136249367186684); // Set group 3 bol bias 20 (VH_BLIND) to 2.1679320914489204 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1679320914489204); // Set group 4 bol bias 01 (VH) to 2.591852678092942 Volts Pacs_BOLC_SET_VH_G4(2.591852678092942); // Set group 4 bol bias 02 (VL) to -0.408147321907058 Volts Pacs_BOLC_SET_VL_G4(-0.408147321907058); // Set group 4 bol bias 03 (VRL) to 0.4158848845694993 Volts Pacs_BOLC_SET_VRL_G4(0.4158848845694993); // Set group 4 bol bias 20 (VH_BLIND) to 2.176235181901646 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176235181901646); // Set group 5 bol bias 01 (VH) to 2.231303538712061 Volts Pacs_BOLC_SET_VH_G5(2.231303538712061); // Set group 5 bol bias 02 (VL) to -0.36869646128793887 Volts Pacs_BOLC_SET_VL_G5(-0.36869646128793887); // Set group 5 bol bias 03 (VRL) to 0.4261159129370585 Volts Pacs_BOLC_SET_VRL_G5(0.4261159129370585); // Set group 5 bol bias 20 (VH_BLIND) to 2.1842235863263286 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1842235863263286); // Set group 6 bol bias 01 (VH) to 2.2493043049150576 Volts Pacs_BOLC_SET_VH_G6(2.2493043049150576); // Set group 6 bol bias 02 (VL) to -0.3506956950849426 Volts Pacs_BOLC_SET_VL_G6(-0.3506956950849426); // Set group 6 bol bias 03 (VRL) to 0.4237159708307814 Volts Pacs_BOLC_SET_VRL_G6(0.4237159708307814); // Set group 6 bol bias 20 (VH_BLIND) to 2.179385794698645 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.179385794698645); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // //********************************************** // Set the PAcS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS0 at 48.0 K // corresponding to 0.90pW on the blue and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4721285832931112 Volts Pacs_BOLC_SET_VH_G1(1.4721285832931112); // Set group 1 bol bias 02 (VL) to -0.12787141670688873 Volts Pacs_BOLC_SET_VL_G1(-0.12787141670688873); // Set group 1 bol bias 03 (VRL) to 0.3926297476827718 Volts Pacs_BOLC_SET_VRL_G1(0.3926297476827718); // Set group 1 bol bias 20 (VH_BLIND) to 2.151154074587398 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151154074587398); // Set group 2 bol bias 01 (VH) to 1.4563242224495716 Volts Pacs_BOLC_SET_VH_G2(1.4563242224495716); // Set group 2 bol bias 02 (VL) to -0.14367577755042849 Volts Pacs_BOLC_SET_VL_G2(-0.14367577755042849); // Set group 2 bol bias 03 (VRL) to 0.3881765529411487 Volts Pacs_BOLC_SET_VRL_G2(0.3881765529411487); // Set group 2 bol bias 20 (VH_BLIND) to 2.145937513130471 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.145937513130471); // Set group 3 bol bias 01 (VH) to 1.45972772124239 Volts Pacs_BOLC_SET_VH_G3(1.45972772124239); // Set group 3 bol bias 02 (VL) to -0.14027227875761006 Volts Pacs_BOLC_SET_VL_G3(-0.14027227875761006); // Set group 3 bol bias 03 (VRL) to 0.38988919840997094 Volts Pacs_BOLC_SET_VRL_G3(0.38988919840997094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1442125685158864 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1442125685158864); // Set group 4 bol bias 01 (VH) to 1.4747276174033868 Volts Pacs_BOLC_SET_VH_G4(1.4747276174033868); // Set group 4 bol bias 02 (VL) to -0.12527238259661322 Volts Pacs_BOLC_SET_VL_G4(-0.12527238259661322); // Set group 4 bol bias 03 (VRL) to 0.38624222870786595 Volts Pacs_BOLC_SET_VRL_G4(0.38624222870786595); // Set group 4 bol bias 20 (VH_BLIND) to 2.1423530627314813 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1423530627314813); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3734713392363535 Volts Pacs_BOLC_SET_VRL_G5(0.3734713392363535); // Set group 5 bol bias 20 (VH_BLIND) to 2.1211616404276756 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1211616404276756); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3640870527167945 Volts Pacs_BOLC_SET_VRL_G6(0.3640870527167945); // Set group 6 bol bias 20 (VH_BLIND) to 2.1074512769294307 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1074512769294307); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6005646067625168 Volts Pacs_BOLC_SET_VH_G1(1.6005646067625168); // Set group 1 bol bias 02 (VL) to -0.19943539323748327 Volts Pacs_BOLC_SET_VL_G1(-0.19943539323748327); // Set group 1 bol bias 03 (VRL) to 0.3927137250656313 Volts Pacs_BOLC_SET_VRL_G1(0.3927137250656313); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512536862532445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512536862532445); // Set group 2 bol bias 01 (VH) to 1.5835245401299414 Volts Pacs_BOLC_SET_VH_G2(1.5835245401299414); // Set group 2 bol bias 02 (VL) to -0.21647545987005867 Volts Pacs_BOLC_SET_VL_G2(-0.21647545987005867); // Set group 2 bol bias 03 (VRL) to 0.3880497715778095 Volts Pacs_BOLC_SET_VRL_G2(0.3880497715778095); // Set group 2 bol bias 20 (VH_BLIND) to 2.1457903439369534 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1457903439369534); // Set group 3 bol bias 01 (VH) to 1.5867464604266623 Volts Pacs_BOLC_SET_VH_G3(1.5867464604266623); // Set group 3 bol bias 02 (VL) to -0.2132535395733377 Volts Pacs_BOLC_SET_VL_G3(-0.2132535395733377); // Set group 3 bol bias 03 (VRL) to 0.3903025295231384 Volts Pacs_BOLC_SET_VRL_G3(0.3903025295231384); // Set group 3 bol bias 20 (VH_BLIND) to 2.144668449205875 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144668449205875); // Set group 4 bol bias 01 (VH) to 1.6044364991789073 Volts Pacs_BOLC_SET_VH_G4(1.6044364991789073); // Set group 4 bol bias 02 (VL) to -0.19556350082109264 Volts Pacs_BOLC_SET_VL_G4(-0.19556350082109264); // Set group 4 bol bias 03 (VRL) to 0.387662053519384 Volts Pacs_BOLC_SET_VRL_G4(0.387662053519384); // Set group 4 bol bias 20 (VH_BLIND) to 2.1439743820479262 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1439743820479262); // Set group 5 bol bias 01 (VH) to 1.3451907640885556 Volts Pacs_BOLC_SET_VH_G5(1.3451907640885556); // Set group 5 bol bias 02 (VL) to -0.054809235911444244 Volts Pacs_BOLC_SET_VL_G5(-0.054809235911444244); // Set group 5 bol bias 03 (VRL) to 0.40021084689056974 Volts Pacs_BOLC_SET_VRL_G5(0.40021084689056974); // Set group 5 bol bias 20 (VH_BLIND) to 2.1532482013507512 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1532482013507512); // Set group 6 bol bias 01 (VH) to 1.39 Volts Pacs_BOLC_SET_VH_G6(1.39); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.4344512926668127 Volts Pacs_BOLC_SET_VRL_G6(0.4344512926668127); // Set group 6 bol bias 20 (VH_BLIND) to 2.192323231555507 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.192323231555507); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7330644465100378 Volts Pacs_BOLC_SET_VH_G1(1.7330644465100378); // Set group 1 bol bias 02 (VL) to -0.26693555348996223 Volts Pacs_BOLC_SET_VL_G1(-0.26693555348996223); // Set group 1 bol bias 03 (VRL) to 0.3923254235050375 Volts Pacs_BOLC_SET_VRL_G1(0.3923254235050375); // Set group 1 bol bias 20 (VH_BLIND) to 2.1507930978184753 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1507930978184753); // Set group 2 bol bias 01 (VH) to 1.714453661934205 Volts Pacs_BOLC_SET_VH_G2(1.714453661934205); // Set group 2 bol bias 02 (VL) to -0.2855463380657951 Volts Pacs_BOLC_SET_VL_G2(-0.2855463380657951); // Set group 2 bol bias 03 (VRL) to 0.38771628761093724 Volts Pacs_BOLC_SET_VRL_G2(0.38771628761093724); // Set group 2 bol bias 20 (VH_BLIND) to 2.1454032366160996 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1454032366160996); // Set group 3 bol bias 01 (VH) to 1.7283831876482196 Volts Pacs_BOLC_SET_VH_G3(1.7283831876482196); // Set group 3 bol bias 02 (VL) to -0.2716168123517804 Volts Pacs_BOLC_SET_VL_G3(-0.2716168123517804); // Set group 3 bol bias 03 (VRL) to 0.40171045250948384 Volts Pacs_BOLC_SET_VRL_G3(0.40171045250948384); // Set group 3 bol bias 20 (VH_BLIND) to 2.157256007066197 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157256007066197); // Set group 4 bol bias 01 (VH) to 1.7381239240265867 Volts Pacs_BOLC_SET_VH_G4(1.7381239240265867); // Set group 4 bol bias 02 (VL) to -0.26187607597341334 Volts Pacs_BOLC_SET_VL_G4(-0.26187607597341334); // Set group 4 bol bias 03 (VRL) to 0.38896138623469356 Volts Pacs_BOLC_SET_VRL_G4(0.38896138623469356); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454582711839105 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454582711839105); // Set group 5 bol bias 01 (VH) to 1.4703496551390403 Volts Pacs_BOLC_SET_VH_G5(1.4703496551390403); // Set group 5 bol bias 02 (VL) to -0.12965034486095992 Volts Pacs_BOLC_SET_VL_G5(-0.12965034486095992); // Set group 5 bol bias 03 (VRL) to 0.39904033450461596 Volts Pacs_BOLC_SET_VRL_G5(0.39904033450461596); // Set group 5 bol bias 20 (VH_BLIND) to 2.151844445053932 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151844445053932); // Set group 6 bol bias 01 (VH) to 1.5181165758982518 Volts Pacs_BOLC_SET_VH_G6(1.5181165758982518); // Set group 6 bol bias 02 (VL) to -0.08188342410174834 Volts Pacs_BOLC_SET_VL_G6(-0.08188342410174834); // Set group 6 bol bias 03 (VRL) to 0.4343226272779045 Volts Pacs_BOLC_SET_VRL_G6(0.4343226272779045); // Set group 6 bol bias 20 (VH_BLIND) to 2.1921697898825356 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1921697898825356); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8730534488812565 Volts Pacs_BOLC_SET_VH_G1(1.8730534488812565); // Set group 1 bol bias 02 (VL) to -0.3269465511187437 Volts Pacs_BOLC_SET_VL_G1(-0.3269465511187437); // Set group 1 bol bias 03 (VRL) to 0.3922166883004623 Volts Pacs_BOLC_SET_VRL_G1(0.3922166883004623); // Set group 1 bol bias 20 (VH_BLIND) to 2.1506641222123926 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1506641222123926); // Set group 2 bol bias 01 (VH) to 1.8512060220322217 Volts Pacs_BOLC_SET_VH_G2(1.8512060220322217); // Set group 2 bol bias 02 (VL) to -0.34879397796777845 Volts Pacs_BOLC_SET_VL_G2(-0.34879397796777845); // Set group 2 bol bias 03 (VRL) to 0.3869592141320811 Volts Pacs_BOLC_SET_VRL_G2(0.3869592141320811); // Set group 2 bol bias 20 (VH_BLIND) to 2.1445244519836626 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1445244519836626); // Set group 3 bol bias 01 (VH) to 1.8654619469621685 Volts Pacs_BOLC_SET_VH_G3(1.8654619469621685); // Set group 3 bol bias 02 (VL) to -0.33453805303783174 Volts Pacs_BOLC_SET_VL_G3(-0.33453805303783174); // Set group 3 bol bias 03 (VRL) to 0.40224166318840543 Volts Pacs_BOLC_SET_VRL_G3(0.40224166318840543); // Set group 3 bol bias 20 (VH_BLIND) to 2.1578437499437477 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1578437499437477); // Set group 4 bol bias 01 (VH) to 1.8790483325189686 Volts Pacs_BOLC_SET_VH_G4(1.8790483325189686); // Set group 4 bol bias 02 (VL) to -0.32095166748103154 Volts Pacs_BOLC_SET_VL_G4(-0.32095166748103154); // Set group 4 bol bias 03 (VRL) to 0.39052544771082365 Volts Pacs_BOLC_SET_VRL_G4(0.39052544771082365); // Set group 4 bol bias 20 (VH_BLIND) to 2.1472446958154223 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1472446958154223); // Set group 5 bol bias 01 (VH) to 1.5997463742933684 Volts Pacs_BOLC_SET_VH_G5(1.5997463742933684); // Set group 5 bol bias 02 (VL) to -0.2002536257066316 Volts Pacs_BOLC_SET_VL_G5(-0.2002536257066316); // Set group 5 bol bias 03 (VRL) to 0.3972802806465645 Volts Pacs_BOLC_SET_VRL_G5(0.3972802806465645); // Set group 5 bol bias 20 (VH_BLIND) to 2.1497335299275955 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1497335299275955); // Set group 6 bol bias 01 (VH) to 1.64826517003746 Volts Pacs_BOLC_SET_VH_G6(1.64826517003746); // Set group 6 bol bias 02 (VL) to -0.1517348299625401 Volts Pacs_BOLC_SET_VL_G6(-0.1517348299625401); // Set group 6 bol bias 03 (VRL) to 0.43238698345346915 Volts Pacs_BOLC_SET_VRL_G6(0.43238698345346915); // Set group 6 bol bias 20 (VH_BLIND) to 2.189850849172478 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.189850849172478); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.034145377320728 Volts Pacs_BOLC_SET_VH_G1(2.034145377320728); // Set group 1 bol bias 02 (VL) to -0.36585462267927166 Volts Pacs_BOLC_SET_VL_G1(-0.36585462267927166); // Set group 1 bol bias 03 (VRL) to 0.4026842358176688 Volts Pacs_BOLC_SET_VRL_G1(0.4026842358176688); // Set group 1 bol bias 20 (VH_BLIND) to 2.163077213168135 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163077213168135); // Set group 2 bol bias 01 (VH) to 1.9964246373780308 Volts Pacs_BOLC_SET_VH_G2(1.9964246373780308); // Set group 2 bol bias 02 (VL) to -0.40357536262196914 Volts Pacs_BOLC_SET_VL_G2(-0.40357536262196914); // Set group 2 bol bias 03 (VRL) to 0.38543545754038677 Volts Pacs_BOLC_SET_VRL_G2(0.38543545754038677); // Set group 2 bol bias 20 (VH_BLIND) to 2.1427558304354366 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1427558304354366); // Set group 3 bol bias 01 (VH) to 2.0225756539924595 Volts Pacs_BOLC_SET_VH_G3(2.0225756539924595); // Set group 3 bol bias 02 (VL) to -0.37742434600754043 Volts Pacs_BOLC_SET_VL_G3(-0.37742434600754043); // Set group 3 bol bias 03 (VRL) to 0.41362905220735763 Volts Pacs_BOLC_SET_VRL_G3(0.41362905220735763); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704381594190805 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704381594190805); // Set group 4 bol bias 01 (VH) to 2.0286801589025623 Volts Pacs_BOLC_SET_VH_G4(2.0286801589025623); // Set group 4 bol bias 02 (VL) to -0.37131984109743765 Volts Pacs_BOLC_SET_VL_G4(-0.37131984109743765); // Set group 4 bol bias 03 (VRL) to 0.39131683434261844 Volts Pacs_BOLC_SET_VRL_G4(0.39131683434261844); // Set group 4 bol bias 20 (VH_BLIND) to 2.14814867942076 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.14814867942076); // Set group 5 bol bias 01 (VH) to 1.7436864671540049 Volts Pacs_BOLC_SET_VH_G5(1.7436864671540049); // Set group 5 bol bias 02 (VL) to -0.2563135328459952 Volts Pacs_BOLC_SET_VL_G5(-0.2563135328459952); // Set group 5 bol bias 03 (VRL) to 0.4060804936984878 Volts Pacs_BOLC_SET_VRL_G5(0.4060804936984878); // Set group 5 bol bias 20 (VH_BLIND) to 2.1602616898977316 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1602616898977316); // Set group 6 bol bias 01 (VH) to 1.7834132365202005 Volts Pacs_BOLC_SET_VH_G6(1.7834132365202005); // Set group 6 bol bias 02 (VL) to -0.21658676347979958 Volts Pacs_BOLC_SET_VL_G6(-0.21658676347979958); // Set group 6 bol bias 03 (VRL) to 0.43021242094743417 Volts Pacs_BOLC_SET_VRL_G6(0.43021242094743417); // Set group 6 bol bias 20 (VH_BLIND) to 2.1872266025341247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1872266025341247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.209416047586087 Volts Pacs_BOLC_SET_VH_G1(2.209416047586087); // Set group 1 bol bias 02 (VL) to -0.3905839524139128 Volts Pacs_BOLC_SET_VL_G1(-0.3905839524139128); // Set group 1 bol bias 03 (VRL) to 0.4134679213904496 Volts Pacs_BOLC_SET_VRL_G1(0.4134679213904496); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758418687268812 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758418687268812); // Set group 2 bol bias 01 (VH) to 2.1541915675147214 Volts Pacs_BOLC_SET_VH_G2(2.1541915675147214); // Set group 2 bol bias 02 (VL) to -0.44580843248527846 Volts Pacs_BOLC_SET_VL_G2(-0.44580843248527846); // Set group 2 bol bias 03 (VRL) to 0.38424319746039115 Volts Pacs_BOLC_SET_VRL_G2(0.38424319746039115); // Set group 2 bol bias 20 (VH_BLIND) to 2.1413720715536493 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1413720715536493); // Set group 3 bol bias 01 (VH) to 2.1813068162319285 Volts Pacs_BOLC_SET_VH_G3(2.1813068162319285); // Set group 3 bol bias 02 (VL) to -0.4186931837680716 Volts Pacs_BOLC_SET_VL_G3(-0.4186931837680716); // Set group 3 bol bias 03 (VRL) to 0.41360319513591143 Volts Pacs_BOLC_SET_VRL_G3(0.41360319513591143); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704095720713417 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704095720713417); // Set group 4 bol bias 01 (VH) to 2.202944386753124 Volts Pacs_BOLC_SET_VH_G4(2.202944386753124); // Set group 4 bol bias 02 (VL) to -0.3970556132468757 Volts Pacs_BOLC_SET_VL_G4(-0.3970556132468757); // Set group 4 bol bias 03 (VRL) to 0.40381007074137704 Volts Pacs_BOLC_SET_VRL_G4(0.40381007074137704); // Set group 4 bol bias 20 (VH_BLIND) to 2.1624292794462514 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1624292794462514); // Set group 5 bol bias 01 (VH) to 1.883738472848583 Volts Pacs_BOLC_SET_VH_G5(1.883738472848583); // Set group 5 bol bias 02 (VL) to -0.31626152715141714 Volts Pacs_BOLC_SET_VL_G5(-0.31626152715141714); // Set group 5 bol bias 03 (VRL) to 0.4028494691164935 Volts Pacs_BOLC_SET_VRL_G5(0.4028494691164935); // Set group 5 bol bias 20 (VH_BLIND) to 2.156400882301432 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156400882301432); // Set group 6 bol bias 01 (VH) to 1.9235912310846244 Volts Pacs_BOLC_SET_VH_G6(1.9235912310846244); // Set group 6 bol bias 02 (VL) to -0.2764087689153759 Volts Pacs_BOLC_SET_VL_G6(-0.2764087689153759); // Set group 6 bol bias 03 (VRL) to 0.4280070912945936 Volts Pacs_BOLC_SET_VRL_G6(0.4280070912945936); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845650655206446 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845650655206446); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3806926938420414 Volts Pacs_BOLC_SET_VH_G1(2.3806926938420414); // Set group 1 bol bias 02 (VL) to -0.41930730615795847 Volts Pacs_BOLC_SET_VL_G1(-0.41930730615795847); // Set group 1 bol bias 03 (VRL) to 0.4020155079485436 Volts Pacs_BOLC_SET_VRL_G1(0.4020155079485436); // Set group 1 bol bias 20 (VH_BLIND) to 2.162285695776181 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162285695776181); // Set group 2 bol bias 01 (VH) to 2.3371282046100963 Volts Pacs_BOLC_SET_VH_G2(2.3371282046100963); // Set group 2 bol bias 02 (VL) to -0.46287179538990364 Volts Pacs_BOLC_SET_VL_G2(-0.46287179538990364); // Set group 2 bol bias 03 (VRL) to 0.3923402298587034 Volts Pacs_BOLC_SET_VRL_G2(0.3923402298587034); // Set group 2 bol bias 20 (VH_BLIND) to 2.1507712805161225 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1507712805161225); // Set group 3 bol bias 01 (VH) to 2.356604953923699 Volts Pacs_BOLC_SET_VH_G3(2.356604953923699); // Set group 3 bol bias 02 (VL) to -0.44339504607630065 Volts Pacs_BOLC_SET_VL_G3(-0.44339504607630065); // Set group 3 bol bias 03 (VRL) to 0.4124662568673877 Volts Pacs_BOLC_SET_VRL_G3(0.4124662568673877); // Set group 3 bol bias 20 (VH_BLIND) to 2.169152536126319 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169152536126319); // Set group 4 bol bias 01 (VH) to 2.3825039100730487 Volts Pacs_BOLC_SET_VH_G4(2.3825039100730487); // Set group 4 bol bias 02 (VL) to -0.4174960899269509 Volts Pacs_BOLC_SET_VL_G4(-0.4174960899269509); // Set group 4 bol bias 03 (VRL) to 0.40493410269973024 Volts Pacs_BOLC_SET_VRL_G4(0.40493410269973024); // Set group 4 bol bias 20 (VH_BLIND) to 2.1637149679245193 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1637149679245193); // Set group 5 bol bias 01 (VH) to 2.0340896725156363 Volts Pacs_BOLC_SET_VH_G5(2.0340896725156363); // Set group 5 bol bias 02 (VL) to -0.3659103274843634 Volts Pacs_BOLC_SET_VL_G5(-0.3659103274843634); // Set group 5 bol bias 03 (VRL) to 0.3987896988621052 Volts Pacs_BOLC_SET_VRL_G5(0.3987896988621052); // Set group 5 bol bias 20 (VH_BLIND) to 2.1515438563527702 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1515438563527702); // Set group 6 bol bias 01 (VH) to 2.080247845760918 Volts Pacs_BOLC_SET_VH_G6(2.080247845760918); // Set group 6 bol bias 02 (VL) to -0.31975215423908154 Volts Pacs_BOLC_SET_VL_G6(-0.31975215423908154); // Set group 6 bol bias 03 (VRL) to 0.42577779561759777 Volts Pacs_BOLC_SET_VRL_G6(0.42577779561759777); // Set group 6 bol bias 20 (VH_BLIND) to 2.1818744401374954 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1818744401374954); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6181566702818313 Volts Pacs_BOLC_SET_VH_G1(2.6181566702818313); // Set group 1 bol bias 02 (VL) to -0.38184332971816887 Volts Pacs_BOLC_SET_VL_G1(-0.38184332971816887); // Set group 1 bol bias 03 (VRL) to 0.43545225816479755 Volts Pacs_BOLC_SET_VRL_G1(0.43545225816479755); // Set group 1 bol bias 20 (VH_BLIND) to 2.2018572484354544 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2018572484354544); // Set group 2 bol bias 01 (VH) to 2.5300933623498008 Volts Pacs_BOLC_SET_VH_G2(2.5300933623498008); // Set group 2 bol bias 02 (VL) to -0.469906637650199 Volts Pacs_BOLC_SET_VL_G2(-0.469906637650199); // Set group 2 bol bias 03 (VRL) to 0.3917176926734228 Volts Pacs_BOLC_SET_VRL_G2(0.3917176926734228); // Set group 2 bol bias 20 (VH_BLIND) to 2.1500484890692286 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1500484890692286); // Set group 3 bol bias 01 (VH) to 2.5545115967606167 Volts Pacs_BOLC_SET_VH_G3(2.5545115967606167); // Set group 3 bol bias 02 (VL) to -0.4454884032393832 Volts Pacs_BOLC_SET_VL_G3(-0.4454884032393832); // Set group 3 bol bias 03 (VRL) to 0.41136249367186684 Volts Pacs_BOLC_SET_VRL_G3(0.41136249367186684); // Set group 3 bol bias 20 (VH_BLIND) to 2.1679320914489204 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1679320914489204); // Set group 4 bol bias 01 (VH) to 2.591852678092942 Volts Pacs_BOLC_SET_VH_G4(2.591852678092942); // Set group 4 bol bias 02 (VL) to -0.408147321907058 Volts Pacs_BOLC_SET_VL_G4(-0.408147321907058); // Set group 4 bol bias 03 (VRL) to 0.4158848845694993 Volts Pacs_BOLC_SET_VRL_G4(0.4158848845694993); // Set group 4 bol bias 20 (VH_BLIND) to 2.176235181901646 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176235181901646); // Set group 5 bol bias 01 (VH) to 2.231303538712061 Volts Pacs_BOLC_SET_VH_G5(2.231303538712061); // Set group 5 bol bias 02 (VL) to -0.36869646128793887 Volts Pacs_BOLC_SET_VL_G5(-0.36869646128793887); // Set group 5 bol bias 03 (VRL) to 0.4261159129370585 Volts Pacs_BOLC_SET_VRL_G5(0.4261159129370585); // Set group 5 bol bias 20 (VH_BLIND) to 2.1842235863263286 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1842235863263286); // Set group 6 bol bias 01 (VH) to 2.2493043049150576 Volts Pacs_BOLC_SET_VH_G6(2.2493043049150576); // Set group 6 bol bias 02 (VL) to -0.3506956950849426 Volts Pacs_BOLC_SET_VL_G6(-0.3506956950849426); // Set group 6 bol bias 03 (VRL) to 0.4237159708307814 Volts Pacs_BOLC_SET_VRL_G6(0.4237159708307814); // Set group 6 bol bias 20 (VH_BLIND) to 2.179385794698645 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.179385794698645); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PAcS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS1 at 58.0 K // corresponding to 1.25pW on the blue and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4721285832931112 Volts Pacs_BOLC_SET_VH_G1(1.4721285832931112); // Set group 1 bol bias 02 (VL) to -0.12787141670688873 Volts Pacs_BOLC_SET_VL_G1(-0.12787141670688873); // Set group 1 bol bias 03 (VRL) to 0.3926297476827718 Volts Pacs_BOLC_SET_VRL_G1(0.3926297476827718); // Set group 1 bol bias 20 (VH_BLIND) to 2.151154074587398 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151154074587398); // Set group 2 bol bias 01 (VH) to 1.4563242224495716 Volts Pacs_BOLC_SET_VH_G2(1.4563242224495716); // Set group 2 bol bias 02 (VL) to -0.14367577755042849 Volts Pacs_BOLC_SET_VL_G2(-0.14367577755042849); // Set group 2 bol bias 03 (VRL) to 0.3881765529411487 Volts Pacs_BOLC_SET_VRL_G2(0.3881765529411487); // Set group 2 bol bias 20 (VH_BLIND) to 2.145937513130471 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.145937513130471); // Set group 3 bol bias 01 (VH) to 1.45972772124239 Volts Pacs_BOLC_SET_VH_G3(1.45972772124239); // Set group 3 bol bias 02 (VL) to -0.14027227875761006 Volts Pacs_BOLC_SET_VL_G3(-0.14027227875761006); // Set group 3 bol bias 03 (VRL) to 0.38988919840997094 Volts Pacs_BOLC_SET_VRL_G3(0.38988919840997094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1442125685158864 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1442125685158864); // Set group 4 bol bias 01 (VH) to 1.4747276174033868 Volts Pacs_BOLC_SET_VH_G4(1.4747276174033868); // Set group 4 bol bias 02 (VL) to -0.12527238259661322 Volts Pacs_BOLC_SET_VL_G4(-0.12527238259661322); // Set group 4 bol bias 03 (VRL) to 0.38624222870786595 Volts Pacs_BOLC_SET_VRL_G4(0.38624222870786595); // Set group 4 bol bias 20 (VH_BLIND) to 2.1423530627314813 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1423530627314813); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3734713392363535 Volts Pacs_BOLC_SET_VRL_G5(0.3734713392363535); // Set group 5 bol bias 20 (VH_BLIND) to 2.1211616404276756 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1211616404276756); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3640870527167945 Volts Pacs_BOLC_SET_VRL_G6(0.3640870527167945); // Set group 6 bol bias 20 (VH_BLIND) to 2.1074512769294307 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1074512769294307); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6005646067625168 Volts Pacs_BOLC_SET_VH_G1(1.6005646067625168); // Set group 1 bol bias 02 (VL) to -0.19943539323748327 Volts Pacs_BOLC_SET_VL_G1(-0.19943539323748327); // Set group 1 bol bias 03 (VRL) to 0.3927137250656313 Volts Pacs_BOLC_SET_VRL_G1(0.3927137250656313); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512536862532445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512536862532445); // Set group 2 bol bias 01 (VH) to 1.5835245401299414 Volts Pacs_BOLC_SET_VH_G2(1.5835245401299414); // Set group 2 bol bias 02 (VL) to -0.21647545987005867 Volts Pacs_BOLC_SET_VL_G2(-0.21647545987005867); // Set group 2 bol bias 03 (VRL) to 0.3880497715778095 Volts Pacs_BOLC_SET_VRL_G2(0.3880497715778095); // Set group 2 bol bias 20 (VH_BLIND) to 2.1457903439369534 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1457903439369534); // Set group 3 bol bias 01 (VH) to 1.5867464604266623 Volts Pacs_BOLC_SET_VH_G3(1.5867464604266623); // Set group 3 bol bias 02 (VL) to -0.2132535395733377 Volts Pacs_BOLC_SET_VL_G3(-0.2132535395733377); // Set group 3 bol bias 03 (VRL) to 0.3903025295231384 Volts Pacs_BOLC_SET_VRL_G3(0.3903025295231384); // Set group 3 bol bias 20 (VH_BLIND) to 2.144668449205875 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144668449205875); // Set group 4 bol bias 01 (VH) to 1.6044364991789073 Volts Pacs_BOLC_SET_VH_G4(1.6044364991789073); // Set group 4 bol bias 02 (VL) to -0.19556350082109264 Volts Pacs_BOLC_SET_VL_G4(-0.19556350082109264); // Set group 4 bol bias 03 (VRL) to 0.387662053519384 Volts Pacs_BOLC_SET_VRL_G4(0.387662053519384); // Set group 4 bol bias 20 (VH_BLIND) to 2.1439743820479262 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1439743820479262); // Set group 5 bol bias 01 (VH) to 1.3451907640885556 Volts Pacs_BOLC_SET_VH_G5(1.3451907640885556); // Set group 5 bol bias 02 (VL) to -0.054809235911444244 Volts Pacs_BOLC_SET_VL_G5(-0.054809235911444244); // Set group 5 bol bias 03 (VRL) to 0.40021084689056974 Volts Pacs_BOLC_SET_VRL_G5(0.40021084689056974); // Set group 5 bol bias 20 (VH_BLIND) to 2.1532482013507512 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1532482013507512); // Set group 6 bol bias 01 (VH) to 1.39 Volts Pacs_BOLC_SET_VH_G6(1.39); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.4344512926668127 Volts Pacs_BOLC_SET_VRL_G6(0.4344512926668127); // Set group 6 bol bias 20 (VH_BLIND) to 2.192323231555507 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.192323231555507); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7330644465100378 Volts Pacs_BOLC_SET_VH_G1(1.7330644465100378); // Set group 1 bol bias 02 (VL) to -0.26693555348996223 Volts Pacs_BOLC_SET_VL_G1(-0.26693555348996223); // Set group 1 bol bias 03 (VRL) to 0.3923254235050375 Volts Pacs_BOLC_SET_VRL_G1(0.3923254235050375); // Set group 1 bol bias 20 (VH_BLIND) to 2.1507930978184753 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1507930978184753); // Set group 2 bol bias 01 (VH) to 1.714453661934205 Volts Pacs_BOLC_SET_VH_G2(1.714453661934205); // Set group 2 bol bias 02 (VL) to -0.2855463380657951 Volts Pacs_BOLC_SET_VL_G2(-0.2855463380657951); // Set group 2 bol bias 03 (VRL) to 0.38771628761093724 Volts Pacs_BOLC_SET_VRL_G2(0.38771628761093724); // Set group 2 bol bias 20 (VH_BLIND) to 2.1454032366160996 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1454032366160996); // Set group 3 bol bias 01 (VH) to 1.7283831876482196 Volts Pacs_BOLC_SET_VH_G3(1.7283831876482196); // Set group 3 bol bias 02 (VL) to -0.2716168123517804 Volts Pacs_BOLC_SET_VL_G3(-0.2716168123517804); // Set group 3 bol bias 03 (VRL) to 0.40171045250948384 Volts Pacs_BOLC_SET_VRL_G3(0.40171045250948384); // Set group 3 bol bias 20 (VH_BLIND) to 2.157256007066197 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157256007066197); // Set group 4 bol bias 01 (VH) to 1.7381239240265867 Volts Pacs_BOLC_SET_VH_G4(1.7381239240265867); // Set group 4 bol bias 02 (VL) to -0.26187607597341334 Volts Pacs_BOLC_SET_VL_G4(-0.26187607597341334); // Set group 4 bol bias 03 (VRL) to 0.38896138623469356 Volts Pacs_BOLC_SET_VRL_G4(0.38896138623469356); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454582711839105 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454582711839105); // Set group 5 bol bias 01 (VH) to 1.4703496551390403 Volts Pacs_BOLC_SET_VH_G5(1.4703496551390403); // Set group 5 bol bias 02 (VL) to -0.12965034486095992 Volts Pacs_BOLC_SET_VL_G5(-0.12965034486095992); // Set group 5 bol bias 03 (VRL) to 0.39904033450461596 Volts Pacs_BOLC_SET_VRL_G5(0.39904033450461596); // Set group 5 bol bias 20 (VH_BLIND) to 2.151844445053932 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151844445053932); // Set group 6 bol bias 01 (VH) to 1.5181165758982518 Volts Pacs_BOLC_SET_VH_G6(1.5181165758982518); // Set group 6 bol bias 02 (VL) to -0.08188342410174834 Volts Pacs_BOLC_SET_VL_G6(-0.08188342410174834); // Set group 6 bol bias 03 (VRL) to 0.4343226272779045 Volts Pacs_BOLC_SET_VRL_G6(0.4343226272779045); // Set group 6 bol bias 20 (VH_BLIND) to 2.1921697898825356 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1921697898825356); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8730534488812565 Volts Pacs_BOLC_SET_VH_G1(1.8730534488812565); // Set group 1 bol bias 02 (VL) to -0.3269465511187437 Volts Pacs_BOLC_SET_VL_G1(-0.3269465511187437); // Set group 1 bol bias 03 (VRL) to 0.3922166883004623 Volts Pacs_BOLC_SET_VRL_G1(0.3922166883004623); // Set group 1 bol bias 20 (VH_BLIND) to 2.1506641222123926 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1506641222123926); // Set group 2 bol bias 01 (VH) to 1.8512060220322217 Volts Pacs_BOLC_SET_VH_G2(1.8512060220322217); // Set group 2 bol bias 02 (VL) to -0.34879397796777845 Volts Pacs_BOLC_SET_VL_G2(-0.34879397796777845); // Set group 2 bol bias 03 (VRL) to 0.3869592141320811 Volts Pacs_BOLC_SET_VRL_G2(0.3869592141320811); // Set group 2 bol bias 20 (VH_BLIND) to 2.1445244519836626 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1445244519836626); // Set group 3 bol bias 01 (VH) to 1.8654619469621685 Volts Pacs_BOLC_SET_VH_G3(1.8654619469621685); // Set group 3 bol bias 02 (VL) to -0.33453805303783174 Volts Pacs_BOLC_SET_VL_G3(-0.33453805303783174); // Set group 3 bol bias 03 (VRL) to 0.40224166318840543 Volts Pacs_BOLC_SET_VRL_G3(0.40224166318840543); // Set group 3 bol bias 20 (VH_BLIND) to 2.1578437499437477 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1578437499437477); // Set group 4 bol bias 01 (VH) to 1.8790483325189686 Volts Pacs_BOLC_SET_VH_G4(1.8790483325189686); // Set group 4 bol bias 02 (VL) to -0.32095166748103154 Volts Pacs_BOLC_SET_VL_G4(-0.32095166748103154); // Set group 4 bol bias 03 (VRL) to 0.39052544771082365 Volts Pacs_BOLC_SET_VRL_G4(0.39052544771082365); // Set group 4 bol bias 20 (VH_BLIND) to 2.1472446958154223 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1472446958154223); // Set group 5 bol bias 01 (VH) to 1.5997463742933684 Volts Pacs_BOLC_SET_VH_G5(1.5997463742933684); // Set group 5 bol bias 02 (VL) to -0.2002536257066316 Volts Pacs_BOLC_SET_VL_G5(-0.2002536257066316); // Set group 5 bol bias 03 (VRL) to 0.3972802806465645 Volts Pacs_BOLC_SET_VRL_G5(0.3972802806465645); // Set group 5 bol bias 20 (VH_BLIND) to 2.1497335299275955 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1497335299275955); // Set group 6 bol bias 01 (VH) to 1.64826517003746 Volts Pacs_BOLC_SET_VH_G6(1.64826517003746); // Set group 6 bol bias 02 (VL) to -0.1517348299625401 Volts Pacs_BOLC_SET_VL_G6(-0.1517348299625401); // Set group 6 bol bias 03 (VRL) to 0.43238698345346915 Volts Pacs_BOLC_SET_VRL_G6(0.43238698345346915); // Set group 6 bol bias 20 (VH_BLIND) to 2.189850849172478 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.189850849172478); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.034145377320728 Volts Pacs_BOLC_SET_VH_G1(2.034145377320728); // Set group 1 bol bias 02 (VL) to -0.36585462267927166 Volts Pacs_BOLC_SET_VL_G1(-0.36585462267927166); // Set group 1 bol bias 03 (VRL) to 0.4026842358176688 Volts Pacs_BOLC_SET_VRL_G1(0.4026842358176688); // Set group 1 bol bias 20 (VH_BLIND) to 2.163077213168135 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163077213168135); // Set group 2 bol bias 01 (VH) to 1.9964246373780308 Volts Pacs_BOLC_SET_VH_G2(1.9964246373780308); // Set group 2 bol bias 02 (VL) to -0.40357536262196914 Volts Pacs_BOLC_SET_VL_G2(-0.40357536262196914); // Set group 2 bol bias 03 (VRL) to 0.38543545754038677 Volts Pacs_BOLC_SET_VRL_G2(0.38543545754038677); // Set group 2 bol bias 20 (VH_BLIND) to 2.1427558304354366 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1427558304354366); // Set group 3 bol bias 01 (VH) to 2.0225756539924595 Volts Pacs_BOLC_SET_VH_G3(2.0225756539924595); // Set group 3 bol bias 02 (VL) to -0.37742434600754043 Volts Pacs_BOLC_SET_VL_G3(-0.37742434600754043); // Set group 3 bol bias 03 (VRL) to 0.41362905220735763 Volts Pacs_BOLC_SET_VRL_G3(0.41362905220735763); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704381594190805 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704381594190805); // Set group 4 bol bias 01 (VH) to 2.0286801589025623 Volts Pacs_BOLC_SET_VH_G4(2.0286801589025623); // Set group 4 bol bias 02 (VL) to -0.37131984109743765 Volts Pacs_BOLC_SET_VL_G4(-0.37131984109743765); // Set group 4 bol bias 03 (VRL) to 0.39131683434261844 Volts Pacs_BOLC_SET_VRL_G4(0.39131683434261844); // Set group 4 bol bias 20 (VH_BLIND) to 2.14814867942076 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.14814867942076); // Set group 5 bol bias 01 (VH) to 1.7436864671540049 Volts Pacs_BOLC_SET_VH_G5(1.7436864671540049); // Set group 5 bol bias 02 (VL) to -0.2563135328459952 Volts Pacs_BOLC_SET_VL_G5(-0.2563135328459952); // Set group 5 bol bias 03 (VRL) to 0.4060804936984878 Volts Pacs_BOLC_SET_VRL_G5(0.4060804936984878); // Set group 5 bol bias 20 (VH_BLIND) to 2.1602616898977316 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1602616898977316); // Set group 6 bol bias 01 (VH) to 1.7834132365202005 Volts Pacs_BOLC_SET_VH_G6(1.7834132365202005); // Set group 6 bol bias 02 (VL) to -0.21658676347979958 Volts Pacs_BOLC_SET_VL_G6(-0.21658676347979958); // Set group 6 bol bias 03 (VRL) to 0.43021242094743417 Volts Pacs_BOLC_SET_VRL_G6(0.43021242094743417); // Set group 6 bol bias 20 (VH_BLIND) to 2.1872266025341247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1872266025341247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.209416047586087 Volts Pacs_BOLC_SET_VH_G1(2.209416047586087); // Set group 1 bol bias 02 (VL) to -0.3905839524139128 Volts Pacs_BOLC_SET_VL_G1(-0.3905839524139128); // Set group 1 bol bias 03 (VRL) to 0.4134679213904496 Volts Pacs_BOLC_SET_VRL_G1(0.4134679213904496); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758418687268812 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758418687268812); // Set group 2 bol bias 01 (VH) to 2.1541915675147214 Volts Pacs_BOLC_SET_VH_G2(2.1541915675147214); // Set group 2 bol bias 02 (VL) to -0.44580843248527846 Volts Pacs_BOLC_SET_VL_G2(-0.44580843248527846); // Set group 2 bol bias 03 (VRL) to 0.38424319746039115 Volts Pacs_BOLC_SET_VRL_G2(0.38424319746039115); // Set group 2 bol bias 20 (VH_BLIND) to 2.1413720715536493 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1413720715536493); // Set group 3 bol bias 01 (VH) to 2.1813068162319285 Volts Pacs_BOLC_SET_VH_G3(2.1813068162319285); // Set group 3 bol bias 02 (VL) to -0.4186931837680716 Volts Pacs_BOLC_SET_VL_G3(-0.4186931837680716); // Set group 3 bol bias 03 (VRL) to 0.41360319513591143 Volts Pacs_BOLC_SET_VRL_G3(0.41360319513591143); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704095720713417 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704095720713417); // Set group 4 bol bias 01 (VH) to 2.202944386753124 Volts Pacs_BOLC_SET_VH_G4(2.202944386753124); // Set group 4 bol bias 02 (VL) to -0.3970556132468757 Volts Pacs_BOLC_SET_VL_G4(-0.3970556132468757); // Set group 4 bol bias 03 (VRL) to 0.40381007074137704 Volts Pacs_BOLC_SET_VRL_G4(0.40381007074137704); // Set group 4 bol bias 20 (VH_BLIND) to 2.1624292794462514 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1624292794462514); // Set group 5 bol bias 01 (VH) to 1.883738472848583 Volts Pacs_BOLC_SET_VH_G5(1.883738472848583); // Set group 5 bol bias 02 (VL) to -0.31626152715141714 Volts Pacs_BOLC_SET_VL_G5(-0.31626152715141714); // Set group 5 bol bias 03 (VRL) to 0.4028494691164935 Volts Pacs_BOLC_SET_VRL_G5(0.4028494691164935); // Set group 5 bol bias 20 (VH_BLIND) to 2.156400882301432 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156400882301432); // Set group 6 bol bias 01 (VH) to 1.9235912310846244 Volts Pacs_BOLC_SET_VH_G6(1.9235912310846244); // Set group 6 bol bias 02 (VL) to -0.2764087689153759 Volts Pacs_BOLC_SET_VL_G6(-0.2764087689153759); // Set group 6 bol bias 03 (VRL) to 0.4280070912945936 Volts Pacs_BOLC_SET_VRL_G6(0.4280070912945936); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845650655206446 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845650655206446); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3806926938420414 Volts Pacs_BOLC_SET_VH_G1(2.3806926938420414); // Set group 1 bol bias 02 (VL) to -0.41930730615795847 Volts Pacs_BOLC_SET_VL_G1(-0.41930730615795847); // Set group 1 bol bias 03 (VRL) to 0.4020155079485436 Volts Pacs_BOLC_SET_VRL_G1(0.4020155079485436); // Set group 1 bol bias 20 (VH_BLIND) to 2.162285695776181 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162285695776181); // Set group 2 bol bias 01 (VH) to 2.3371282046100963 Volts Pacs_BOLC_SET_VH_G2(2.3371282046100963); // Set group 2 bol bias 02 (VL) to -0.46287179538990364 Volts Pacs_BOLC_SET_VL_G2(-0.46287179538990364); // Set group 2 bol bias 03 (VRL) to 0.3923402298587034 Volts Pacs_BOLC_SET_VRL_G2(0.3923402298587034); // Set group 2 bol bias 20 (VH_BLIND) to 2.1507712805161225 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1507712805161225); // Set group 3 bol bias 01 (VH) to 2.356604953923699 Volts Pacs_BOLC_SET_VH_G3(2.356604953923699); // Set group 3 bol bias 02 (VL) to -0.44339504607630065 Volts Pacs_BOLC_SET_VL_G3(-0.44339504607630065); // Set group 3 bol bias 03 (VRL) to 0.4124662568673877 Volts Pacs_BOLC_SET_VRL_G3(0.4124662568673877); // Set group 3 bol bias 20 (VH_BLIND) to 2.169152536126319 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169152536126319); // Set group 4 bol bias 01 (VH) to 2.3825039100730487 Volts Pacs_BOLC_SET_VH_G4(2.3825039100730487); // Set group 4 bol bias 02 (VL) to -0.4174960899269509 Volts Pacs_BOLC_SET_VL_G4(-0.4174960899269509); // Set group 4 bol bias 03 (VRL) to 0.40493410269973024 Volts Pacs_BOLC_SET_VRL_G4(0.40493410269973024); // Set group 4 bol bias 20 (VH_BLIND) to 2.1637149679245193 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1637149679245193); // Set group 5 bol bias 01 (VH) to 2.0340896725156363 Volts Pacs_BOLC_SET_VH_G5(2.0340896725156363); // Set group 5 bol bias 02 (VL) to -0.3659103274843634 Volts Pacs_BOLC_SET_VL_G5(-0.3659103274843634); // Set group 5 bol bias 03 (VRL) to 0.3987896988621052 Volts Pacs_BOLC_SET_VRL_G5(0.3987896988621052); // Set group 5 bol bias 20 (VH_BLIND) to 2.1515438563527702 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1515438563527702); // Set group 6 bol bias 01 (VH) to 2.080247845760918 Volts Pacs_BOLC_SET_VH_G6(2.080247845760918); // Set group 6 bol bias 02 (VL) to -0.31975215423908154 Volts Pacs_BOLC_SET_VL_G6(-0.31975215423908154); // Set group 6 bol bias 03 (VRL) to 0.42577779561759777 Volts Pacs_BOLC_SET_VRL_G6(0.42577779561759777); // Set group 6 bol bias 20 (VH_BLIND) to 2.1818744401374954 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1818744401374954); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6181566702818313 Volts Pacs_BOLC_SET_VH_G1(2.6181566702818313); // Set group 1 bol bias 02 (VL) to -0.38184332971816887 Volts Pacs_BOLC_SET_VL_G1(-0.38184332971816887); // Set group 1 bol bias 03 (VRL) to 0.43545225816479755 Volts Pacs_BOLC_SET_VRL_G1(0.43545225816479755); // Set group 1 bol bias 20 (VH_BLIND) to 2.2018572484354544 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2018572484354544); // Set group 2 bol bias 01 (VH) to 2.5300933623498008 Volts Pacs_BOLC_SET_VH_G2(2.5300933623498008); // Set group 2 bol bias 02 (VL) to -0.469906637650199 Volts Pacs_BOLC_SET_VL_G2(-0.469906637650199); // Set group 2 bol bias 03 (VRL) to 0.3917176926734228 Volts Pacs_BOLC_SET_VRL_G2(0.3917176926734228); // Set group 2 bol bias 20 (VH_BLIND) to 2.1500484890692286 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1500484890692286); // Set group 3 bol bias 01 (VH) to 2.5545115967606167 Volts Pacs_BOLC_SET_VH_G3(2.5545115967606167); // Set group 3 bol bias 02 (VL) to -0.4454884032393832 Volts Pacs_BOLC_SET_VL_G3(-0.4454884032393832); // Set group 3 bol bias 03 (VRL) to 0.41136249367186684 Volts Pacs_BOLC_SET_VRL_G3(0.41136249367186684); // Set group 3 bol bias 20 (VH_BLIND) to 2.1679320914489204 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1679320914489204); // Set group 4 bol bias 01 (VH) to 2.591852678092942 Volts Pacs_BOLC_SET_VH_G4(2.591852678092942); // Set group 4 bol bias 02 (VL) to -0.408147321907058 Volts Pacs_BOLC_SET_VL_G4(-0.408147321907058); // Set group 4 bol bias 03 (VRL) to 0.4158848845694993 Volts Pacs_BOLC_SET_VRL_G4(0.4158848845694993); // Set group 4 bol bias 20 (VH_BLIND) to 2.176235181901646 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176235181901646); // Set group 5 bol bias 01 (VH) to 2.231303538712061 Volts Pacs_BOLC_SET_VH_G5(2.231303538712061); // Set group 5 bol bias 02 (VL) to -0.36869646128793887 Volts Pacs_BOLC_SET_VL_G5(-0.36869646128793887); // Set group 5 bol bias 03 (VRL) to 0.4261159129370585 Volts Pacs_BOLC_SET_VRL_G5(0.4261159129370585); // Set group 5 bol bias 20 (VH_BLIND) to 2.1842235863263286 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1842235863263286); // Set group 6 bol bias 01 (VH) to 2.2493043049150576 Volts Pacs_BOLC_SET_VH_G6(2.2493043049150576); // Set group 6 bol bias 02 (VL) to -0.3506956950849426 Volts Pacs_BOLC_SET_VL_G6(-0.3506956950849426); // Set group 6 bol bias 03 (VRL) to 0.4237159708307814 Volts Pacs_BOLC_SET_VRL_G6(0.4237159708307814); // Set group 6 bol bias 20 (VH_BLIND) to 2.179385794698645 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.179385794698645); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************** // Epilogue : Set the safe biases //******************************** PHOT_set_bias_volt(endBiasTable,1); PHOT_set_bias_volt(endBiasTable,2); PHOT_set_bias_volt(endBiasTable,3); PHOT_set_bias_volt(endBiasTable,4); PHOT_set_bias_volt(endBiasTable,5); PHOT_set_bias_volt(endBiasTable,6); // // sync the bus sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_Mec_Setup_Cold { /* No variables to call PacsEng_Spec_Gra_Mec_Setup_Cold */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Mec_Setup_Cold */ }{ // 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(PACS_Spec_Gra_Mec_Setup_Cold())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_Mec_Setup_Cold(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpireBbPcalFlash // // execute PCAL calibration // // K.J. King // block SpireBbPcalFlash SPIRE 10241 { string flashMode = "PFlash" in ["PFlash","SFlash"]; int step = 0; }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB PCAL Flash started"); SpireMsg(2," $Id: SpireBbPcalFlash.txt,v 1.3 2006/12/05 14:48:06 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP hstr = SpireHexStr(step,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(" + hstr + ")"); Spire_SET_OBS_STEP_RAW(step); // // Time synchronisation tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RESET_DRCU_COUNTERS_RAW()"); Spire_RESET_DRCU_COUNTERS_RAW(); delay(2); // if(flashMode == "SFlash") { // Move SMEC to HOME position int home = ilookup("SMEC.txt","HOME","ivalue"); SpireSendDrcuCmd(0x90450000 + home,0); // set position SpireSendDrcuCmd(0x90490001,0); // move SpireSendDrcuCmd(0x90490000,0); // hold position delay(2); } // int id = ilookup("CommandLists.txt","Flash","Id"); // number of table containing the flash command list int index = ilookup("CommandLists.txt","Flash","Index"); // istart point in table containing the flash command list int nParms = ilookup("CommandLists.txt","Flash","Nparms"); // number of parameters to the flash command list int lowBias = ilookup("Flash.txt",flashMode,"LowBias"); int highBias = ilookup("Flash.txt",flashMode,"HighBias"); int cycles = ilookup("Flash.txt",flashMode,"Cycles"); int period = ilookup("Flash.txt",flashMode,"Period"); int dcuFrame = ilookup("Flash.txt",flashMode,"DcuFrame"); int dcuSamples = ilookup("Flash.txt",flashMode,"DcuSamples"); int dcuDelay = ilookup("Flash.txt",flashMode,"DcuDelay"); int scuMode = ilookup("Flash.txt",flashMode,"ScuMode"); int scuSamples = ilookup("Flash.txt",flashMode,"ScuSamples"); {int}[] parms = [{lowBias},{highBias},{cycles},{period},{dcuFrame},{dcuSamples},{dcuDelay},{scuMode},{scuSamples}]; tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RUN_VM_RAW(" + id + "," + index + "," + nParms + "," + parms + ")"); Spire_RUN_VM_RAW(id,index,nParms,parms); delay(period * cycles / 1000000 + 2); // // // ..... completion ..... // // flush data tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_FLUSH_FIFO_RAW(0x1000)"); Spire_FLUSH_FIFO_RAW(0x5000); delay(2); tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB PCAL Flash ended"); SpireMsg(1," ..PCAL Flash (" + (time() - t) + " seconds)"); } // $Id: PacsEng_Spec_SPU_Reset.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_SPU_Reset_u { /* No variables to call PacsEng_Spec_SPU_Reset */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_SPU_Reset */ }{ // 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(PACS_Spec_SPU_Reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_SPU_Reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Phot_Sequencer_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Loading the sequencer to build up the signal (OBMO) // for normal DDCS mode // // Author : T. Mueller // CUSification : DAC // Arguments : none // // // Description : This script will set the sequencer, which is building // up the final signal and it sets the data mode // to "Bolo & HK". // This script should be executed just after the // switch-on procedure, the BOLC initialisation // and the bias settings (polarizer) // // Comments : Coded based on PhFPU UM, Draft 5, August 10, 2006 // // Version : 1.3 // History : 1.0 / 20-Apr-2004 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 11-aug-2006 TM: updated for PhFPU UM, draft 5, chapter 4.2.2 // 1.3 26-oct-2006 TM: data mode Bolo & Hk is set in the end // procedure PACS_Phot_Sequencer_Setup { }{ // ------------------------------------------------------------ // ------------------------------------------------------------ // PhFPU UM, draft 5: // 4.2.2 Loading the sequencer // Programmable Sequencer loading script for "Hacheur" mode // ------------------------------------------------------------ // ------------------------------------------------------------ // Set clock mux stop //# P 09 00 00 00 int operand = 0x9000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 0 time 0 clk 20 //# P 0C 00 0014 operand = 0xc000014; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 1 time 35 clk 52 //# P 0C 01 11B4 operand = 0xc0111b4; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 2 time 144 clk 116 //# P 0C 02 4874 operand = 0xc024874; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 3 time 153 clk 100 //# P 0C 03 4CE4 operand = 0xc034ce4; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 4 time 159 clk 108 //# P 0C 04 4FEC operand = 0xc044fec; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 5 time 280 clk 44 //# P 0C 05 8C2C operand = 0xc058c2c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 6 time 290 clk 36 //# P 0C 06 9124 operand = 0xc069124; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 7 time 294 clk 52 //# P 0C 07 9334 operand = 0xc079334; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 8 time 314 clk 20 //# P 0C 08 9B14 operand = 0xc089b14; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 9 time 322 clk 0 //# P 0C 09 A100 operand = 0xc09a100; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set clock mux sequencer //# P 09 00 00 01 operand = 0x9000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set data mode Bolo & HK //# P 09 02 00 01 operand = 0x9020001; Pacs_DMC_SEND_COMMAND_BOLC(operand); // --------------------------------------------- // //----------------- // End of Procedure //----------------- } // Missionphase : FMIST // // Purpose : CONFigure the servo grating loop using parameters read from // a CAL-U file // // Author : Pierre Royer // // Arguments : This version reads the ROW calUrow of the -calUname CAL-U file // string calUname Name of the CAL-U table // string calUrow Name of the ROW containing the desired controler params // // Version : 1.0 // History : 1.0 20-Jul-2007 PR // : procedure PACS_Spec_Gra_IST_Set_Ctrl_Par { }{ // Calibration Table string calUname = "CONFGrat"; // Row in table = Instrument Configuration string calUrow = "FMILT"; // 0 : rate read from calibration table; 1 : rate forced = 3 (homing request) int homing_mode_rate = 1; // // Read the demanded column of the given table. // Rows 0 to 8 int word0 = ilookup(calUname,calUrow,"Kp"); int word1 = ilookup(calUname,calUrow,"Ki"); int word2 = ilookup(calUname,calUrow,"Kd"); int word3 = ilookup(calUname,calUrow,"Kf"); int word4 = 3; if(homing_mode_rate == 0) { word4 = ilookup(calUname,calUrow,"Rate"); } int word5 = ilookup(calUname,calUrow,"AccLimit"); int word6 = ilookup(calUname,calUrow,"OutputLimit"); int word7 = ilookup(calUname,calUrow,"Scaling"); int word8 = ilookup(calUname,calUrow,"ErrorLimit"); // Create the parameter list tuple {int}[] params = [{word0},{word1},{word2},{word3},{word4},{word5},{word6},{word7},{word8}]; // Create the array for the checksum function int[] aux = [word0,word1,word2,word3,word4,word5,word6,word7,word8]; int chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_PAR(params,chksum); delay(1); } // Filename : Pacs_Spec_dark_current_pv // // Purpose : Short performance test Dark Current // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do dark current measurements in buffer transmission mode on // both CS positions. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and internal CSs switched off. // CDMS has to be switched to burst mode. After the end of the // test go back to nominal mode. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : 1.0 04-04-07 HD. IST update. // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 08-Apr-2008 HF adapted to in-flight default biases and heater values // based on PacsEng_Spec_dark_current_imt502 // 1.0 15-07-08 HD. Version now for PV. // procedure Pacs_Spec_dark_current_pv { string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position int gratPOS = 500000; // Grating Position }{ // Switch to burst mode Burstmode_setup_block(); // // Set-Up definition // reset interval in ramps int reset_inter = 512; // choose temperature blue det in raw units double blue_temp = 0.78; // heat-up time for blue detector heater in sec int heat_up_time = 900; // observing time in sec int obs_time = 420; // Move chopper to one CS PACS_Chopper_mov_abs_fm_bb(-21350); // Move Filter Wheel to Position A SPEC_fltw_move(fltPOS); // Move grating to a key wavelength SPEC_Gra_move_abs_raw(gratPOS); delay(15); // Set Temperature PACS_Spec_B_Heat_Setup(blue_temp); // Wait for stabilization of the temperature delay(heat_up_time); // CRE setup int ramp_len_red = reset_inter; int ramp_len_blu = reset_inter; double bias_d_red = 0.03; double bias_r_red = 3.0E-4; double bias_d_blu = 0.08; double bias_r_blu = 3.0E-4; int capa_red = 0; int capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // SPU setup int comp_mode_blu = 25; int comp_mode_red = 25; int nb_samp_subramp_blu = 16; int nb_samp_subramp_red = 16; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 1; bool startSPU = true; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Dark Current measurements for 7 minutes at CS1 position delay(obs_time); // Do SPU reset SPEC_spu_reset(); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // CRE setup to default values SPEC_CRE_No_Heater_setup(64,64,bias_d_red,0.01,bias_d_blu,0.01,12,12); // reset burst mode profile Burstmode_reset_block(); } // Missionphase : PACS IST // // Purpose : Spectroscopy to Non-Prime // // Author : H. Feuchtgruber // CUSification : DAC // // Arguments : None // // // Description : This script will disable and switch off mechanisms, // calibration sources // and detectors to go from spectroscopy to non-prime. // // // Comments : // // Version : 2.1 // History : 1.0 / 16-Dec-2002 initial version // 1.1 / 02-Jul-2003 added stop compression commands // 1.2 / 09-Oct-2003 Sytnax changes according to new TOPE // 1.3 / 26-Mar-2004 Adapted to DMC SUM 2.6 // 2.0 / 24-Aug-2004 Adapted for CQM and DMC SUM 3.1 // 2.1 / 10-Nov-2004 Editorial for IST, removed switch-off of // FPU T-sensors and FW turn // 2.2 10-apr-2006 Renamed to SpectroscopytoNonPrime procedure SpectroscopytoNonPrime { }{ debug_print("Start SpectroscopytoNonprime"); // DMC_DISABLE_BB1_CONT Pacs_DMC_DISABLE_BB_1_CONT(); delay(1); // DMC-SWITCH-OFF-BB-1-CONT" SWITCH OFF BLACK BODY 1 CONTROLLER Pacs_DMC_SWOF_BB_1_CONT(); // DMC_DISABLE_BB2_CONT Pacs_DMC_DISABLE_BB_2_CONT(); delay(1); // DMC-SWITCH-OFF-BB-2-CONT" SWITCH OFF BLACK BODY 1 CONTROLLER Pacs_DMC_SWOF_BB_2_CONT(); delay(1); // "DMC-DISABLE-CHOPPER-CONT" DISABLE CHOPPER CONTROLLER Pacs_DMC_DISABLE_CHOP_CONT(); delay(1); // "DMC-SWITCH-OFF-CHOP-CONT" SWITCH OFF CHOPPER CONTROLLER Pacs_DMC_SWOF_CHOP_CONT(); delay(1); // "DMC-DISABLE-GRATING-CONT" DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); // "DMC-SWITCH-OFF-GRAT-CONT" SWITCH OFF GRATING CONTROLLER Pacs_DMC_SWOF_GRAT_CONT(); // SPUS-STOP-REDUCT-COMPR Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // DMC_WRT_B_DEC_OPT(ID,LENGTH,4,CHKSUM) int[] argum = [4]; {int}[] argTuple = [{4}]; int chksum = checksum("int",argum); Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,chksum); delay(1); argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,chksum); delay(1); // "DMC-SWITCH-OFF-RED-SPEC" SWITCH OFF RED SPECTROMETER ARRAY POWER Pacs_DMC_SWOF_R_SPEC(); delay(1); // "DMC-SWITCH-OFF-BLUE-SPEC" SWITCH OFF BLUE SPECTROMETER ARRAY POWER Pacs_DMC_SWOF_B_SPEC(); delay(1); // "DMC-SWITCH-OFF-RED-DEC" SWITCH OFF RED DEC POWER Pacs_DMC_SWOF_R_DEC(); delay(1); // "DMC-SWITCH-OFF-BLUE-DEC" SWITCH OFF BLUE DEC POWER Pacs_DMC_SWOF_B_DEC(); delay(1); // DPU-SET-HK-LIST (NonPrime for both channels) Pacs_DPU_SET_HK_LIST("NO_PRIME","BOTH Array"); // End of Procedure } // $Id$ // Missionphase : PACS Commissiong Phase // // // // // Purpose : Ge:Ga detector Loop // // Author : Helmut Dannerbauer // CUS script : HD // CVS file : // // Arguments : bias, integration time, capacity, measurement time, resistor bias // // // Description : Loop over bias, integration time and capacity. // // Dependencies : - Pacs_Spec_GeGa_Loop_Comm // - WriteOBSID // - WriteEndID // // // Preconditions : - PACS is switched on // - Setup spectroscopy // - Mechanics and CS controllers are SWON and ENABLED // // Comments : // // Version : 1.0 // // History : 1.0 HD. 14-Apr-2008 initial version by HD. // 1.1 PR. 17-Apr-2008 See corresponding procedure // // obs PacsEng_Spec_GeGa_Loop_Comm { /* Needed variables to call PacsEng_Spec_GeGa_Loop_Comm */ int repeat_global = 15; // Global repetition factor (main loop) int repeat_intern = 2; // Repetition factor inside the bias loop (ramplen+capa loops) double[] bias_blue = [0.06,0.08,0.1,0.12]; //bias blue double[] bias_red = [0.03,0.04,0.05,0.06]; //bias red red int[] ramp_len_blue = [32,64]; //ramp length blue (set integration time) int[] ramp_len_red = [32,64]; //ramp length red (set integration time) int[] capa_blue = [8,12]; //capacity blue int[] capa_red = [8,12]; //capacity red int meas_time = 60; //observing time in seconds per setting double bias_res_blue = 0.01; //resistor bias blue double bias_res_red = 0.01; //resistor bias red int chop_pos = 0; //chopper position int grat_pos = 535000; // grating position string filter_pos = "POS A" in ["POS A","POS B"]; // FW position /* End of needed variables for PacsEng_Spec_GeGa_Loop_Comm */ }{ // 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(Pacs_Spec_GeGa_Loop_Comm(repeat_global,repeat_intern,bias_blue,bias_red,ramp_len_blue,ramp_len_red,capa_blue,capa_red,meas_time,bias_res_blue,bias_res_red,chop_pos,grat_pos,filter_pos))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_GeGa_Loop_Comm(repeat_global,repeat_intern,bias_blue,bias_red,ramp_len_blue,ramp_len_red,capa_blue,capa_red,meas_time,bias_res_blue,bias_res_red,chop_pos,grat_pos,filter_pos); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Spectrometer FoV Scan on the cryo cover // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 15-Apr-2008 Initial version by PR // obs PacsEng_Spec_GeGa_Chop_2_3 { /* Needed variables to call PacsEng_Spec_FoV_Scan */ int grat_pos = 535000; // Grating position string filter_pos = "POS A" in ["POS A","POS B"]; int nb_rdouts_ramp = 64; // Ramp length used in computation of OBCP duration only int nb_samp_subramp_blu = 64; // Red Subramp length (directly connected to ramp_fit_alg) int nb_samp_subramp_red = 64; // Blue Subramp length int ramp_fit_alg = 0 in [0,1]; // Ramp fit algorithm [0=LstSq;1=mean value] int nb_grat_steps = 1; // Number of grating steps P#2 int nb_SRC_OFF = 10; // Nb cycles grating position P#3 int nb_ramps_plateau = 2; // Nb of ramps per chopper plateau P#5 /* End of needed variables for PacsEng_Spec_FoV_Scan */ }{ // Fixed Parameters int nb_up_down = 1; // Number of sequences: up down up P#1 int grat_step_up = 0; // Grating step P#11 int grat_step_dn = 0; // Grating step P#12 int chop_pos_REF1 = 664; // Chopper position 1 P#4 int chop_pos_CS1 = -21350; // Chopper position on CS1 P#9 int chop_pos_CS2 = 21200; // Chopper position on CS2 P#10 int grat_time = 15000; // Grating time int grat_def_time = 15000; // Grating default time int chop_def = 664; // Chopper default position int detector = 1; // Detector to SYNCH on int grat_def = 500000; // Grating default int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression // // 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(PACS_Spec_GeGa_Chop_2_3(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_GeGa_Chop_2_3(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsEng_PHOT_orbit_epilogue.txt,v 1.4 2008/11/12 11:40:20 vanessad Exp $ // Purpose : Bring PACS from any state to the standard PHOT configuration // // CUS author : KO modified from PacsEng_PHOT_orbit_prologue // // Input arguments: see after module identification // // Return values // N/A // // Comments : // // History: // 1.0 19-may-2008 KO, Created by modifying PacsEng_PHOT_orbit_prologue // 1.1 20-may-2008 KO, Debugged for pointing timing logic // obs PacsEng_PHOT_orbit_epilogue { string calUfile = "BOLObias_preILT_standard_low"; //Bias table int tSET = 1; // Settling time for CS string fltPOS = "POS A"; // Filter double set_CS1 = 48.0; // set CS1 (ohms) double set_CS2 = 58.0; // set CS2 (ohms) bool gotoDirect = true in [true,false]; // DDCS setting to Direct mode }{ bool execute = true; // Initial hold int tih = imax(1,duration(WriteOBSID($OBSID))); // Final hold int tfh = imax(1,duration(WriteEndID())) + tSET; // Duration of "stable" pointing int tp = duration(PHOT_setup(calUfile,fltPOS,set_CS1,set_CS2,gotoDirect)); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the PHOT setup script PHOT_setup(calUfile,fltPOS,set_CS1,set_CS2,gotoDirect); } if(state[0] == 5) { // Wait for CS to stabilize delay(tSET); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 04-04-06 Refined on IST requirements. // : 2.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Spec_CS_imt511 { /* Needed variables to call PacsEng_Spec_CS_imt511 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CS_imt511 */ }{ // 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(SPEC_CS_imt511_bb())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_CS_imt511_bb(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Fil_Trapping_DEG_MODE // Missionphase : PACS FM ILT // // Purpose : Position sequence test of spectrometer filterwheel, intensively using the relative movements // // Author : PR // // Arguments : // // Description : Operations in 2 phases // Phase 1 Open loop movements of increasing size from both FW stop positions // Phase 2 Repetition of the same small open loop movements, from positions 45 degrees from the stop positions. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.0 // History : 1.0 / 12-May-2006 Creation // block PACS_Spec_Fil_Trapping_DEG_MODE PACS 179 { int num_iter = 2; // Number of repetitions of each sub-test block int maxkick = 15; // Maximal amplitude of the kicks in each sub-test block (degrees) }{ // Register start of BB WriteBBID($BBID); // double deg = 0.0; deg = 1536.0 / 360.0; // One degree in commanding units of the FW num_iter = 2 * num_iter; // int slew_time = 10; // max slew_time for any movement int kicktime = 4; // int fw_start = 0; // initial filter wheel position (0=A; 1=B) int fw_pos2 = (fw_start + 1) % 2; // // other filter wheel position // string[] fltPOS = ["POS A","POS B"]; // number of iterations in all the test loops // // SWON FW CONTROLLER Pacs_DMC_SWON_FW_SPEC(); delay(1); // // STARTING FROM FW STOP POSITION // ============================== // Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // int step = 0; double n = 0.0; // for(int loop0 = 0 .. num_iter - 1) { Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[loop0 % 2]); delay(slew_time); for(int npos = 1 .. maxkick) { n = double(npos); Pacs_DMC_MOVE_SPEC_FW_STEP(iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop1 = 0 .. num_iter - 1) { Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[loop1 % 2]); delay(slew_time); for(int nneg = 1 .. maxkick) { n = double(nneg); Pacs_DMC_MOVE_SPEC_FW_STEP(-1 * iround(n * deg)); delay(kicktime); } } // // 45 DEGREES FROM POSITION // ======================== Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop2 = 0 .. num_iter - 1) { for(int npos2 = 1 .. maxkick) { n = double(npos2); Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[loop2 % 2]); delay(slew_time + 5); Pacs_DMC_MOVE_SPEC_FW_STEP(iround(45.0 * deg)); delay(slew_time); // Pacs_DMC_MOVE_SPEC_FW_STEP(iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop3 = 0 .. num_iter - 1) { for(int nneg2 = 1 .. maxkick) { n = double(nneg2); Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[loop3 % 2]); delay(slew_time + 5); Pacs_DMC_MOVE_SPEC_FW_STEP(iround(-45.0 * deg)); delay(slew_time); // Pacs_DMC_MOVE_SPEC_FW_STEP(-1 * iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Perform one MOVE_GRATING_ABSOLUTE // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : target_pos : Grating target position // // Description : executes Pacs_DMC_MOVE_GRAT_ABS_RAW // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON, ENABLED and HOMED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : Since the amplitude of the movement cannot be computed, THIS BBlock/COMMAND DOES NOT INCLUDE ANY DELAY!!! // // Version : 2.0 // // History : 1.0 22-Sep-2005 Creation by PR // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_move_abs_raw { /* Needed variables to call PacsEng_Spec_Gra_move_abs_raw */ int target_pos = 500000; // Target position /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_move_abs_raw */ }{ // 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(SPEC_Gra_move_abs_raw(target_pos))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_Gra_move_abs_raw(target_pos); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the spec filter wheel for Nominal Warm // // Author : PR // // Arguments : // // Description : // // Comments : // // Version : 0.1 // History : 0.1 04-Jul-2007 Initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // obs PacsEng_CONF_spec_fltw_Warm { /* No variables to call PacsEng_CONF_spec_fltw_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_spec_fltw_Warm */ }{ // 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_spec_fltw_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS script ; SPEC_init_det_setup.cus // Missionphase : PACS AVM ILT // // Purpose : Prepare for Spectroscopy // // Author : H. Feuchtgruber // // Arguments : none // // CRE setup according to the DEC/MEC User's Manual // // 1. DMC_SWON_B_DEC to switch on the DEC // 2. Wait 8 seconds to get the 1355 connection between DEC and CPU board // 3. Send the complete set of default parameters. // First send a DMC_WRT_B_SPEC_PAR command with these values // (in hex: 20-8-18C-0-0-EA60-0-0). // 3a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // 4. DMC_SWON_B_SPEC to switch on the detector array // 5. Wait 15 seconds to let the switch on procedure run and all voltages // become stables // 6. Then, to activate the CREs (signal SELECT on the CREs), send the first // 3 parameters, i.e. DMC_WRT_B_SPEC_PAR command with these // values (length: 3, values in hex : 20- 8-18E). // 6a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // Note: with this command, we set bit1 to 1 (activate CRE). Bit0 // has been set to 1 by the DMC_SWON_B_SPEC command but, // bit0 is not commandable through the DMC_WRT_B_SPEC_PAR. // The only way to switch on/off the detector array is to use the // trigger commands. // 7. Then, you should set the bias voltages by writing the first 4 or 5 // parameters of the block. Make sure to copy the latest values you use // for the first 3 parameters. // // Description : Sets CRE parameters (see list of arguments). // User specifies cre_ctrl_xx as: // cre_ctrl: 256 to set "sync width=2" // 128 to set "T sensor on" // 2 to set "select" // 1 power on (not relevant here) // Script adds capa_xx to cre_ctrl_xx // xx_cre_ctrl = capa_xx + cre_ctrl_xx // xx_cre_ctrl gets written to the CRE register // Must be called on a stopped SPU. This procedure will // neither stop nor start SPU (call SPEC_spu_reset and // SPEC_spu_setup respectively for that) //// Description : Section "Initial detector setup" from SetupSpectroscopy.tcl, // v2.8 // // Comments : // // Version : 0.4 // History : 0.1 3-jul-2006 initial version // : 0.2 10-nov-2006 TM: inclusion of the CRE selection // 0.3 16-nov-2006 Revision for copy to OpDataBase // 0.4 11-feb-2008 DAC removed two spurious debug print // procedure SPEC_init_det_setup { }{ // Switchon B and R DEC power, wait 8 sec Pacs_DMC_SWON_B_DEC(); delay(8); Pacs_DMC_SWON_R_DEC(); delay(8); // Wait after DEC switch-on delay(5); // Now define the startup Ge:Ga detector parameters (to be performed in 3 steps) // The 3rd step - setting the bias voltages - is done by SPEC_cre_setup // 1st step int read_per_ramp_b = 8; int cre_ctrl_b = 396; double bias_r_b = 0.0; double bias_d_b = 0.0; int read_per_ramp_r = 8; int cre_ctrl_r = 396; double bias_r_r = 0.0; double bias_d_r = 0.0; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums // BLUe channel int i_blu_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_b); int i_blu_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_b); int clks_rdout = 32; int simul_reg = 60000; int[] aux = [clks_rdout,read_per_ramp_b,cre_ctrl_b,i_blu_bias_r,i_blu_bias_d,simul_reg]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(clks_rdout,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,simul_reg,check_sum); // RED channel int i_red_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_r); int i_red_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_r); aux = [clks_rdout,read_per_ramp_r,cre_ctrl_r,i_red_bias_r,i_red_bias_d,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(clks_rdout,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,simul_reg,check_sum); // SEND COMPLETE PARAMETERS TABLE TO Blue/RED DEC Pacs_DMC_SET_PAR_B_SPEC(); Pacs_DMC_SET_PAR_R_SPEC(); // SWITCH ON BLUE/RED SPECTROMETER ARRAY POWER Pacs_DMC_SWON_B_SPEC(); delay(1); Pacs_DMC_SWON_R_SPEC(); delay(1); // Wait for CRE HW sequence to finish delay(15); //////////////////////////////////////////// // 2nd step cre_ctrl_b = 398; cre_ctrl_r = 398; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums // BLUe channel aux = [clks_rdout,read_per_ramp_b,cre_ctrl_b,i_blu_bias_r,i_blu_bias_d,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(clks_rdout,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,simul_reg,check_sum); // RED channel aux = [clks_rdout,read_per_ramp_r,cre_ctrl_r,i_red_bias_r,i_red_bias_d,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(clks_rdout,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,simul_reg,check_sum); // SEND COMPLETE PARAMETERS TABLE TO Blue/RED DEC Pacs_DMC_SET_PAR_B_SPEC(); Pacs_DMC_SET_PAR_R_SPEC(); // End of script } // Script file : OBCP_chop_scan_phot.txt // Missionphase : // // Purpose : Chopper Up-Down Scan Photometry (OBCP 14, DMC Seq. 15) // This procedure is required to execute chopper scans across // the PACS field of view. The filter wheel is commanded // outside this OBCP. This procedure calls the sequence // described in sec. 4.1.9 // // OBCP author : HF // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Chop increasingly away from start position; then increasingly // closer to start position. Whole operation may be repeated nb_up_down times // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 6-apr-2006 DAC // 0.2 9-aug-2006 TM new default values // 0.3 8-sep-2006 DAC Use OBCP number rather than name // 0.4 10-oct-2006 DAC Back to OBCP name // int[] block OBCP_chop_scan_phot PACS 14 { int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 19; // P#2 number of readouts on step int nb_steps_up = 100; // P#3 number of steps up int nb_steps_dn = 100; // P#4 number of steps down int step_up = 200; // P#5 relative move up int step_dn = -200; // P#6 relative move down int detector = 4; // Detector to SYNCH on int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression int chop_start = -10000; // Chopper start position int chop_def = 0; // Chopper default position }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; debug_print("Bolo sample: " + bol_freq + " " + bol_unit); debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); debug_print("DMC/OBCP margins: " + dmc_margin + "/" + obcp_margin); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) // Here and elsewhere it is assumed that OBCP "internal" TCs take t_cmd // [msec] to be executed duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_start_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) // (all parameters filled by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the seq time int[] duree1 = DMC_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn); debug_print("Duration DMC_chop_scan_phot [rdouts] " + duree1); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration duree_msec = duree_msec + seq_time; // WAIT(seq_time) // Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8) + event duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // End // Duration: 8 x 200ms + seq_time + 0.5s // Now trigger execution of OBCP // This OBCP is number 14, requires 13 parameters and lasts seq_time [msec] // It calls DMC sequence 15 string obcp_ID = "CHOP_UPDOWN_PHOT"; int obcp_NB = 14; int obcp_par_nber = 13; int seq_DMC = 15; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_rdouts},{5,nb_steps_up},{6,nb_steps_dn},{7,step_up},{8,step_dn},{9,detector},{10,comp_mode_blu},{11,comp_mode_red},{12,chop_start},{13,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return return time_array; } // Filename : Pacs_Spec_QuickFullSpectrum // Purpose : Quick full spectral scan in about 1 hour in all bands // // // Input arguments Integrating capacitance blue (0,8,4,12) and red; chopper position // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP28 for executing quick full scans in both filters // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // Version : 1.1 // History : 1.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 1.1 08-Apr-2008 HF changed to in-flight defauilt biases // procedure Pacs_Spec_QuickFullSpectrum { int chop_def = 650; // chopper position during grating scan int capa_red = 12; // Red capacitor int capa_blu = 0; // Blue capacitor }{ // Fixed parameters int grating_start = 45000; // grating start position for scan\ int grating_stepsize = 1005; // grating step size int grating_numsteps = 995; // number of grating steps in one direction int grating_numramps = 2; // number of ramps per grating position int readoutsperramp = 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 chop_pos_CS1 = -21350; int chop_pos_CS2 = 21200; int detector = 1; // Synchronize on this detector 1:Blue 2:Red int nb_CS1_CS2 = 0; // number of cycles on calsources, 0=don't use them int nb_ramps_CS = 3; // number of ramps on CSs int grat_start_time = 15000; // time for grating to start [ms] int grat_def_time = 15000; // time for grating to go to default [ms] // // CRE settings int ramp_len_blu = readoutsperramp; int ramp_len_red = readoutsperramp; // Set up the blue and red CRE subsystem // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; // Give ENG values for the bias [v] double bias_r_blu = 0.01; double bias_r_red = 0.01; double bias_d_blu = 0.08; double bias_d_red = 0.03; // // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // Reset SPU // Move the filter wheel to Position B SPEC_fltw_move("POS B"); // internal flux check for filter B SPEC_fluxref("CS2","B"); // Write CRE parameters for scan SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // Scan in filter B OBCP_grat_scan_nochop(num_updown,grating_numsteps,grating_stepsize,-grating_stepsize,grating_numramps,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,nb_ramps_CS,grating_numsteps,chop_def,detector,grating_start,grat_start_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,readoutsperramp); // // Reset spu SPEC_spu_reset(); // Move the filter wheel to Position A SPEC_fltw_move("POS A"); // Flux check for filter A SPEC_fluxref("CS2","A"); // Write CRE parameters for scan SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // Scan in filter A OBCP_grat_scan_nochop(num_updown,grating_numsteps,grating_stepsize,-grating_stepsize,grating_numramps,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,nb_ramps_CS,grating_numsteps,chop_def,detector,grating_start,grat_start_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,readoutsperramp); // // Reset spu SPEC_spu_reset(); } // File : PACS_Phot_Sequencer_SetupNew.cus // Missionphase : PACS ILT3 // // Purpose : Loading the sequencer to build up the signal (OBMO) // for normal DDCS mode // // Author : E.Doumayrou & L.Rodriguez // CUSification : K.Okumura // Arguments : none // // // Description : This script will set the sequencer, which is building // up the final signal and it sets the data mode // to "Bolo & HK". // This script should be executed just after the // switch-on procedure, the BOLC initialisation // and the bias settings (polarizer) // // Comments : New! The values are set to decrease the noise in DDCS mode // 1.1 Also switch off VSMS during CKRL/VDECX switching // // Version : 1.0 // History : 1.0 14-Jun-2007 KO initial version with input from ED & LR // 1.1 16-Jun-2007 KO new set of values from ED & LR // procedure PACS_Phot_Sequencer_SetupNew { }{ // ------------------------------------------------------------ // ------------------------------------------------------------ // New sequencer to decrease the noise in DCSS mode // ------------------------------------------------------------ // ------------------------------------------------------------ // Set clock mux stop //# P 09 00 00 00 int operand = 0x9000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 0 time 0 clk 20 //# P 0C 00 0014 operand = 0xc000014; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 1 time 35 clk 52 //# P 0C 01 11B4 operand = 0xc0111b4; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 2 //# P 0C 02 4174 operand = 0xc024174; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 3 //# P 0C 03 4A54 operand = 0xc034a54; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 4 //# P 0C 04 4CC4 operand = 0xc044cc4; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 5 //# P 0C 05 4FCC operand = 0xc054fcc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 6 //# P 0C 06 526C operand = 0xc06526c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 7 //# P 0C 07 84AC operand = 0xc0784ac; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 8 //# P 0C 08 8E8C operand = 0xc088e8c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table 9 //# P 0C 09 9104 operand = 0xc099104; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table A //# P 0C 0A 9314 operand = 0xc0a9314; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set seq param table B //# P 0C 0B A100 operand = 0xc0ba100; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set clock mux sequencer //# P 09 00 00 01 operand = 0x9000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //----------------- // End of Procedure //----------------- } block Pacs_CcuMonitorStartRecycle PACS 2102 { }{ PacsCcuMonitorPeriodRecycle(); sync(); } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.1 for the Commissioning Phase // Check the bias/signal relationship using telescope background // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_lowGainBias2_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0 // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_lowGainBias2_direct // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_CommPh_lowGainBias2(1, "LOW") // // Version : Thu Jul 10 19:09:29 CEST 2008 // obs PacsCal_Phot_lowGainBias2_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0 int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeSetBias = duration(PHOT_set_biases(endBiasTable,"DIRECT","LOW")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); //Minimum slew time int tslewmin = timeOBSID + timeSetBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeSetBias + timeCal3CPR5 + timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_lowGainBias2_direct(measure_time,startBiasTable,endBiasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,15,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,15,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } //************************************ // Call the Phot_lowGainBias2_direct //************************************ Phot_lowGainBias2_direct(measure_time,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,15,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The building block containing the instrumental command // for move chopper to absolute position is called. // // Dependencies : // // Preconditions : PACS switched-on and chopper enabled. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 15-04-05 creation by HD // 1.1 25-Apr-2005 HF, added OBSID and EndID calls // 1.2 19-jun-2007 Renamed to xxxx_OBS for naming uniformity // : 2.0 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Chop_mov_abs { /* Needed variables to call PacsEng_Chop_mov_abs */ int chop_abs_pos = 0; // chopper absolute position /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chop_mov_abs */ }{ // 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(Chop_mov_abs(chop_abs_pos))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Chop_mov_abs(chop_abs_pos); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : EMC reset activities // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : ENTER_SAFE_Mode.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Transit to SAFE mode // // // // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // // Comments : // // Version : 2.0 // History : 1.0 29-Mar-2005 creation by HF // : 2.0 04-Mar-2008 Converted into Eng OBS by VDP // // obs PacsEng_ENTER_SAFE_Mode { /* Needed variables to call PacsEng_ENTER_SAFE_Mode */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_ENTER_SAFE_Mode */ }{ // 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(OBCP_SAFE())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure OBCP_SAFE(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsEng_Spec_Dark_CS_SimultaneousWarmUp.txt,v 1.1 2008/11/12 16:46:30 pierre Exp $ // Missionphase : PACS FM IST SOVT2 & PV Phase // // // Purpose : Schedule the associated CUS procedure // // Author : PRoyer // CUS script : PR // CVS file : // // Arguments : // // // Description : // // Dependencies : // // Preconditions: // - PACS is switched on // - Setup spectroscopy with cold calibration sources // // Comments: // // Version: 1.0 // // History : 1.0 12-Nov-2008 Created from the corresponding PacsCal & from PacsEng_Spec_GeGa_Loop_Comm // // obs PacsEng_Spec_Dark_CS_SimultaneousWarmUp { /* Needed variables to call PacsEng_Spec_Dark_CS_SimultaneousWarmUp */ int obs_time = 540; // Observing time per CS/FW/Grating setting int chop_time = 180; // Chopper plateau [sec] during CS temp rise time (0 = no chopping) /* End of needed variables for PacsEng_Spec_Dark_CS_SimultaneousWarmUp */ }{ debug_print("obs PacsEng_Spec_Dark_CS_SimultaneousWarmUp. Version 1.0. 20081112"); // 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(PACS_Spec_Dark_CS_SimultaneousWarmUp(obs_time,chop_time))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Dark_CS_SimultaneousWarmUp(obs_time,chop_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpireStartDcuData // // $Id: SpireStartDcuData.txt,v 1.1 2006/08/10 09:38:59 kking Exp $ // // Procedure to start generation of detector data TM packets // // // procedure SpireStartDcuData { string datamode = "PF" in ["PF","PSW","PMW","PLW","SF","SSW","SLW"]; //Data mode to be generated, default is PHOT_FULL }{ message("4 " + time() + ": SpireStartDcuData started"); message("4 $Id: SpireStartDcuData.txt,v 1.1 2006/08/10 09:38:59 kking Exp $"); // // select data mode if(datamode == "PF") { SpireSendDrcuCmd(0x843c0000,0); } if(datamode == "PSW") { SpireSendDrcuCmd(0x843c0001,0); } if(datamode == "PMW") { SpireSendDrcuCmd(0x843c0002,0); } if(datamode == "PLW") { SpireSendDrcuCmd(0x843c0003,0); } if(datamode == "SF") { SpireSendDrcuCmd(0x843c0004,0); } if(datamode == "SSW") { SpireSendDrcuCmd(0x843c0005,0); } if(datamode == "SLW") { SpireSendDrcuCmd(0x843c0006,0); } // // start data collection SpireSendDrcuCmd(0x843e0001,0); // delay(1); message("4 " + time() + ": SpireStartDcuData ended"); // } // File : PACS_Spec_Gra_Mec_Setup.cus // Missionphase : PACS FM ILT // // Purpose : Prepare grating mechanism // // Author : P. Royer // // Arguments : CALIBRATION TABLE (CONFGrat) // ROW of CALU table (CONFGrat) // Row of this table = instrument version // // Description : This script will switch on and set all required // parameters for the grating // // Comments : // // Version : 1.0 // History : 1.0 / 13-Jun-2006 created from a non-calu-using script // 1.1 / 08-Nov-2006 Additional delay after setting the inductosyn amplitude // procedure PACS_Spec_Gra_Mec_Setup { string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "FMILT"; // INSTRUMENT VERSION }{ // // Grating home mode: 0 = move to neg. positions; 1 = move to pos. positions int grat_home_mode = 1; // Grating central position (rough) int grat_center_pos = 500000; // //---------------------- // CONTROLLER PARAMETERS //---------------------- // PACS_Spec_Gra_Conf_Calu(calUname,calUrow); // //---------------------- // ADDITIONAL PARAMETERS //---------------------- // // ADDITIONAL PARAMS : 1. GRATING INDUCTOSYN AMPLITUDE // int induct_ampl = ilookup(calUname,calUrow,"InductAmpl"); {int}[] list_tuple = [{induct_ampl}]; int[] list_int = [induct_ampl]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 2. HALL SENSOR OFFSET // int hall_offset = ilookup(calUname,calUrow,"HallOffset"); list_tuple = [{hall_offset}]; list_int = [hall_offset]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_HALLOFFSET(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 3. GRATING RANGE // int range = ilookup(calUname,calUrow,"Range"); list_tuple = [{range}]; list_int = [range]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_RANGE(list_tuple,chksum); delay(1); // // DELAY NECESSARY FOR FM ILT (CAN BE SUPPRESSED IN FLIGHT, when correct value is defaulted in OBSW) // NECESSARY WAIT TIME AFTER SETTING THE AMPLITUDE // delay(120); // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(1); // // ---------------- // HOME THE GRATING // ---------------- // Search for the origin and initialize the position encoder correctly // PARAM: 0 = move towards negative positions; // 1 = move towards positive positions; // Duration: max 70 sec (if the Grating param 'rate' is 3), // depending on the initial position of the grating. // Failure code: 0xAA: Grating controller is not enabled // string[] homeMode = ["NEGATIVE","POSITIVE"]; Pacs_DMC_HOME_GRAT(homeMode[grat_home_mode]); delay(70); // // MOVE GRATING TO CENTER Pacs_DMC_MOVE_GRAT_ABS(grat_center_pos); delay(30); //------------------------- // End of Procedure //------------------------- } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Disable all regular HK for FDIR Test // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : use Service 14 for nominal HK and a memory load for the essential // // Dependencies : Disable_HK // // Comments : // // Version : 2.0 // History : 1.0 27-Mar-2007 initial Version // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Disable_HK { /* Needed variables to call PacsEng_Disable_HK */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Disable_HK */ }{ // 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(Disable_HK())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Disable_HK(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Set gain "HIGH" or "LOW" for the BOLO electronics // // // // TCL author : // TCL file : tm_phot_set_gain.tcl // CUS author : // Script file : PHOT_set_gain.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will activate the LOW or HIGH gain modes // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-apr-2005 DAC. // int[] procedure PHOT_set_gain { string set_gain = "LOW" in ["LOW","HIGH"]; // Set electronics gain }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); Pacs_BOLC_SET_GAIN(set_gain); // Time spent int duree_TCs = time() - time_start; duree_OVR = duree_TCs; duree_num = duree_OVR; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; sync(); return time_array; } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. Special HKs. // // Author : Markus Nielbock // CUS author : MN // // Description : Set up 5 housekeeping parameter for diagnostic housekeeping // of the chopper for open loop tests. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : // 1.0 29-03-07 MN. Spec. HK for open loop measurements. // 1.1 21-jan-2008 DAC Added WiteEndBB // block SPEC_Chopper_dhk_5hk_1khz_bb PACS 474 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 6; {int}[] parlist = [{209},{244},{245},{258},{561},{0xffff}]; int[] aux = [209,244,245,258,561,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 0; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark end of BB WriteEndBB(); sync(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Exercise all available OBCPs for SPECtroscopy // // // // TCL author : N/A // TCL file : tN/A // CUS author : DAC // Script file : SPEC_all_aots_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : SPEC_setup has been executed // // Comments : // // Version 2.0 // History 0.1 25-apr-2005 DAC // 0.2 26-apr-2005 DAC Added SPEC_spu_setup and PACS_reset // 0.3 26-apr-2005 DAC SPEC_aot_prologue instead of SPEC_spu_setup // 0.4 20-sep-2005 Correcred up/dn grating steps // 0.5 25-oct-2005 DAC Use fit_alg = 0 // 0.6 09-aug-2006 TM updated for both filters, new OBCP, new default parameters // and SPEC_spu_setup (instead of SPEC_aot_prologue) // 0.7 10-aug-2006 TM shorten execution length // 0.8 09-aug-2006 TM synchronisation sources for OBCP27 changed from 2 to 1 // 1.0 17-nov-2006 Reviewed for OpDataBase // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_all_aots { /* Needed variables to call PacsEng_Spec_all_aots */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_all_aots */ }{ // 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(Pacs_Spec_all_aots())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_all_aots(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Fully Characterize one set of PID parameters (Healthcheck & slewtime cal) // // Description : // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV Added MOIS comments // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Gra_IST_Full_Charac { /* Needed variables to call PacsEng_Spec_Gra_IST_Full_Charac */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Full_Charac */ }{ // 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(Pacs_Spec_Gra_IST_Full_Charac())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_Full_Charac(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Exercise chopped SED // // // // TCL author : N/A // TCL file : tN/A // CUS author : TM // Script file : // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : SPEC_setup has been executed // // Comments : // // Version 1.0 // History 0.1 11-apr-2007 TM // 1.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_chopped_SED { /* Needed variables to call PacsEng_Spec_chopped_SED */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_chopped_SED */ }{ // 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(Pacs_Spec_chopped_SED())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_chopped_SED(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filename : Pacs_Spec_Gra_Slew_Time_Cal // Purpose : Loops over relative grating movements of various step_size // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : gra_steps_per_block : number of grating steps per step_size // // Description : Loops over relative grating movements // The step sizes are fixed. A block of "gra_steps_per_block" steps is performed for each given step_size // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON, ENABLED and HOMED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : This test only makes sense with appropriate diagnostic HK (e.g. PACS_Spec_Gra_Diaghk_Setup.tcl) // // Version : 2.0 // // History : 1.0 12-Jun-2006 Creation based on SPEC_Gra_slew_time_cal // addition of step sizes typical of AOT // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Spec_Gra_Slew_Time_Cal { int gra_steps_per_block = 3; }{ // Fixing the parameters for the blocks of grating movements int time_on_pos = 2; double atomic_step_pos = 116.505; double atomic_step_neg = -116.505; double[] steps = [1.0,2.0,3.0,3.43,5.15,7.725,10.3,15.0,20.6,50.0,100.0,200.0,600.0]; int n_steps = length(steps) - 1; int astep = 0; // First block : from bottom, upwards SPEC_Gra_move_abs_raw(66000); delay(25); for(int n1 = 0 .. n_steps) { // debug_print("n1 =" + n1 + " steps[n1] = " + steps[n1]); astep = iround(steps[n1] * atomic_step_pos); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // Second block : from center, upwards SPEC_Gra_move_abs_raw(500000); delay(25); for(int n2 = 0 .. n_steps) { astep = iround(steps[n2] * atomic_step_pos); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // Third block : from top, downwards SPEC_Gra_move_abs_raw(990000); delay(25); for(int n3 = 0 .. n_steps) { astep = iround(steps[n3] * atomic_step_neg); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // Fourth block : from center, downwards SPEC_Gra_move_abs_raw(500000); delay(25); for(int n4 = 0 .. n_steps) { astep = iround(steps[n4] * atomic_step_neg); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // End : bring the grating back to central position SPEC_Gra_move_abs_raw(500000); delay(25); } // CVS comments : $Id: SumFunction.txt,v 1.2 2007/04/25 15:14:05 dcesarsk Exp $ // Purpose : Accumulate OBCP times, sum2 = sum2 + sum1 // // CUS author : DAC // Script file : SumFunction.txt // // Input arguments // type name description // int [][] sum1 Vector of times per waveLength // int [][] sum2 Accumulated vector of times per waveLength // // Return values // Type Description // int [][] sum2 Vector of accumulated times per waveLength // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 11-jan-2006 DAC int[][] procedure SumFunction { int[][] sum1 = [[0]]; int[][] sum2 = [[0]]; }{ // Establish length of sum1 int nbWave = length(sum1); // Sum for all wavelenths represented in sum1 for(int loop0 = 0 .. nbWave - 1) { sum2[loop0][0] = sum2[loop0][0] + sum1[loop0][0]; sum2[loop0][1] = sum2[loop0][1] + sum1[loop0][1]; sum2[loop0][2] = sum2[loop0][2] + sum1[loop0][2]; sum2[loop0][3] = sum2[loop0][3] + sum1[loop0][3]; sum2[loop0][4] = sum2[loop0][4] + sum1[loop0][4]; } return sum2; } // File : PACS_Phot_DPU_DMC_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Prepare DPU and DMC for photometry // // Author : T. Mueller // CUSification : DAC // Arguments : none // // // Description : This script will set the DPU HK list, write and set the // FPGA timing parameters (if necessary), set the synchronization // source for the sequencer, forward data to the packet encoder // and validate the sciece data // // // Comments : Coded with respect to DPU and DMC UM // // Version : 1.5 // History : 1.0 / 23-Apr-2003 initial version by FGB // : 1.1 / 25-Nov-2003 update by TM // : 1.2 / 20-Apr-2004 modified and renamed // : 1.3 / 13-Apr-2006 TM update for FM, adopted from // "PHOT_dpu_dmc_setup.txt" // 1.4 / 11-Aug-2006 TM update for FM, delay(1) introduced // between sequential FPGA parameter settings // 1.5 23-nov-2006 Updated FPGA parameters // // @author Thomas Mueller // @date today // @version 1.3 // @purpose Prepare DPU and DMC for photometry procedure PACS_Phot_DPU_DMC_Setup { }{ //------------------------------- // Set HK list //------------------------------- // DPU_SET_HK_LIST (PHOT HK_PACKT_ID=2; // SPU_ARRAY: 1 for both channels, 2 for blue chan, 3: for red chan) // PC003380 "DPU_SET_HK_LIST" SET THE PREDIFINED LIST OF HK VALUES // FOR THE HK PACKET // PP005380 "HK_PACKT_ID" // PP025380 "SPU_ARRAY" // tcsend PC003380 {PP005380 2} [list PP025380 $phot_hk] // waittime 0.5 Pacs_DPU_SET_HK_LIST("PHOT","BOTH Array"); delay(1); //------------------------------------------------- // Stop forwarding data to packet encoder //------------------------------------------------- // PC169420 "DMC_WRT_BOL_REC_OPT" WRITE THE BOL RECEIVER OPTIONS // Fixed GroupSize: 1, repetition: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // tcsend PC169420 {PP067420 4} \ // {PP066420 0xC444 LO} // waittime 0.5 int[] argum = [4]; {int}[] argTuple = [{4}]; int chksum = checksum("int",argum); Pacs_DMC_WRT_BOL_REC_OPT(argTuple,chksum); delay(1); // PC170420 "DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS // Fixed GroupSize: 1, repetition: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // tcsend PC170420 {PP067420 4} \ // {PP066420 0xC444 LO} // waittime 0.5 argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,chksum); delay(1); // PC171420 "DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS // Fixed GroupSize: 1, repetition: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // tcsend PC171420 {PP067420 4} \ // {PP066420 0xC444 LO} // waittime 0.5 argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,chksum); delay(1); // Write and set FPGA timing parameters // DMC_WRT_TIMING_FPGA_PAR int[] aux = [0x0,0x0,0x0,26,0x977dc04,0x32]; int check_sum = checksum("int",aux); {int}[] parlist = Array2grp_1(aux); Pacs_DMC_WRT_TIMING_FPGA_PAR(parlist,check_sum); // DMC_SET_TIMING_FPGA_PAR: Copy parameters set by WRT_TIMING to registers Pacs_DMC_SET_TIMING_FPGA_PAR(); // SYNCHRONIZE_ON_DETECTOR (synchronize on BOL readouts) // 1 = synchronize on blue spectrometer ramps // 2 = synchronize on red spectrometer ramps // 4 = synchronize on BOL readouts Pacs_DMC_SYNCHRONIZE_ON_DET_RAW(4); delay(1); // Write and set FPGA timing parameters // DMC_WRT_TIMING_FPGA_PAR aux = [0x0,0x0,0x0,26,0x977dc04,0x22]; check_sum = checksum("int",aux); parlist = Array2grp_1(aux); Pacs_DMC_WRT_TIMING_FPGA_PAR(parlist,check_sum); // DMC_SET_TIMING_FPGA_PAR: Copy parameters set by WRT_TIMING to registers Pacs_DMC_SET_TIMING_FPGA_PAR(); //------------------------------------------------ // Forward data to Packet Encoder //------------------------------------------------ // PC169420 "DMC_WRT_BOL_REC_OPT" WRITE THE BOL RECEIVER OPTIONS // Fixed GroupSize: 1, repetition: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // tcsend PC169420 {PP067420 0} {PP066420 0x84C0 LO} // waittime 0.5 argum = [0]; argTuple = [{0}]; chksum = checksum("int",argum); Pacs_DMC_WRT_BOL_REC_OPT(argTuple,chksum); delay(1); //------------------------------------------------ // Validate science data photometry //------------------------------------------------ // PC095420 "DMC_VAL_SCI_DATA_B" VALIDATE SCIENCE DATA FROM THE BLUE CHANNEL // // PC096420 "DMC_VAL_SCI_DATA_R" VALIDATE SCIENCE DATA FROM THE RED CHANNEL // // PC097420 "DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS // tcsend PC097420 // waittime 0.5 Pacs_DMC_VAL_SCI_DATA_BOTH(); //----------------- // End of Procedure //----------------- } // Preconditions : // // Comments : // // Version : 1.0 // // History : 1.0 05-Apr-2005 Creation by PR // 1.1 11-apr-2005 DAC. Same correction as // OBCP_spec_2_3_chop, viz. returned time array // 1.2 27-apr-2005 DAC Corrected OBCP name after MIB // 1.3 14-jan-2008 DAC Added WriteEndBB at the end of bld. block // int[] block OBCP_grat_scan_nochop PACS 28 { int nb_up_dn = 1; // DMC Seq P#1 : Number of sequences: up down up ... int nb_grat_steps_up = 20; // DMC Seq P#2 Number of grating steps (up-scan) int grat_step_up = 133; // DMC Seq P#3 : Grating step (up-scan) int grat_step_dn = -133; // DMC Seq P#4 : Grating step (down-scan) int nb_ramps_grat_pos = 3; // DMC Seq P#5 : Nb ramps/grat position int nb_CS1_CS2 = 1; // DMC Seq P#6 : Nb of cycles on CS/grat position int chop_pos_CS1 = -25000; // DMC Seq P#7 : Chopper position on CS1 int chop_pos_CS2 = 25000; // DMC Seq P#8 : Chopper position on CS2 int nb_ramps_cs = 3; // DMC Seq P#9 : Nb ramps plateau on CS int nb_grat_steps_dn = 20; // DMC Seq P#10 Number of grating steps (down-scan) int chop_def = 0; // DMC Seq P#11 : Chopper default position int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_start_pos = 800000; // Starting grating position int grat_start_time = 40000; // Time for grating to move to start position int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Register with environment WriteBBID($BBID); // Variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); // debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // duree of this OBCP (computed and returned in [msec]) int duree_msec = 0; // OBCP pseudo code // OBCP_GRAT_LINE_SCAN_NOCHOP(seq, seq_time, P#1,&,P#11, // detector, grat_pos, grat_time, // comp_mode_blu, comp_mode_red, // grat_def, grat_def_time) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_start_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // (all parameters filled by DPU based on seq parameter) // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, comp_mode_blu, comp_mode_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_time) duree_msec = duree_msec + t_cmd + grat_start_time; duree_OVR = duree_OVR + t_cmd + grat_start_time; // DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the execution time // (hence not all parameters are relevant) int[] duree1 = DMC_grat_scan_nochop(nb_up_dn,nb_grat_steps_up,nb_ramps_grat_pos,nb_CS1_CS2,nb_ramps_cs,nb_grat_steps_dn); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // WAIT (seq_time) duree_msec = duree_msec + t_cmd; duree_msec = duree_msec + seq_time; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_def_time) duree_msec = duree_msec + t_cmd + grat_def_time; duree_OVR = duree_OVR + t_cmd + grat_def_time; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Now trigger execution of OBCP // This OBCP is number 28, requires 20 parameters and calls DEC/MEC Seq #13 string obcp_ID = "GRAT_SCAN_NOCHOP"; int obcp_par_nb = 20; int seq_DMC = 13; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_dn},{4,nb_grat_steps_up},{5,grat_step_up},{6,grat_step_dn},{7,nb_ramps_grat_pos},{8,nb_CS1_CS2},{9,chop_pos_CS1},{10,chop_pos_CS2},{11,nb_ramps_cs},{12,nb_grat_steps_dn},{13,chop_def},{14,detector},{15,grat_start_pos},{16,grat_start_time},{17,comp_mode_blu},{18,comp_mode_red},{19,grat_def},{20,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } delay(time_array[0]); // Indicate end of BB WriteEndBB(); // Return the array of times return time_array; } // Missionphase : // // Purpose : Set CRE bias, ramps' length and capacitor values // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : SPEC_cre_setup.txt // // Arguments : // Type Name DefVal Description // int cre_ctrl_red CRE control register (red) // int cre_ctrl_blu CRE control register (blu) // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' lengthl // double bias_d_red 0 BIAS_D for red spectrometer (1V=4095) // double bias_r_red 0 BIAS_R for red spectrometer (1V=4095) // double bias_d_blu 0 BIAS_D for blue spectrometer (1V=4095) // double bias_r_blu 0 BIAS_R for blue spectrometer (1V=4095) // int capa_red 0 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 0 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // // // CRE setup according to the DEC/MEC User's Manual // // 1. DMC_SWON_B_DEC to switch on the DEC // 2. Wait 5 seconds to get the 1355 connection between DEC and CPU board // 3. Send the complete set of default parameters. // First send a DMC_WRT_B_SPEC_PAR command with these values // (in hex: 20-8-18C-0-0-EA60-0-0). // 3a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // 4. DMC_SWON_B_SPEC to switch on the detector array // 5. Wait 15 seconds to let the switch on procedure run and all voltages // become stables // 6. Then, to activate the CREs (signal SELECT on the CREs), send the first // 3 parameters, i.e. DMC_WRT_B_SPEC_PAR command with these // values (length: 3, values in hex : 20- 8-18E). // 6a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // Note: with this command, we set bit1 to 1 (activate CRE). Bit0 // has been set to 1 by the DMC_SWON_B_SPEC command but, // bit0 is not commandable through the DMC_WRT_B_SPEC_PAR. // The only way to switch on/off the detector array is to use the // trigger commands. // 7. Then, you should set the bias voltages by writing the first 4 or 5 // parameters of the block. Make sure to copy the latest values you use // for the first 3 parameters. // // Description : Sets CRE parameters (see list of arguments). // User specifies cre_ctrl_xx as: // cre_ctrl: 256 to set "sync width=2" // 128 to set "T sensor on" // 2 to set "select" // 1 power on (not relevant here) // Script adds capa_xx to cre_ctrl_xx // xx_cre_ctrl = capa_xx + cre_ctrl_xx // xx_cre_ctrl gets written to the CRE register // Must be called on a stopped SPU. This procedure will // neither stop nor start SPU (call SPEC_spu_reset and // SPEC_spu_setup respectively for that) // // // Dependencies : // // Comments : Based on V1.3 of FGB's fgb_spec_cre_setup.tcl. Major // change is getting ENG values for the bias voltages // // Version : 0.1 7-Oct-2004 Creation by DAC // History : 0.2 12-Oct-2004 Removed "delay" statements // 0.3 18-Oct-2004 Normalized variable names // 0.4 21-Oct-2004 Added cre_ctrl_xx and heater_on // arguments to allow calling by // SPEC_orbit_prologue. // Removed heater commands // 0.5 27-Oct-2004 Put bck delay statement // 1.0 10-Apr-2006 HF, modified for FM // int procedure SPEC_cre_setup { int cre_ctrl_red = 386; // Red CRE register (capa_red=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) }{ // Accumulated duration [milliseconds] int duration_msec = 0; // Write the blue spectrometer parameters int blu_cre_ctrl = capa_blu + cre_ctrl_blu; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums int i_blu_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_blu); int i_blu_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_blu); int[] aux = [32,ramp_len_blu,blu_cre_ctrl,i_blu_bias_r,i_blu_bias_d,0]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(32,ramp_len_blu,blu_cre_ctrl,bias_r_blu,bias_d_blu,0,check_sum); // Same for RED parameters int red_cre_ctrl = capa_red + cre_ctrl_red; int i_bias_r_red = convert_to_raw("pacs_DMC_BIAS_R",bias_r_red); int i_bias_d_red = convert_to_raw("pacs_DMC_BIAS_D",bias_d_red); aux = [32,ramp_len_red,red_cre_ctrl,i_bias_r_red,i_bias_d_red,0]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(32,ramp_len_red,red_cre_ctrl,bias_r_red,bias_d_red,0,check_sum); // Send complete parameters table to both DECS Pacs_DMC_SET_PAR_BOTH_SPEC(); // Convert duration to [sec] and set delay int duration_sec = Msec2sec(duration_msec); delay(duration_sec); return duration_msec; } // $Id$ // Missionphase : PACS PV Phase // // Purpose : PHOT "AOT" with dithered chopping and nodding in raster // OBCP used: OBCP_chopped_photometry_dither (OBCP#5) // Calls nodding_raster_pointing (3.6 in Point document) // Author : DAC // // Arguments : See input list below // // Prerequisite : PACS is PHOT configured and SPU is stopped, ready to be // configured. // // Description : Uses OBCP3 // Comments : Based on PacsCal_PHOT_NodRaster // // Version : 0.1 // History : 0.1 19-feb-2008 DAC // obs PacsCal_PHOT_Dither_NodRaster { /* Needed variables to call PHOT_NodRaster */ string fltPOS = "POS A"; // Fltw position "POS A" or "POS B" double chopthrow = 30.0 in [2.0,960.0]; // Nod/chop throw [arcsec] string gain = "LOW" in ["LOW","HIGH"]; // BOLC gain /* */ /* OBCP related parameters */ /* */ /* PHOT compression modes */ /* 0x00 BOL0: Default */ /* 0x01 BOL1: Double Compression */ /* 0x02 BOL2: Half Compression */ /* 0x04 BOL4: Lossless Compression */ /* 0x07 BOL7: Transparent */ /* 0x09 BOL9: Buffer Transmission */ int comp_mode_blu = 0x0; // Compression mode int comp_mode_red = 0x0; // Compression mode int nraw_blu = 3; // Number of raw pixels int nraw_red = 3; // Number of raw pixels int nb_SRC_REF = 2; // Nb of SRC-REF1-SRC-REF2 cycles int nb_rd_plateau = 31; // Nb rdouts/plateau (4*nn - 1) int nb_cycles_obs_cal = 1; // Outermost DMC loop int nb_CS1_CS2 = 0; // Loop on CSs int max_dither = 1000; // Maximum dither (chopper engineering units) /* Pointing parameters */ double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // zoffset [arcsec] double ra = 0.0; // RA (returned by xHPOT pop-up window) double dec = 0.0; // DEC (ditto) /* Raster parameters */ int m = 2 in [2,100]; // Number of raster points int n = 2 in [1,100]; // Number of raster lines double d1 = 2.0 in [2.0,480.0]; // Raster point step [arcsec] double d2 = 2.0 in [2.0,480.0]; // Raster line separation [arcsec] int nnod = 2; // Number of Aa aA ... nods /* NOTE: raster size shall not be larger than 14880x14880 arcsec */ /* Overall "verbosity" */ bool verbose = true; }{ // Compute duration of tasks to be performed during slew to source // Set OBSID int timeOBSID = duration(WriteOBSID($OBSID)); // Move filter wheel to intended position int timeFLTW = duration(PHOT_fltw_move(fltPOS)); // Condition BOLC to gain setting. This may change the data rate but SPU // is still stopped and a proper comp_mode may be defined // Can I set the gain directly (Thomas says "yes") //DAC Done by AOT-prologue int timeGAIN = duration(PHOT_set_gain(gain)); // Condition SPU to demanded compression mode int timePROL = duration(PHOT_aot_prologue(gain,comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,verbose)); // // Before dealing with the OBCP, obtain the chopper position for CS1 and CS2 // (likely not to be used here, but just for completeness) int chop_pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); // The chopper moves from -chopthrow/2 to +chopthrow/2 [arcsec] string convU = "PHOT_CHOP_sky"; double auxSRC = -chopthrow / 2.0; double auxREF = +chopthrow / 2.0; int chop_pos_SRC = PacsReadChopSky(convU,auxSRC); int chop_pos_REF = PacsReadChopSky(convU,auxREF); // Report settings if verbose if(verbose) { debug_print("++CHOPPER, SRC: " + auxSRC + " [arcsec] -> " + chop_pos_SRC + " [ENG]"); debug_print("++CHOPPER, REF: " + auxREF + " [arcsec] -> " + chop_pos_REF + " [ENG]"); } // Default position for chopper int chop_def = ilookup("SPEC_MEC_Defaults","Photometry","chopper"); // Duration of OBCP to be performed ON and NOD int tp = duration(OBCP_chopped_photometry_dither(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def,max_dither)); if(verbose) { debug_print("Duration of OBCP " + tp + " [sec]"); } // tp cannot be shorted than 10 sec if(tp < 10) { error("The OBCP cannot be shorter than 10 sec; adjust your OBCP parameters"); } // // Several arguments needed for "nodding_raster_pointing" // //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = timeOBSID + timeFLTW + timePROL; // Add one second (there is no sinc() in some procedures during slew) tslewmin = tslewmin + 1; if(verbose) { debug_print("Slew MinTime is " + tslewmin + " [sec]"); } //Initial hold int tih = 0; //Final hold // Need 1 sec to WriteEndID() and close OBS int tfh = 1; //Use PHOT virtual aperture string ib = "P01_0"; //Non-solar source int naifid = 0; //Issue PointReq // Still undefined variables // Raster in S/C coordinates bool fixed = false; // Raster pattern orientation double patt = 0.0; // Nodding orientation (along y-axis) double pattnod = 270.0; // Number of points/scan lines before going to OFF int k = 0; // Number of nods/raster/sacn before performing a hold int nhold = 0; // Duration of a hold operation int thold = 0; // Time spent at OFF int top = 0; // Coordinates of OFF position double raoff = 0.0; double decoff = 0.0; // Repetitions of pattern int nrepeat = 1; // The minimum duration of return slew between repetitions int trepeatmin = 0; // Minimum duration of a "load" operation int tloadmin = 0; // Number of slews before starting a "load" slew int nload = 0; // Issue de PointReq int[] ts = nodding_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,chopthrow,nnod,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID, move filter, set gain, perform prologue WriteOBSID($OBSID); data_rate(120.0); PHOT_fltw_move(fltPOS); PHOT_aot_prologue(gain,comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,verbose); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the OBCP with the known parameters OBCP_chopped_photometry_dither(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def,max_dither); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINL_HOLD ends at " + tNOW); } } if(state[0] == 7) { tNOW = time(); if(verbose) { debug_print("NOD starts at " + tNOW); } // Call the OBCP with the same parameters as for POINT OBCP_chopped_photometry_dither(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def,max_dither); tNOW = time(); if(verbose) { debug_print("NOD ends at " + tNOW); } } } } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_CS_SFT_Warm { /* No variables to call PacsEng_CS_SFT_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_CS_SFT_Warm */ }{ // 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(PACS_CS_SFT_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_CS_SFT_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_SPU_Buffer_Setup { /* No variables to call PacsEng_Spec_SPU_Buffer_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_SPU_Buffer_Setup */ }{ // 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(PACS_Spec_SPU_Buffer_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_SPU_Buffer_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpirePOF5Observing // // $Id: SpirePOF5Observing.txt,v 1.8 2007/04/20 12:29:27 kking Exp $ // // This is the procedure to calculate // instrument observing parameters for the Scan Map observing mode // // Note: // This procedure assumes that 2 seconds are required at the start of the scan to allow // setting of the BB and STEP. // It also assumes that 2 seconds are required at the end of the scan to // reset the STEP parameter // // 13/04/07: SCR3010 - changed default obsMode // {double,double,int,int,int,int} procedure SpirePOF5Observing { string obsMode = "POF5_S_N"; int nRepeats = 1; // requested number of map repeats double mapWidth = 0.0; // requested map width (arcmins) double mapHeight = 0.0; // requested map height (arcmin) }{ SpireMsg(2," Observing mode POF5 Observing Parameters "); SpireMsg(2," $Id: SpirePOF5Observing.txt,v 1.8 2007/04/20 12:29:27 kking Exp $"); // // fetch operating parameters double flashTime = double(ilookup("SpireParms.txt",obsMode,"FlashTime")); // Optimum time between flashes double calTime = double(ilookup("SpireParms.txt",obsMode,"CalTime")); // Minimum time between gyro calibrations string ib = slookup("OpsParms.txt",obsMode,"Boresight"); // instrument boresight double patt = dlookup("OpsParms.txt",obsMode,"Patt"); // direction of nod double d2 = dlookup("OpsParms.txt",obsMode,"D2"); // line separation double hLoss = dlookup("OpsParms.txt",obsMode,"HLoss"); // map height loss double lLoss = dlookup("OpsParms.txt",obsMode,"LLoss"); // map length loss double scanRate = dlookup("OpsParms.txt",obsMode,"ScanRate"); // line scan rate bool initFlash = blookup("SpireParms.txt",obsMode,"InitFlash"); // initial flash flag bool endFlash = blookup("SpireParms.txt",obsMode,"EndFlash"); // final flash flag // // ***************************************** // Display input parameters // ***************************************** SpireMsg(3," POF5 Observing Input values:"); SpireMsg(3," ..nRepeats: " + nRepeats); SpireMsg(3," ..mapWidth: " + mapWidth); SpireMsg(3," ..mapHeight: " + mapHeight); SpireMsg(3," POF5 Fixed values:"); SpireMsg(3," ..ib: " + ib); SpireMsg(3," ..patt: " + patt); SpireMsg(3," ..d2: " + d2); SpireMsg(3," ..hLoss: " + hLoss); SpireMsg(3," ..lLoss: " + lLoss); SpireMsg(3," ..scanRate: " + scanRate); SpireMsg(3," ..flashTime: " + flashTime); SpireMsg(3," ..calTime: " + calTime); SpireMsg(3," ..initFlash: " + initFlash); SpireMsg(3," ..endFlash: " + endFlash); // // calculate observing parameters SpireMsg(2," Calculated Parameters:"); // // number of lines in a map int nLines = iceil((mapHeight * 60.0 - hLoss) / d2) + 1; SpireMsg(3," Required number of scan lines in map: " + nLines); // // observing scanLength double scanLength = mapWidth * 60.0 + lLoss; // // integration time per line (covering user requested length) double lineOsit = scanLength / scanRate; SpireMsg(3," Integration time per scan line: " + lineOsit); // // increase scan length to allow time to start the scan int tStart = 2; int tEnd = 2; scanLength = scanLength + double(tStart + tEnd) * scanRate; SpireMsg(3," Required scan length: " + scanLength); // // time per line double lineTime = scanLength / scanRate; // // total observing time int d = duration(SpireBbScanLine(iceil(lineTime),0)); double totalTime = double(nRepeats) * double(nLines) * double(d); SpireMsg(3," Total observing time: " + totalTime); // // number of lines per Gyro calibration // Note: this only takes into account on source observing time, not movement between lines, // which is assumed to be a small fraction of the observing time, and so the value obtained is approximate int nCals = ifloor(totalTime / calTime); // SpireMsg(3," Number of Gyro Calibrations: " + nCals); int nCal = iceil(totalTime / lineTime); // default is no gyro calibrations during observation if(nCals > 0) { nCal = iceil(double(nLines) * double(nRepeats) / double(nCals + 1)); } if(nLines % nCal == 0) { nCal = nCal + 1; } // SpireMsg(3," Number of Gyro Calibrations(adjusted): " + nCals); // SpireMsg(3," Number of nod lines per Gyro calibration: " + nCal); // // number of lines per PCAL calibration // Note: this only takes into account on source observing time, not movement between lines, // which is assumed to be a small fraction of the observing time, and so the value obtained is approximate int nFlashes = ifloor(totalTime / flashTime); SpireMsg(3," Number of Flashes: " + nFlashes); int nFlash = iceil(totalTime / lineTime); // default is no flashes during observation if(nFlashes > 0) { nFlash = iceil(double(nLines) * double(nRepeats) / double(nFlashes + 1)); } if(nLines % nFlash == 0) { nFlash = nFlash + 1; } SpireMsg(3," Number of Flashes(adjusted): " + nFlashes); SpireMsg(3," Number of nod lines per PCAL calibration: " + nFlash); return {lineOsit * double(nLines),scanLength,nRepeats,nLines,nCal,nFlash}; } // File : PACS_Spec_HK_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Prepare for Spectroscopy HK // // Author : H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : This script will only activate Spectroscopy HK // // Comments : // // // Version : 1.0 // History : 1.0 / 18-Nov-2004 initial version // // procedure PACS_Spec_HK_Setup { }{ //DPU_SET_HK_LIST (SPEC for both channels) // tcsend PC003380 {PP005380 1} {PP025380 1} // waittime 0.5 Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); // putlog "Spec HK set" // --------------------- // End of Procedure // --------------------- } // CVS comments : $Id: WriteEndID.txt,v 1.9 2007/08/22 10:21:52 dcesarsk Exp $ // Purpose : Set the BBID and OBSID to the predefined values shown // in FIRST-FSC-DOC-0200 // // CUS script : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // Original TCL : N/A // CVS file : WriteEndID.txt // // Input arguments // Type Name DefVal Description // // Description : Equivalent of WriteOBSID and WriteBBID but using preset // values for $OBSID and $BBID // // Dependencies : Pacs_DMC_SET_BBID and Pacs_DMC_SET_OBSID // // Comments : // // Version : 0.1 12-Oct-2004 First creation // History : 0.2 21-Oct-2004 Added write to CDMS // 1.0 24-Mar-2005 DAC Removed all writes except to DMC (ASTRIUM environment) // 1.1 20-oct-2005 BBID and then OBSID; do not sync() before leaving as this // is the last TC ever. // 1.2 19-apr-2006 Do sync so duration() will give time for next TC // 1.2.1 22-nov-2006 Removed debug_print // 2.0 21-aug-2007 According to HERSCHEL SCIENCE GROUND SEGMENT // TO INSTRUMENTS INTERFACE CONTROL DOCUMENT // r�ference FIRST-FSC-DOC-0200; OBSID should be set // to zero when no observing (in OBS phase) // Removed write to BBID as all blocks now end by setting // their BBIDs to the default value (SCR-3507) // procedure WriteEndID { }{ // int iBBID = 0x40000000; // // Write BBID to DEC/MEC // Pacs_DMC_SET_BBID(iBBID); int iOBSID = 0x0; // Write OBSID to DEC/MEC Pacs_DMC_SET_OBSID(iOBSID); sync(); } // File : PACS_Phot_Switchoff.cus // Missionphase : PACS FM Test // // Purpose : BOLC switch-off // // Author : T. Mueller // // Arguments : none // // // Description : Once we are satisfied with the tests, it is time to switch // off the instrument by setting all biases to zero // // Comments : Coded based on PhFPU UM, draft 5, chapter 4.2.6 // // Version : 1.3 // History : 1.0 / 02-Jul-2004 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 11-aug-2006 TM: updated for PhFPU UM, draft 5, chapter 4.2.6 // 1.3 08-nov-2006 TM: groups off in the end procedure PACS_Phot_Switchoff { }{ //*********************************** //* //* Switch-off procedure for BOLC //* Part 1: switching off the detectors //* //* creation date : 15/09/05 //* //* //*********************************** // Switch off of all biases in the correct order // // Set all groups bol bias 02 (VL) to 0.00000000 Volt (0) //# P 00 02 0000 int operand = 0x20000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 05 (VCH) to 0.00000000 Volt (0) //# P 00 05 0000 operand = 0x50000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 01 (VH) to 0.00000000 Volt (0) //# P 00 01 0000 operand = 0x10000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 03 (VRL) to 0.00000000 Volt (0) //# P 00 03 0000 operand = 0x30000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 04 (VINJ) to 0.00000000 Volt (0) //# P 00 04 0000 operand = 0x40000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 06 (VDL) to 0.00000000 Volt (0) //# P 00 06 0000 operand = 0x60000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 08 (VGL) to 0.00000000 Volt (0) //# P 00 08 0000 operand = 0x80000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 07 (VSS) to 0.00000000 Volt (0) //# P 00 07 0000 operand = 0x70000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 0.00000000 Volt (0) //# P 00 10 0000 operand = 0x100000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 15 (VGG) to 0.00000000 Volt (0) //# P 00 0F 0000 operand = 0xf0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 0.00000000 Volt (0) //# P 00 09 0000 operand = 0x90000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 0.00000000 Volt (0) //# P 00 0A 0000 operand = 0xa0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 11 (VDECX-H) to 0.00000000 Volt (0) //# P 00 0B 0000 operand = 0xb0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 13 (VSMS-H) to 0.00000000 Volt (0) //# P 00 0D 0000 operand = 0xd0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 14 (VSMS-L) to 0.00000000 Volt (0) //# P 00 0E 0000 operand = 0xe0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 18 (VDL-BU) to 0.00000000 Volt (0) //# P 00 12 0000 operand = 0x120000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 0.00000000 Volt (0) //# P 00 14 0000 operand = 0x140000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 19 (VGL-BU) to 0.00000000 Volt (0) //# P 00 13 0000 operand = 0x130000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 17 (VSS-BU) to 0.00000000 Volt (0) //# P 00 11 0000 operand = 0x110000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // // // Wait 100 ms //# S 01 000064 // // Switch-off of the protection biases // // Set all groups bol bias 21 (VDD-PROT-CL) OFF (0) //# P 00 15 0000 operand = 0x150000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 22 (VDD-PROT-BU) OFF (0) //# P 00 16 0000 operand = 0x160000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 23 (GND-BU) OFF (0) //# P 00 17 0000 operand = 0x170000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // //*********************************** //* //* Switch-off procedure for BOLC //* Part 2: switching off BOLC groups //* //* creation date : 15/09/05 //* //* //*********************************** // Switch off all groups // Set group on/off 00 hexa //# P 0A 00 00 00 operand = 0xa000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //----------------- // End of Procedure //----------------- } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OBCP 11: Photometry Calibration II, calls DEC seq 6 // // OBCP author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky & Thomas G. Mueller // CVS file : OBCP_phot_cal_I.txt // // Arguments: // Type Name Description // int nb_cal_cycles p01 Nb of main loops // int chop_POS_0 p02 Chopper start position // int nb_rdouts_plateau p03 Nb readouts per chopper plateau // int label_1 p04 1st of two labels // int label_2 p05 2nd of two labels // int chop_POS_1 p06 1st of 5 chopper positions // int chop_POS_2 p07 2nd of 5 chopper positions // int chop_POS_3 p08 3rd of 5 chopper positions // int chop_POS_4 p09 4th of 5 chopper positions // int chop_POS_5 p10 5th of 5 chopper positions // // Description : This script mimics the OBCP_PHOT_CAL_II // pseudo script, section 3.11.2 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DEC_phot_cal_I DECMEC sequence, 4.1.6 // WriteBBID to declare its BB identification // Comments : // // Version : 0.1 29-Oct-2004 DAC // History : // int[] block OBCP_phot_cal_II PACS 11 { int nb_cal_cycles = 2; // p01 Nb of main loops int chop_POS_0 = -22680; // p02 Chopper start position int nb_rdouts_plateau = 79; // p03 Nb readouts per chopper plateau int label_1 = 65; // p04 1st of two labels int label_2 = 129; // p05 2nd of two labels int chop_POS_1 = 45270; // p06 1st of 5 chopper positions int chop_POS_2 = 45770; // p07 2nd of 5 chopper positions int chop_POS_3 = 46270; // p08 3rd of 5 chopper positions int chop_POS_4 = 46770; // p09 4th of 5 chopper positions int chop_POS_5 = 47270; // p10 5th of 5 chopper positions int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position }{ // Starting time int time_start = time(); // Anounce start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Bolo sampling rate (needed to compute readout duration) double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); // BOL readout frequency [Hz] and readout period [msec] double bol_period = 1000.0 / bol_freq; debug_print("Bolo frequency: " + bol_freq + " " + bol_unit); debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Accumulated duration of this script [msec] int duration_msec = 0; // OBCP pseudo-code starts here; accumulate duration as it goes) // OBCP_PHOT_CAL_II(seq,seq_time,P#1-P#10,comp_mode_blu,comp_mode_red,chop_def) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call CUS version of DECMEC sequence to obtain duration // Returns array with [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR] int[] duree1 = DMC_phot_cal_II(nb_cal_cycles,nb_rdouts_plateau); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // DMC_SYNCHRONIZE_ON_DETECTOR(4) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, comp_mode_blu, comp_mode_red, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (seq_time) // ; Check execution status of the sequence and in case of failure stop OBCP // DMC_MOVE_CHOP_ABS(chop_def) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 11, requires 15 parameters, call DEC seq #6 // which lasts seq_time [msec] string obcp_ID = "PHOT_CALIB_II"; int obcp_par_nb = 15; int seq_DMC = 6; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_cal_cycles},{4,chop_POS_0},{5,nb_rdouts_plateau},{6,label_1},{7,label_2},{8,chop_POS_1},{9,chop_POS_2},{10,chop_POS_3},{11,chop_POS_4},{12,chop_POS_5},{13,comp_mode_blu},{14,comp_mode_red},{15,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the OBCP "jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return return time_array; } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsLineSpec AOT // // CUS author : DAC // // Input arguments: see after module identification // // Return values // {int,int,int} {totalDuration,slewDuration,obsOverPACSandSC} // // Comments : If this file is called PacsLineSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsLineSpec.def // - rename obs module to PacsLineSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false !! // // History: // 25-apr-2007 14.0 For earlier history see v1.37 in CVS // Removed history up to today // 22-may-2007 14.1 SPR-3199 Return only SRC+REF time // 29-may-2007 14.2 SPR-3237 Use map orientation parameter // 11-jun-2007 14.3 Count WAIT=1 for grating in OBCP22 as SRC/REF // 20-sep-2007 14.4 SCR-3552. Correct pattnod with skewCorrec in PACSyzoffsets // 15-oct-2007 15.0 SCR-3691 // Add state=4 (OFF) in the StateMachine logic. Ready to // implement raster with OFF for pointing 21 & 31 // 22-oct-2007 15.1 FreqSwitch only allowed with source="large" // Introduce RAoff DECoff as in PacsRange // 23-oct-2007 15.2 UserNodCycles is now a rasterRepeat factor for // FreqSwitch (it was a cycle repeater) // 16-dec-2007 15.3 SPR-3830 (RAoff,DECoff out of boundaries) // 14-jan-2008 16.0 Use standard names for RA,DEC // 13-may-2008 17.0 SCR-3699 Implemented raoff and decoff refSelected // {int,int,int} obs PacsLineSpecObs { /* "lines" is defined as an array; its elements (and hence its dimension) */ /* are provided by HSPOT */ /* {id,redshifted wavelength,repeat factor,line flux,continuum flux, */ /* line width,line flux unit,line width unit} */ {string,double,int,double,double,double,string,string}[] lines = []; //Filled by HSPOT /*------------- following only to use CUS interface -------------------------*/ string lineId0 = "My 1st line"; double lWave0 = 82.0 in [55.0,210.0]; int repeatLine0 = 1 in [0,10]; double lineFlux0 = 111.0 in [0.0,10000.0]; double contFlux0 = 111.11 in [0.0,10000.0]; double lineWidth0 = 30.0; string fluxUnit0 = "Jy/m2"; string widthUnit0 = "kms"; string lineId1 = "n"; double lWave1 = 157.0 in [55.0,210.0]; int repeatLine1 = 1 in [0,10]; double lineFlux1 = 111.0 in [0.0,10000.0]; double contFlux1 = 111.11 in [0.0,10000.0]; double lineWidth1 = 0.3; string fluxUnit1 = "Jy/m2"; string widthUnit1 = "micron"; string lineId2 = "n"; double lWave2 = 59.0 in [55.0,210.0]; int repeatLine2 = 1 in [0,10]; double lineFlux2 = 111.0 in [0.0,10000.0]; double contFlux2 = 111.11 in [0.0,10000.0]; double lineWidth2 = 30.0; string fluxUnit2 = "Jy/m2"; string widthUnit2 = "kms"; string lineId3 = "n"; double lWave3 = 106.0 in [55.0,210.0]; int repeatLine3 = 1 in [0,10]; double lineFlux3 = 111.0 in [0.0,10000.0]; double contFlux3 = 111.11 in [0.0,10000.0]; double lineWidth3 = 30.0; string fluxUnit3 = "Jy/m2"; string widthUnit3 = "kms"; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order2" in ["order2","order3"]; bool chopNod = true; bool faintLines = true; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 3 in [2,32]; int n = 3 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target bool refSelected = false; double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; int naifid = 0; // RA,DEC or SSO double pointStep = 20.0 in [2.0,480.0]; double lineStep = 20.0 in [2.0,480.0]; string redshiftType = "redshift" in ["redshift","optical"]; double redshiftValue = 0.0; int obsOverhead = 180; // Slew overhead }{ //*--------- following only when using CUS interface -------------------*/ string isNotSet = "n"; if(lineId0 != isNotSet) { lines[0] = {lineId0,lWave0,repeatLine0,lineFlux0,contFlux0,lineWidth0,fluxUnit0,widthUnit0}; } if(lineId1 != isNotSet) { lines[1] = {lineId1,lWave1,repeatLine1,lineFlux1,contFlux1,lineWidth1,fluxUnit1,widthUnit1}; } if(lineId2 != isNotSet) { lines[2] = {lineId2,lWave2,repeatLine2,lineFlux2,contFlux2,lineWidth2,fluxUnit2,widthUnit2}; } if(lineId3 != isNotSet) { lines[3] = {lineId3,lWave3,repeatLine3,lineFlux3,contFlux3,lineWidth3,fluxUnit3,widthUnit3}; } //*--------- above only when using CUS interface -------------------*/ //*-----------------------------------------------------------------*/ // Start of "Pointing" section // // Overall control of debugging messages bool verbose = true; // New variable to start at nodded position bool startAtOFF = false; // extraConf: whatever affects PACS default configuration // Currently: the option faintLines calls for an extraConf string extraConf = "normal"; // For bright lines if(!faintLines) { extraConf = "bright"; } // Set messages for HTML format message(""); message(""); // Need switching boolean bool switching = !chopNod; // Switching only allowed with source "large" if(switching && source != "large") { error("Frequency Switch only in mode raster (large source) with OFF"); } // Decode more HSPOT information int nbLines = length(lines); int nbLines1 = nbLines - 1; // Cannot call with empty "lines" if(nbLines == 0) { error("STOP!! There are no spectral lines defined!"); } // No more than 10 lines or repetitions int nbLinesRep = 0; for(int loop00 = 0 .. nbLines - 1) { // Default repetion factor is 1 int repFactor = lines[loop00]{2}; if(repFactor == 0) { repFactor = 1; } nbLinesRep = nbLinesRep + repFactor; } if(verbose) { debug_print("Total lines/repeat: " + nbLinesRep); } if(nbLinesRep > 10) { error("STOP!! The number of lines/repetitions exceeds 10"); } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto) // Pointing mode is undefined. If it remains undefined at the end of // the next tests, then there is a problem with the source definition int pointCase = 0; // FinePointingMode with setup time // POINT source, with and without chopNod if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding)"; if(switching) { userMode = "Point source (frequency switch, no nodding)"; } pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // DITHERED source // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Large source (no nodding)"; pointCase = 31; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); for(int iii = 0 .. nbLines1) { debug_print("MAIN:Id, Wave, repeat, Lflux, Cflux, etc. " + lines[iii]); } } // Define array of wavelengths (will be needed by the SORT procedure) double[] lineWave = [55.0]; // Populate the array of wavelengths for(int loop0 = 0 .. nbLines1) { lineWave[loop0] = lines[loop0]{1}; } // For each line obtain the grating order and the grating position int[] orders = [0]; double[] grat_pos = [0.0]; // Fill the tuple waveTuple {waveLen,order,gratPos,nbStep,gratStep} {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; for(int loop1 = 0 .. nbLines1) { waveTuple[loop1] = SPEC_get_grat_info(lineWave[loop1],"HI",switching,extraConf,orderSel,verbose); // Create vector of intermediate results orders[loop1] = waveTuple[loop1]{1}; grat_pos[loop1] = double(waveTuple[loop1]{2}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbLines1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } // Reject mixed orders if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("L2"); double[] band3 = SPEC_BAND_read("L3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 int filter = 1; // Determine filter based on HSPOT input if(orderSel == "order2") { filter = 2; } if(orderSel == "order3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders); } // Filter below will be set by SPEC_aot_prologue via SlewCal if(verbose) { debug_print("MAIN:The full OBS will be performed with filter " + filter); } // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,grat_pos); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,lineWave); // Recast "lines" and waveTuple according to the ordered grating positions {string,double,int,double,double,double,string,string}[] sortLines = [{"empty",0.0,0,0.0,0.0,0.0,"bla","bla"}]; {double,int,int,int,int}[] sortWaveTuple = [{0.0,0,0,0,0}]; for(int reSORT = 0 .. nbLines1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbLines1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortLines[reSORT] = lines[sortedIndex]; sortWaveTuple[reSORT] = waveTuple[sortedIndex]; if(verbose) { debug_print("Sorted Line: " + sortLines[reSORT]); } } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 chop_pos_CS1 // chop_pos_CS2 chop_def detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC contians: // capa, nb_rdouts_ramp, nb_rdouts_subramp, comp_mode, // glitch_det, ramp_fit_alg, nb_raw, bias_r, bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values string throwUsage = throw; // Frequency switch parameters are as for offraster in PacsRange // (this will set REF1=REF2=CS1 but this is irrelevant for OBCP32) if(switching) { throwUsage = "offraster"; } if(verbose) { debug_print("PacsLine:Use throw: " + throwUsage); } paramsSPECdef = PacsSpecDefaults(throwUsage,extraConf,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module(s) to estimate OBS times as a function of the // input given by the HSPOT user. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} // More info: {nb_nods,nb_up_dn,timeOBS,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("MAIN.confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; // Accumulator total OBS time int totalOBS = 0; // For each demanded wavelength compute minimum duration for(int waveLOOP = 1 .. nbLines) { int waveLOOP1 = waveLOOP - 1; // Different OBCPs if frequency switch or not if(chopNod) { // Here we perform nodding/chopping // SCR-2942: consider case of faintLines = false string forDEBUG = "chop/nod"; paramsSPECext = PacsLineSpecEstimatorOBCP27(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,chopNod,faintLines,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; } else { // Here we perform frequency switching forDEBUG = "freq/switch"; // SPR-2926: Use userNODcycles as overall multiplier for repeatLine // No longer true with raster+OFF; repeat raster instead paramsSPECext = PacsLineSpecEstimatorOBCP32(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; } // Accumulate total OBS time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("MAIN.Obs mode : " + forDEBUG); debug_print("MAIN.Wavelength : " + sortLines[waveLOOP1]{1}); debug_print("MAIN.confOBCP[" + waveLOOP + "]: " + confOBCP[waveLOOP]); debug_print("MAIN.confSPEC[" + waveLOOP + "]: " + confSPECblu[waveLOOP]); } } if(verbose) { debug_print("MAIN.Minimum required time: " + totalOBS + " [sec]"); } if(chopNod) { // Here we perform nodding/chopping nbNods = userNODcycles; if(verbose) { debug_print("MAIN.The PointReq will contain " + nbNods + " nod cycles"); } } else { // Here we perform freq switch nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

Minimum required OBStime: " + totalOBS + " [sec]

"; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Since no NOD was specified the total OBS time is equal" + " to the minimum required time. The time can be changed" + " by changing the line(s) repeat factor

"; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

Red channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Blue channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths // MODIF: this leads to redundancy when Lines are selected both in // the norder+1st order: hence 1KWL per Filter: i.e. in practice 1 // per "blue order double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double[] keyWAVE = PacsLineSpecKeyWaves(sortWaveTuple); // int nbKeyWAVE = length(keyWAVE); == 1 int nbKeyWAVE = 1; // With current versions of CommandOBCP27 and CommandOBCP32, the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:SortWaveTuple: " + sortWaveTuple); debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOT // prologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // CAL for HOLD doAOTprologue = false; int timeHoldCal = duration(PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,0,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during HOLD: " + timeHoldCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration could be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation // Different OBCP for wavelength switch if(!switching) { // Here we perform nodding/chopping int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per pointing; nbNods: " + nbNods); } } else { // Here we perform freq switch timeOBS = duration(PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP32: " + timeOBS + " [sec] per pointing"); } } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbLines per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one will use time during // slew to perform SlewCal. // // The chopper step has been read already (PacsSpecDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table. Read chopper position SRC and // REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("PacsSpecDef: CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; // DAC Test ONLY int thold = timeHoldCal; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; // FinePointingMode with setup time if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode without nodding, section 3.4 ib = "P02_0"; // Nodding is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chopper pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode repeated_raster_with_hold_and_OFF, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int top = 0; if(!switching && pointCase == 21) { raoff = 0.0; decoff = 0.0; } int nrepeat = 1; // If switching for "large" source perform OFF observation if(switching || pointCase == 31) { // Repeat raster according to userNODcycles nrepeat = userNODcycles; k = n * m; top = tp; } int trepeatmin = 0; int tloadmin = 0; nload = 0; // SPR-3237 (map orientation parameter) applies only to raster if(pointCase == 31) { fixed = true; patt = mapRasterAngle; } fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // Raster mode w/nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("++++++++++++++++++++++++ Issue PointRequest now"); debug_print("Return from PointReq: " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); int tNOW = time(); debug_print("=====Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { /// obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { /// obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOFF = nbOFF + 1; // Logic to sum up obsTime /// if (nbOFF == 1) {sumUpObsTime = obsTime;} /// if (nbOFF > 1) {sumUpObsTime = SumFunction(obsTime,sumUpObsTime);} if(verbose) { tNOW = time(); /// debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print("Ending with NbOFF: " + nbOFF); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL lines). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // // and a per wavelength array: // [waveSTART,waveEND,order,gratStep,nbGratStep,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill 1st dimension of infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int wait1 = 1; // but there is no wait in FreqSwitch // Count the WAIT=1 for grating as a useful SRC if(switching) { wait1 = 1; } int nbRampPlateau = confOBCP[1]{4} + wait1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime : " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbLines1) { // for some reason it has to be "initialized" infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the START wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{0} = sortLines[loop3]{1}; // copy the END wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{1} = sortLines[loop3]{1}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortWaveTuple[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortWaveTuple[loop3]{4}; infoArray[1]{1}[loop3]{3} = (confOBCP[loop3 + 1]{2} - confOBCP[loop3 + 1]{1}) / 2; // copy the number of grating steps infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from sumUpObsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Also data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTimeTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of lines observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbLines; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal; // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Fill 3rd dimension of infoArray with global timing and AOT information // timeObsEnd is the total duration of the AOT // Pass details of AOT // We use OBCP27: OBCP_grat_scan_chop2 (unless FreqSwitch) string aotName = "GratScanChop2"; // Special "sky time" for FreqSwitch and SmallSourceDither if(switching) { aotName = "FreqSwitch"; } if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } infoArray[2] = {{aotName,0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // If switching if(switching && source == "Large") { infoArray[1]{0}{0} = "RasterOFF"; } else { if(switching && source == "Point") { infoArray[1]{0}{0} = "Pointed"; } infoArray[2]{0}{5} = userNODcycles; } // Process the information contained in infoArray (pass also sortLines) PacsProcessInfoArrayLine(infoArray,sortLines,confOBCP,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); // Compute the total time SRC + REF int accumSrceRef = 0; for(int loopL = 0 .. nbLines - 1) { // Add up Srce and Ref times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopL]{6} + infoArray[1]{1}[loopL]{7}; } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; // Return demanded tuples return {accumSrceRef,fromPntReq[1],overPACSandSC}; } // CVS comments : $Id: WriteOBSID.txt,v 1.7 2007/11/06 08:39:25 dcesarsk Exp $ // Missionphase : // // Purpose : Set the OBSID via DEC/MEC; show decoded OBSID on // user screen // // CUS script : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // Original TCL : N/A // CVS file : WriteOBSID.txt // // Input arguments // Type Name DefVal Description // int iOBSID N/A OBSID obtained from environment // // Description : Obtain OBSID from run environment and send TC to DMC // Write decoded OBSID to log file // // Dependencies : Pacs_DMC_SET_OBSID // DecodeOBSID // // Comments : // // Version : 0.1 23-Sep-2004 First creation // History : 0.2 28-Sep-2004 Remove set_unset; write // decoded OBSID to output log // 0.3 7-Oct-2004 Renamed to WriteOBSID to match to names of // related procedures // 0.4 12-Oct-2004 Added write to EGSE environment (need // to add write to IST environment ??) // 0.5 21-Oct-2004 Added write to CDMS // 1.0 9-May-2005 DAC Removed write to EGSE and CDMS (not // needed at Astrium) // 1.1 20-oct-2005 Added sync() as I will need the "true" // duration // 1.2 5-nov-2007 Added delay(1) before first TC to wait // for completion of bus_configure // : // procedure WriteOBSID_hk { int iOBSID = 0x20000000; // Observation ID }{ // Wait 1 second to allow for bus_configure delay(1); // Write OBSID to DEC/MEC and decode to output log Pacs_DMC_SET_OBSID(iOBSID); // house keeping data rate ess_hk_data_rate(0.31); non_ess_hk_data_rate(4.0); // sync the bus sync(); // Inform CUS debugger // DecodeOBSID(iOBSID); } // SpireBbPOF5Config // // $Id: SpireBbPOF5Config.txt,v 1.2 2006/12/01 09:57:19 kking Exp $ // // Building Block to configure the instrument for POF5 (scan map) operation // // The complete instrument setup operation is divided into two parts: // Configuration: actions that can be executed during the slew to the start // position of the S/C pointing mode. // Initialisation: actions that must be carried out at the S/C intial pointing // position before any observational operations are executed. // // This building Block implements the first part of the setup // block SpireBbPOF5Config SPIRE 8272 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Configuration started"); SpireMsg(2," $Id: SpireBbPOF5Config.txt,v 1.2 2006/12/01 09:57:19 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // Set Mode to POF5 tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(0x0350)"); Spire_SET_OBS_MODE_RAW(0x350); // // Move BSM to HOLD int bsmHoldChopPosn = ilookup("BSM.txt","Hold","ChopPosn"); int bsmHoldJiggPosn = ilookup("BSM.txt","Hold","JiggPosn"); SpireBsmMove(bsmHoldChopPosn,bsmHoldJiggPosn); // // Time synchronisation tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RESET_DRCU_COUNTERS_RAW()"); Spire_RESET_DRCU_COUNTERS_RAW(); // // Garbage Collection tstr = SpireTimeStr(time()); // SpireMsg(5," " + tstr + "Cmd: Spire_COLLECT_GARBAGE_RAW()"); // Spire_COLLECT_GARBAGE_RAW(); // // ..... completion ..... // delay(2); // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Configuration ended"); SpireMsg(1," ..POF5 Configuration (" + (time() - t) + " seconds)"); } // SpireSendDrcuCmd // // $Id: SpireSendDrcuCmd.txt,v 1.1 2006/08/10 09:38:59 kking Exp $ // // Procedure to send a DRCU command // // // procedure SpireSendDrcuCmd { int cmd = 0x0; int override = 0; }{ string hstr = ""; // hex string string tstr = ""; // time string // hstr = SpireHexStr(cmd,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SEND_DRCU_COMMAND_RAW(" + hstr + ")"); Spire_SEND_DRCU_COMMAND_RAW(cmd,override); } // $Id$ // Missionphase : PACS PV Phase // // // just to call Phot_lowFreq_direct_EMT // // Version : 1.0 // History : 0.1 Thu Mar 29 2007 // : 1.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Phot_low_freq_direct { /* Needed variables to call PacsEng_Phot_low_freq_direct */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_low_freq_direct */ }{ // 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(Phot_lowFreq_direct_IST("cs2",2000,"BOLObias_ILT_lowFreq_CS2","BOLObias_preILT_standard_low"))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Phot_lowFreq_direct_IST("cs2",2000,"BOLObias_ILT_lowFreq_CS2","BOLObias_preILT_standard_low"); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: Array2grp_1.txt,v 1.2 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : // // Purpose : Utility to create grp_1 tuples out of 1D arrays. // Many PACS TCs require a grp_1 argument. It appears that grp_1 are // defined as "1 element" tuples, which conceptually is the same as a 1D // array. The checksum function, on the other hand, which is used to checksum // some PACS operands, acts on 1D arrays. So a grp_1 list cannot be checksummed // unless a 1D array is created from the grp_1. This is error prone as the // following construct is needed in many CUS instances: // // // TC operand // {int}[] spu_par = [{ppf},{ppp},{tfp},{tcp}]; // // // Check sum argument array // int aux = [ppf,ppp,tfp,tcp]; // int check_sum = checksum("int",aux); // // The utility Array2grp_1 will create "spu_par " given the array aux as // input: // // {int} [] spu_par = Array2grp_1(aux); // // TCL author : N/A // TCL file : N/A // CUS author : DAC // Script file : Array2grp_1.txt // // Input arguments // type name description // int[] array_in Any 1D array containing elements needed as operand for a TC // // Return values // type Name Description // {int} [] A 1D tuple constructed with all the elements of the input array // // Description : Extract elements from array_in and insert them as "tuples" in tuple_out // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 creation by XXX {int}[] procedure Array2grp_1 { int[] array_in = [0,1,2,3]; }{ // Get dimension of array_in int nb_elem = length(array_in); // Create output tuple {int}[] tuple_out = [{0}]; {int} aux = {0}; // and fill it with elements from array_in for(int loop = 0 .. nb_elem - 1) { aux = {array_in[loop]}; tuple_out[loop] = aux; } return tuple_out; } // // Purpose : Record data in BOL-C test pattern mode // // Author : Bart Vandenbussche // CUS script : PHOT_TestPattern_obs // CVS file : // // Arguments : time_in_testmode : time to stay in test pattern mode // // Description : Switch to BOL-C HK+test pattern data mode // wait seconds // Switch to BOL-C HK + bolometer data mode // // Dependencies : // // Preconditions : PACS is switched on with configured BOLC // // Comments : // // Version : 3.0 // // History : 1.0 13-apr-2005 BV - First version // 2.0 DAC 19-oct-2005 Added SPU start and stop // 2.1 BV 11-04-2007 Changed raw channels to 0 // 3.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Phot_TestPattern { int time_in_testmode = 60; }{ // Switch ON SPU PHOT_spu_setup(0,0,0,0,true); // Bulding block containing the mode switch, a delay and a switch back PHOT_TestPattern(time_in_testmode); // Switch OFF SPU PHOT_spu_reset(); sync(); } // File : PACS_Diaghk_Reset.cus // Missionphase : PACS EQM Test // // Purpose : Switch off diagnostic hk flow // // Author : B.Vandenbussche // CUSification : DAC // Arguments : // // Description : // : // Comments : // // Version : 1.0 // History : 1.0 / 07-Jan-2004 initial version by BV // procedure PACS_Diaghk_Reset { }{ Pacs_DMC_STOP_DIAG_HK(); delay(1); //------------------ // End of procedure //------------------ } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : TM // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // // History : 0.1 22-mar-2006 // 0.2 09-oct-2006, TM // 1.0 04-mar-2008 translated into PV script // obs PacsEng_Phot_spu_reset { /* Needed variables to call PacsEng_Phot_spu_reset */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_spu_reset */ }{ // 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(PHOT_spu_reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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 PHOT_spu_reset(); } if(state[0] == 5) { // Declare end of OBS WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Run a loop of tens of different sets of PID parameters // // Description : For each set, performs a dozen of small and two larger movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Gra_IST_PID_Loop { /* Needed variables to call PacsEng_Spec_Gra_IST_PID_Loop */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_PID_Loop */ }{ // 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(Pacs_Spec_Gra_IST_PID_Loop())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_PID_Loop(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Gra_SFT_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Grating short functional test warm // // Author : H. Feuchtgruber // CUSification : DAC // Arguments : none // // Description : This script will switch on and set all required // parameters for the grating // // Comments : // // Version : 1.0 // History : 1.0 / 26-Nov-2004 initial version // 1.1 / 02-Mar-2007 PR Introduced DEGMODE configuration of the grating // procedure PACS_Spec_Gra_SFT_Warm { }{ debug_print("Start PACS_Spec_Gra_SFT_Warm"); // // CONFIGURATION // HF's approach: everything is hardcoded // Default parameters : // Rate = 32 (grating speed ~ 1 deg / sec) // Maximum Output Current = 8192 (138.75 mA) // {int}[] parlist = [{32},{8192}]; int[] aux = [32,8192]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_GRAT_DEGMOD_PAR(parlist,check_sum); delay(1); // // PC108420 "DMC_SWON_GRAT_CONT" SWITCH ON GRATING CONTROLLER //tcsend PC108420 //waittime 0.5 Pacs_DMC_SWON_GRAT_CONT(); delay(1); // PC115420 "DMC_ENTER_GRAT_CONT_DEG,0" //tcsend PC115420 {PP092420 0} //waittime 0.5 Pacs_DMC_ENTER_GRAT_CONT_DEG(0); delay(1); // PC112420 "DMC_MOVE_GRAT_REL" MOVE GRATING relative // tcsend PC113420 {PP078420 1280} // waittime 15.0 Pacs_DMC_MOVE_GRAT_REL(1280); delay(15); // PC112420 "DMC_MOVE_GRAT_REL" MOVE GRATING relative //tcsend PC113420 {PP078420 -1280} //waittime 15.0 Pacs_DMC_MOVE_GRAT_REL(-1280); delay(15); // "DMC_EXIT_GRAT_CONT_DEG" Exit grating open loop mode // tcsend PC116420 // waittime 0.5 Pacs_DMC_EXIT_GRAT_CONT_DEG(); delay(1); // "DMC-SWITCH-OFF-GRAT-CONT" SWITCH OFF GRATING CONTROLLER // tcsend PC109420 // waittime 0.5 Pacs_DMC_SWOF_GRAT_CONT(); delay(1); //------------------------- // End of Procedure //------------------------- } // Missionphase : EQM IMT // // Purpose : Configure the DPU bus list for burst mode // // Author : Bart Vandenbussche : // // Arguments : none // // Description : Sets the bus list for burst mode // // Dependencies : none // // Comments : // // Version : 1.0 // // History : 1.0 20-04-2005 BV - created base on Thomas' tcl script // 2.0 07-02-1008 VDP - added WriteBBID and WriteEndBB // for PV phase // block Burstmode_setup_block PACS 307 { }{ // Obtain and set Block ID WriteBBID($BBID); Pacs_DPU_SET_BUS_LIST("ENABLE"); // Reset Block ID WriteEndBB(); } // Mission phase : Performace Verification Phase // // Purpose : PCD req.1.1.10 Explore the time constant after flux change for // a flux levels using a CS and the background // // Author : Koryo Okumura // // Version : Fri Jul 25 22:30:55 CEST 2008 // // CUS script : procedure Phot_bandpassDDCS // // Argument : // string biasTable = "BOLObias_standard_high" : Bias table file name containing the initial values // string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements // int sideField = 7134 : Chopper angle for the FOV next to BB2 // int chop_pos_CS2 = 21196 : Chopper angle for BB2 // // Check before executing : // + Bolometer is already normally operating // // Description : // + All the biases are set group by group // except for VH, VL, VRL and VHBLIND // + Loop over 8 PACS chopper frequencies // + Loop over 3 different biases (set group by group) // + The 4 biases are set to a safe value for caution // Signal plateau length provided by PACS chopper movement : [40, 2, 3, 4, 6, 8, 10, 16] readouts // // Dependencies : Previously obtaind data at high gain (PCD req.1.1.1bis) // // Comments : generated by IA script : cus_PVph_timeCont(False) // procedure Phot_bandpassDDCS { string biasTable = "BOLObias_standard_low"; // Bias table file name containing the initial values string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements int sideField = 7134; // Chopper angle for the FOV next to BB2 int chop_pos_CS2 = 21196; // Chopper angle for BB2 }{ // //********************************************** // Flux is 2.0pW on the bleu // and 5.0pW on the red detector //********************************************** // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // //******************************* // Bias setting of the detectors //******************************* // PHOT_change_biases(biasTable,"DDCS",gain); // // Set the PACS chopper at the central position // Pacs_DMC_MOVE_CHOP_ABS(664); // //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("ENABLE"); // // //***************************************************** // PACS chopper cycle with 40 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 2 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 3 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 4 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 6 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 8 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 10 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 16 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("DISABLE"); // // // Sychronize // sync(); } // $Id: PacsCal_OBCP_chopped_photometry.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration and instrumental profile // Author : HF // // Arguments : // // Prerequisite : PACS must be on and configured for Photometry // // Description : Uses OBCP4 for executing a parameterized // // Comments : // // Version : 0.2 // History : 0.1 29-apr-2008 VDP created // obs PacsCal_OBCP_chopped_photometry { /* Pacs_OBCP_chopped_photometry parameters */ int nb_SRC_REF = 0; // p01 Number of observations in OBS loop int chop_pos_SRC = 0; // p02 Chopper position for SRCE int nb_rdouts_plateau = 15; // p03 Number of readouts per chopper position int chop_pos_REF1 = 0; // p04 Chopper position for BKG1 int chop_pos_REF2 = 0; // p05 Chopper position for BB2 int nb_cycles_obs_cal = 1; // p06 Number of obs/cal cycles int nb_CS1_CS2 = 38; // p07 Number of observations in CAL loop int chop_pos_CS1 = -21350; // p08 Chopper position for CS1 int chop_pos_CS2 = 21200; // p09 Chopper position for CS2 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position /* Pointing basic parameters */ int naifid = 0; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // zoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = imax(1,duration(WriteOBSID($OBSID))); //Initial hold int tih = 0; //Final hold int tfh = imax(1,duration(WriteEndID())); //Duration of "stable" pointing int tp = duration(Pacs_OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def)); debug_print("tp:" + tp); //Use SPECTRO virtual aperture string ib = "P01_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { WriteOBSID($OBSID); data_rate(120.0); } else { if(state[0] == 3) { // Pacs_OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); } else { if(state[0] == 5) { data_rate(0.0); WriteEndID(); } } } } } // Mission phase : Performance Verification Phase // // Purpose : PCD req.1.1.1 for the Performance Verification Phase // Check the bias/signal relationship using CSs and the central FOV // // Author : Koryo Okumura // // CUS script : procedure Phot_lowGainBiasDirect // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // + Set the biases group by group // + Set the blue filter 100um // + Loop on CSs // + Set the chopper on a CS // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the chopper on the central FOV // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the blue filter 70um // + Loop on CSs // + Set the chopper on a CS // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the chopper on the central FOV // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + At the end, the biases are set following a given bias table // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_lowGainBias(1, "LOW") // New version // // Version : Thu Jul 10 21:22:36 CEST 2008 // procedure Phot_lowGainBiasDirect { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values }{ // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //************************************************ // Set the biases and start SPU, then set the gain //************************************************ // PHOT_set_biases(startBiasTable,"DIRECT","LOW"); // //********************************************** // Set the PACS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS1 at 48.0 K // corresponding to 1.20pW on the green and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.2387937986138855 Volts Pacs_BOLC_SET_VH_G1(1.2387937986138855); // Set group 1 bol bias 02 (VL) to -0.01120620138611441 Volts Pacs_BOLC_SET_VL_G1(-0.01120620138611441); // Set group 1 bol bias 03 (VRL) to 0.39273766758961587 Volts Pacs_BOLC_SET_VRL_G1(0.39273766758961587); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512820863099917 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512820863099917); // Set group 2 bol bias 01 (VH) to 1.2273390654384582 Volts Pacs_BOLC_SET_VH_G2(1.2273390654384582); // Set group 2 bol bias 02 (VL) to -0.022660934561541744 Volts Pacs_BOLC_SET_VL_G2(-0.022660934561541744); // Set group 2 bol bias 03 (VRL) to 0.38921788688528014 Volts Pacs_BOLC_SET_VRL_G2(0.38921788688528014); // Set group 2 bol bias 20 (VH_BLIND) to 2.147146340755748 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.147146340755748); // Set group 3 bol bias 01 (VH) to 1.2296951151089281 Volts Pacs_BOLC_SET_VH_G3(1.2296951151089281); // Set group 3 bol bias 02 (VL) to -0.020304884891071927 Volts Pacs_BOLC_SET_VL_G3(-0.020304884891071927); // Set group 3 bol bias 03 (VRL) to 0.3894736881379893 Volts Pacs_BOLC_SET_VRL_G3(0.3894736881379893); // Set group 3 bol bias 20 (VH_BLIND) to 2.143754288741119 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.143754288741119); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.38519980225961764 Volts Pacs_BOLC_SET_VRL_G4(0.38519980225961764); // Set group 4 bol bias 20 (VH_BLIND) to 2.141162817635055 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.141162817635055); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3228584222642352 Volts Pacs_BOLC_SET_VRL_G5(0.3228584222642352); // Set group 5 bol bias 20 (VH_BLIND) to 2.067428073283575 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.067428073283575); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3146600782399116 Volts Pacs_BOLC_SET_VRL_G6(0.3146600782399116); // Set group 6 bol bias 20 (VH_BLIND) to 2.057234963490994 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.057234963490994); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.457556831416261 Volts Pacs_BOLC_SET_VH_G1(1.457556831416261); // Set group 1 bol bias 02 (VL) to -0.14244316858373907 Volts Pacs_BOLC_SET_VL_G1(-0.14244316858373907); // Set group 1 bol bias 03 (VRL) to 0.39289728144635716 Volts Pacs_BOLC_SET_VRL_G1(0.39289728144635716); // Set group 1 bol bias 20 (VH_BLIND) to 2.151471417543995 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151471417543995); // Set group 2 bol bias 01 (VH) to 1.444087138537561 Volts Pacs_BOLC_SET_VH_G2(1.444087138537561); // Set group 2 bol bias 02 (VL) to -0.1559128614624391 Volts Pacs_BOLC_SET_VL_G2(-0.1559128614624391); // Set group 2 bol bias 03 (VRL) to 0.3888592125442133 Volts Pacs_BOLC_SET_VRL_G2(0.3888592125442133); // Set group 2 bol bias 20 (VH_BLIND) to 2.1467299681244416 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1467299681244416); // Set group 3 bol bias 01 (VH) to 1.4461276964721905 Volts Pacs_BOLC_SET_VH_G3(1.4461276964721905); // Set group 3 bol bias 02 (VL) to -0.15387230352780956 Volts Pacs_BOLC_SET_VL_G3(-0.15387230352780956); // Set group 3 bol bias 03 (VRL) to 0.389702653261631 Volts Pacs_BOLC_SET_VRL_G3(0.389702653261631); // Set group 3 bol bias 20 (VH_BLIND) to 2.1440068212666743 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1440068212666743); // Set group 4 bol bias 01 (VH) to 1.461535092163816 Volts Pacs_BOLC_SET_VH_G4(1.461535092163816); // Set group 4 bol bias 02 (VL) to -0.13846490783618415 Volts Pacs_BOLC_SET_VL_G4(-0.13846490783618415); // Set group 4 bol bias 03 (VRL) to 0.38666891513104484 Volts Pacs_BOLC_SET_VRL_G4(0.38666891513104484); // Set group 4 bol bias 20 (VH_BLIND) to 2.1428402830030913 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1428402830030913); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.393205233420548 Volts Pacs_BOLC_SET_VRL_G5(0.393205233420548); // Set group 5 bol bias 20 (VH_BLIND) to 2.144845482323282 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.144845482323282); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3832953489422562 Volts Pacs_BOLC_SET_VRL_G6(0.3832953489422562); // Set group 6 bol bias 20 (VH_BLIND) to 2.130607584787264 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.130607584787264); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.585769661368119 Volts Pacs_BOLC_SET_VH_G1(1.585769661368119); // Set group 1 bol bias 02 (VL) to -0.214230338631881 Volts Pacs_BOLC_SET_VL_G1(-0.214230338631881); // Set group 1 bol bias 03 (VRL) to 0.39304515064751266 Volts Pacs_BOLC_SET_VRL_G1(0.39304515064751266); // Set group 1 bol bias 20 (VH_BLIND) to 2.151646819089764 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151646819089764); // Set group 2 bol bias 01 (VH) to 1.571162518585341 Volts Pacs_BOLC_SET_VH_G2(1.571162518585341); // Set group 2 bol bias 02 (VL) to -0.22883748141465898 Volts Pacs_BOLC_SET_VL_G2(-0.22883748141465898); // Set group 2 bol bias 03 (VRL) to 0.3888194923923588 Volts Pacs_BOLC_SET_VRL_G2(0.3888194923923588); // Set group 2 bol bias 20 (VH_BLIND) to 2.1466838588402206 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1466838588402206); // Set group 3 bol bias 01 (VH) to 1.5728976206374763 Volts Pacs_BOLC_SET_VH_G3(1.5728976206374763); // Set group 3 bol bias 02 (VL) to -0.22710237936252387 Volts Pacs_BOLC_SET_VL_G3(-0.22710237936252387); // Set group 3 bol bias 03 (VRL) to 0.39016220909623334 Volts Pacs_BOLC_SET_VRL_G3(0.39016220909623334); // Set group 3 bol bias 20 (VH_BLIND) to 2.144513683272569 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144513683272569); // Set group 4 bol bias 01 (VH) to 1.5905884509492139 Volts Pacs_BOLC_SET_VH_G4(1.5905884509492139); // Set group 4 bol bias 02 (VL) to -0.2094115490507863 Volts Pacs_BOLC_SET_VL_G4(-0.2094115490507863); // Set group 4 bol bias 03 (VRL) to 0.38773283476462383 Volts Pacs_BOLC_SET_VRL_G4(0.38773283476462383); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440552130411823 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440552130411823); // Set group 5 bol bias 01 (VH) to 1.3241923646302258 Volts Pacs_BOLC_SET_VH_G5(1.3241923646302258); // Set group 5 bol bias 02 (VL) to -0.07580763536977406 Volts Pacs_BOLC_SET_VL_G5(-0.07580763536977406); // Set group 5 bol bias 03 (VRL) to 0.40046001102514184 Volts Pacs_BOLC_SET_VRL_G5(0.40046001102514184); // Set group 5 bol bias 20 (VH_BLIND) to 2.153546375049013 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.153546375049013); // Set group 6 bol bias 01 (VH) to 1.37098688511416 Volts Pacs_BOLC_SET_VH_G6(1.37098688511416); // Set group 6 bol bias 02 (VL) to -0.02901311488583999 Volts Pacs_BOLC_SET_VL_G6(-0.02901311488583999); // Set group 6 bol bias 03 (VRL) to 0.43611847195239406 Volts Pacs_BOLC_SET_VRL_G6(0.43611847195239406); // Set group 6 bol bias 20 (VH_BLIND) to 2.1943115490461103 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1943115490461103); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7183370767248043 Volts Pacs_BOLC_SET_VH_G1(1.7183370767248043); // Set group 1 bol bias 02 (VL) to -0.2816629232751957 Volts Pacs_BOLC_SET_VL_G1(-0.2816629232751957); // Set group 1 bol bias 03 (VRL) to 0.39272615099525776 Volts Pacs_BOLC_SET_VRL_G1(0.39272615099525776); // Set group 1 bol bias 20 (VH_BLIND) to 2.151268425592528 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151268425592528); // Set group 2 bol bias 01 (VH) to 1.7019559750109217 Volts Pacs_BOLC_SET_VH_G2(1.7019559750109217); // Set group 2 bol bias 02 (VL) to -0.29804402498907834 Volts Pacs_BOLC_SET_VL_G2(-0.29804402498907834); // Set group 2 bol bias 03 (VRL) to 0.388357028089395 Volts Pacs_BOLC_SET_VRL_G2(0.388357028089395); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461470122884805 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461470122884805); // Set group 3 bol bias 01 (VH) to 1.714454188425701 Volts Pacs_BOLC_SET_VH_G3(1.714454188425701); // Set group 3 bol bias 02 (VL) to -0.2855458115742991 Volts Pacs_BOLC_SET_VL_G3(-0.2855458115742991); // Set group 3 bol bias 03 (VRL) to 0.401550404399907 Volts Pacs_BOLC_SET_VRL_G3(0.401550404399907); // Set group 3 bol bias 20 (VH_BLIND) to 2.15707892246005 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.15707892246005); // Set group 4 bol bias 01 (VH) to 1.7242793470756728 Volts Pacs_BOLC_SET_VH_G4(1.7242793470756728); // Set group 4 bol bias 02 (VL) to -0.27572065292432724 Volts Pacs_BOLC_SET_VL_G4(-0.27572065292432724); // Set group 4 bol bias 03 (VRL) to 0.3889940535267571 Volts Pacs_BOLC_SET_VRL_G4(0.3889940535267571); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454955805079967 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454955805079967); // Set group 5 bol bias 01 (VH) to 1.4496153041151667 Volts Pacs_BOLC_SET_VH_G5(1.4496153041151667); // Set group 5 bol bias 02 (VL) to -0.15038469588483347 Volts Pacs_BOLC_SET_VL_G5(-0.15038469588483347); // Set group 5 bol bias 03 (VRL) to 0.39905723488551603 Volts Pacs_BOLC_SET_VRL_G5(0.39905723488551603); // Set group 5 bol bias 20 (VH_BLIND) to 2.15186471364944 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.15186471364944); // Set group 6 bol bias 01 (VH) to 1.4970241024935167 Volts Pacs_BOLC_SET_VH_G6(1.4970241024935167); // Set group 6 bol bias 02 (VL) to -0.10297589750648331 Volts Pacs_BOLC_SET_VL_G6(-0.10297589750648331); // Set group 6 bol bias 03 (VRL) to 0.43401661473441144 Volts Pacs_BOLC_SET_VRL_G6(0.43401661473441144); // Set group 6 bol bias 20 (VH_BLIND) to 2.1918048548715423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1918048548715423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8585362347937342 Volts Pacs_BOLC_SET_VH_G1(1.8585362347937342); // Set group 1 bol bias 02 (VL) to -0.34146376520626587 Volts Pacs_BOLC_SET_VL_G1(-0.34146376520626587); // Set group 1 bol bias 03 (VRL) to 0.3925990888065586 Volts Pacs_BOLC_SET_VRL_G1(0.3925990888065586); // Set group 1 bol bias 20 (VH_BLIND) to 2.1511177079955788 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1511177079955788); // Set group 2 bol bias 01 (VH) to 1.838716500789082 Volts Pacs_BOLC_SET_VH_G2(1.838716500789082); // Set group 2 bol bias 02 (VL) to -0.3612834992109183 Volts Pacs_BOLC_SET_VL_G2(-0.3612834992109183); // Set group 2 bol bias 03 (VRL) to 0.38744902130448367 Volts Pacs_BOLC_SET_VRL_G2(0.38744902130448367); // Set group 2 bol bias 20 (VH_BLIND) to 2.1450929993071512 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1450929993071512); // Set group 3 bol bias 01 (VH) to 1.85163190367321 Volts Pacs_BOLC_SET_VH_G3(1.85163190367321); // Set group 3 bol bias 02 (VL) to -0.34836809632679006 Volts Pacs_BOLC_SET_VL_G3(-0.34836809632679006); // Set group 3 bol bias 03 (VRL) to 0.4020826639883897 Volts Pacs_BOLC_SET_VRL_G3(0.4020826639883897); // Set group 3 bol bias 20 (VH_BLIND) to 2.157667831933953 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157667831933953); // Set group 4 bol bias 01 (VH) to 1.8658389594227858 Volts Pacs_BOLC_SET_VH_G4(1.8658389594227858); // Set group 4 bol bias 02 (VL) to -0.3341610405772144 Volts Pacs_BOLC_SET_VL_G4(-0.3341610405772144); // Set group 4 bol bias 03 (VRL) to 0.39087822103495706 Volts Pacs_BOLC_SET_VRL_G4(0.39087822103495706); // Set group 4 bol bias 20 (VH_BLIND) to 2.1476476539739764 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1476476539739764); // Set group 5 bol bias 01 (VH) to 1.5144117466818523 Volts Pacs_BOLC_SET_VH_G5(1.5144117466818523); // Set group 5 bol bias 02 (VL) to -0.18558825331814774 Volts Pacs_BOLC_SET_VL_G5(-0.18558825331814774); // Set group 5 bol bias 03 (VRL) to 0.39841417525779244 Volts Pacs_BOLC_SET_VRL_G5(0.39841417525779244); // Set group 5 bol bias 20 (VH_BLIND) to 2.151093482383656 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151093482383656); // Set group 6 bol bias 01 (VH) to 1.5622243148794812 Volts Pacs_BOLC_SET_VH_G6(1.5622243148794812); // Set group 6 bol bias 02 (VL) to -0.13777568512051877 Volts Pacs_BOLC_SET_VL_G6(-0.13777568512051877); // Set group 6 bol bias 03 (VRL) to 0.43327546525989336 Volts Pacs_BOLC_SET_VRL_G6(0.43327546525989336); // Set group 6 bol bias 20 (VH_BLIND) to 2.1909210235812204 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1909210235812204); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0202028596068895 Volts Pacs_BOLC_SET_VH_G1(2.0202028596068895); // Set group 1 bol bias 02 (VL) to -0.3797971403931106 Volts Pacs_BOLC_SET_VL_G1(-0.3797971403931106); // Set group 1 bol bias 03 (VRL) to 0.4031554178502121 Volts Pacs_BOLC_SET_VRL_G1(0.4031554178502121); // Set group 1 bol bias 20 (VH_BLIND) to 2.163634915975391 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163634915975391); // Set group 2 bol bias 01 (VH) to 1.9845954458032045 Volts Pacs_BOLC_SET_VH_G2(1.9845954458032045); // Set group 2 bol bias 02 (VL) to -0.41540455419679545 Volts Pacs_BOLC_SET_VL_G2(-0.41540455419679545); // Set group 2 bol bias 03 (VRL) to 0.38611513204716796 Volts Pacs_BOLC_SET_VRL_G2(0.38611513204716796); // Set group 2 bol bias 20 (VH_BLIND) to 2.1435447105412555 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1435447105412555); // Set group 3 bol bias 01 (VH) to 2.0091673911193446 Volts Pacs_BOLC_SET_VH_G3(2.0091673911193446); // Set group 3 bol bias 02 (VL) to -0.39083260888065513 Volts Pacs_BOLC_SET_VL_G3(-0.39083260888065513); // Set group 3 bol bias 03 (VRL) to 0.4135751200095534 Volts Pacs_BOLC_SET_VRL_G3(0.4135751200095534); // Set group 3 bol bias 20 (VH_BLIND) to 2.170378532407885 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170378532407885); // Set group 4 bol bias 01 (VH) to 2.0158037297874873 Volts Pacs_BOLC_SET_VH_G4(2.0158037297874873); // Set group 4 bol bias 02 (VL) to -0.3841962702125128 Volts Pacs_BOLC_SET_VL_G4(-0.3841962702125128); // Set group 4 bol bias 03 (VRL) to 0.3915724280149063 Volts Pacs_BOLC_SET_VRL_G4(0.3915724280149063); // Set group 4 bol bias 20 (VH_BLIND) to 2.1484406507127387 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1484406507127387); // Set group 5 bol bias 01 (VH) to 1.5900913542685013 Volts Pacs_BOLC_SET_VH_G5(1.5900913542685013); // Set group 5 bol bias 02 (VL) to -0.20990864573149876 Volts Pacs_BOLC_SET_VL_G5(-0.20990864573149876); // Set group 5 bol bias 03 (VRL) to 0.40844955554354584 Volts Pacs_BOLC_SET_VRL_G5(0.40844955554354584); // Set group 5 bol bias 20 (VH_BLIND) to 2.163093126853995 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.163093126853995); // Set group 6 bol bias 01 (VH) to 1.6276124853923464 Volts Pacs_BOLC_SET_VH_G6(1.6276124853923464); // Set group 6 bol bias 02 (VL) to -0.17238751460765359 Volts Pacs_BOLC_SET_VL_G6(-0.17238751460765359); // Set group 6 bol bias 03 (VRL) to 0.43216415132235575 Volts Pacs_BOLC_SET_VRL_G6(0.43216415132235575); // Set group 6 bol bias 20 (VH_BLIND) to 2.1895819441738285 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1895819441738285); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1116098904579044 Volts Pacs_BOLC_SET_VH_G1(2.1116098904579044); // Set group 1 bol bias 02 (VL) to -0.3883901095420957 Volts Pacs_BOLC_SET_VL_G1(-0.3883901095420957); // Set group 1 bol bias 03 (VRL) to 0.4140062165204889 Volts Pacs_BOLC_SET_VRL_G1(0.4140062165204889); // Set group 1 bol bias 20 (VH_BLIND) to 2.1764790937594767 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1764790937594767); // Set group 2 bol bias 01 (VH) to 2.0619437696054 Volts Pacs_BOLC_SET_VH_G2(2.0619437696054); // Set group 2 bol bias 02 (VL) to -0.43805623039459973 Volts Pacs_BOLC_SET_VL_G2(-0.43805623039459973); // Set group 2 bol bias 03 (VRL) to 0.38550512685952865 Volts Pacs_BOLC_SET_VRL_G2(0.38550512685952865); // Set group 2 bol bias 20 (VH_BLIND) to 2.1428366925092326 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1428366925092326); // Set group 3 bol bias 01 (VH) to 2.0871836925661524 Volts Pacs_BOLC_SET_VH_G3(2.0871836925661524); // Set group 3 bol bias 02 (VL) to -0.4128163074338474 Volts Pacs_BOLC_SET_VL_G3(-0.4128163074338474); // Set group 3 bol bias 03 (VRL) to 0.41367957243777737 Volts Pacs_BOLC_SET_VRL_G3(0.41367957243777737); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704940139980216 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704940139980216); // Set group 4 bol bias 01 (VH) to 2.095481525504912 Volts Pacs_BOLC_SET_VH_G4(2.095481525504912); // Set group 4 bol bias 02 (VL) to -0.40451847449508793 Volts Pacs_BOLC_SET_VL_G4(-0.40451847449508793); // Set group 4 bol bias 03 (VRL) to 0.3918611768543646 Volts Pacs_BOLC_SET_VRL_G4(0.3918611768543646); // Set group 4 bol bias 20 (VH_BLIND) to 2.148770503204217 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.148770503204217); // Set group 5 bol bias 01 (VH) to 1.6549108970361488 Volts Pacs_BOLC_SET_VH_G5(1.6549108970361488); // Set group 5 bol bias 02 (VL) to -0.24508910296385117 Volts Pacs_BOLC_SET_VL_G5(-0.24508910296385117); // Set group 5 bol bias 03 (VRL) to 0.4072430925044988 Volts Pacs_BOLC_SET_VRL_G5(0.4072430925044988); // Set group 5 bol bias 20 (VH_BLIND) to 2.161651131887083 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161651131887083); // Set group 6 bol bias 01 (VH) to 1.6931168196610022 Volts Pacs_BOLC_SET_VH_G6(1.6931168196610022); // Set group 6 bol bias 02 (VL) to -0.20688318033899758 Volts Pacs_BOLC_SET_VL_G6(-0.20688318033899758); // Set group 6 bol bias 03 (VRL) to 0.4307551048853343 Volts Pacs_BOLC_SET_VRL_G6(0.4307551048853343); // Set group 6 bol bias 20 (VH_BLIND) to 2.187881524411063 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187881524411063); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.196006753214598 Volts Pacs_BOLC_SET_VH_G1(2.196006753214598); // Set group 1 bol bias 02 (VL) to -0.4039932467854021 Volts Pacs_BOLC_SET_VL_G1(-0.4039932467854021); // Set group 1 bol bias 03 (VRL) to 0.41357184702417576 Volts Pacs_BOLC_SET_VRL_G1(0.41357184702417576); // Set group 1 bol bias 20 (VH_BLIND) to 2.1759648938728384 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1759648938728384); // Set group 2 bol bias 01 (VH) to 2.1433243650504217 Volts Pacs_BOLC_SET_VH_G2(2.1433243650504217); // Set group 2 bol bias 02 (VL) to -0.45667563494957836 Volts Pacs_BOLC_SET_VL_G2(-0.45667563494957836); // Set group 2 bol bias 03 (VRL) to 0.3850880425693594 Volts Pacs_BOLC_SET_VRL_G2(0.3850880425693594); // Set group 2 bol bias 20 (VH_BLIND) to 2.14235260562423 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14235260562423); // Set group 3 bol bias 01 (VH) to 2.1686669393324536 Volts Pacs_BOLC_SET_VH_G3(2.1686669393324536); // Set group 3 bol bias 02 (VL) to -0.43133306066754634 Volts Pacs_BOLC_SET_VL_G3(-0.43133306066754634); // Set group 3 bol bias 03 (VRL) to 0.41346974712361556 Volts Pacs_BOLC_SET_VRL_G3(0.41346974712361556); // Set group 3 bol bias 20 (VH_BLIND) to 2.17026203238048 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.17026203238048); // Set group 4 bol bias 01 (VH) to 2.1793962970285237 Volts Pacs_BOLC_SET_VH_G4(2.1793962970285237); // Set group 4 bol bias 02 (VL) to -0.42060370297147653 Volts Pacs_BOLC_SET_VL_G4(-0.42060370297147653); // Set group 4 bol bias 03 (VRL) to 0.39239244557899233 Volts Pacs_BOLC_SET_VRL_G4(0.39239244557899233); // Set group 4 bol bias 20 (VH_BLIND) to 2.149377418431709 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.149377418431709); // Set group 5 bol bias 01 (VH) to 1.7225616727109463 Volts Pacs_BOLC_SET_VH_G5(1.7225616727109463); // Set group 5 bol bias 02 (VL) to -0.27743832728905365 Volts Pacs_BOLC_SET_VL_G5(-0.27743832728905365); // Set group 5 bol bias 03 (VRL) to 0.40580736393386424 Volts Pacs_BOLC_SET_VRL_G5(0.40580736393386424); // Set group 5 bol bias 20 (VH_BLIND) to 2.159935285624683 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.159935285624683); // Set group 6 bol bias 01 (VH) to 1.7622827443723812 Volts Pacs_BOLC_SET_VH_G6(1.7622827443723812); // Set group 6 bol bias 02 (VL) to -0.23771725562761872 Volts Pacs_BOLC_SET_VL_G6(-0.23771725562761872); // Set group 6 bol bias 03 (VRL) to 0.4298269773716583 Volts Pacs_BOLC_SET_VRL_G6(0.4298269773716583); // Set group 6 bol bias 20 (VH_BLIND) to 2.1867614355291423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1867614355291423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2848572542958143 Volts Pacs_BOLC_SET_VH_G1(2.2848572542958143); // Set group 1 bol bias 02 (VL) to -0.4151427457041857 Volts Pacs_BOLC_SET_VL_G1(-0.4151427457041857); // Set group 1 bol bias 03 (VRL) to 0.4131612503913013 Volts Pacs_BOLC_SET_VRL_G1(0.4131612503913013); // Set group 1 bol bias 20 (VH_BLIND) to 2.175478838481054 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175478838481054); // Set group 2 bol bias 01 (VH) to 2.227445675456437 Volts Pacs_BOLC_SET_VH_G2(2.227445675456437); // Set group 2 bol bias 02 (VL) to -0.47255432454356333 Volts Pacs_BOLC_SET_VL_G2(-0.47255432454356333); // Set group 2 bol bias 03 (VRL) to 0.38358395077791313 Volts Pacs_BOLC_SET_VRL_G2(0.38358395077791313); // Set group 2 bol bias 20 (VH_BLIND) to 2.1406069736852453 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1406069736852453); // Set group 3 bol bias 01 (VH) to 2.2541010275551834 Volts Pacs_BOLC_SET_VH_G3(2.2541010275551834); // Set group 3 bol bias 02 (VL) to -0.4458989724448167 Volts Pacs_BOLC_SET_VL_G3(-0.4458989724448167); // Set group 3 bol bias 03 (VRL) to 0.4127976284436742 Volts Pacs_BOLC_SET_VRL_G3(0.4127976284436742); // Set group 3 bol bias 20 (VH_BLIND) to 2.1695189208400576 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1695189208400576); // Set group 4 bol bias 01 (VH) to 2.2792127013060117 Volts Pacs_BOLC_SET_VH_G4(2.2792127013060117); // Set group 4 bol bias 02 (VL) to -0.4207872986939883 Volts Pacs_BOLC_SET_VL_G4(-0.4207872986939883); // Set group 4 bol bias 03 (VRL) to 0.4047407291500576 Volts Pacs_BOLC_SET_VRL_G4(0.4047407291500576); // Set group 4 bol bias 20 (VH_BLIND) to 2.1634937911711 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1634937911711); // Set group 5 bol bias 01 (VH) to 1.8021521044604545 Volts Pacs_BOLC_SET_VH_G5(1.8021521044604545); // Set group 5 bol bias 02 (VL) to -0.2978478955395457 Volts Pacs_BOLC_SET_VL_G5(-0.2978478955395457); // Set group 5 bol bias 03 (VRL) to 0.4159065601971136 Volts Pacs_BOLC_SET_VRL_G5(0.4159065601971136); // Set group 5 bol bias 20 (VH_BLIND) to 2.17200886747967 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.17200886747967); // Set group 6 bol bias 01 (VH) to 1.8316635864270032 Volts Pacs_BOLC_SET_VH_G6(1.8316635864270032); // Set group 6 bol bias 02 (VL) to -0.26833641357299687 Volts Pacs_BOLC_SET_VL_G6(-0.26833641357299687); // Set group 6 bol bias 03 (VRL) to 0.4288145963722081 Volts Pacs_BOLC_SET_VRL_G6(0.4288145963722081); // Set group 6 bol bias 20 (VH_BLIND) to 2.185539634602432 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.185539634602432); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3796037366573897 Volts Pacs_BOLC_SET_VH_G1(2.3796037366573897); // Set group 1 bol bias 02 (VL) to -0.4203962633426101 Volts Pacs_BOLC_SET_VL_G1(-0.4203962633426101); // Set group 1 bol bias 03 (VRL) to 0.4129099400989898 Volts Pacs_BOLC_SET_VRL_G1(0.4129099400989898); // Set group 1 bol bias 20 (VH_BLIND) to 2.175181344026924 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175181344026924); // Set group 2 bol bias 01 (VH) to 2.315754480139234 Volts Pacs_BOLC_SET_VH_G2(2.315754480139234); // Set group 2 bol bias 02 (VL) to -0.4842455198607661 Volts Pacs_BOLC_SET_VL_G2(-0.4842455198607661); // Set group 2 bol bias 03 (VRL) to 0.38156757008948644 Volts Pacs_BOLC_SET_VRL_G2(0.38156757008948644); // Set group 2 bol bias 20 (VH_BLIND) to 2.138266993828065 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.138266993828065); // Set group 3 bol bias 01 (VH) to 2.3449665772192874 Volts Pacs_BOLC_SET_VH_G3(2.3449665772192874); // Set group 3 bol bias 02 (VL) to -0.45503342278071257 Volts Pacs_BOLC_SET_VL_G3(-0.45503342278071257); // Set group 3 bol bias 03 (VRL) to 0.4122322683327103 Volts Pacs_BOLC_SET_VRL_G3(0.4122322683327103); // Set group 3 bol bias 20 (VH_BLIND) to 2.1688938193526224 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1688938193526224); // Set group 4 bol bias 01 (VH) to 2.360152158437928 Volts Pacs_BOLC_SET_VH_G4(2.360152158437928); // Set group 4 bol bias 02 (VL) to -0.4398478415620719 Volts Pacs_BOLC_SET_VL_G4(-0.4398478415620719); // Set group 4 bol bias 03 (VRL) to 0.39354738531821554 Volts Pacs_BOLC_SET_VRL_G4(0.39354738531821554); // Set group 4 bol bias 20 (VH_BLIND) to 2.150696897295742 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150696897295742); // Set group 5 bol bias 01 (VH) to 1.8624422796333608 Volts Pacs_BOLC_SET_VH_G5(1.8624422796333608); // Set group 5 bol bias 02 (VL) to -0.3375577203666393 Volts Pacs_BOLC_SET_VL_G5(-0.3375577203666393); // Set group 5 bol bias 03 (VRL) to 0.4028017551941114 Volts Pacs_BOLC_SET_VRL_G5(0.4028017551941114); // Set group 5 bol bias 20 (VH_BLIND) to 2.156343875220547 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156343875220547); // Set group 6 bol bias 01 (VH) to 1.9050654119965236 Volts Pacs_BOLC_SET_VH_G6(1.9050654119965236); // Set group 6 bol bias 02 (VL) to -0.2949345880034766 Volts Pacs_BOLC_SET_VL_G6(-0.2949345880034766); // Set group 6 bol bias 03 (VRL) to 0.42788441761189455 Volts Pacs_BOLC_SET_VRL_G6(0.42788441761189455); // Set group 6 bol bias 20 (VH_BLIND) to 2.1844170100895375 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1844170100895375); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6080079699591967 Volts Pacs_BOLC_SET_VH_G1(2.6080079699591967); // Set group 1 bol bias 02 (VL) to -0.39199203004080335 Volts Pacs_BOLC_SET_VL_G1(-0.39199203004080335); // Set group 1 bol bias 03 (VRL) to 0.4353039674693117 Volts Pacs_BOLC_SET_VRL_G1(0.4353039674693117); // Set group 1 bol bias 20 (VH_BLIND) to 2.2016826896367014 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2016826896367014); // Set group 2 bol bias 01 (VH) to 2.5212704911688184 Volts Pacs_BOLC_SET_VH_G2(2.5212704911688184); // Set group 2 bol bias 02 (VL) to -0.4787295088311815 Volts Pacs_BOLC_SET_VL_G2(-0.4787295088311815); // Set group 2 bol bias 03 (VRL) to 0.39184175711517744 Volts Pacs_BOLC_SET_VRL_G2(0.39184175711517744); // Set group 2 bol bias 20 (VH_BLIND) to 2.150192531202592 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150192531202592); // Set group 3 bol bias 01 (VH) to 2.5446946302676037 Volts Pacs_BOLC_SET_VH_G3(2.5446946302676037); // Set group 3 bol bias 02 (VL) to -0.4553053697323962 Volts Pacs_BOLC_SET_VL_G3(-0.4553053697323962); // Set group 3 bol bias 03 (VRL) to 0.41118382754245053 Volts Pacs_BOLC_SET_VRL_G3(0.41118382754245053); // Set group 3 bol bias 20 (VH_BLIND) to 2.1677345299207764 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1677345299207764); // Set group 4 bol bias 01 (VH) to 2.582263974911207 Volts Pacs_BOLC_SET_VH_G4(2.582263974911207); // Set group 4 bol bias 02 (VL) to -0.4177360250887929 Volts Pacs_BOLC_SET_VL_G4(-0.4177360250887929); // Set group 4 bol bias 03 (VRL) to 0.4155747259799741 Volts Pacs_BOLC_SET_VRL_G4(0.4155747259799741); // Set group 4 bol bias 20 (VH_BLIND) to 2.1758807093660604 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1758807093660604); // Set group 5 bol bias 01 (VH) to 2.0139550919820626 Volts Pacs_BOLC_SET_VH_G5(2.0139550919820626); // Set group 5 bol bias 02 (VL) to -0.38604490801793717 Volts Pacs_BOLC_SET_VL_G5(-0.38604490801793717); // Set group 5 bol bias 03 (VRL) to 0.39874967908065667 Volts Pacs_BOLC_SET_VRL_G5(0.39874967908065667); // Set group 5 bol bias 20 (VH_BLIND) to 2.151495860090233 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151495860090233); // Set group 6 bol bias 01 (VH) to 2.0603593375586526 Volts Pacs_BOLC_SET_VH_G6(2.0603593375586526); // Set group 6 bol bias 02 (VL) to -0.3396406624413473 Volts Pacs_BOLC_SET_VL_G6(-0.3396406624413473); // Set group 6 bol bias 03 (VRL) to 0.4254561262075288 Volts Pacs_BOLC_SET_VRL_G6(0.4254561262075288); // Set group 6 bol bias 20 (VH_BLIND) to 2.1814861909041072 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1814861909041072); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.958669888952511 Volts Pacs_BOLC_SET_VH_G1(2.958669888952511); // Set group 1 bol bias 02 (VL) to -0.3413301110474886 Volts Pacs_BOLC_SET_VL_G1(-0.3413301110474886); // Set group 1 bol bias 03 (VRL) to 0.43496400697889964 Volts Pacs_BOLC_SET_VRL_G1(0.43496400697889964); // Set group 1 bol bias 20 (VH_BLIND) to 2.201282516353445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201282516353445); // Set group 2 bol bias 01 (VH) to 2.877259199990068 Volts Pacs_BOLC_SET_VH_G2(2.877259199990068); // Set group 2 bol bias 02 (VL) to -0.4227408000099317 Volts Pacs_BOLC_SET_VL_G2(-0.4227408000099317); // Set group 2 bol bias 03 (VRL) to 0.41471523343174815 Volts Pacs_BOLC_SET_VRL_G2(0.41471523343174815); // Set group 2 bol bias 20 (VH_BLIND) to 2.1767077990321737 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1767077990321737); // Set group 3 bol bias 01 (VH) to 2.917604872367548 Volts Pacs_BOLC_SET_VH_G3(2.917604872367548); // Set group 3 bol bias 02 (VL) to -0.38239512763245215 Volts Pacs_BOLC_SET_VL_G3(-0.38239512763245215); // Set group 3 bol bias 03 (VRL) to 0.43322793583509106 Volts Pacs_BOLC_SET_VRL_G3(0.43322793583509106); // Set group 3 bol bias 20 (VH_BLIND) to 2.1920928084003948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1920928084003948); // Set group 4 bol bias 01 (VH) to 2.9326607124177055 Volts Pacs_BOLC_SET_VH_G4(2.9326607124177055); // Set group 4 bol bias 02 (VL) to -0.36733928758229417 Volts Pacs_BOLC_SET_VL_G4(-0.36733928758229417); // Set group 4 bol bias 03 (VRL) to 0.4248388375312061 Volts Pacs_BOLC_SET_VRL_G4(0.4248388375312061); // Set group 4 bol bias 20 (VH_BLIND) to 2.186464990521523 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.186464990521523); // Set group 5 bol bias 01 (VH) to 2.2123399887514554 Volts Pacs_BOLC_SET_VH_G5(2.2123399887514554); // Set group 5 bol bias 02 (VL) to -0.38766001124854466 Volts Pacs_BOLC_SET_VL_G5(-0.38766001124854466); // Set group 5 bol bias 03 (VRL) to 0.4257278403385899 Volts Pacs_BOLC_SET_VRL_G5(0.4257278403385899); // Set group 5 bol bias 20 (VH_BLIND) to 2.1837591130416554 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1837591130416554); // Set group 6 bol bias 01 (VH) to 2.2318001783201304 Volts Pacs_BOLC_SET_VH_G6(2.2318001783201304); // Set group 6 bol bias 02 (VL) to -0.36819982167986975 Volts Pacs_BOLC_SET_VL_G6(-0.36819982167986975); // Set group 6 bol bias 03 (VRL) to 0.423759377774352 Volts Pacs_BOLC_SET_VRL_G6(0.423759377774352); // Set group 6 bol bias 20 (VH_BLIND) to 2.1794381888209813 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1794381888209813); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS2 at 58.0 K // corresponding to 1.55pW on the green and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38123347242944194 Volts Pacs_BOLC_SET_VRL_G1(0.38123347242944194); // Set group 1 bol bias 20 (VH_BLIND) to 2.1376407910122737 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1376407910122737); // Set group 2 bol bias 01 (VH) to 1.2387003199108486 Volts Pacs_BOLC_SET_VH_G2(1.2387003199108486); // Set group 2 bol bias 02 (VL) to -0.011299680089151297 Volts Pacs_BOLC_SET_VL_G2(-0.011299680089151297); // Set group 2 bol bias 03 (VRL) to 0.3885454558920056 Volts Pacs_BOLC_SET_VRL_G2(0.3885454558920056); // Set group 2 bol bias 20 (VH_BLIND) to 2.146365745091845 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146365745091845); // Set group 3 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G3(1.24); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.38773615773066705 Volts Pacs_BOLC_SET_VRL_G3(0.38773615773066705); // Set group 3 bol bias 20 (VH_BLIND) to 2.141837957849939 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.141837957849939); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3746747870084728 Volts Pacs_BOLC_SET_VRL_G4(0.3746747870084728); // Set group 4 bol bias 20 (VH_BLIND) to 2.1291508925975227 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1291508925975227); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.30644740182478597 Volts Pacs_BOLC_SET_VRL_G5(0.30644740182478597); // Set group 5 bol bias 20 (VH_BLIND) to 2.051135159732571 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051135159732571); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.29823090263814045 Volts Pacs_BOLC_SET_VRL_G6(0.29823090263814045); // Set group 6 bol bias 20 (VH_BLIND) to 2.0409569182979173 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0409569182979173); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4721285832931112 Volts Pacs_BOLC_SET_VH_G1(1.4721285832931112); // Set group 1 bol bias 02 (VL) to -0.12787141670688873 Volts Pacs_BOLC_SET_VL_G1(-0.12787141670688873); // Set group 1 bol bias 03 (VRL) to 0.3926297476827718 Volts Pacs_BOLC_SET_VRL_G1(0.3926297476827718); // Set group 1 bol bias 20 (VH_BLIND) to 2.151154074587398 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151154074587398); // Set group 2 bol bias 01 (VH) to 1.4563242224495716 Volts Pacs_BOLC_SET_VH_G2(1.4563242224495716); // Set group 2 bol bias 02 (VL) to -0.14367577755042849 Volts Pacs_BOLC_SET_VL_G2(-0.14367577755042849); // Set group 2 bol bias 03 (VRL) to 0.3881765529411487 Volts Pacs_BOLC_SET_VRL_G2(0.3881765529411487); // Set group 2 bol bias 20 (VH_BLIND) to 2.145937513130471 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.145937513130471); // Set group 3 bol bias 01 (VH) to 1.45972772124239 Volts Pacs_BOLC_SET_VH_G3(1.45972772124239); // Set group 3 bol bias 02 (VL) to -0.14027227875761006 Volts Pacs_BOLC_SET_VL_G3(-0.14027227875761006); // Set group 3 bol bias 03 (VRL) to 0.38988919840997094 Volts Pacs_BOLC_SET_VRL_G3(0.38988919840997094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1442125685158864 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1442125685158864); // Set group 4 bol bias 01 (VH) to 1.4747276174033868 Volts Pacs_BOLC_SET_VH_G4(1.4747276174033868); // Set group 4 bol bias 02 (VL) to -0.12527238259661322 Volts Pacs_BOLC_SET_VL_G4(-0.12527238259661322); // Set group 4 bol bias 03 (VRL) to 0.38624222870786595 Volts Pacs_BOLC_SET_VRL_G4(0.38624222870786595); // Set group 4 bol bias 20 (VH_BLIND) to 2.1423530627314813 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1423530627314813); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3734713392363535 Volts Pacs_BOLC_SET_VRL_G5(0.3734713392363535); // Set group 5 bol bias 20 (VH_BLIND) to 2.1211616404276756 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1211616404276756); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3640870527167945 Volts Pacs_BOLC_SET_VRL_G6(0.3640870527167945); // Set group 6 bol bias 20 (VH_BLIND) to 2.1074512769294307 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1074512769294307); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6005646067625168 Volts Pacs_BOLC_SET_VH_G1(1.6005646067625168); // Set group 1 bol bias 02 (VL) to -0.19943539323748327 Volts Pacs_BOLC_SET_VL_G1(-0.19943539323748327); // Set group 1 bol bias 03 (VRL) to 0.3927137250656313 Volts Pacs_BOLC_SET_VRL_G1(0.3927137250656313); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512536862532445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512536862532445); // Set group 2 bol bias 01 (VH) to 1.5835245401299414 Volts Pacs_BOLC_SET_VH_G2(1.5835245401299414); // Set group 2 bol bias 02 (VL) to -0.21647545987005867 Volts Pacs_BOLC_SET_VL_G2(-0.21647545987005867); // Set group 2 bol bias 03 (VRL) to 0.3880497715778095 Volts Pacs_BOLC_SET_VRL_G2(0.3880497715778095); // Set group 2 bol bias 20 (VH_BLIND) to 2.1457903439369534 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1457903439369534); // Set group 3 bol bias 01 (VH) to 1.5867464604266623 Volts Pacs_BOLC_SET_VH_G3(1.5867464604266623); // Set group 3 bol bias 02 (VL) to -0.2132535395733377 Volts Pacs_BOLC_SET_VL_G3(-0.2132535395733377); // Set group 3 bol bias 03 (VRL) to 0.3903025295231384 Volts Pacs_BOLC_SET_VRL_G3(0.3903025295231384); // Set group 3 bol bias 20 (VH_BLIND) to 2.144668449205875 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144668449205875); // Set group 4 bol bias 01 (VH) to 1.6044364991789073 Volts Pacs_BOLC_SET_VH_G4(1.6044364991789073); // Set group 4 bol bias 02 (VL) to -0.19556350082109264 Volts Pacs_BOLC_SET_VL_G4(-0.19556350082109264); // Set group 4 bol bias 03 (VRL) to 0.387662053519384 Volts Pacs_BOLC_SET_VRL_G4(0.387662053519384); // Set group 4 bol bias 20 (VH_BLIND) to 2.1439743820479262 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1439743820479262); // Set group 5 bol bias 01 (VH) to 1.3451907640885556 Volts Pacs_BOLC_SET_VH_G5(1.3451907640885556); // Set group 5 bol bias 02 (VL) to -0.054809235911444244 Volts Pacs_BOLC_SET_VL_G5(-0.054809235911444244); // Set group 5 bol bias 03 (VRL) to 0.40021084689056974 Volts Pacs_BOLC_SET_VRL_G5(0.40021084689056974); // Set group 5 bol bias 20 (VH_BLIND) to 2.1532482013507512 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1532482013507512); // Set group 6 bol bias 01 (VH) to 1.39 Volts Pacs_BOLC_SET_VH_G6(1.39); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.4344512926668127 Volts Pacs_BOLC_SET_VRL_G6(0.4344512926668127); // Set group 6 bol bias 20 (VH_BLIND) to 2.192323231555507 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.192323231555507); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7330644465100378 Volts Pacs_BOLC_SET_VH_G1(1.7330644465100378); // Set group 1 bol bias 02 (VL) to -0.26693555348996223 Volts Pacs_BOLC_SET_VL_G1(-0.26693555348996223); // Set group 1 bol bias 03 (VRL) to 0.3923254235050375 Volts Pacs_BOLC_SET_VRL_G1(0.3923254235050375); // Set group 1 bol bias 20 (VH_BLIND) to 2.1507930978184753 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1507930978184753); // Set group 2 bol bias 01 (VH) to 1.714453661934205 Volts Pacs_BOLC_SET_VH_G2(1.714453661934205); // Set group 2 bol bias 02 (VL) to -0.2855463380657951 Volts Pacs_BOLC_SET_VL_G2(-0.2855463380657951); // Set group 2 bol bias 03 (VRL) to 0.38771628761093724 Volts Pacs_BOLC_SET_VRL_G2(0.38771628761093724); // Set group 2 bol bias 20 (VH_BLIND) to 2.1454032366160996 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1454032366160996); // Set group 3 bol bias 01 (VH) to 1.7283831876482196 Volts Pacs_BOLC_SET_VH_G3(1.7283831876482196); // Set group 3 bol bias 02 (VL) to -0.2716168123517804 Volts Pacs_BOLC_SET_VL_G3(-0.2716168123517804); // Set group 3 bol bias 03 (VRL) to 0.40171045250948384 Volts Pacs_BOLC_SET_VRL_G3(0.40171045250948384); // Set group 3 bol bias 20 (VH_BLIND) to 2.157256007066197 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157256007066197); // Set group 4 bol bias 01 (VH) to 1.7381239240265867 Volts Pacs_BOLC_SET_VH_G4(1.7381239240265867); // Set group 4 bol bias 02 (VL) to -0.26187607597341334 Volts Pacs_BOLC_SET_VL_G4(-0.26187607597341334); // Set group 4 bol bias 03 (VRL) to 0.38896138623469356 Volts Pacs_BOLC_SET_VRL_G4(0.38896138623469356); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454582711839105 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454582711839105); // Set group 5 bol bias 01 (VH) to 1.4703496551390403 Volts Pacs_BOLC_SET_VH_G5(1.4703496551390403); // Set group 5 bol bias 02 (VL) to -0.12965034486095992 Volts Pacs_BOLC_SET_VL_G5(-0.12965034486095992); // Set group 5 bol bias 03 (VRL) to 0.39904033450461596 Volts Pacs_BOLC_SET_VRL_G5(0.39904033450461596); // Set group 5 bol bias 20 (VH_BLIND) to 2.151844445053932 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151844445053932); // Set group 6 bol bias 01 (VH) to 1.5181165758982518 Volts Pacs_BOLC_SET_VH_G6(1.5181165758982518); // Set group 6 bol bias 02 (VL) to -0.08188342410174834 Volts Pacs_BOLC_SET_VL_G6(-0.08188342410174834); // Set group 6 bol bias 03 (VRL) to 0.4343226272779045 Volts Pacs_BOLC_SET_VRL_G6(0.4343226272779045); // Set group 6 bol bias 20 (VH_BLIND) to 2.1921697898825356 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1921697898825356); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8730534488812565 Volts Pacs_BOLC_SET_VH_G1(1.8730534488812565); // Set group 1 bol bias 02 (VL) to -0.3269465511187437 Volts Pacs_BOLC_SET_VL_G1(-0.3269465511187437); // Set group 1 bol bias 03 (VRL) to 0.3922166883004623 Volts Pacs_BOLC_SET_VRL_G1(0.3922166883004623); // Set group 1 bol bias 20 (VH_BLIND) to 2.1506641222123926 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1506641222123926); // Set group 2 bol bias 01 (VH) to 1.8512060220322217 Volts Pacs_BOLC_SET_VH_G2(1.8512060220322217); // Set group 2 bol bias 02 (VL) to -0.34879397796777845 Volts Pacs_BOLC_SET_VL_G2(-0.34879397796777845); // Set group 2 bol bias 03 (VRL) to 0.3869592141320811 Volts Pacs_BOLC_SET_VRL_G2(0.3869592141320811); // Set group 2 bol bias 20 (VH_BLIND) to 2.1445244519836626 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1445244519836626); // Set group 3 bol bias 01 (VH) to 1.8654619469621685 Volts Pacs_BOLC_SET_VH_G3(1.8654619469621685); // Set group 3 bol bias 02 (VL) to -0.33453805303783174 Volts Pacs_BOLC_SET_VL_G3(-0.33453805303783174); // Set group 3 bol bias 03 (VRL) to 0.40224166318840543 Volts Pacs_BOLC_SET_VRL_G3(0.40224166318840543); // Set group 3 bol bias 20 (VH_BLIND) to 2.1578437499437477 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1578437499437477); // Set group 4 bol bias 01 (VH) to 1.8790483325189686 Volts Pacs_BOLC_SET_VH_G4(1.8790483325189686); // Set group 4 bol bias 02 (VL) to -0.32095166748103154 Volts Pacs_BOLC_SET_VL_G4(-0.32095166748103154); // Set group 4 bol bias 03 (VRL) to 0.39052544771082365 Volts Pacs_BOLC_SET_VRL_G4(0.39052544771082365); // Set group 4 bol bias 20 (VH_BLIND) to 2.1472446958154223 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1472446958154223); // Set group 5 bol bias 01 (VH) to 1.5346700184984832 Volts Pacs_BOLC_SET_VH_G5(1.5346700184984832); // Set group 5 bol bias 02 (VL) to -0.16532998150151687 Volts Pacs_BOLC_SET_VL_G5(-0.16532998150151687); // Set group 5 bol bias 03 (VRL) to 0.39828926215052507 Volts Pacs_BOLC_SET_VRL_G5(0.39828926215052507); // Set group 5 bol bias 20 (VH_BLIND) to 2.1509436695484125 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1509436695484125); // Set group 6 bol bias 01 (VH) to 1.5825303056022821 Volts Pacs_BOLC_SET_VH_G6(1.5825303056022821); // Set group 6 bol bias 02 (VL) to -0.11746969439771773 Volts Pacs_BOLC_SET_VL_G6(-0.11746969439771773); // Set group 6 bol bias 03 (VRL) to 0.43350337388623417 Volts Pacs_BOLC_SET_VRL_G6(0.43350337388623417); // Set group 6 bol bias 20 (VH_BLIND) to 2.191192803954044 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191192803954044); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.034145377320728 Volts Pacs_BOLC_SET_VH_G1(2.034145377320728); // Set group 1 bol bias 02 (VL) to -0.36585462267927166 Volts Pacs_BOLC_SET_VL_G1(-0.36585462267927166); // Set group 1 bol bias 03 (VRL) to 0.4026842358176688 Volts Pacs_BOLC_SET_VRL_G1(0.4026842358176688); // Set group 1 bol bias 20 (VH_BLIND) to 2.163077213168135 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163077213168135); // Set group 2 bol bias 01 (VH) to 1.9964246373780308 Volts Pacs_BOLC_SET_VH_G2(1.9964246373780308); // Set group 2 bol bias 02 (VL) to -0.40357536262196914 Volts Pacs_BOLC_SET_VL_G2(-0.40357536262196914); // Set group 2 bol bias 03 (VRL) to 0.38543545754038677 Volts Pacs_BOLC_SET_VRL_G2(0.38543545754038677); // Set group 2 bol bias 20 (VH_BLIND) to 2.1427558304354366 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1427558304354366); // Set group 3 bol bias 01 (VH) to 2.0225756539924595 Volts Pacs_BOLC_SET_VH_G3(2.0225756539924595); // Set group 3 bol bias 02 (VL) to -0.37742434600754043 Volts Pacs_BOLC_SET_VL_G3(-0.37742434600754043); // Set group 3 bol bias 03 (VRL) to 0.41362905220735763 Volts Pacs_BOLC_SET_VRL_G3(0.41362905220735763); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704381594190805 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704381594190805); // Set group 4 bol bias 01 (VH) to 2.0286801589025623 Volts Pacs_BOLC_SET_VH_G4(2.0286801589025623); // Set group 4 bol bias 02 (VL) to -0.37131984109743765 Volts Pacs_BOLC_SET_VL_G4(-0.37131984109743765); // Set group 4 bol bias 03 (VRL) to 0.39131683434261844 Volts Pacs_BOLC_SET_VRL_G4(0.39131683434261844); // Set group 4 bol bias 20 (VH_BLIND) to 2.14814867942076 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.14814867942076); // Set group 5 bol bias 01 (VH) to 1.5997463742933684 Volts Pacs_BOLC_SET_VH_G5(1.5997463742933684); // Set group 5 bol bias 02 (VL) to -0.2002536257066316 Volts Pacs_BOLC_SET_VL_G5(-0.2002536257066316); // Set group 5 bol bias 03 (VRL) to 0.3972802806465645 Volts Pacs_BOLC_SET_VRL_G5(0.3972802806465645); // Set group 5 bol bias 20 (VH_BLIND) to 2.1497335299275955 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1497335299275955); // Set group 6 bol bias 01 (VH) to 1.64826517003746 Volts Pacs_BOLC_SET_VH_G6(1.64826517003746); // Set group 6 bol bias 02 (VL) to -0.1517348299625401 Volts Pacs_BOLC_SET_VL_G6(-0.1517348299625401); // Set group 6 bol bias 03 (VRL) to 0.43238698345346915 Volts Pacs_BOLC_SET_VRL_G6(0.43238698345346915); // Set group 6 bol bias 20 (VH_BLIND) to 2.189850849172478 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.189850849172478); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1252730205231707 Volts Pacs_BOLC_SET_VH_G1(2.1252730205231707); // Set group 1 bol bias 02 (VL) to -0.3747269794768295 Volts Pacs_BOLC_SET_VL_G1(-0.3747269794768295); // Set group 1 bol bias 03 (VRL) to 0.4136487083795371 Volts Pacs_BOLC_SET_VRL_G1(0.4136487083795371); // Set group 1 bol bias 20 (VH_BLIND) to 2.176055880953933 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.176055880953933); // Set group 2 bol bias 01 (VH) to 2.0735703522054516 Volts Pacs_BOLC_SET_VH_G2(2.0735703522054516); // Set group 2 bol bias 02 (VL) to -0.4264296477945484 Volts Pacs_BOLC_SET_VL_G2(-0.4264296477945484); // Set group 2 bol bias 03 (VRL) to 0.38501518126647505 Volts Pacs_BOLC_SET_VRL_G2(0.38501518126647505); // Set group 2 bol bias 20 (VH_BLIND) to 2.1422680405518997 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1422680405518997); // Set group 3 bol bias 01 (VH) to 2.1002048058798914 Volts Pacs_BOLC_SET_VH_G3(2.1002048058798914); // Set group 3 bol bias 02 (VL) to -0.3997951941201084 Volts Pacs_BOLC_SET_VL_G3(-0.3997951941201084); // Set group 3 bol bias 03 (VRL) to 0.41374892649754597 Volts Pacs_BOLC_SET_VRL_G3(0.41374892649754597); // Set group 3 bol bias 20 (VH_BLIND) to 2.170570690743195 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170570690743195); // Set group 4 bol bias 01 (VH) to 2.1080881836667413 Volts Pacs_BOLC_SET_VH_G4(2.1080881836667413); // Set group 4 bol bias 02 (VL) to -0.39191181633325867 Volts Pacs_BOLC_SET_VL_G4(-0.39191181633325867); // Set group 4 bol bias 03 (VRL) to 0.39179349399255325 Volts Pacs_BOLC_SET_VRL_G4(0.39179349399255325); // Set group 4 bol bias 20 (VH_BLIND) to 2.1486931849427977 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1486931849427977); // Set group 5 bol bias 01 (VH) to 1.6757782637240437 Volts Pacs_BOLC_SET_VH_G5(1.6757782637240437); // Set group 5 bol bias 02 (VL) to -0.22422173627595626 Volts Pacs_BOLC_SET_VL_G5(-0.22422173627595626); // Set group 5 bol bias 03 (VRL) to 0.40729645571050493 Volts Pacs_BOLC_SET_VRL_G5(0.40729645571050493); // Set group 5 bol bias 20 (VH_BLIND) to 2.1617149101325723 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1617149101325723); // Set group 6 bol bias 01 (VH) to 1.7136503402053438 Volts Pacs_BOLC_SET_VH_G6(1.7136503402053438); // Set group 6 bol bias 02 (VL) to -0.18634965979465615 Volts Pacs_BOLC_SET_VL_G6(-0.18634965979465615); // Set group 6 bol bias 03 (VRL) to 0.43098263818668947 Volts Pacs_BOLC_SET_VRL_G6(0.43098263818668947); // Set group 6 bol bias 20 (VH_BLIND) to 2.1881561132520857 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1881561132520857); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.209416047586087 Volts Pacs_BOLC_SET_VH_G1(2.209416047586087); // Set group 1 bol bias 02 (VL) to -0.3905839524139128 Volts Pacs_BOLC_SET_VL_G1(-0.3905839524139128); // Set group 1 bol bias 03 (VRL) to 0.4134679213904496 Volts Pacs_BOLC_SET_VRL_G1(0.4134679213904496); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758418687268812 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758418687268812); // Set group 2 bol bias 01 (VH) to 2.1541915675147214 Volts Pacs_BOLC_SET_VH_G2(2.1541915675147214); // Set group 2 bol bias 02 (VL) to -0.44580843248527846 Volts Pacs_BOLC_SET_VL_G2(-0.44580843248527846); // Set group 2 bol bias 03 (VRL) to 0.38424319746039115 Volts Pacs_BOLC_SET_VRL_G2(0.38424319746039115); // Set group 2 bol bias 20 (VH_BLIND) to 2.1413720715536493 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1413720715536493); // Set group 3 bol bias 01 (VH) to 2.1813068162319285 Volts Pacs_BOLC_SET_VH_G3(2.1813068162319285); // Set group 3 bol bias 02 (VL) to -0.4186931837680716 Volts Pacs_BOLC_SET_VL_G3(-0.4186931837680716); // Set group 3 bol bias 03 (VRL) to 0.41360319513591143 Volts Pacs_BOLC_SET_VRL_G3(0.41360319513591143); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704095720713417 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704095720713417); // Set group 4 bol bias 01 (VH) to 2.202944386753124 Volts Pacs_BOLC_SET_VH_G4(2.202944386753124); // Set group 4 bol bias 02 (VL) to -0.3970556132468757 Volts Pacs_BOLC_SET_VL_G4(-0.3970556132468757); // Set group 4 bol bias 03 (VRL) to 0.40381007074137704 Volts Pacs_BOLC_SET_VRL_G4(0.40381007074137704); // Set group 4 bol bias 20 (VH_BLIND) to 2.1624292794462514 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1624292794462514); // Set group 5 bol bias 01 (VH) to 1.7436864671540049 Volts Pacs_BOLC_SET_VH_G5(1.7436864671540049); // Set group 5 bol bias 02 (VL) to -0.2563135328459952 Volts Pacs_BOLC_SET_VL_G5(-0.2563135328459952); // Set group 5 bol bias 03 (VRL) to 0.4060804936984878 Volts Pacs_BOLC_SET_VRL_G5(0.4060804936984878); // Set group 5 bol bias 20 (VH_BLIND) to 2.1602616898977316 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1602616898977316); // Set group 6 bol bias 01 (VH) to 1.7834132365202005 Volts Pacs_BOLC_SET_VH_G6(1.7834132365202005); // Set group 6 bol bias 02 (VL) to -0.21658676347979958 Volts Pacs_BOLC_SET_VL_G6(-0.21658676347979958); // Set group 6 bol bias 03 (VRL) to 0.43021242094743417 Volts Pacs_BOLC_SET_VRL_G6(0.43021242094743417); // Set group 6 bol bias 20 (VH_BLIND) to 2.1872266025341247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1872266025341247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.297951276717203 Volts Pacs_BOLC_SET_VH_G1(2.297951276717203); // Set group 1 bol bias 02 (VL) to -0.4020487232827972 Volts Pacs_BOLC_SET_VL_G1(-0.4020487232827972); // Set group 1 bol bias 03 (VRL) to 0.41346783054780994 Volts Pacs_BOLC_SET_VRL_G1(0.41346783054780994); // Set group 1 bol bias 20 (VH_BLIND) to 2.175841761189199 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175841761189199); // Set group 2 bol bias 01 (VH) to 2.237764444765691 Volts Pacs_BOLC_SET_VH_G2(2.237764444765691); // Set group 2 bol bias 02 (VL) to -0.46223555523430954 Volts Pacs_BOLC_SET_VL_G2(-0.46223555523430954); // Set group 2 bol bias 03 (VRL) to 0.3829355076340157 Volts Pacs_BOLC_SET_VRL_G2(0.3829355076340157); // Set group 2 bol bias 20 (VH_BLIND) to 2.13985443895415 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.13985443895415); // Set group 3 bol bias 01 (VH) to 2.2663898962449944 Volts Pacs_BOLC_SET_VH_G3(2.2663898962449944); // Set group 3 bol bias 02 (VL) to -0.43361010375500575 Volts Pacs_BOLC_SET_VL_G3(-0.43361010375500575); // Set group 3 bol bias 03 (VRL) to 0.4131238530516411 Volts Pacs_BOLC_SET_VRL_G3(0.4131238530516411); // Set group 3 bol bias 20 (VH_BLIND) to 2.1698796071025357 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1698796071025357); // Set group 4 bol bias 01 (VH) to 2.279673221041111 Volts Pacs_BOLC_SET_VH_G4(2.279673221041111); // Set group 4 bol bias 02 (VL) to -0.42032677895888915 Volts Pacs_BOLC_SET_VL_G4(-0.42032677895888915); // Set group 4 bol bias 03 (VRL) to 0.39361613583982535 Volts Pacs_BOLC_SET_VRL_G4(0.39361613583982535); // Set group 4 bol bias 20 (VH_BLIND) to 2.15077544624775 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.15077544624775); // Set group 5 bol bias 01 (VH) to 1.809656711096493 Volts Pacs_BOLC_SET_VH_G5(1.809656711096493); // Set group 5 bol bias 02 (VL) to -0.2903432889035071 Volts Pacs_BOLC_SET_VL_G5(-0.2903432889035071); // Set group 5 bol bias 03 (VRL) to 0.4049518544441218 Volts Pacs_BOLC_SET_VRL_G5(0.4049518544441218); // Set group 5 bol bias 20 (VH_BLIND) to 2.1589129512261658 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1589129512261658); // Set group 6 bol bias 01 (VH) to 1.852468907894238 Volts Pacs_BOLC_SET_VH_G6(1.852468907894238); // Set group 6 bol bias 02 (VL) to -0.247531092105762 Volts Pacs_BOLC_SET_VL_G6(-0.247531092105762); // Set group 6 bol bias 03 (VRL) to 0.4292993417752352 Volts Pacs_BOLC_SET_VRL_G6(0.4292993417752352); // Set group 6 bol bias 20 (VH_BLIND) to 2.1861246581200136 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1861246581200136); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3806926938420414 Volts Pacs_BOLC_SET_VH_G1(2.3806926938420414); // Set group 1 bol bias 02 (VL) to -0.41930730615795847 Volts Pacs_BOLC_SET_VL_G1(-0.41930730615795847); // Set group 1 bol bias 03 (VRL) to 0.4020155079485436 Volts Pacs_BOLC_SET_VRL_G1(0.4020155079485436); // Set group 1 bol bias 20 (VH_BLIND) to 2.162285695776181 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162285695776181); // Set group 2 bol bias 01 (VH) to 2.3371282046100963 Volts Pacs_BOLC_SET_VH_G2(2.3371282046100963); // Set group 2 bol bias 02 (VL) to -0.46287179538990364 Volts Pacs_BOLC_SET_VL_G2(-0.46287179538990364); // Set group 2 bol bias 03 (VRL) to 0.3923402298587034 Volts Pacs_BOLC_SET_VRL_G2(0.3923402298587034); // Set group 2 bol bias 20 (VH_BLIND) to 2.1507712805161225 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1507712805161225); // Set group 3 bol bias 01 (VH) to 2.356604953923699 Volts Pacs_BOLC_SET_VH_G3(2.356604953923699); // Set group 3 bol bias 02 (VL) to -0.44339504607630065 Volts Pacs_BOLC_SET_VL_G3(-0.44339504607630065); // Set group 3 bol bias 03 (VRL) to 0.4124662568673877 Volts Pacs_BOLC_SET_VRL_G3(0.4124662568673877); // Set group 3 bol bias 20 (VH_BLIND) to 2.169152536126319 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169152536126319); // Set group 4 bol bias 01 (VH) to 2.3825039100730487 Volts Pacs_BOLC_SET_VH_G4(2.3825039100730487); // Set group 4 bol bias 02 (VL) to -0.4174960899269509 Volts Pacs_BOLC_SET_VL_G4(-0.4174960899269509); // Set group 4 bol bias 03 (VRL) to 0.40493410269973024 Volts Pacs_BOLC_SET_VRL_G4(0.40493410269973024); // Set group 4 bol bias 20 (VH_BLIND) to 2.1637149679245193 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1637149679245193); // Set group 5 bol bias 01 (VH) to 1.883738472848583 Volts Pacs_BOLC_SET_VH_G5(1.883738472848583); // Set group 5 bol bias 02 (VL) to -0.31626152715141714 Volts Pacs_BOLC_SET_VL_G5(-0.31626152715141714); // Set group 5 bol bias 03 (VRL) to 0.4028494691164935 Volts Pacs_BOLC_SET_VRL_G5(0.4028494691164935); // Set group 5 bol bias 20 (VH_BLIND) to 2.156400882301432 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156400882301432); // Set group 6 bol bias 01 (VH) to 1.9235912310846244 Volts Pacs_BOLC_SET_VH_G6(1.9235912310846244); // Set group 6 bol bias 02 (VL) to -0.2764087689153759 Volts Pacs_BOLC_SET_VL_G6(-0.2764087689153759); // Set group 6 bol bias 03 (VRL) to 0.4280070912945936 Volts Pacs_BOLC_SET_VRL_G6(0.4280070912945936); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845650655206446 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845650655206446); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6181566702818313 Volts Pacs_BOLC_SET_VH_G1(2.6181566702818313); // Set group 1 bol bias 02 (VL) to -0.38184332971816887 Volts Pacs_BOLC_SET_VL_G1(-0.38184332971816887); // Set group 1 bol bias 03 (VRL) to 0.43545225816479755 Volts Pacs_BOLC_SET_VRL_G1(0.43545225816479755); // Set group 1 bol bias 20 (VH_BLIND) to 2.2018572484354544 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2018572484354544); // Set group 2 bol bias 01 (VH) to 2.5300933623498008 Volts Pacs_BOLC_SET_VH_G2(2.5300933623498008); // Set group 2 bol bias 02 (VL) to -0.469906637650199 Volts Pacs_BOLC_SET_VL_G2(-0.469906637650199); // Set group 2 bol bias 03 (VRL) to 0.3917176926734228 Volts Pacs_BOLC_SET_VRL_G2(0.3917176926734228); // Set group 2 bol bias 20 (VH_BLIND) to 2.1500484890692286 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1500484890692286); // Set group 3 bol bias 01 (VH) to 2.5545115967606167 Volts Pacs_BOLC_SET_VH_G3(2.5545115967606167); // Set group 3 bol bias 02 (VL) to -0.4454884032393832 Volts Pacs_BOLC_SET_VL_G3(-0.4454884032393832); // Set group 3 bol bias 03 (VRL) to 0.41136249367186684 Volts Pacs_BOLC_SET_VRL_G3(0.41136249367186684); // Set group 3 bol bias 20 (VH_BLIND) to 2.1679320914489204 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1679320914489204); // Set group 4 bol bias 01 (VH) to 2.591852678092942 Volts Pacs_BOLC_SET_VH_G4(2.591852678092942); // Set group 4 bol bias 02 (VL) to -0.408147321907058 Volts Pacs_BOLC_SET_VL_G4(-0.408147321907058); // Set group 4 bol bias 03 (VRL) to 0.4158848845694993 Volts Pacs_BOLC_SET_VRL_G4(0.4158848845694993); // Set group 4 bol bias 20 (VH_BLIND) to 2.176235181901646 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176235181901646); // Set group 5 bol bias 01 (VH) to 2.0340896725156363 Volts Pacs_BOLC_SET_VH_G5(2.0340896725156363); // Set group 5 bol bias 02 (VL) to -0.3659103274843634 Volts Pacs_BOLC_SET_VL_G5(-0.3659103274843634); // Set group 5 bol bias 03 (VRL) to 0.3987896988621052 Volts Pacs_BOLC_SET_VRL_G5(0.3987896988621052); // Set group 5 bol bias 20 (VH_BLIND) to 2.1515438563527702 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1515438563527702); // Set group 6 bol bias 01 (VH) to 2.080247845760918 Volts Pacs_BOLC_SET_VH_G6(2.080247845760918); // Set group 6 bol bias 02 (VL) to -0.31975215423908154 Volts Pacs_BOLC_SET_VL_G6(-0.31975215423908154); // Set group 6 bol bias 03 (VRL) to 0.42577779561759777 Volts Pacs_BOLC_SET_VRL_G6(0.42577779561759777); // Set group 6 bol bias 20 (VH_BLIND) to 2.1818744401374954 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1818744401374954); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.9648806825465286 Volts Pacs_BOLC_SET_VH_G1(2.9648806825465286); // Set group 1 bol bias 02 (VL) to -0.3351193174534714 Volts Pacs_BOLC_SET_VL_G1(-0.3351193174534714); // Set group 1 bol bias 03 (VRL) to 0.4345971818834749 Volts Pacs_BOLC_SET_VRL_G1(0.4345971818834749); // Set group 1 bol bias 20 (VH_BLIND) to 2.2008507320864905 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2008507320864905); // Set group 2 bol bias 01 (VH) to 2.8835722707263107 Volts Pacs_BOLC_SET_VH_G2(2.8835722707263107); // Set group 2 bol bias 02 (VL) to -0.4164277292736889 Volts Pacs_BOLC_SET_VL_G2(-0.4164277292736889); // Set group 2 bol bias 03 (VRL) to 0.4147637133976726 Volts Pacs_BOLC_SET_VRL_G2(0.4147637133976726); // Set group 2 bol bias 20 (VH_BLIND) to 2.176763943185141 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176763943185141); // Set group 3 bol bias 01 (VH) to 2.924290179534832 Volts Pacs_BOLC_SET_VH_G3(2.924290179534832); // Set group 3 bol bias 02 (VL) to -0.37570982046516804 Volts Pacs_BOLC_SET_VL_G3(-0.37570982046516804); // Set group 3 bol bias 03 (VRL) to 0.4333518026225201 Volts Pacs_BOLC_SET_VRL_G3(0.4333518026225201); // Set group 3 bol bias 20 (VH_BLIND) to 2.19222958084261 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.19222958084261); // Set group 4 bol bias 01 (VH) to 2.938948180111503 Volts Pacs_BOLC_SET_VH_G4(2.938948180111503); // Set group 4 bol bias 02 (VL) to -0.3610518198884969 Volts Pacs_BOLC_SET_VL_G4(-0.3610518198884969); // Set group 4 bol bias 03 (VRL) to 0.4248831336064878 Volts Pacs_BOLC_SET_VRL_G4(0.4248831336064878); // Set group 4 bol bias 20 (VH_BLIND) to 2.1865155818476714 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1865155818476714); // Set group 5 bol bias 01 (VH) to 2.231303538712061 Volts Pacs_BOLC_SET_VH_G5(2.231303538712061); // Set group 5 bol bias 02 (VL) to -0.36869646128793887 Volts Pacs_BOLC_SET_VL_G5(-0.36869646128793887); // Set group 5 bol bias 03 (VRL) to 0.4261159129370585 Volts Pacs_BOLC_SET_VRL_G5(0.4261159129370585); // Set group 5 bol bias 20 (VH_BLIND) to 2.1842235863263286 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1842235863263286); // Set group 6 bol bias 01 (VH) to 2.2493043049150576 Volts Pacs_BOLC_SET_VH_G6(2.2493043049150576); // Set group 6 bol bias 02 (VL) to -0.3506956950849426 Volts Pacs_BOLC_SET_VL_G6(-0.3506956950849426); // Set group 6 bol bias 03 (VRL) to 0.4237159708307814 Volts Pacs_BOLC_SET_VRL_G6(0.4237159708307814); // Set group 6 bol bias 20 (VH_BLIND) to 2.179385794698645 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.179385794698645); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // // //********************************************************************** // Measurement // PACS photometer central field-of-view // corresponding to 1.42pW on the green and 2.30pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // //********************************************** // Set the PACS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS1 at 48.0 K // corresponding to 0.90pW on the blue and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS2 at 58.0 K // corresponding to 1.25pW on the blue and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker602(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // // //********************************************************************** // Measurement // PACS photometer central field-of-view // corresponding to 2.53pW on the blue and 2.30pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker603(); delay(measure_time); TMMarker600(); //******************************** // Epilogue : Set the safe biases //******************************** PHOT_set_bias_volt(endBiasTable,1); PHOT_set_bias_volt(endBiasTable,2); PHOT_set_bias_volt(endBiasTable,3); PHOT_set_bias_volt(endBiasTable,4); PHOT_set_bias_volt(endBiasTable,5); PHOT_set_bias_volt(endBiasTable,6); // // sync the bus sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 0.2 // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // 0.2 11-aug-2006 TM: update of procedure checked obs PacsEng_Phot_Warm_Startinputsignal { /* No variables to call PacsEng_Phot_Warm_Startinputsignal */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Warm_Startinputsignal */ }{ // 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(PACS_Phot_Warm_Startinputsignal())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Warm_Startinputsignal(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Close_Launch_Lock { /* No variables to call PacsEng_Close_Launch_Lock */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Close_Launch_Lock */ }{ // 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(PACS_Close_Launch_Lock())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Close_Launch_Lock(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: Msec2sec.txt,v 1.2 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : // // Purpose : Convert [msec] into [sec]. This is needed since CUS // granularity is the second. // // Author CUS : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // // Author TCL : N/A // // Original TCL : N/A // // Input arguments // Type Name DefVal Description // int milisec N/A A duration [msec] to be converted into [sec] // // Description : Convert int msec into float sec (for instance 1230 msec // gets converted to 1.230 [sec] and take next closest integer // (2 in this example) // // Dependencies : None // // Comments : // // Version : 0.1 13-Aug-2004 First creation // History : // : // int procedure Msec2sec { int milisec = 0; }{ double fwait = double(milisec) / 1000.0; int secnds = iceil(fwait); return secnds; } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Spectrometer Staring observation in Buffer Transmission Mode // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 11-Mar-2008 Initial version by PR // obs PacsEng_Spec_BufferTransmission { /* Needed variables to call PacsEng_Spec_BufferTransmission */ int ramp_len_red = 64; // Red ramps length int ramp_len_blu = 64; // Blue ramps length double bias_d_red = 0.04 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_d_blu = 0.08 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) int capa_red = 8; // Capacitor red (0=100f,4=300f,8=1pf,12=3pF) int capa_blu = 8; // Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) int grat_pos = 500000; // Grating position during the observation (fixed) string filter_pos = "POS B" in ["POS A","POS B"]; // FW position during the observation (fixed) int chop_pos = 21200; // Chopper Position (default 21200 = CS2) int stare_time = 7200; // Idle time in buffer transmission mode /* End of needed variables for PacsEng_Spec_BufferTransmission */ }{ // busconfig (7); // BURST MODE : 4:PACS PRIME - 7:BURST MODE - 8:PARALLEL MODE // // 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(PACS_Spec_BufferTransmission_Stare(ramp_len_red,ramp_len_blu,bias_d_red,bias_d_blu,capa_red,capa_blu,grat_pos,filter_pos,chop_pos,stare_time))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_BufferTransmission_Stare(ramp_len_red,ramp_len_blu,bias_d_red,bias_d_blu,capa_red,capa_blu,grat_pos,filter_pos,chop_pos,stare_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_CS_SFT_Warm.cus // Missionphase : PACS EQM Test // // Purpose : VERIFY FUNCTION of INTERNAL CALIBRATION SOURCES // // Author : H. Dannerbauer // R. Vavrek // H. Feuchtgruber // CUSification : DAC // // Arguments : BB1 & BB2 temperature [muOhms & Volts] // // // Called : WaitForGo // waittime // tcsend // // Dependences : tm_switchon // tm_spec_det_setup // tm_spec_spu_setup // tm_spec_mec_setup // // // Description : This script assumes an already set-up PACS instrument. // This test is based on functional test 0.7.11 and PTD 0.7.12. // // Comments : None of the detector systems are involved in the BB's // functional check. Nevertheless, in order to generate HK data, // the DPU-SET-HK-LIST command is set and parametrised for // spectroscopy and spectrometer setup needed inorder to // synchronize diagnostic HK on readouts. // Commanding unit conversions: 1 setpoint unit = 100 micro // Ohms, max temperature ~ 100 K, max setpoint = 32767 // In case if temperature set directly: -32767 = -10 Volts, // +32767 = +10 Volts. // // Version : 1.0 // History : This script is based on the commanding during // the CQM ILT Test. 15-11-2004. procedure PACS_CS_SFT_Warm { }{ debug_print("Start PACS_CS_SFT_Warm"); // Diagnostic HK period (in milliseconds) int diag_hk_period = 300; // PC160420 "DMC_WRT_DIAG_HK_LIST" WRITE THE LIST OF DIAGNOSTIC HK INTO DMC MEMORY // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // Chopper specific measures are: // 214 DMC_CS2_CTRL_STA - CS2 controller status // 445 DMC_CS1_RES_VALUE - CS1 current resistor value // 446 DMC_CS1_OUTPUT - CS1 controller output voltage // 447 DMC_CS2_RES_VALUE - CS2 current resistor value // 448 DMC_CS1_OUTPUT - CS2 controller output voltage // 459 DMC_CS1_TARGET - CS1 target resistor value // 460 DMC_CS2_TARGET - CS2 target resistor value // 526 DMC_CS1_VOLT_SG - CS1 small gain sensor voltage // 527 DMC_CS1_VOLT_BG - CS1 big gain sensor voltage // 528 DMC_CS1_CUR_SG - CS1 small gain sensor current // 529 DMC_CS1_CUR_BG - CS1 big gain sensor current // 542 DMC_CS2_VOLT_SG - CS2 small gain sensor voltage // 543 DMC_CS2_VOLT_BG - CS2 big gain sensor voltage // 544 DMC_CS2_CUR_SG - CS2 small gain sensor current // 545 DMC_CS2_CUR_BG - CS2 big gain sensor current int nb_words = 16; {int}[] list_tuple = [{214},{445},{446},{447},{448},{459},{460},{526},{527},{528},{529},{542},{543},{544},{545},{0xffff}]; int[] list_int = [214,445,446,447,448,459,460,526,527,528,529,542,543,544,545,0xffff]; int chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_DIAG_HK_LIST(nb_words,list_tuple,chksum); delay(1); // // PC161420 "DMC_WRT_DIAG_HK_CONF_TAB" WRITE THE CUSTOM HK CONFIGURATION TABLE // PP065420 "DMC_DATA_LENGTH", GroupSize: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // PC146420 "DMC_START_DIAG_HK" START THE ACQUISITION OF THE DIAGNOSTIC HK // PP076420 "DIAG_HK_PERIOD" Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // // Write calibration source controller parameters // // DMC_WRT_CS1_CONF_PAR list_tuple = [{1000000},{5000},{3277},{1857},{327},{0x7fff},{0}]; list_int = [1000000,5000,3277,1857,327,0x7fff,0]; chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_CS1_CONF_PAR(list_tuple,chksum); delay(1); // DMC_WRT_CS2_CONF_PAR //set params [list {PP067420 1000000} {PP067420 5000} {PP067420 3277} \ // {PP067420 1857} {PP067420 327} \ // [list PP067420 [expr 0x7FFF]] {PP067420 0}] list_tuple = [{1000000},{5000},{3277},{1857},{327},{0x7fff},{0}]; list_int = [1000000,5000,3277,1857,327,0x7fff,0]; chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_CS2_CONF_PAR(list_tuple,chksum); delay(1); // // Calibration source controller parameters are set // // Heat-up the CS sources up to 800000 (70.5K;CS1) // and 920000 (76.0K;CS2) --- big step // Switchon, enable and set CS1 to 800000 (~70.5K) // PC138420 "DMC_SWON_BB_1_CONT" SWITCH ON BLACK BODY 1 CONTROLLER Pacs_DMC_SWON_BB_1_CONT(); delay(1); // PC206420 "DMC_ENABLE_BB_1_CONT" ENABLE BB1 CONTROLLER Pacs_DMC_ENABLE_BB_1_CONT(); // PC140420 "DMC_SET_TEMP_BB_1" SET THE TEMPERATURE OF THE BLACK BODY 1 // PP094420 "DMC_BB_TEMP" double temp = 80.0; Pacs_DMC_SET_TEMP_BB_1(temp); delay(1); // Switchon, enable and set CS2 to 920000 (~76.0K) // PC142420 "DMC_SWON_BB_2_CONT" SWITCH ON BLACK BODY 2 CONTROLLER Pacs_DMC_SWON_BB_2_CONT(); delay(1); // PC208420 "DMC_ENABLE_BB_2_CONT" ENABLE BB2 CONTROLLER Pacs_DMC_ENABLE_BB_2_CONT(); delay(1); // PC144420 "DMC_SET_TEMP_BB_2" SET THE TEMPERATURE OF THE BLACK BODY 2 // PP094420 "DMC_BB_TEMP" temp = 92.0; Pacs_DMC_SET_TEMP_BB_2(temp); // wait a while to allow for HK checking and sufficient diag data collection delay(300); // PC147420 "DMC_STOP_DIAG_HK" STOP THE ACQUISITION OF THE DIAGNOSTIC HK Pacs_DMC_STOP_DIAG_HK(); delay(1); // End of Procedure } // CVS comments : $Id: SPEC_BAND_read.txt,v 1.3 2007/05/07 13:48:17 dcesarsk Exp $ // Purpose : Return the BAND limits (from SPEC_BAND) for a given order // CUS author : DAC // Script file : SPEC_BAND_read.txt // // Input arguments // type name description // int order Grating order // // Return values // Type Description // double [] LO and HI wavelengths // // Description : Access the table SPEC_BAND_params. Read and return the // band limits for a given order // // Dependencies : // // Preconditions : // // Comments : // type string // // History : 0.1 23-may-2006 DAC // 0.2 7-may-2007 Make input argument string to be able to read "L" lines double[] procedure SPEC_BAND_read { string order = "1"; // Give order }{ // Open and read SPEC_BAND_params table. Table indexed by ORDER // read BLU and RED edges of the SPEC bands double blu = dlookup("SPEC_BAND_params",order,"BLU"); double red = dlookup("SPEC_BAND_params",order,"RED"); return [blu,red]; } // Mission phase : Performance Verification Phase // // Purpose : Explore the time constant after flux change for a flux levels using the low gain // // Author : Koryo Okumura // // Version : Fri Jul 25 22:33:21 CEST 2008 // // CUS script : mode PacsCal_Phot_bandpassDDCS // // Argument : // int sideField = 7134; // Chopper angle for the FOV next to BB2 // int chop_pos_CS2 = 21196; // Chopper angle for BB2 // string biasTable = "BOLObias_standard_low"; // Bias table // string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0s // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops2 = 30; // number of CSs cycles during initial hold // int nLoops5 = 30; // number of CSs cycles during final hold // int nReadout_plateau = 16; // number of readouts per plateau // // Check before executing : // + Bolometer is already normally operating // // Description : OBS script to execute PacsCal_Phot_bandpassDDCS // // Dependencies : Previously obtaind data at high gain (PCD req.1.1.1bis) // // Comments : generated by IA script : cus_PVph_timeCont(False) // obs PacsCal_Phot_bandpassDDCS { int sideField = 7134; // Chopper angle for the FOV next to BB2 int chop_pos_CS2 = 21196; // Chopper angle for BB2 string biasTable = "BOLObias_standard_low"; // Bias table string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0s string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per plateau bool verbose = true; }{ // Bus configuration for the Burst mode (7) busconfig (7); int nRdts = readouts_plateau - 1; // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = 0; int timeChgBias0 = duration(PHOT_change_biases(biasTable,"NO_CHANGE","NO_CHANGE")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); //Minimum slew time if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS","LOW")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"LOW")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } int tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeChgBias + timeCal3CPR5 + timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_bandpassDDCS(biasTable,gain,sideField,chop_pos_CS2)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(300.0); data_rate(300.0); // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // No biases setting here because nothing changes //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } //************************************ // Call the Phot_bandpassDDCS //************************************ Phot_bandpassDDCS(biasTable,gain,sideField,chop_pos_CS2); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // CVS comments : $Id: PacsPhotEstimatorOBCPn.txt,v 1.9 2007/04/25 15:14:04 dcesarsk Exp $ // Missionphase : Operations // // Purpose : Estimate OBCP parameters for the PointMode and filter // specified by the HSPOT user // // CUS author : DAC // Script file : PacsPhotEstimatorOBCPn_PV.txt // // Input arguments // type name Description // // Return values // Type Description // tuple {confPHOTblu,confPHOTred,confOBCP,{extension}} // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-may-2008 DAC Based on PacsPhotEstimatorOBCPn // added CAL file name to input list {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsPhotEstimatorOBCPn_PV { int pointCase = 11; // Internal code for the pointing mode (see main) string filter = "blue1" in ["blue1","blue2"]; // filter from HSPOT string obcpparams = "OBCP3params"; //Name of the OBCP3params cal file int repFactor = 1; //Repeat factor, i.e. number of nod cycles {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOTdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; // Default values bool noddingSel = false; // Nodding allowed or not bool dither = true; // With/without dithering bool verbose = true; // Print bla-bla }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confPHOTblu = clone(paramsPHOTdef{0}); {int,int,int,int,int,int,int,int,int} confPHOTred = clone(paramsPHOTdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsPHOTdef{2}); // OBCP tuples use several variables, some of them are dedicated to one or // another OBCP. Here define all the tuple variables. Later, they may be // updated according to used OBCP int nb_main_loops = 0; int nb_cycles_obs_cal = 0; int nb_rdouts_plateau = 0; int nb_chop_cycle = 0; int max_dither = 0; int nhold = 0; int nb_SRC_OFF = 0; int nb_CS1_CS2 = 0; int pos_CS1 = 0; int pos_CS2 = 0; // Update corresponding elements of confOBCP // Get "duration related" parameters from corresponding OBCPnparams U-CAL table if(pointCase == 11 || pointCase == 12) { string calNAME = obcpparams; // The acces key is the chosen filter: blue1 or blue2 // There is a row per filter; it lists main OBCP parameters nb_main_loops = ilookup(calNAME,filter,"nb_main_loops"); // OBCPconf uses nb_cycles_obs_cal as variable name nb_cycles_obs_cal = nb_main_loops; nb_rdouts_plateau = ilookup(calNAME,filter,"nb_rdouts_plateau"); nb_chop_cycle = ilookup(calNAME,filter,"nb_chop_cycle"); max_dither = ilookup(calNAME,filter,"max_dither"); nhold = ilookup(calNAME,filter,"nhold"); } if(pointCase == 22 || pointCase == 31) { calNAME = obcpparams; nb_cycles_obs_cal = ilookup(calNAME,filter,"nb_cycles_obs_cal"); nb_SRC_OFF = ilookup(calNAME,filter,"nb_SRC_REF"); nb_rdouts_plateau = ilookup(calNAME,filter,"nb_rdouts_plateau"); nb_CS1_CS2 = ilookup(calNAME,filter,"nb_CS1_CS2"); nhold = ilookup(calNAME,filter,"nhold"); // CS1 and CS2 from dedicated CAL-U file pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); } if(pointCase == 33) { calNAME = "No CAL file yet"; } if(verbose) { debug_print("++PhotEstimator reads CAL-U: " + calNAME); } // Compute the OBS time for this pointCase and filter // Line Scan is not associated to an OBCP yet if(pointCase == 33) { int[] dureeOBCPn = [1,1,0,0,0]; } // Point source if(pointCase == 11 || pointCase == 12) { dureeOBCPn = PacsDureeOBCP3(nb_main_loops,nb_rdouts_plateau,nb_chop_cycle); } // For small and large source use OBCP4 if(pointCase == 22 || pointCase == 31) { dureeOBCPn = PacsDureeOBCP4(nb_SRC_OFF,nb_rdouts_plateau,nb_cycles_obs_cal,nb_CS1_CS2); } if(verbose) { debug_print("++PhotEstimator: dureeOBCP4: " + dureeOBCPn); } double quantumOBStime = double(dureeOBCPn[1] + dureeOBCPn[2]); // Get the "quantum" OBS time for the current order. U-CAL time doubles if // nodding is allowed double nodFactor = 1.0; if(noddingSel) { nodFactor = 2.0; } else { int nb_nods = 0; } quantumOBStime = nodFactor * quantumOBStime; // Inform user string[] msgLine = [" "]; int lineCnt = 0; if(noddingSel) { msgLine[lineCnt] = "

Shortest SKY time (no overheads) for filter " + filter + ": " + quantumOBStime + " [sec], includes an A=>B nod cycle

"; } else { msgLine[lineCnt] = "

Shortest SKY time (no overheads) for filter " + filter + ": " + quantumOBStime + " [sec], no nodding demanded

"; } lineCnt = lineCnt + 1; // Deal with repFactor. In case of noddingSel = false, the repFactor // gives the PointReq nrepeat count // // Re-use the previous logic based on userOBStime... // Repeat factor given for current filter. // Observing time can be increased by (integer) factor: int obsFactor = repFactor; double newOBStime = double(obsFactor) * quantumOBStime; if(verbose) { debug_print("++PhotEstimator: obsFactor: " + obsFactor + "; filter: " + filter); } // Common part of nodding/no nodding message if(repFactor == 1) { msgLine[lineCnt] = "

You may increase the sensitivity for the current filter by setting"; lineCnt = lineCnt + 1; msgLine[lineCnt] = " the RepetitionFactor = 2,3,.. to obtain OBStime = repFactor*" + quantumOBStime + "

"; lineCnt = lineCnt + 1; } // If no nodding then we repeat the raster pattern if(!noddingSel) { int repeat_factor = 1; nb_nods = 0; if(obsFactor > 1) { msgLine[lineCnt] = "

You entered repFactor > 1

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "Since no nodding was requested, we shall repeat"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "the raster pattern " + obsFactor + " times, leading to a total dwell time of " + newOBStime + " [sec]

"; lineCnt = lineCnt + 1; repeat_factor = obsFactor; } } else { // Nodding selected, here we increase newOBStime by increasing the // number of nod cycles repeat_factor = 1; nb_nods = obsFactor; if(obsFactor > 1) { msgLine[lineCnt] = "

You entered repFactor > 1

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "Since nodding is allowed, we set the number"; lineCnt = lineCnt + 1; msgLine[lineCnt] = " of nods to " + obsFactor + " cycles; leading to an accumulated dwell time of " + newOBStime + " [sec]

"; lineCnt = lineCnt + 1; } } // Some more Pointing parameters (auxN just in case I need more...) int aux2 = 0; int aux3 = 0; // Pack information into proper tuples confOBCP{0} = nb_cycles_obs_cal; confOBCP{1} = max_dither; if(!dither) { confOBCP{1} = 0; } // Use confOBCP{2} to convey nb_chop_cycle confOBCP{2} = nb_chop_cycle; confOBCP{3} = nb_SRC_OFF; confOBCP{4} = nb_rdouts_plateau; confOBCP{5} = nb_CS1_CS2; confOBCP{15} = pos_CS1; confOBCP{16} = pos_CS2; // All these leftovers from SPECTRO code // confOBCP { 6} = nb_grat_step_up ; // confOBCP { 7} = nb_grat_step_dn ; // confOBCP { 8} = grat_start_pos ; // confOBCP { 9} = grat_start_time ; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {17} = chop_def ; // confOBCP {19} = order ; // confPHOTred{ 0} = capa_red; // confPHOTred{ 1} = nb_rdouts_ramp_red; // confPHOTred{ 2} = nb_rdouts_subramp_red; // confPHOTred{ 3} = comp_mode_red; // confPHOTred{ 4} = glitch_det_red; // confPHOTred{ 5} = ramp_fit_alg_red; // confPHOTred{ 6 = nb_raw_red; // confPHOTred{ 7} = bias_r_red; // confPHOTred{ 8} = bias_d_red; // confPHOTblu{ 0} = capa_blu; // confPHOTblu{ 1} = nb_rdouts_ramp_blu; // confPHOTblu{ 2} = nb_rdouts_subramp_blu; // confPHOTblu{ 3} = comp_mode_blu; // confPHOTblu{ 4} = glitch_det_blu; // confPHOTblu{ 5} = ramp_fit_alg_blu; // confPHOTblu{ 6 = nb_raw_blu; // confPHOTblu{ 7} = bias_r_blu; // confPHOTblu{ 8} = bias_d_blu; if(verbose) { debug_print("++PhotEstimator: OBCP: " + confOBCP); } // Pass messages to user (not in scan mode) if(pointCase != 33) { PacsMessageCenter("Observing time information",lineCnt,msgLine); } return {confPHOTblu,confPHOTred,confOBCP,{nb_nods,repeat_factor,nhold,0}}; } // Mission phase : Performance Verification Phase // // Purpose : PCD req.1.1.11 // Low frequency noise measurement (3 hours each mode) // // Author : Koryo Okumura // // CUS script : procedure Phot_PVph_lowFreq // // Argument : // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // // Description : // // Dependencies : None // // Comments : // // Version : Jul 1 2008 // procedure Phot_PVph_lowFreq { int measureTime = 10800; // Noise measurement time in seconds string filter = "blue70um" in ["blue70um","green100um"]; // Filter string setting = "DIRECT" in ["DIRECT","DDCS"]; // Mode string biasTable = "BOLObias_standard_high"; // Bias table }{ // //*************** // Select Filter //*************** // if(filter == "blue70um") { PHOT_fltw_move("POS B"); } else { PHOT_fltw_move("POS A"); } // //*********************************************** // Bias setting of the detectors //*********************************************** // PHOT_set_biases(biasTable,setting,"HIGH"); // //******************** // Let all stabilized //******************** delay(60); // //************************************** // Noise measurement during measureTime //************************************** TMMarker602(); delay(measureTime); TMMarker600(); } // Filename : Pacs_Spec_dark_current_imt502 // // Purpose : Short performance test Dark Current // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do dark current measurements in buffer transmission mode on // both CS positions. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and internal CSs switched off. // CDMS has to be switched to burst mode. After the end of the // test go back to nominal mode. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.1 // // History : 1.0 04-04-07 HD. IST update. // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 08-Apr-2008 HF adapted to in-flight default biases and heater values // procedure Pacs_Spec_dark_current_imt502 { }{ // Switch to burst mode Burstmode_setup_block(); // // Set-Up definition // reset interval in ramps int reset_inter = 512; // choose temperature blue det in raw units double blue_temp = 0.78; // heat-up time for blue detector heater in sec int heat_up_time = 900; // observing time in sec int obs_time = 420; // Move chopper to one CS PACS_Chopper_mov_abs_fm_bb(-21350); // Set Temperature PACS_Spec_B_Heat_Setup(blue_temp); // Wait for stabilization of the temperature delay(heat_up_time); // CRE setup int ramp_len_red = reset_inter; int ramp_len_blu = reset_inter; double bias_d_red = 0.03; double bias_r_red = 3.0E-4; double bias_d_blu = 0.08; double bias_r_blu = 3.0E-4; int capa_red = 0; int capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // SPU setup int comp_mode_blu = 25; int comp_mode_red = 25; int nb_samp_subramp_blu = 16; int nb_samp_subramp_red = 16; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 1; bool startSPU = true; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Dark Current measurements for 7 minutes at CS1 position delay(obs_time); // Do SPU reset SPEC_spu_reset(); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // CRE setup to default values SPEC_CRE_No_Heater_setup(64,64,bias_d_red,0.01,bias_d_blu,0.01,12,12); // reset burst mode profile Burstmode_reset_block(); } // $Id: WriteEndBB.txt,v 1.2 2007/08/22 10:21:52 dcesarsk Exp $ // Purpose : Set BBID to its default value to indicate the end // of current BB execution (see FIRST-FSC-DOC-0200) // // CUS script : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // // Input arguments N/A // // Description : BBID will be set to its default value // // Comments : Needed for SCR-3507 // // Version : 0.1 21-aug-2007 First creation // procedure WriteEndBB { }{ int iBBID = 0x40000000; // Write BBID to DEC/MEC Pacs_DMC_SET_BBID(iBBID); } // File : PACS_Spec_Fil_Diaghk_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Switch on diagnostic hk relevant to spectrometer filterwheel // // Author : P.Royer, B.Vandenbussche // CUSification : DAC // Arguments : // // Description : Spectrometer filter wheel diagnostic housekeeping ON // : // Comments : Code of this building block has been taken out of PTP 0.7.7 // by PR. // // Inclusion of hall sensor voltage as housekeeping parameter // is pending - should be included here as well. // // Version : 1.6 // History : 1.0 / 25-Nov-2003 initial version by BV // 1.1 / 06-Jan-2004 syntax checked // 1.2 / 12-Jan-2003 checksum on actual parameters only - BV // 1.3 / 13-Jan-2003 bug fix in list syntax // 1.4 / 31-May-2004 Added hall sensor readouts // 1.5 / 07-Jul-2004 Added DMC_FPU_T_SENS_ST by TM // 1.6 / 19-Jul-2004 Added IMOTA and IMOTB [BV] // 1.7 / 12-May-2006 change to block + simplify comments + diaghk+period as argument // block PACS_Spec_Fil_Diaghk_Setup PACS 158 { int diag_hk_period = 5; // 1: synch w/ BLUE DET 2: synch w/ RED DET >4: period in ms 0: 1KHz (not to use w/ science) }{ // Register start of BB WriteBBID($BBID); // debug_print("Start PACS_Spec_Fil_Diaghk_Setup"); // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // DMC_FW_SPEC_CTRL 210 // DMC_FWSP_CUR_POS 255 // DMC_FWGRAT_HALL_A 256 // DMC_FWGRAT_HALL_B 257 // DMC_FPU_T_SEN_ST 404 // DMC_FW_SPEC_TEMP 405 // DMC_FWSPEC_POS_A 555 // DMC_FWSPEC_POS_B 559 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // int nb_words = 13; {int}[] list_tuple = [{210},{255},{256},{257},{404},{405},{555},{559},{560},{567},{556},{564},{0xffff}]; int[] list_int = [210,255,256,257,404,405,555,559,560,567,556,564,0xffff]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nb_words,list_tuple,chksum); delay(1); Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); //------------------ // End of procedure //------------------ } // CVS comments : $Id: SPEC_fltw_move.txt,v 1.3 2007/04/25 15:14:05 dcesarsk Exp $ // Missionphase : // // Purpose : Change filter wheel in spectroscopy // Attention: there is only one controller for // the filter wheels and the grating, but different // sets of controller parameters! // // Author : Thomas Mueller // CUS script : Diego A. Cesarsky // CVS file : SPEC_fltw_move.txt // // Arguments : // // Description : // This script will perform a relative movement of 90degrees of the spectrometer filter // // This script performs the following operations (section // 4.4.8 of the DEC/MEC User's Manual): // "Consider that the grating is powered on and that an // acquisition sequence has ended. To change the filter wheel // position now: // 1. Disable the grating controller (DMC_DISABLE_GRAT_CONT) // 2. Switch-on the spectro filter wheel controller // (DMC_SWON_FW_SPEC). Note : this will switch-off the // grating controller and the photo filter wheel controller // but the grating position encoder will remain powered-on // and will then continue reading the position. // 3. Any of the 2 move commands can be sent // 4. Switch-on the grating controller (DMC_SWON_GRAT_CONT) // 5. Enable the grating controller (DMC_ENABLE_GRAT_CONT) // 6. Start the new acquisition sequence." // // NOTE: THIS SCRIPT IGNORES REL MODES // // Dependencies : // // Comments : This script should be executed after the // switch-on procedure and the MEC setup // // Version : 1.0 // // History : 1.0 22-Oct-2008 PR First version, based on SPEC_fltw_move // : int procedure SPEC_fltw_move_90degrees { }{ // 90 degrees in commanding units of the FW = (1536 / 360) * 90. int deg90 = iround(1536.0 / 4.0); // Accumulated duration [milliseconds] int duration_msec = 0; // Disable grating controller Pacs_DMC_DISABLE_GRAT_CONT(); // Switch on power supply of SPEC filter wheel Pacs_DMC_SWON_FW_SPEC(); // Move filterwheel to the predefined position Pacs_DMC_MOVE_SPEC_FW_STEP_RAW(deg90); // Get the duration of the move int move_time = iceil(dlookup("PACSparams","fltw_time","freq_time")); // Same in [sec] int move_time_sec = Msec2sec(move_time); delay(move_time_sec); duration_msec = duration_msec + move_time; // Switch on grating controller Pacs_DMC_SWON_GRAT_CONT(); // Enable grating controller Pacs_DMC_ENABLE_GRAT_CONT(); return duration_msec; } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for // CRE check-voltage test PTD1.2.4 // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up housekeeping parameter for diagnostic housekeeping // of the detector, especially for check-out voltage // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : // // Version : 3.0 // // History : 1.0 17-08-06 creation by HD. script test. // 2.0 22-08-06 HD. error in number of diag. HKs. // 3.0 22-08-06 HD. script works. block SPEC_detector_dhk_fmilt124_bb PACS 361 { }{ // Register start of BB WriteBBID($BBID); //----------------------------------------------------- // Setup and start diagnostic HK for detector PTD 0.7.3 //----------------------------------------------------- int chop_diag_hk_length = 13; {int}[] parlist = [{270},{271},{293},{304},{305},{327},{338},{339},{361},{372},{373},{395},{0xffff}]; int[] aux = [270,271,293,304,305,327,338,339,361,372,373,395,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 1; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // Mission phase : IST level // // Purpose : EMC preparation in direct mode // // Author : Koryo Okumura / Thomas Mueller // // CUS script : procedure Phot_prepareEMC_direct // // Argument : None // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + CSs are cold // // Description : // // Dependencies : None // // Comments : // // Version : Mon Jun 18 2007 // procedure Phot_prepareEMC_direct { }{ string biasFile = "BOLObias_ILT_dark_high"; // Bias table file containing the initial values // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper at the CS1 //********************************************** Pacs_DMC_MOVE_CHOP_ABS(-21350); // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // } // File : PACS_Spec_Dark_SOVT2 // Missionphase : PACS FM IST SOVT2 // // Purpose : Dark Current Measurement / Assessment of straylight, PACS Spectro. // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : // // Description : Visit grating positions of Low RSRF for the dark // Estimate Straylight contribution from visiting High RSRF positions & placing the FW outside of any regular filter position. // Do it for both filters // Specific to the SOVT2 version of this test: // Warm up the CSs (both simultaneously) and chop between them every 3 minutes // There should be transients > 3 minutes at the beginning (low flux), but this should at least give an idea, and several samples over the warm up time // // Dependencies : // // Comments : !!! It is supposed that PacsEng_Spec_setup has been run before this script, with current to both CSs == 0. !!! // // Version : 1.0 // History : 1.0 / 22-Oct-2008 // procedure PACS_Spec_Dark_SOVT2 { int obs_time = 540; // observing time in seconds per CS/FW/Grat setting int chop_time = 180; // duration of chopper plateau during rise of CS temp (0 = no chopping) }{ // // Declare the set of variables specific to this test // =========================== // string[] chopPos = ["pos_CS1","pos_CS2"]; int choppos = 0; // // Define the combinations of Grating & FW positions to be tested on each CS string[] filterPos = ["POS B","POS B","POS A","POS A"]; int[] gratingPos = [50000,740000,675000,800000]; int n_settings = length(gratingPos); if(length(filterPos) != n_settings) { debug_print("Inconsistent number of grating and filter wheel positions specified"); } // // Declare the CS Temps (48, 58 Ohms, copied from the SPEC_setup block (in // ============= double temp_CS1 = 48.0; // Temperature 55K for the PACS calibration source 1 double temp_CS2 = 58.0; // Temperature 60K for the PACS calibration source 2 // // Declare the set of CRE variables // =================== double bias_d_blue = 0.17; double bias_d_red = 0.07; double bias_res_blue = 0.01; double bias_res_red = 0.01; int ramp_blue = 64; int ramp_red = 64; int capacity_blue = 0; int capacity_red = 0; // // Declare the set of SPU variables // =================== // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 16; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Ramp fit algorithm [0=LstSq;1=mean value] int ramp_fit_alg = 1; // Start SPU or not [true,false] bool startSPU = true; // // SETUP CRE & SPU // ========== // Setup CREs SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // PART 1 : CS OFF, VISIT LOW & HIGH RSRF POSITIONS IN BOTH FILTERS // for(int cs = 0 .. length(chopPos) - 1) { // // Position the chopper // ============ choppos = ilookup("CHOPPERCSparams","SPEC",chopPos[cs]); PACS_Chop_Move_Abs(choppos); // for(int n = 0 .. n_settings - 1) { debug_print("choppos " + choppos + " n " + n + " filterPos[n] " + filterPos[n] + " gratingPos[n] " + gratingPos[n]); // // ==FW POS == SPEC_fltw_move(filterPos[n]); // // ==GRAT POS == Pacs_DMC_MOVE_GRAT_ABS(gratingPos[n]); // // == OBS TIME == delay(obs_time); // // == FW --> 90 DEGREES == SPEC_fltw_move_90degrees(); // // == OBS TIME == delay(obs_time); // } } // // PART 2 : RISING CS TEMPs, CHOP SLOWLY BETWEEN BOTH CS // // ==GRAT POS == Pacs_DMC_MOVE_GRAT_ABS(50000); // // ==FW POS == SPEC_fltw_move("POS B"); // debug_print("Grating reset to 50000, FW set to POS B, CS switched on and warmed up"); // // PACS CALIBRATION SOURCES CONF_cs("Both"); CS_on_off("CS1","ON"); CS_temp("CS1",temp_CS1); CS_on_off("CS2","ON"); CS_temp("CS2",temp_CS2); // delay(chop_time); if(chop_time > 0) { // int nchop = iround(2200.0 / double(chop_time)); debug_print("Chopping every " + chop_time + " seconds"); debug_print("nchop x chop_time = " + nchop + " x " + chop_time + " = " + nchop * chop_time); // if(nchop >= 2) { // for(int i = 0 .. nchop - 2) { choppos = ilookup("CHOPPERCSparams","SPEC",chopPos[i % 2]); PACS_Chop_Move_Abs(choppos); debug_print("choppos " + choppos); delay(chop_time); } } } else { choppos = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); PACS_Chop_Move_Abs(choppos); debug_print("No chopping: chopper position " + choppos); delay(2100); } // // FINALISATION // // Return Chopper & grating to default // =================================== Pacs_DMC_MOVE_GRAT_ABS(500000); delay(1); PACS_Chop_Move_Abs(0); delay(10); // // SYNC //= = = sync(); // // End of Script } // Missionphase : FM-ILT // // Purpose : Perform Setup Spectroscopy // // CUS author : TM, DAC // Script file : SPEC_setup.cus // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Calls the following "elementary" scripts: // - SPEC_dpu_dmc_setup // - SPEC_init_det_setup // - SPEC_CRE_setup // - SPEC_dmc_setup // - SPEC_spu_setup // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.6 // History : 0.1 TM 10-nov-2006 // 0.2 17-nov-2006 DAC&TM Completed script // 0.2.1 17-nov-2006 Renamed SPEC_cre_setup to SPEC_CRE_setup // to spare changes to modules using // the original SPEC_cre_setup // 0.2.1 17-nov-2006 blue_hetear_current as input argument // 0.3 18-dec-2006 Exchange red/blue detectors // 0.4 19-feb-2007 Exchange red/blue detectors back to nominal // 0.5 02-mar-2007 update for FM // 0.6 07-Apr-2008 set lower bias values for in flight radiation environment // block SPEC_setup PACS 100 { string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double temp_CS1 = 48.0; double temp_CS2 = 58.0; double blu_heater_curr = 0.78; // Nominal current [mA] }{ // Register BBID with environment WriteBBID($BBID); // Start "elementary" scripts SPEC_dpu_dmc_setup(); // Configure initial configuration for CREs SPEC_init_det_setup(); // Default CRE configuration (set default bias, ramp length, and capacitor) // Red ramp length int ramp_len_red = 64; // Blue ramp length int ramp_len_blu = 64; // BIAS_D for red spectro (0-1V) double bias_d_red = 0.03; // BIAS_R for red spectro (0-1V) double bias_r_red = 0.01; // BIAS_D for blue spectro (0-1V) double bias_d_blu = 0.08; // BIAS_R for blue spectro (0-1V) double bias_r_blu = 0.01; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_red = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blu_heater_curr); // Configure all used controllers int chopper_def = 0; SPEC_dmc_setup(fltPOS,chopper_def,temp_CS1,temp_CS2); // configure SPU int comp_mode_blu = 16; int comp_mode_red = 16; int nb_samp_subramp_blu = 64; int nb_samp_subramp_red = 64; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 0; bool startSPU = false; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Last! Enable autonomy function 5 Pacs_DPU_SET_FUNCT("COUNTER_SPEC","ENABLE"); // Last! Enable autonomy function 20 Pacs_DPU_SET_FUNCT("EVENT_DEC_SPC","ENABLE"); // Mark End of Block WriteEndBB(); } // Missionphase : // // Purpose : DMC sequence 5 for OBCP 10: Photometry Calibration I // // // DMC author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : DMC_phot_cal_I.txt // // Arguments used by the calling OBCP // Type Name DefVal Description : // int nb_main_loop number of times main loop is repeated // int nb_CS1_CS2_cycles nb cycles alternating CS1-CS2 // int nb_rdouts_plateau number of readouts per chopper plateau // int chop_pos_CS1 chopper position on CS1 // int chop_step_CS1_CS2 Step to go from CS1 to CS2 // int chop_step_CS2_CS1 Step to go from CS2 to CS1 // // NOTE: For CUS scripts, only the loop parameters are relevant since they // determine the DMC duration // // Description : // CUS transcription of 4.1.5 "Chopping on Internal Calibration // Sources (variable-variable)" Detailed calibration sequence on // the internal sources, version I. Chopping is done to both internal // calibration sources (CS1 and CS2) and the positions on each source // may be incremented by a few small steps. // Note: nb_rdouts_plateau must be defined such that: // (nb_rdouts_plateau + 1) mod 4 = 0. // Set nb_CS1_CS2_cycles=1 and chop_step_CS2_CS1=chop_step_CS1_CS2 // to obtain a sequence which just chops CS1-center to CS2-center. // This procedure returns its duration in number of readouts // It is up to the calling program to convert number of readouts into // [sec] (this procedure does not know the duration of each readout) // // This procedure generates no TC; its only purpose is to illustrate // inner works of the DMC sequence and to compute its duration. Hence // it is called with only the duration relevant parameters // int[] procedure DMC_phot_cal_I { int nb_main_loop = 2; // p01 Number of times main loop is repeated int nb_rdouts_plateau = 39; // p03 Number readouts/plateau (4*n-1) int nb_CS1_CS2_cycles = 8; // p04 Number of cycles alternating CS1-CS2 }{ int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start tallying the duration (measured in number of readouts) int duration_rdouts = 0; // // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LOOP nb_main_loop ; main loop measurement for(int main_loop = 1 .. nb_main_loop) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS1 ; start pos. chopper CS1 // LABEL 65 ; start quadruple on CS1 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // LOOP nb_CS1_CS2_cycles ; do nb_CS1_CS2_cycles steps on BBs for(int inner_loop = 1 .. nb_CS1_CS2_cycles) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE chop_step_CS1_CS2_cycles ; go to CS2 // LABEL 129 ; start quadruple on CS2 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE chop_step_CS2_CS1 ; go back to CS1 // LABEL 65 ; start quadruple on CS1 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; } // END_LOOP ; end of a saw tooth } // END_LOOP ; end main loop // WAIT 1 ; complete last plateau duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // Define return array int[] time_array = [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_phot_cal_I duration [readouts]: " + duration_rdouts); // Return the array of times return time_array; } // File : PACS_Spec_CRE_Setup_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Configure CRE bias, reset interval and capacitor for // testing at room temperature // // Author : H. Feuchtgruber // CUSification : DAC // Comments : Intermediate version // // // Version : 1.0 // History : 1.0 / 16-Nov-2004 Initial version // 1.1 7-mar-2006 SPEC_HEAT_1_C renamed // 1.2 6-apr-2006 DMC v6.0.1 // 1.3 27-nov-2006 changed bias_d to 1mV according to LB input // procedure PACS_Spec_CRE_Setup_Warm { }{ // // red_reset integer 64 Enter red reset interval // blue_reset integer 64 Enter blue reset interval // red_bias_d integer 287 Enter BIAS_D for red spectrometer (1V=4095) // red_bias_r integer 0 Enter BIAS_R for red spectrometer (1V=4095) // blue_bias_d integer 860 Enter BIAS_D for blue spectrometer (1V=4095) // blue_bias_r integer 0 Enter BIAS_R for blue spectrometer (1V=4095) // red_capacitor integer 8 Enter Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // blue_capacitor integer 8 Enter Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // heater_blue_1c integer 4095 Enter blue HEATER_1C value (0=0mA, 4095=0.2mA) // heater_blue_2c integer 0 Enter blue HEATER_2C value (0=0mA, 4095=0.2mA) int red_reset = 64; int blue_reset = 64; int red_bias_d = 4; int red_bias_r = 12; int blue_bias_d = 4; int blue_bias_r = 12; int red_capacitor = 0; int blue_capacitor = 0; int heater_blue_1c = 0; int heater_blue_2c = 0; // PC174420 "DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on int blue_cre_ctrl = blue_capacitor + 256 + 128 + 2 + 1; int[] list_int = [32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0,chksum); delay(1); // PC173420 "DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on // set red_cre_ctrl [expr $red_capacitor+256+128+2+1] // set spec_par_r [list {PP095420 32} \ // [list PP096420 $red_reset] \ // [list PP097420 $red_cre_ctrl] \ // [list PP098420 $red_bias_r] \ // [list PP099420 $red_bias_d] {PP100420 0}] // set chksum [getChkSum -d -32 $spec_par_r] // putlog "ChkSum for spec_par_r: $spec_par_r" int red_cre_ctrl = red_capacitor + 256 + 128 + 2 + 1; list_int = [32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0]; chksum = checksum("int",list_int); Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0,chksum); delay(1); // PC094420 "DMC_SET_PAR_BOTH_SPEC" SEND COMPLETE PARAMETERS TABLE TO BOTH DECS // tcsend PC094420 // waittime 0.5 Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC //tcsend PC086420 //waittime 0.5 Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC //tcsend PC093420 //waittime 0.5 Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SET_B_SPE_HEAT_1C(0) // eval tcsend PC087420 [list [list PP073420 $heater_blue_1c]] // waittime 0.5 Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(heater_blue_1c); delay(1); //----------------- // End of Procedure //----------------- } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 07-Jul-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_FlashHeat_Diaghk_Setup { /* No variables to call PacsEng_Spec_FlashHeat_Diaghk_Setup */ int diag_hk_period = 100; // 1: synch w/ BLUE DET 2: synch w/ RED DET >4: period in ms 0: 1KHz (not to use w/ science) /* End of needed variables for PacsEng_Spec_FlashHeat_Diaghk_Setup */ }{ // 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(PACS_Spec_FlashHeat_Diaghk_Setup(diag_hk_period))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_FlashHeat_Diaghk_Setup(diag_hk_period); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : EQM IMT // // Purpose : Loops over relative grating movements // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : n_moves : Number of relative grating movements in the loop // step_size : Step size for the relative grating movements // time_on_pos : idle time spent on each grating position // // Description : Loops over relative grating movements // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON, ENABLED and HOMED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : // // Version : 1.0 // // History : 1.0 30-Mar-2004 Creation by PR // block SPEC_Gra_move_rel_raw_loop PACS 104 { int n_moves = 3; // Number of relative grating movements in the loop int step_size = 133; // Step size for the relative grating movements (raw) int time_on_pos = 1; // Idle time spent on each grating position (seconds) }{ // Register start of BB WriteBBID($BBID); // Duration of grating step_size (1 degree/second = actually ~5% margin already) // clear "grating plateau", also == additional margin double inter = abs(double(step_size)) / 23301.0; int step_time = iceil(inter) + time_on_pos; for(int i = 1 .. n_moves) { Pacs_DMC_MOVE_GRAT_REL_RAW(step_size); delay(step_time); } // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Close the Grating Launch Lock // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : LLock_Close.txt // // Input arguments none // type name description // // Return values none // Type Name Default Description // // Description : Calls only CloseLLock // You can use the same parameters with both redundant and nominal electronics and command both motors separetely. // Let's name "Motor N" the motor connected to nominal electronics and "Motor R" the motor connected to redundant electronics. // Then the different parameters have the following effects : // // - When using nominal electronics : // DMC_LOCK_GRAT + 0x12 = Lock Motor N + Motor R // DMC_LOCK_GRAT + 0x2 = Lock Motor N // DMC_LOCK_GRAT + 0x10 = Lock Motor R // DMC_UNLOCK_GRAT + 0x28 = Unlock Motor N + Motor R // DMC_UNLOCK_GRAT + 0x8 = Unlock Motor N // DMC_UNLOCK_GRAT + 0x20 = Unlock Motor R // // - When using redundant electronics : // DMC_LOCK_GRAT + 0x12 = Lock Motor R + Motor N // DMC_LOCK_GRAT + 0x2 = Lock Motor R // DMC_LOCK_GRAT + 0x10 = Lock Motor N // DMC_UNLOCK_GRAT + 0x28 = Unlock Motor R + Motor N // DMC_UNLOCK_GRAT + 0x8 = Unlock Motor R // DMC_UNLOCK_GRAT + 0x20 = Unlock Motor N // // // Dependencies : CloseLLock // // Preconditions : PACS must be switched-on and in the equivalent of the SAFE mode // // Version : 2.0 // History : 1.0 30-Mar-2005 creation by HF // 1.1 12-Apr-2006 HF, include degraded modes operation // 4.0 04-Mar-2008 Translated into PV script VDP // obs PacsEng_LLock_Close { /* Needed variables to call PacsEng_LLock_Close */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_LLock_Close */ }{ int lock_mode = 18; // use motors: 2=motor 1, 16 =motor 2, 12 = both motors // 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(CloseLLock(lock_mode))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CloseLLock(lock_mode); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Burstmode_Reset.cus // Missionphase : PACS EQM Test // // Purpose : Reset of PACS burst mode // // Author : T.Mueller, H. Feuchtgruber // CUSification : DAC // Arguments : // // Description : // : // Comments : Needs manual interactions // // // Version : 1.0 // History : 1.0 / 16-Nov-2004 initial version // procedure PACS_Burstmode_Reset { }{ // PC009380 "DPU_SET_BUS_LIST" SWITCH THE DPU FROM NOMINAL TO BURST MODE // AND VICEVERSA // PP006380 "ENABLE_DISABLE" // tcsend PC009380 {PP006380 0} // Switch CDMU to Burst profile Pacs_DPU_SET_BUS_LIST("DISABLE"); delay(1); debug_print("Switch CDMU to Nominal Bus Profile"); debug_print("CDMU is switched to nominal profile now"); //------------------ // End of procedure //------------------ } // Mission phase : Performance Verification Phase // // Purpose : Low Frequency Noise measurement in orbit // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_PVph_lowFreq // // Argument : // int measure_time = 10800; // Noise measurement time in seconds // string filter = "blue70um" in ["blue70um", "green100um"]; // Filter // string setting = "DIRECT" in ["DIRECT", "DDCS"]; // Mode // string biasTable = "BOLObias_standard_high"; // Bias table // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0s // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_telescBack // // Dependencies : PCD req.1.1.1bis ILT data for bias computation // // Comments : None // // Version : // 2008-07-11 KO, First try // obs PacsCal_Phot_PVph_lowFreq { int measure_time = 10800; // Noise measurement time in seconds string filter = "blue70um" in ["blue70um","green100um"]; // Filter string setting = "DIRECT" in ["DIRECT","DDCS"]; // Mode string biasTable = "BOLObias_standard_high"; // Bias table double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0s int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeSetBias = duration(PHOT_set_biases(biasTable,"DIRECT","LOW")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); //Minimum slew time int tslewmin = timeOBSID + timeSetBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeEndID + timeSetBias + timeCal3CPR5; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_PVph_lowFreq(measure_time,filter,setting,biasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { tNOW = time(); debug_print("SLEW/CAL starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_set_biases(biasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // Set biases and start SPU //PHOT_set_biases(biasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the Phot_telescBack Phot_PVph_lowFreq(measure_time,filter,setting,biasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_set_biases(biasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // Missionphase : FM-ILT // // Purpose : Perform Setup Spectroscopy with redundant control parameters // // CUS author : BV // // Input arguments // type name description // string fltPOS Initial filter wheel position // double temp_CS1 Calibration source 1 temperature (resistance value) // double temp_CS2 Calibration source 2 temperature (resistance value) // double blu_heater_curr Blue heater current // // Return values // Type Name Default Description // // Description : Perform PACS setup for spectroscopy with redundant control parameters // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.1 // // History : 1.0 BV 10-04-2007 Initial version based on SPEC_setup // 1.1 HF 20-06-2007 modified default blue heater setting // block SPEC_setup_redundant PACS 1100 { string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double temp_CS1 = 48.0; double temp_CS2 = 58.0; double blu_heater_curr = 0.78; // Nominal current [mA] }{ // Register BBID with environment WriteBBID($BBID); // Start "elementary" scripts SPEC_dpu_dmc_setup(); // Configure initial configuration for CREs SPEC_init_det_setup(); // Default CRE configuration (set default bias, ramp length, and capacitor) // Red ramp length int ramp_len_red = 64; // Blue ramp length int ramp_len_blu = 64; // BIAS_D for red spectro (0-1V) double bias_d_red = 0.069; // BIAS_R for red spectro (0-1V) double bias_r_red = 0.01; // BIAS_D for blue spectro (0-1V) double bias_d_blu = 0.198; // BIAS_R for blue spectro (0-1V) double bias_r_blu = 0.01; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_red = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blu_heater_curr); // Configure all used controllers int chopper_def = 0; SPEC_dmc_setup_redundant(fltPOS,chopper_def,temp_CS1,temp_CS2); // configure SPU int comp_mode_blu = 16; int comp_mode_red = 16; int nb_samp_subramp_blu = 64; int nb_samp_subramp_red = 64; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 0; bool startSPU = false; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Last! Enable autonomy function 5 Pacs_DPU_SET_FUNCT("COUNTER_SPEC","ENABLE"); // Last! Enable autonomy function 20 Pacs_DPU_SET_FUNCT("EVENT_DEC_SPC","ENABLE"); sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : just to execute Phot_prepareEMC_DDCS // // Author : Koryo Okumura / Thomas Mueller // // CUS script : procedure Phot_prepareEMC_DDCS_OBS // // Argument : None // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + CSs are cold (connected to slowly drifting satellite L1-level) // // Description : // // Dependencies : None // // Comments : // // Version : 1.0 // History : 0.1 Mon Jun 18 2007 // : 1.0 translated into PV scipt VDP // obs PacsEng_Phot_prepareEMC_DDCS { /* Needed variables to call PacsEng_Phot_prepareEMC_DDCS */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_prepareEMC_DDCS */ }{ // 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(Phot_prepareEMC_DDCS())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Phot_prepareEMC_DDCS(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : Performance Verification Phase // // Purpose : PCD req.1.1.1 for the Performance Verification Phase // Check the bias/signal relationship using CSs and the central FOV // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_lowGainBias_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // double ra = 232.436; // RA : 15h29m44.65s // double dec = 48.3645; // DEC : 48d21m52.30 // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_lowGainBias_direct // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_lowGainBias(1, "LOW") // // Version : Mon Jun 30 21:44:42 CEST 2008 // obs PacsCal_Phot_lowGainBias_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values double ra = 232.436; // RA : 15h29m44.65s double dec = 48.3645; // DEC : 48d21m52.30 bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); //Minimum slew time int tslewmin = 0; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeOBSID; //Final hold int tfh = timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_lowGainBias_direct(measure_time,startBiasTable,endBiasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the Phot_lowGainBias_direct Phot_lowGainBias_direct(measure_time,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // Missionphase : // // Purpose : Set values for the BLUE detector heaters // // // // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : // // Arguments : // // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 21-Oct-2004 Creation by DAC // 0.2 10-Apr-2006 Modified for FM // History : // : int procedure SPEC_heater { double heater_blu = 0.0; //Blue HEATER value (0:0mA, 4095:20mA) }{ // Define duration (always in msec] int duration_msec = 0; // Send the telecommand to DEC/MEC Pacs_DMC_SET_B_SPEC_HEAT_C(heater_blu); // Convert to [sec], set delay and return int duration_sec = Msec2sec(duration_msec); delay(duration_sec); return duration_sec; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Switchoff { /* No variables to call PacsEng_Phot_Switchoff */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Switchoff */ }{ // 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(PACS_Phot_Switchoff())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Switchoff(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Purpose : // // OBCP author : HF // TCL file : N/A // CUS author : DAC // Script file : OBCP_27_grat_line_scan_chopped_2.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Belongs to Section 3.8: Grating Spectral Line Scan // of PACS-ME-LI-005 // Consists mainly of a sequence with repetitive up- and // down-scans with the grating around a given center position, // while the chopper is operating as well on either two- or // three-positions. This is OBCP 3.8.2, calling DMC sequence // 12 (in 4.2.2) // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-apr-2005 DAC // 0.2 22-apr-2005 Rearranged arguments P#1 P#2 etc. // 0.3 25-apr-2005 DAC Use same defaults as TM's scripts // 0.4 27-apr-2005 DAC MIB name is GRAT_SCAN_CHOP2 (not _2) // 1.0 26-aug-2005 Renamed to MIB name (but lower case); // corresponding DMC is also renamed // 1.1 28-mar-2007 Add stateMachine as input variable; // put stateMachine in 4 upper bits of counter // int[] block OBCP_grat_scan_chop_2 PACS 29 { int nb_up_down = 1; // Nb of "up-down" sequences (P#1); int nb_grat_steps = 100; // Nb of grating steps (P#2) int nb_SRC_REF = 1; // Nb of cycles per grating position (P#3); int chop_pos_REF1 = 1000; // Chopper position 1 (P#4) int nb_ramps_plateau = 1; // Nb of readouts per chopper position (P#5); int chop_pos_REF2 = 3000; // Chopper position 2 (P#6) int nb_CS1_CS2 = 0; // Nb of cycles on the internal CSs (P#7); int chop_pos_CS1 = -25000; // Chopper position on CS1 (P#8) int chop_pos_CS2 = 25000; // Chopper position on CS2 (P#9) int grat_step_up = 1600; // Grating step up (P#10) int grat_step_dn = 1600; // Grating step down (P#11) int detector = 2; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 445000; // Starting grating position int grat_time = 0; // Grating time to move to start [msec] int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopper default position int grat_def_time = 0; // Time to come back to default position int nb_rdouts_ramp = 64; // Number of readouts per ramp int stateMachine = 0; }{ // Starting time int time_start = time(); // Register start of BB // Add stateMachine (shifted 8 bits)to BBID WriteBBID($BBID + 4096 * stateMachine); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; //debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); //debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // OBCP_GRATING_LINE_SCAN_CHOPPED_2(seq, seq_time, // P#1,&,P#11, detector, grat_def, grat_time, // cmp_par_blue, cmp_par_red, grat_def, chop_def, grat_time) // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all parameters filled // by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE ////////////////////////////////////////////////////////////////////////// // Call DEC/MEC code to estimate its duration duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; int[] duree1 = DMC_grat_scan_chop2(nb_up_down,nb_grat_steps,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_REF); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // debug_print("Execution time [msec] from DMC: " + seq_time); // duree_msec(seq_time) duree_msec = duree_msec + t_cmd + seq_time; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 27, requires 21 parameters and calls DEC/MEC #12 string obcp_ID = "GRAT_SCAN_CHOP2"; int obcp_par_nb = 21; int seq_DMC = 12; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_SRC_REF},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,grat_step_up},{13,grat_step_dn},{14,detector},{15,grat_pos},{16,grat_time},{17,comp_mode_blu},{18,comp_mode_red},{19,grat_def},{20,chop_def},{21,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // debug_print(obcp_ID + ": " + time_array); delay(time_array[0]); // Return the array of times //Reset Block ID WriteEndBB(); //Return time_array return time_array; } // SpireBbObsConfig // // $Id: SpireBbObsConfig.txt,v 1.1 2006/08/10 09:38:57 kking Exp $ // // Building Block to configure an observation // // // block SpireBbObsConfig SPIRE 12033 { int obsMode = 0; }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Obs Config started"); SpireMsg(2," $Id: SpireBbObsConfig.txt,v 1.1 2006/08/10 09:38:57 kking Exp $"); hstr = SpireHexStr($BBID,8); SpireMsg(3," BBID = " + hstr); hstr = SpireHexStr(obsMode,4); SpireMsg(3," MODE = " + hstr); // // set OBSID hstr = SpireHexStr($OBSID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + " Cmd: Spire_SET_OBSID_RAW(" + hstr + ")"); Spire_SET_OBSID_RAW($OBSID); // // set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // Set Mode hstr = SpireHexStr(obsMode,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(" + hstr + ")"); Spire_SET_OBS_MODE_RAW(obsMode); // // set STEP to zero tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0000)"); Spire_SET_OBS_STEP_RAW(0x0); // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Obs Config ended"); SpireMsg(1," ..Observation Configuration (" + (time() - t) + " secs)"); } // CVS comments : $Id: PacsSpecConfSet.txt,v 1.2 2007/05/07 13:48:17 dcesarsk Exp $ // Missionphase : PACS ILT // // Purpose : Apply parameters from confSPEC // // CUS author : Diego Cesarsky // // Input arguments // Type Name Default Description // // Description : CRE: updates bias voltages // SPU: Sets values for compression mode, // threshold values (glitch, chopper, grating), raw // channel transmission, sub-ramp and detector // constants, load DPU time and restart SPU. Script // sets its own delays [sec] and returns the total // duration in milliseconds. This version addresses // BLU or RED (except for comp_mode write to DMC) // // Dependencies : PACS TCs // // Preconditions : // // Comments : Based on SPEC_spu_setup and SPEC_cre_setup CUS scripts // // History : 0.1 31-May-2005 First creation // 0.2 10-apr-2006 Adapted for SPU V12.1 // 1.0 2-may-2007 Renamed to PacsSpecConfSet to follow naming convention // int procedure PacsSpecConfSet { string color = "BLU" in ["BLU","RED"]; {int,int,int,int,int,int,int,int,int} confSPEC = {0,0,0,0,0,0,0,0,0}; // SPEC parameters }{ // Expand elements of confSPEC int capa = confSPEC{0}; int nb_rdouts_ramp = confSPEC{1}; int nb_rdouts_subramp = confSPEC{2}; int comp_mode = confSPEC{3}; int glitch_det = confSPEC{4}; int ramp_fit_alg = confSPEC{5}; int nb_raw = confSPEC{6}; int bias_r_mV = confSPEC{7}; int bias_d_mV = confSPEC{8}; // Duration (accumulated time expressed in milliseconds) int duration_msec = 0; // Stop the "color" SPUs if(color == "BLU") { Pacs_SPUS_STOP_REDUCT_COMPR(); } else { Pacs_SPUL_STOP_REDUCT_COMPR(); } // Set the CRE int cre_ctrl = 386; cre_ctrl = cre_ctrl + capa; // Convert bias from mV to volts double bias_r = double(bias_r_mV) / 1000.0; double bias_d = double(bias_d_mV) / 1000.0; // Bias values are given in ENG units. Have to convert to RAW in // order to compute check-sums int i_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r); int i_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d); int[] aux = [32,nb_rdouts_ramp,cre_ctrl,i_bias_r,i_bias_d,0]; int check_sum = checksum("int",aux); if(color == "BLU") { Pacs_DMC_WRT_B_SPEC_PAR(32,nb_rdouts_ramp,cre_ctrl,bias_r,bias_d,0,check_sum); } else { Pacs_DMC_WRT_R_SPEC_PAR(32,nb_rdouts_ramp,cre_ctrl,bias_r,bias_d,0,check_sum); } // Send the parameters to both receivers Pacs_DMC_SET_PAR_BOTH_SPEC(); // Set the SPU compression modes; identical for both SPUs {int}[] comp_par = [{comp_mode},{comp_mode}]; aux = [comp_mode,comp_mode]; check_sum = checksum("int",aux); // Issue the TC to DEC/MEC Pacs_DMC_WRT_SPU_TRAN_MODE(comp_par,check_sum); // Setting of start index of raw channels for SPUS and SPUL string spu_obs_mode = "SPEC"; int spu_startraw = 1; // Sub-ramp and detector const. setting to SPU // No preprocessing int ppf = 0; int ppp = 0; // Threshold for glitch int tfs = 1000; // Threshold for chopper int tcs = 100; // Threshold for grating int tgd = 100; // Reordering algorithm 0=no reordering on 1= 2=reorder 3= 4=resort int reor = 4; // Lossless compression algorithm for spec 0=pacs_codec 1=Rzip+ pacs_codec // 2=RZIp only 3= arithmetic coder int llcs = 0; // Range for the pacs codec 3= low CPU low compression, 4= high CPU and // high compression int ords = 4; // Write detector constants for blue spectrometer array {int}[] spu_par = [{ppf},{ppp},{tfs},{tcs},{tgd},{nb_rdouts_subramp},{glitch_det},{ramp_fit_alg},{reor},{llcs},{ords},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}]; aux = [ppf,ppp,tfs,tcs,tgd,nb_rdouts_subramp,glitch_det,ramp_fit_alg,reor,llcs,ords,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Send TC to proper SPU if(color == "BLU") { Pacs_SPUS_RAW_CHAN_TRAN_MODE(spu_obs_mode,nb_raw,spu_startraw); Pacs_SPUS_WRT_DET_CST_SPEC(spu_par,check_sum); Pacs_SPUS_START_REDUCT_COMPR(); } else { Pacs_SPUL_RAW_CHAN_TRAN_MODE(spu_obs_mode,nb_raw,spu_startraw); Pacs_SPUL_WRT_DET_CST_SPEC(spu_par,check_sum); Pacs_SPUL_START_REDUCT_COMPR(); } // Set delay [sec] int duration_sec = Msec2sec(duration_msec); delay(duration_sec); // That's it. Return duration [msec] return duration_msec; } // Missionphase : FM ILT // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT Tests. // // Version : 1.0 // // History : // 1.0 09-11-06 HD. Adapted on FM ILT requirements. block SPEC_CS_fmilt071112_swon_cs_perf_bb PACS 396 { }{ // Register start of BB WriteBBID($BBID); //Switchon and enabling CSs Pacs_DMC_SWON_BB_1_CONT(); Pacs_DMC_ENABLE_BB_1_CONT(); Pacs_DMC_SWON_BB_2_CONT(); Pacs_DMC_ENABLE_BB_2_CONT(); //------------------------------------------------------------------------------ // Heat the calibration sources up to 70 (XX.XK;CS1) and 80 // (70.5K;CS2) Ohm --- big step //------------------------------------------------------------------------------ // start temperature CS1 in Ohm double cs1_temp = 70.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // start temperature CS2 in Ohm double cs2_temp = 80.0; // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 60 minutes of heating-up and stay on the desired temperatures do another heat-up delay(3600); // Assume that CSs are on since long and already stabilized, monitor them for 20 minutes only delay(1200); //-------------------------------------------------------------------------------- // Heat the calibration sources up to 85 (72.8K;CS1) and 97 (78.4K;CS2) Ohm --- small step //-------------------------------------------------------------------------------- cs1_temp = 85.0; cs2_temp = 97.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 60 minutes of heating-up and stay on the desired temperatures do cooling-down delay(3600); //------------------------------------------ // Cool both calibration sources down to 10 (X.XXK) //------------------------------------------ cs1_temp = 10.0; cs2_temp = 10.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); // Cool down for about 60 seconds delay(60); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS Commissiong Phase // // // // // Purpose : Ge:Ga detector Loop // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : bias, integration time, capacity, measurement time, resistor bias // // // Description : Loop over bias, integration time and capacity. // // Dependencies : - Pacs_Spec_GeGa_Loop_Comm // - WriteOBSID // - WriteEndID // // // Preconditions : - PACS is switched on // - Setup spectroscopy // - Mechanics and CS controllers are SWON and ENABLED // // Comments : // // Version : 1.0 // // History : 1.0 04-Jul-2008 PR // obs PacsEng_Spec_Curing_Concept_Loop { /* Needed variables to call Pacs_Spec_Curing_Concept_Loop */ int repeat_intern = 10; // Repetition factor inside the bias loop (ramplen+capa loops) double[] bias_blue = [0.08,0.1,0.125,0.15,0.175,0.2]; //bias blue double[] bias_red = [0.02,0.03,0.04,0.05,0.06,0.07]; //bias red red int[] ramp_len_blue = [32,64]; //ramp length blue (set integration time) int[] ramp_len_red = [32,64]; //ramp length red (set integration time) int[] capa_blue = [8,12]; //capacity blue int[] capa_red = [8,12]; //capacity red int meas_time = 60; //observing time in seconds per setting double bias_res_blue = 0.01; //resistor bias blue double bias_res_red = 0.01; //resistor bias red int chop_pos = 21200; // chopper position int grat_pos = 535000; // grating position string filter_pos = "POS A" in ["POS A","POS B"]; // FW position int blue_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int nflash = 1; // Number of flashes int flash_time = 60; // Duration of each flash int interflash_time = 30; // Idle time between the flashes /* End of needed variables for PacsEng_Spec_Curing_Concept_Loop */ }{ // 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(Pacs_Spec_Curing_Concept_Loop(repeat_intern,bias_blue,bias_red,ramp_len_blue,ramp_len_red,capa_blue,capa_red,meas_time,bias_res_blue,bias_res_red,chop_pos,grat_pos,filter_pos,blue_flasher_current,red_flasher_current,nflash,flash_time,interflash_time))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Curing_Concept_Loop(repeat_intern,bias_blue,bias_red,ramp_len_blue,ramp_len_red,capa_blue,capa_red,meas_time,bias_res_blue,bias_res_red,chop_pos,grat_pos,filter_pos,blue_flasher_current,red_flasher_current,nflash,flash_time,interflash_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // Script : PACS_Chopper_uk_move_12000_ast_OBS.cus // // Missionphase : IST Chopper Day // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on the commanding during the CQM/FM ILT. // // Version : 4.0 // // History : 1.0 02-03-07 HD. Script to do simple chopper cycle // // 2.0 05-07-07 HD. IST Chopper Day // 3.0 05-07-07 MN. edited for SVT/PV conformance // 4.0 05-03-2008 translated in PV phase script VDP obs PacsEng_Chopper_uk_move_12000_ast { /* Needed variables to call PacsEng_Chopper_uk_move_12000_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_uk_move_12000_ast */ }{ // 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(PACS_Chopper_uk_move_12000_NoConf_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_uk_move_12000_NoConf_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // copy of SPEC_CRE_No_Heater_setup, adapted for the curing -> allowing for an extra parameter being the 'curing mode' // // History : 1.0 25-09-2008 PR // procedure SPEC_CRE_Curing_setup { int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) int curing_mode = 0 in [0,1]; // Bit 4 of the CRE register : 0 for not in curing mode, 1 for curing mode (CREs in reset mode, while bias on). }{ int curing_ctrl = 0; if(curing_mode == 1) { curing_ctrl = 16; } else { curing_ctrl = 0; } // Red CRE register (capa_red=0) int cre_ctrl_red = 386; // Blue CRE register (capa_blu=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) // Write the blue spectrometer parameters int blu_cre_ctrl = capa_blu + cre_ctrl_blu + curing_ctrl; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums int i_blu_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_blu); int i_blu_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_blu); int clks_rdout = 32; int simul_reg = 60000; int[] aux = [clks_rdout,ramp_len_blu,blu_cre_ctrl,i_blu_bias_r,i_blu_bias_d,simul_reg]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(clks_rdout,ramp_len_blu,blu_cre_ctrl,bias_r_blu,bias_d_blu,simul_reg,check_sum); // Same for RED parameters int red_cre_ctrl = capa_red + cre_ctrl_red + curing_ctrl; int i_bias_r_red = convert_to_raw("pacs_DMC_BIAS_R",bias_r_red); int i_bias_d_red = convert_to_raw("pacs_DMC_BIAS_D",bias_d_red); aux = [clks_rdout,ramp_len_red,red_cre_ctrl,i_bias_r_red,i_bias_d_red,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(clks_rdout,ramp_len_red,red_cre_ctrl,bias_r_red,bias_d_red,simul_reg,check_sum); // Send complete parameters table to both DECS Pacs_DMC_SET_PAR_BOTH_SPEC(); // Switchon and set blue detector heater // Pacs_DMC_SWON_BD_HEATER(); // Pacs_DMC_SET_B_SPEC_HEAT_C(blue_heat_current); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS {int}[] argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); } procedure Spr { string whatIS = "1.2micron" in ["1.2micron","1.4","your.guess"]; }{ if(whatIS == "1.2micron") { message("WhatIS: " + whatIS); } if(whatIS == "1.4") { message("WhatIS: " + whatIS); } if(whatIS == "your.guess") { message("WhatIS: " + whatIS); } message("WhatIS: " + whatIS); } // CVS file : DMC_chop_scan_spec.txt // Missionphase : // // Purpose : Chop increasingly away from start position; then increasingly // closer to start position. Whole operation may be repeated // nb_up_down times // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // // Arguments : (only timing parameters are used in actual call) // int nb_up_down P#1 number of up-down seqs. // int nb_ramps P#2 number of readouts on step // int nb_steps_up P#3 number of steps up // int nb_steps_dn P#4 number of steps down // int step_up P#5 relative move up // int step_dn P#6 relative move down // // Description : Chop increasing distance from start, then revert // and chop closer and closer to initial position // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows line by line 4.2.9 in PACS-ME-LI-005 // Tally all readouts as REF // // Version : 0.1 6-apr-2006 Creation by DAC // History : int[] procedure DMC_chop_scan_spec { int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 1; // P#2 number of ramps on step int nb_steps_up = 1; // P#3 number of steps up int nb_steps_dn = 1; // P#4 number of steps down }{ // Time keeping variables [readouts] int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Parameterized up and down scan with the PACS chopper. // WAIT 1 ; have a defined start duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; ensure LABEL 0 // WAIT 1 duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LOOP P#1 ; number of up-down seqs. for(int loop1 = 1 .. nb_up_dn) { // LABEL 193 ; special LABEL up // LOOP P#3 ; number of steps up for(int loop3 = 1 .. nb_steps_up) { // WAIT P#2 ; number of readouts on step duree_ramps = duree_ramps + nb_ramps; duree_SRC = duree_SRC + nb_ramps; // MOVE_CHOPPER_RELATIVE P#5 ; relative move up } // END_LOOP // LOOP P#4 ; number of steps down for(int loop4 = 1 .. nb_steps_dn) { // WAIT P#2 ; number of readouts on step duree_ramps = duree_ramps + nb_ramps; duree_SRC = duree_SRC + nb_ramps; // MOVE_CHOPPER_RELATIVE P#6 ; relative move down // LABEL 225 ; special LABEL down } // END_LOOP } // END_LOOP // WAIT P#2 ; integrate on last step duree_ramps = duree_ramps + nb_ramps; duree_SRC = duree_SRC + nb_ramps; // WAIT 1 duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 // END_SEQUENCE // Return durations // Expected duration int duree_theor = 3 + nb_up_dn * (nb_steps_up * nb_ramps + nb_steps_dn * nb_ramps) + nb_ramps; debug_print("DMC_chop_scan_spec: " + duree_theor); return [duree_ramps,duree_SRC,duree_REF,duree_CAL,duree_OVR]; } // Missionphase : // // Purpose : Two or three position chopping followed by calibration // readouts chopping between CS1 and CS2 // // DMC author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : DMC_spec_2_3_chop.txt // // Arguments used by the calling OBCP // // Type Name DefVal Description : // int nb_up_down number of up-down sequences // int nb_grat_steps number of grating steps // int nb_SRC_OFF nb cycles on/off source per grating positn // int chop_pos_REF1: chopper position 1 // int nb_ramps_plateau number of ramps per chopper plateau // int chop_pos_REF2 chopper position 2 // int chop_pos_REF3 chopper position 3 // int nb_CS1_CS2 number of cycles on the calibration sources // per grating positn // int chop_pos_CS1 chopper position on CS1 // int chop_pos_CS2 chopper position on CS2 // int grat_step_up step size of relative grating move up // int grat_step_dn step size of relative grating move down // // Description : // Default sequence for spectral line observations. The // chopping pattern is identical to the analogous photometry // case, however the number of chopper/readout cycles per // grating step can be given as a parameter. Currently it is // assumed that we do internal calibration measurements inside // this sequence on every grating step. "Up" and "Down" scans will // cover the same absolute grating positions in equidistant steps, // commanded by MOVE_GRATING_RELATIVE. The initial absolute start // position of the grating will be commanded before, from // within the OBCP (3.9). The number of grating steps for a // line scan is determined by nb_grat_steps. The sequence may // consist of at least 7 LOOPs. // Explicitly: // For the number of UP/DOWN sequences // For each of the P#2 grating positions going up // Repeat P#3 times // SRC P#4 // OFF P#6 // SRC P#4 // OFF P#7 // End repeat P#3 times // Repeat P#8 times // CS1 P#9 // CS2 P#10 // End repeat P#8 times // End of for each of the P#2 grating positions going up // For each of the P#2 grating positions going down // Repeat P#3 times // SRC P#4 // OFF P#6 // SRC P#4 // OFF P#7 // End repeat P#3 times // Repeat P#8 times // CS1 P#9 // CS2 P#10 // End repeat P#8 times // End of for each of the P#2 grating positions going down // End for the number of UP/DOWN sequences // This procedure returns its duree // in number_of_ramps. It is up to the calling program to // convert number_of_ramps into [sec] (this procedure does // not know the duree of each ramp) // // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows verbatim paragraph 4.2.1 in PACS-ME-LI-005 // Actual values of input parameters, except values for the // various loop counters, are completely irrelevant and so // are not used. // Loop counters are used to estimate the duree of the // sequence // // Version : 0.1 19-Aug-2004 Creation by DAC // History : 0.2 18-Oct-2004 Normalized variable names // 0.3 12-Nov-2004 Introduce time_array // 0.4 14-mar-2007 WAIT=1 for chopper is now useful data // // This "dummy" DEC/MEC sequence needs only the loop parameters from the // complete list above // int[] procedure DMC_spec_2_3_chop { int nb_up_down = 1; // Number of sequences: up down up ... int nb_grat_steps = 10; // Number of grating steps int nb_SRC_OFF = 10; // Nb cycles on/off source/grating position int nb_ramps_plateau = 10; // Number of ramps per chopper plateau int nb_CS1_CS2 = 10; // Nbr cycles on cal src per grating position }{ // Define variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Pseudo code from PACS OBCPs and DMC Sequences (4.1.2) // // WAIT 1 ; have a defined start // Accumulated duree_ramps in number of ramps duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop measurement for(int outloop = 1 .. nb_up_down) { // LOOP P#2 ; grating loop up for(int gratUPloop = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#11 ; increment grating position // LOOP P#3 ; chop readout cycle for(int onoffUPloop = 1 .. nb_SRC_OFF) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 (REF1) // LABEL 5 ; next chopper pos. // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#7 ; chopper to P#7 (REF2) // LABEL 7 ; last chopper pos. // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; } // END_LOOP ; chop readout cycle // LOOP P#8 ; calibration loop for(int csUPloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS1; chop to CS1 // LABEL 65 ; CS1 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS2 ; chop to CS2 // LABEL 129 ; CS2 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; } // END_LOOP ; calibration done } // END_LOOP ; grating scan up done // LOOP P#2 ; grating loop down for(int gratDNloop = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE grat_step_dn ;decrement grating position // LOOP P#3 ; chop readout cycle for(int onoffDNloop = 1 .. nb_SRC_OFF) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 (REF1) // LABEL 5 ; next chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#7 ; chopper to P#7 (REF2) // LABEL 7 ; last chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; } // END_LOOP ; chop readout cycle done // LOOP P#8 ; calibration loop for(int csDNloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to P#9 (CS1) // LABEL 65 ; CS1 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#10 ; chop to P#10 (CS2) // LABEL 129 ; CS2 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; } // END_LOOP ; calibration done } // END_LOOP ; grating scan up done } // END_LOOP ; main loop done // WAIT 1 ; complete last plateau duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // Create time_array int[] time_array = [duree_ramps,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_spec_2_3_chop duree: " + time_array); return time_array; } // $Id: PacsEng_SPEC_orbit_prologue.txt,v 1.8 2008/11/12 11:40:20 vanessad Exp $ // Purpose : Bring PACS from switched off condition to standby // for PHOT observations // // CUS author : Composed from various ILT modules // // Input arguments: see after module identification // // Return values // N/A // // Comments : // // History: // 1.0 21-aug-2007 Renamed from PACS_SPEC_orbit_prologue // Use new "no_pointing" pointing request and // StateMachine logic // 2.0 12-nov-2008 Helmut Dannerbauer changed the setup time for CSs from // 1800 to 2100 seconds. obs PacsEng_SPEC_orbit_prologue { }{ // Settling time for CS int tSET = 2100; string fltPOS = "POS A"; double temp_CS1 = 48.0; double temp_CS2 = 58.0; double blu_heater_curr = 0.78; // Get duration int tp = duration(SPEC_setup(fltPOS,temp_CS1,temp_CS2,blu_heater_curr)); bool execute = true; // Add needed time to set/unset OBSID int tset = duration(WriteOBSID($OBSID)); int tunset = duration(WriteEndID()); tp = tp + tset + tunset + tSET; // Issue PointReq int[] ts = no_pointing(execute,0,0,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 3) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); // Call the SPEC setup script SPEC_setup(fltPOS,temp_CS1,temp_CS2,blu_heater_curr); // Wait for CS to stabilize delay(tSET); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // Missionphase : EQM IMT // // Purpose : Configure the DPU bus list for nominal bus list after burst mode // // Author : Bart Vandenbussche : // // Arguments : none // // Description : Sets the nominal bus list on the DPU // // Dependencies : none // // Comments : // // Version : 1.0 // // History : 1.0 20-04-2005 BV - created base on Thomas' tcl script // 2.0 07-02-2008 VDP - Added WriteBBID and WriteEndBB // modified for PV phase // block Burstmode_reset_block PACS 308 { }{ // Obtain and set Block ID WriteBBID($BBID); Pacs_DPU_SET_BUS_LIST("DISABLE"); // reset Block ID WriteEndBB(); } // CVS comments : $Id: SPEC_get_grat_info.txt,v 1.6 2008/05/28 13:53:57 vanessad Exp $ // Purpose : Estimate grating parameters by referring to the U-CAL SPEC_BAND_params and // grating calibration file mentioned therein // // CUS author : DAC // Script file : SPEC_get_grat_info.txt // // Input arguments // type name description // double waveLen Desired wavelength [microns] // // Return values // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int} nbSteps,stepSize} // // Description : Access the table SPEC_BAND_params. Verify that the given // wavelength is within range; obtain order and the name of the GratCal // grat vs. wavelength table. Get nominal grating position from GratCal table. // Returns the grating position such that nominal grating position will be // acchieved after nbSteps/2 steps // // Dependencies : // // Preconditions : // // Comments : With current version of lookup, first column has to be of // type string // // History : 0.1 25-aug-2005 DAC // 0.2 8-may-2006 Return grating position such that line falls // in the middle of array after n_steps/2 // 0.3 30-may-2006 Access SPEC_BAND_params using module SPEC_BAND_read; // Return central pixel gratPos if switching = true // 0.4 22-nov-2006 "Verbosed" debug_print // 0.5 14-feb-2007 Verbose in calling argument // 0.6 14-mar-2007 extraConf in calling argument // 0.6 7-may-2007 Amended for SCR-3164: introduction of "L" lines in // SPEC_BAND_params // 0.7 8-may-2007 Case of overlapping bands; orderSel defines the order // 1.0 10-oct-2007 SCR3632. Dedicated key wave parameters. K lines will // be recognized because "resol" will be KHI, KMED, or KLOW {double,int,int,int,int} procedure SPEC_get_grat_info { double waveLen = 54.0 in [54.0,210.0]; // Sought wavelength string resol = "HI" in ["HI","MED","LOW","KHI","KMED","KLOW"]; // Desired resolution bool switching = true; // Return central pixel if true string extraConf = "normal" in ["normal","bright"]; string orderSel = "order2"; bool verbose = false; }{ bool special = false; // PacsRangeSpec may call with sedN instead of orderSelN; use // "conversion" table for sedN => orderSelN if(orderSel == "sed2") { orderSel = "order2"; } if(orderSel == "sed3") { orderSel = "order3"; } if(orderSel == "sed4") { orderSel = "order2"; special = true; } if(verbose) { debug_print("SPEC_get_grat: order " + orderSel); } // Open and read SPEC_BAND_params table. Table indexed by ORDER // Try two possible ORDERs: order 1 and order indicated by orderSel // Start with order = 1 int order = 1; if(special) { order = 23; } bool found = false; int nbSRCH = 0; while(!found && nbSRCH < 2) { // SCR-3164. Deal with "L" lines string key = "L" + order; // SCR-3632 Deal with key wavelengths if(resol == "KHI" || resol == "KMED" || resol == "KLOW") { key = "K" + order; } // read BLU and RED edges of the SPEC bands double blu = dlookup("SPEC_BAND_params",key,"BLU"); double red = dlookup("SPEC_BAND_params",key,"RED"); found = blu <= waveLen && red >= waveLen; if(verbose) { debug_print("SPEC_get_grat: Switching is " + switching); debug_print("SPEC_get_grat: Wave " + waveLen); debug_print("SPEC_get_grat: FOUND " + found); debug_print("SPEC_get_grat: key " + key); debug_print("SPEC_get_grat: nbSRC " + nbSRCH); } // If not yet found search in order indicated by orderSel if(!found) { if(orderSel == "order2") { order = 2; } else { if(orderSel == "order3") { order = 3; } } nbSRCH = nbSRCH + 1; } } // If given wavelength not found there is a problem if(!found) { error("Wavelength " + waveLen + " is not within " + orderSel); } // Found the ORDER. Get now the name of position vs. wavelength gratPosTab string gratPosTab = slookup("SPEC_BAND_params",key,"CAL_FILE"); // Read the step size and the number of steps for this ORDER and resolution // Recast "resol" as it was before SCR3632 if(resol == "KHI") { resol = "HI"; } if(resol == "KMED") { resol = "MED"; } if(resol == "KLOW") { resol = "LOW"; } // Special case for "bright" source if(extraConf == "normal") { int stepSize = ilookup("SPEC_BAND_params",key,resol); int nbSteps = ilookup("SPEC_BAND_params",key,"NSTEPS"); } if(extraConf == "bright") { stepSize = ilookup("SPEC_BAND_params",key,resol); nbSteps = ilookup("SPEC_BAND_params",key,"FASTSTEP"); } // Get from gratPosTab the grating position corresponding to waveLen double gratPosDble = interpolate(gratPosTab,"grat_pos",waveLen); // gratPos will place waveLen in the middle of the array int gratPos = iround(gratPosDble); if(verbose) { debug_print("SPEC_get_grat Nominal wavelen: " + waveLen); debug_print("SPEC_get_grat Nominal grating: " + gratPos); } // Grating is scanned with a negative step size (increasing wavelength) // The grating start position should then be such that after nbSteps/2 we // are at nominal position: // gratPos = gratStartPos - stepSize*nbSteps/2 // hence: int gratStartPos = iround(gratPosDble + double(stepSize) * double(nbSteps) / 2.0); // and will scan by decreasing grating angle, i.e. negative step size: stepSize = -stepSize; // If frequency switch return return gratPos (central pixel) if(switching) { gratStartPos = gratPos; } if(verbose) { debug_print("SPEC_get_grat: reads SPEC_BANDS"); debug_print("SPEC_get_grat: WAVE/order/gratNOMINAL/gratSTRT: " + waveLen + "/" + order + "/" + gratPos + "/" + gratStartPos); debug_print("SPEC_get_grat: nbSteps/stepSize: " + nbSteps + "/" + stepSize); } return {waveLen,order,gratStartPos,nbSteps,stepSize}; } // $Id // Missionphase : PACS PV Phase // // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsPhotSlewCal.txt // // Input arguments // Type Description // // Return values // Type Name Default Description // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 DAC 30-Nov-2005 (inspired by PacsSpecSlewCal) // 0.2 DAC 20-sep-2006 Clean up leftovers from SPEC script // 0.3 DAC 6-dec-2006 Adapted to simpler PHOT_fltw_move // 0.4 DAC 27-jun-2007 SPR-3339 Always move filter wheel // 1.0 DAC 10-oct-2007 SCR-3628 Added arguments to call aot_prologue // obs PacsCal_PacsPhotSlewCal { /* Needed variables to call PacsPhotSlewCal */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int comp_mode_blu = 0; int nb_raw_blu = 3; int comp_mode_red = 0; int nb_raw_red = 3; int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC double chopthrow = 30.0; bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Set OBSID int tobsid = duration(WriteOBSID($OBSID)); // Calibration time during slew if(fltPOS == "POS A") { string filter = "blue2"; } else { if(fltPOS == "POS B") { filter = "blue1"; } } {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,comp_mode_blu,0,nb_raw_blu,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,comp_mode_blu,0,nb_raw_red,0,0,0}]; // OBCP parameters none is given since PacsPhotSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; bool doProlog = true; //Initial hold int tih = duration(WriteOBSID($OBSID)); int tslewmin = 0; //Final hold int tendobsid = duration(WriteEndID()); int tepilog = duration(PHOT_aot_epilogue()); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter)); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } //Photometry string ib = "P01_0"; int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); // WriteOBSID($OBSID); if(verbose) { debug_print("WriteOBSID at :" + tNOW + " sec"); } tNOW = time(); if(verbose) { debug_print("WriteOBSID ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter); tNOW = time(); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } PHOT_aot_epilogue(); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // End of Observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Fil_Testseq { /* No variables to call PacsEng_Phot_Fil_Testseq */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Fil_Testseq */ }{ // 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(PACS_Phot_Fil_Testseq())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Fil_Testseq(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_SFT_Cooler_Warm { /* No variables to call PacsEng_Phot_SFT_Cooler_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_SFT_Cooler_Warm */ }{ // 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(PACS_Phot_SFT_Cooler_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_SFT_Cooler_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } procedure PACS_Spec_Gra_PID_loop_Short { }{ int[] kp = [2000,2500,3000,3500,4000]; int[] ki = [50000,75000,100000,125000,150000]; int[] kd = [20,22,25,27]; int nsteps_kp = length(kp) - 1; int nsteps_ki = length(ki) - 1; int nsteps_kd = length(kd) - 1; string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "ISTSafe"; // INSTRUMENT VERSION // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // int word0 = ilookup(calUname,calUrow,"Kp"); int word1 = ilookup(calUname,calUrow,"Ki"); int word2 = ilookup(calUname,calUrow,"Kd"); int word3 = ilookup(calUname,calUrow,"Kf"); int word4 = ilookup(calUname,calUrow,"Rate"); int word5 = ilookup(calUname,calUrow,"AccLimit"); int word6 = ilookup(calUname,calUrow,"OutputLimit"); int word7 = ilookup(calUname,calUrow,"Scaling"); int word8 = ilookup(calUname,calUrow,"ErrorLimit"); {int}[] params = []; int[] aux = []; int chksum = 0; // for(int np = 0 .. nsteps_kp) { for(int ni = 0 .. nsteps_ki) { for(int nd = 0 .. nsteps_kd) { // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); // word0 = kp[np]; word1 = ki[ni]; word2 = kd[nd]; // Create the parameter list tuple params = [{word0},{word1},{word2},{word3},{word4},{word5},{word6},{word7},{word8}]; // Create the array for the checksum function aux = [word0,word1,word2,word3,word4,word5,word6,word7,word8]; chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_PAR(params,chksum); delay(1); // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(3); for(int m = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(117); delay(1); } for(int j = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(-117); delay(1); } Pacs_DMC_MOVE_GRAT_REL_RAW(233010); delay(10); Pacs_DMC_MOVE_GRAT_REL_RAW(-233010); delay(10); } } } // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : SPU nominal data rate check (photometry) // // Author : Roland Vavrek // CUS script : RV // CVS file : // // Arguments : No interactive parameters // // // // Description : Photometry, staring 7 min on CS2/CS1 and chopper zero position in default/double compression SPU setup. // // // Dependencies : - Chop_mov_abs // - PHOT_spu_reset // - PHOT_spu_setup // // // Preconditions : - PACS is switched on // - Setup photometry with nominal parameters // - Mechanics and CS controllers are SWON and ENABLED // - CS2/CS1 temperature is raising but not yet stabilized // // Comments : The default detector selection table is assumed to be used before executing this script. // // Version : 2.0 // // History : 2.0 25-mar-2008 Translated from IST to PV phase syntax // 1.3 09-Apr-2007 Use PHOT_spu_reset and PHOT_spu_setup // 1.2 05-Apr-2007 Chopper positions on CS1 and zero added, double compression mode // added on CS2, unit time is reduced to 2 min. Constants updated for FM/ILT // 1.1 27-Apr-2005 SPU reset attached to the end // 1.0 21-Apr-2005 Creation by RV // obs PacsEng_Phot_spu_data_rate { /* Needed variables to call PacsEng_Phot_spu_data_rate */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_spu_data_rate */ }{ // 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(Pacs_Phot_spu_data_rate())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_spu_data_rate(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Loops over relative grating movements of various step_size // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : gra_steps_per_block : number of grating steps per step_size // // Description : Loops over relative grating movements // The step sizes are fixed. A block of "gra_steps_per_block" steps is performed for each given step_size // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON, ENABLED and HOMED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : This test only makes sense with appropriate diagnostic HK (e.g. PACS_Spec_Gra_Diaghk_Setup.tcl) // // Version : 2.0 // // History : 1.0 12-Jun-2006 Creation based on SPEC_Gra_slew_time_cal // addition of step sizes typical of AOT // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_Gra_Slew_Time_Cal { /* Needed variables to call PacsEng_Spec_Gra_Slew_Time_Cal */ int gra_steps_per_block = 3; /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Slew_Time_Cal */ }{ // 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(Pacs_Spec_Gra_Slew_Time_Cal(gra_steps_per_block))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_Slew_Time_Cal(gra_steps_per_block); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS EQM Test // // Purpose : Open the launch lock // // Author : H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : This script will do what's necessary to open the launch lock // // Comments : // // Version : 1.0 // History : 1.0 / 17-Nov-2004 initial version // 1.1 4-apr-2006 Unlock grating with 0x28 // procedure PACS_Open_Launch_Lock { }{ // DPU_SET_HK_LIST (SPEC for both channels) Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); // Set the mechanisms // "DMC_SWON_GRAT_CONT" SWITCH ON GRATING CONTROLLER Pacs_DMC_SWON_GRAT_CONT(); delay(1); // DMC_UNLOCK_GRATING" Unlock the Grating launch lock // in open loop mode Pacs_DMC_UNLOCK_GRAT(0x28); delay(10); // DMC_SWOF_GRAT_CONT" Switch off grating controller Pacs_DMC_SWOF_GRAT_CONT(); // --------------------- // End of Procedure // --------------------- } // CVS comments : $Id: SPEC_grat_time.txt,v 1.4 2007/04/25 15:14:05 dcesarsk Exp $ // Purpose : Provide an estimate of the time it takes the grating to // move nb_steps. NOTE: units are [msec] // // CUS author : DAC // Script file : SPEC_grat_time.txt // // Input arguments // type name Description // int nb_steps Desired relative movement of grating // // Return values // Type Description // int Expected time [msec] to move the grating by nb_steps // // Description : Straitghtforward computation based on a stepping speed of // 1 degree/sec, equivalent to 23.301 steps per milisecond // // Dependencies : // // Preconditions : // // Comments : // // History : 0.2 DAC // 3-may-2006 0.1 Added 200 msec margin for settling time // 15-feb-2007 0.2 Read parameters from PACSparams int procedure SPEC_grat_time { int nb_steps = 23301; // Number of grating steps (relative move) }{ // Get speed and settling time double grat_speed = dlookup("PACSparams","grat_speed","freq_time"); double grat_settle = dlookup("PACSparams","grat_settle","freq_time"); if(nb_steps == 0) { int needed_time = 0; } else { needed_time = iceil(abs(double(nb_steps)) / grat_speed + grat_settle); } // Return [msec]!! return needed_time; } // File : PACS_Spec_Heat_SWON.cus // Missionphase : PACS FM ILT tests // // Purpose : SWOF Heaters // // Author : P. Royer // // Arguments : blue & red Heater currents // // Description : SWOF Heaters // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jun-2006 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose SWOF Heaters // @comment - // block PACS_Spec_Heat_SWOF PACS 164 { }{ // Register start of BB WriteBBID($BBID); // // SWON HEATERS // Pacs_DMC_SWOF_BD_HEATER(); Pacs_DMC_SWOF_RD_HEATER(); // // End of procedure //------------------ } // Missionphase : FM ILT // // Purpose : Switch on/off diagnostic HK // // Author : Markus Nielbock // CUS author : MN // // Description : This building block switches on/off diagnaostic HK. // Receiving signals: // ON: switch on diagnostic HK // OFF: switch off diagnostic HK // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched on // // Comments : // // Version : 1.1 // // History : 1.0 29-03-07 creation by MN // Begin Mode description procedure PACS_Chopper_EnDis_Test_dhk { string onoff = "OFF" in ["ON","OFF"]; }{ // For housekeeping using the chopper in open-loop mode, we need the // following parameters: // 209 DMC_CHOP_CTRL_ST // 242 DMC_IRS_CNT // 244 DMC_CHOP_CUR_POS // 245 DMC_CHOP_SETPOIN // 258 DMC_CHOP_OUTPUT // 561 DMC_CHOP_IA // IF-statement for switching on if(onoff == "ON") { // Readout period set to 1kHz int diag_hk_period = 0; // Create list of HK parameters {int}[] parlist = [{209},{244},{245},{258},{561},{0xffff}]; int hk_len = length(parlist); // Calculate check sum int[] aux = [209,244,245,258,561,0xffff]; int check_sum = checksum("int",aux); // Write HK parameters and start HK debug_print("Starting chopper diagnostics with " + hk_len + " parameters:"); Pacs_DMC_WRT_DIAG_HK_LIST(hk_len,parlist,check_sum); Pacs_DMC_START_DIAG_HK(diag_hk_period); } // End IF // IF-statement for switching off if(onoff == "OFF") { debug_print("Stopping diagnostic HK"); Pacs_DMC_STOP_DIAG_HK(); } // End IF } ///////////////////////////////////////////////////////////////////////////// /// $Id: PacsPhoto.def,v 1.69 2008/05/14 11:10:32 vanessa Exp $ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsPhoto AOT // CUS author : DAC // Script file : PacsPhoto.def // Return values // Description : // This AOT has to cater to three different source morphologies: // "point", "small", and "large". Each mode requires its own pointing modes. // Available pointing modes (reference is to JBr's document): // NOTE: All modes include operations during SLEW and operations at end of OBS. // NOTE: Updated based on e-mail from MS dated 3-Dec-2005 (denoted UPDATE) // NOTE: Updated after Saclay meeting // ==== "point" // no nodding 2.1 fine_pointing // nodding (includes "hold" periods) 3.4 nodding_pointing // UPDATE: Nodding is always needed ==> eliminate fine_pointing // // ==== "small" // (raster dimensions and steps TBD; expect 2x2 or 3x3) // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding always used ==> nodding_in_raster // // ==== "large" // Can be RASTER or SCAN (freeze mode is based upon a SCANning PointMode) // RASTER // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding not used ==> raster_pointing // // SCAN // There is no nodding and no chopping. "Hold" periods are allowed (mode 2.14) // Leg length is restricted to 20 degrees. Logic will start OBCP7 as early as // possible (in the INIT_HOLD state). The actual duration of OBCP7 is set as // short as possible to prevent the CAL phase to interrupt a running DEC/MEC // sequence. // // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 2-Sep-2005 DAC // 4.5 2-may-2007 For history before today see CVS // Fixed SPR-3160 as tih = duration(OBCP7) // 4.6 22-may-2007 SPR-3211 Include overheads in Calibration time // 4.6.1 31-may-2007 Renamed patt to pattnod in "nodding_pointing" // 4.6.2 27-jun-2007 SPR-3339 Correct SlewCal module // 4.7 20-sep-2007 SCR-3552 Add skewCorrec (in PACSyzoffsets) to pattnod // 4.8 10-oct-2007 SCR-3628 Add Prime/Parallel to PacsPhotDefaults // 5.0 14-jan-2008 DAC Use standard names for RA,DEC // 6.0 28-apr-2008 VDP SPR3689: fixed mapScanLegLength to be decimal // ..... SCR 4196: implement Low Gain for Bright sources // 6.1 24-jun-2008 DAC MapScanLength back to integer // 6.2 17-jul-2008 DAC Inserted TMMarker600 at begin of each scan leg // 7.0 15-sep-2008 VDP implement data_rates and HK rates SCR 4431 // 7.1 26-sep-2008 VDP remove data_rate (already in WriteOBSID and // PHOT_aot_proplogue/epilogue // Merged with DAC on the fly modif // 7.2 30-sep-2008 VDP MapScanLegLength back to double {int,int,int,double,{string,double,double,double,double,double,double}[]} obs PacsPhoto_complete { string blue = "blue1" in ["blue1","blue2"]; int repFactor = 1 in [1,1500]; // Hard limit for source = "point" string source = "point" in ["point","small","largeRaster","largeScan","none"]; // SrceSize string mapScanSpeed = "high" in ["high","medium","low"]; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanConstrFrom = 0.0 in [0.0,360.0]; double mapScanConstrTo = 0.0 in [0.0,360.0]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool mapScanHomCoverage = true; bool mapScanSquare = false; double pointStep = 2.0 in [2.0,480.0]; double lineStep = 2.0 in [2.0,480.0]; string mapRasterAngleRef = "inst" in ["inst","i+c"]; double mapRasterConstrFrom = 0.0 in [0.0,360.0]; double mapRasterConstrTo = 0.0 in [0.0,360.0]; int m = 2 in [2,100]; int n = 1 in [1,100]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; bool dither = false; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; //RA,DEC or SSO double fluxPntBlu = 116.0 in [0.0,2.0E7]; // Flux density in blue band mJy double fluxPntRed = 150.0 in [0.0,2.0E7]; // Flux density in red band mJy double fluxExtBlu = 116.0 in [0.0,2.0E7]; // Flux in blue band MJy/sr double fluxExtRed = 40.0 in [0.0,2.0E7]; // Flux in red band MJy/sr int obsOverhead = 180; // Slew overhead /* End of input section */ }{ // Begin "pointing" section // Overall "verbosity" bool verbose = false; // New nodding_pointing variable bool startAtOFF = false; // Conversion to deprecated variables bool noddingSel = true; if(source == "largeRaster") { string largeOptions = "raster"; bool mapRasterSel = true; noddingSel = false; } if(source == "largeScan") { largeOptions = "scan"; mapRasterSel = false; noddingSel = false; } int mapRasterNumCycles = repFactor; // Useful variables // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // // Set messages for HTML format message(""); message(""); // Pointing mode has not been established yet int pointCase = 0; // Determine the pointing mode if(source == "point") { // Variable needed to obtain choper throw from CAl-U string srcID = "pointSRC"; // Just for completiness, define a 1x1 raster m = 1; n = 1; // Fine pointing without nodding is disallowed (pointCase remain null) if(!noddingSel) { string pointMode = "basic_fine_pointing"; string shortDesc = "Point source (no nodding)"; // not allowed pointCase = 11; } else { pointMode = "nodding_pointing"; shortDesc = "Point source (nodding and chopping)"; pointCase = 12; string yzoffsetROW = "P" + pointCase; } } if(source == "small") { srcID = "smallSRC"; // Obtain the size of the raster from CAL-U "SMALL_SRC_params" m = ilookup("SMALL_SRC_params","PHOT","mRast"); n = ilookup("SMALL_SRC_params","PHOT","nRast"); pointStep = dlookup("SMALL_SRC_params","PHOT","pointStep"); lineStep = dlookup("SMALL_SRC_params","PHOT","lineStep"); if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = " Small source (no nodding)"; // not allowed // pointCase = 21; } else { pointMode = "nodding_raster_pointing"; shortDesc = "Small source (nodding and chopping)"; pointCase = 22; yzoffsetROW = "P" + pointCase; } } // Large source in Raster Mode if(source == "largeRaster") { srcID = "largeSRC"; if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = "Large source, raster mode (chopping and no nodding)"; pointCase = 31; yzoffsetROW = "P" + pointCase; } else { pointMode = "nodding_in_raster"; shortDesc = "Large source, raster mode (chopping and nodding)"; // not allowed // pointCase = 32; } } // Large source in Scan Mode if(source == "largeScan") { srcID = "largeSRC"; pointMode = "line_scan_pointing"; shortDesc = "Large source, line scan mode (no chopping)"; // For consistency m = 1; n = mapScanNumLegs; pointCase = 33; yzoffsetROW = "P" + pointCase; } // If pointCase is still 0, then something went wrong with the PointMode logic... if(pointCase == 0) { error("NODDING is incompatible with source: " + source); } // The pointing mode has been established. Continue with other input data // from HSPOT if(verbose) { debug_print("================> PointMode: " + pointMode); } // // confPHOT arrays (red and blu) compared to confSPEC // PHOT name SPEC name // confPHOTred{ 0} gain capa_red; // confPHOTred{ 1} N/A nb_rdouts_ramp_red; // confPHOTred{ 2} N/A nb_rdouts_subramp_red; // confPHOTred{ 3} same comp_mode_red; // confPHOTred{ 4} same glitch_det_red; // confPHOTred{ 5} ?? ramp_fit_alg_red; // confPHOTred{ 6 ?? nb_raw_red; // confPHOTred{ 7} N/A bias_r_red; // confPHOTred{ 8} N/A bias_d_red; // // Define confOBCP array. // NOTE: the conf arrays are inherited from PacsSpec, where the [0] element // represented the default values, and the [n] element represented values // to be used with the n-th wavelength. Here - PHOT - [0] still represents // the default values and [1] values corresponding to the chosen filter. // Could even use [1] and [2] for blue1 and blue2.... but will not! {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confPHOTblu and confPHOTred {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,0,0,0,0,0,0}]; // Define paramsPHOT, a "tuple of tuples" // Estimator module returns {confPHOTblu,confPHOTred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOT = {clone(confPHOTblu[0]),clone(confPHOTred[0]),clone(confOBCP[0])}; // including a new section for Low Gain implementation SCR4196 bool isBrightPacs = false; string calUFile = "isBrightPacsTrigger"; // section defining triggering Fluxes (to be read in CALU table) double fluxPntRedTriggerLowGain = dlookup(calUFile,"Red","fluxPntTrigger"); if(blue == "blue1") { double fluxPntBluTriggerLowGain = dlookup(calUFile,"Blue","fluxPntTrigger"); } else { if(blue == "blue2") { fluxPntBluTriggerLowGain = dlookup(calUFile,"Green","fluxPntTrigger"); } } double fluxExtRedTriggerLowGain = dlookup(calUFile,"Red","fluxExtTrigger"); if(blue == "blue1") { double fluxExtBluTriggerLowGain = dlookup(calUFile,"Blue","fluxExtTrigger"); } else { if(blue == "blue2") { fluxExtBluTriggerLowGain = dlookup(calUFile,"Green","fluxExtTrigger"); } } // section test if(fluxPntRedTriggerLowGain <= fluxPntRed || fluxPntBluTriggerLowGain <= fluxPntBlu || fluxExtRedTriggerLowGain <= fluxExtRed || fluxExtBluTriggerLowGain <= fluxExtBlu) { isBrightPacs = true; } // Obtain default values for "Prime" mode paramsPHOT = PacsPhotDefaults(srcID,"Prime",isBrightPacs,verbose); // Array [0] of paramsPHOT contains the default values; array [1] // will contain the values based on HSPOT input. Array [1] is a copy of [0]; // only elements depending on HSPOT will be updated // Copy default values to individual "conf" tuples confPHOTblu[0] = paramsPHOT{0}; confPHOTred[0] = paramsPHOT{1}; confOBCP[0] = paramsPHOT{2}; // Now comes the module to estimate PACS parameters as a function of the // exposure time given by the user. // paramsPHOText (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,repeat_factor,nhold,dummy2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsPHOText = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for given HSPOT input. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("++Photo: confOBCP[0]: " + confOBCP[0]); } paramsPHOText = PacsPhotEstimatorOBCPn(pointCase,blue,repFactor,paramsPHOT,noddingSel,dither,verbose); // Copy estimates to respective tuples confPHOTblu[1] = paramsPHOText{0}; confPHOTred[1] = paramsPHOText{1}; confOBCP[1] = paramsPHOText{2}; int nb_nods = paramsPHOText{3}{0}; int repeat_factor = paramsPHOText{3}{1}; int nhold = paramsPHOText{3}{2}; ///////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source. // We have to collect the duration of all TCs that will be released after the // PointingRequest // First TC is associated with setting OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsPhotSlewCal to perform AOT prologue and CAL during // The time needed to perform these activities during slew is // with no prologue: bool doProlog = false; int timeSlewCal = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCal: " + timeSlewCal); } // With prologue doProlog = true; int timeSlewCalProlog = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCalProlog: " + timeSlewCalProlog); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsPhotCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsPhotCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // Duration of any nod leg or staring observation // Use OBCP3 for point source // Use OBCP4 for all others, except scan mode if(pointCase == 11 || pointCase == 12) { int timeOBS = duration(PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP3: " + timeOBS); } } if(pointCase == 22 || pointCase == 31) { timeOBS = duration(PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP4: " + timeOBS); } } if(pointCase == 33) { // Estimate how long OBCP7 has to run to cover a scan leg // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec double rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } double timeLEG = mapScanLegLength * 60.0 / rate; // Duration of OBCP7 // For one readout int nb_SRC = 1; confOBCP[1]{3} = nb_SRC; int timeOBS1 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // For 20 readouts nb_SRC = 20; confOBCP[1]{3} = nb_SRC; int timeOBS2 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 19.0; double offset = double(timeOBS1) - slope; // Compute nb_SRC so that OBCP runs during the whole scan leg nb_SRC = iceil((timeLEG - offset) / slope); if(verbose) { debug_print("Needed nb_SRC to fill scan leg: " + nb_SRC); } confOBCP[1]{3} = nb_SRC; timeOBS = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); } if(verbose) { debug_print("confOBCP[1]: " + confOBCP[1]); debug_print("==> Duration OBCP: " + timeOBS + " [sec] per nod; pointCase: " + pointCase); } // Finally deal with PHOT_aot_epilogue and WriteEndID int timeEpilogue = duration(PHOT_aot_epilogue()); int timeEndID = duration(WriteEndID()); timeEpilogue = timeEpilogue + timeEndID; if(verbose) { debug_print("Duration aot_epilogue: " + timeEpilogue); } // We have all elements to issue a Pointing Request and generate TCs // - duration of SlewCAL // - duration of OBS (one pointing) // - nb of nods or nb of raster points // - nhold ///DAC nhold = 0; ///DAC // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // The nodding step has been estimated already (PacsPhotDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table // Read nod amplitude [arcsec] double nodThrow = dlookup("PHOT_CHOP_params",srcID,"NOD"); int max_dither = confOBCP[1]{1}; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("TimeSlewCal : " + timeSlewCal); debug_print("TimeOBS : " + timeOBS); debug_print("m/n : " + m + "/" + n); debug_print("nb_nods/repeat_factor/nhold: " + nb_nods + "/" + repeat_factor + "/" + nhold); debug_print("NOD amplitude for " + srcID + ": " + nodThrow + " [arcsec]"); int chpSRC = confOBCP[1]{12}; int chpREF1 = confOBCP[1]{13}; int chpREF2 = confOBCP[1]{14}; debug_print("#### CHOP SRC/REF1/REF2: " + chpSRC + "/" + chpREF1 + "/" + chpREF2); debug_print("CHOP dither: " + max_dither); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); } // Issue pointing request // Virtual aperture // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("##Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("##skewCorrec : " + skewCorrec); } // SCAN/RASTER orientation for "scan map" and "chopped raster" // RASTER defines mapRasterAngleRef = "inst" in ["inst", "i+c"]; // SCAN defines mapScanAngleRef = "sky" in ["sky", "inst", "s+c", "i+c"]; // By default S/C moves in instrument coordinates bool useINST = true; if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { useINST = false; } // Act according to pointCase // POINT source, i.e. 3.4 nodding_pointing if(pointCase == 12) { // Issue pointing request (when possible use JBr's variable names for clarity) // SlewCal during slew string ib = "P01_0"; int tslewmin = timeSetOBSID + timeSlewCalProlog; int tih = 0; int tfh = timeEpilogue; bool fixed = false; double pattnod = 0.0 + skewCorrec; int nnods = nb_nods; int tp = timeOBS; int tloadslewmin = 0; int nload = 0; int thold = timeSlewCal; // int nhold Already defined // Do not start at nod position startAtOFF = false; int[] fromPntReq = nodding_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); if(verbose) { debug_print("##### nodding_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tss = fromPntReq[2]; tload = fromPntReq[3]; } // SMALL source or LARGE raster with nodding if(pointCase == 22 || pointCase == 32) { // "nodding_raster_pointing" (3.6 in Pointing document) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; double patt = 0.0; // Chopper moves along -Y-axis pattnod = 270.0 + skewCorrec; // Chop nodThrow was already established // nodThrow = From CAL-U table int k = 0; fixed = false; int nrepeat = repeat_factor; double d1 = pointStep; double d2 = lineStep; thold = timeSlewCal; tp = timeOBS; nnods = nb_nods; // New arguments for pointing request; will be dealt with next iteration int top = 0; double raoff = 0.0; double decoff = 0.0; nrepeat = repeat_factor; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nnods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); if(verbose) { debug_print("##### nodding_in_raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tss = fromPntReq[3]; tll = fromPntReq[4]; tnod = fromPntReq[5]; tload = fromPntReq[6]; tsop = fromPntReq[7]; trep = fromPntReq[8]; } // SMALL or LARGE source with no nodding if(pointCase == 21 || pointCase == 31) { // raster_pointing (mode 3.5) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; // Perform raster in instrument coordinates fixed = false; //SPR-2431 Raster lines along y-axis patt = 90.0; d1 = pointStep; d2 = lineStep; tp = timeOBS; nrepeat = repeat_factor; thold = timeSlewCal; nhold = 0; k = 0; top = 0; raoff = 0.0; decoff = 0.0; fromPntReq = raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); if(verbose) { debug_print("##### raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tll = fromPntReq[3]; trep = fromPntReq[4]; tsop = fromPntReq[5]; } if(pointCase == 33) { // line_scan_pointing. Keep (most of) JBr's variable names tslewmin = timeSetOBSID + timeSlewCalProlog; // Case of homogeneous coverage double pi = 3.1415926535; // degrees to radians double dtor = 0.0; double rtod = 0.0; double halfDiag = 0.0; double halfDiagAngle = 0.0; dtor = 2.0 * pi / 360.0; rtod = 1.0 / dtor; halfDiag = sqrt(boloSSize * boloSSize + boloLSize * boloLSize) / 2.0; halfDiagAngle = atan(boloSSize / boloLSize) * rtod; // Add further constraint from RV (SPR-2889) // Add SPR-2699 further logic: mapScanAngleRef overrides ScanHom and ScanSquare if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { mapScanHomCoverage = false; mapScanSquare = false; } // Could simplify logic after SPR-2699 (mapScanHomCoverage cannot be true // unless inst or i+c have been specified) if(mapScanHomCoverage == true && (mapScanAngleRef == "inst" || mapScanAngleRef == "i+c")) { mapScanCrossScan = halfDiag * (abs(sin(dtor * (mapScanAngle + 90.0 - halfDiagAngle))) + abs(cos(dtor * (90.0 - halfDiagAngle - mapScanAngle + 90.0)))); if(verbose) { debug_print("New mapScancCross: " + mapScanCrossScan); } } // Case of square map request if(mapScanSquare == true && mapScanHomCoverage == true) { mapScanNumLegs = iceil(60.0 * mapScanLegLength / mapScanCrossScan); if(verbose) { debug_print("New mapScanNumLegs: " + mapScanNumLegs); } } // OBCP7 duration with computed nb_SRC int startOBCP7 = 2; // Use "true" duration of OBCP7 startOBCP7 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); ib = "P01_0"; tih = 0; tfh = timeEpilogue; // Use instrument coordinates unless HSPOT says otherwise fixed = false; if(useINST == false) { fixed = true; } patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeSlewCal; nhold = 0; nrepeat = repFactor; if(verbose) { debug_print("Map reference: " + mapScanAngleRef + "=" + fixed); } // In this version we start OBCP7 with the state=INIT_HOLD. We set // a duration of a few seconds, shorter than the shortest SCAN length. // We also restart OBCP7 at the beginning of each SCAN, just to set the BBID // If there are intervening HOLD states, we restart OBCP7 as soon as the // CAL is over, else data will be collected till the end of the scans fromPntReq = line_scan_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,thold,nhold,nrepeat); //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tacc = fromPntReq[2]; tdec = fromPntReq[3]; tl = fromPntReq[4]; tll = fromPntReq[5]; trep = fromPntReq[6]; if(verbose) { debug_print("##### line_scan_with_hold"); } if(verbose) { debug_print("##### rate: " + rate + " arcsec/sec"); } // Here we record how long it takes to scan a line [sec] int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; } if(verbose) { debug_print("PointReq: " + fromPntReq + " for pointCase: " + pointCase); debug_print("PointMode: " + pointMode); } // End of "pointing" section }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); debug_print("++++++++++++++++++++++++ State Machine"); } // Initialize some "global" variables int totalOBStime = 0; int totalOBSover = 0; int totalCALtime = 0; int totalCALover = 0; int nbSCANlegs = 0; // Issue TCs int[] state = [0]; int nbOBS = 0; while(state[0] >= 0) { state = next_state(); //// STATE = SLEW if(state[0] == 1) { if(verbose) { int tNOW = time(); debug_print("=== SLEW/CAL starts at: " + tNOW); } // Set OBSID WriteOBSID($OBSID); doProlog = true; int[] calTime = PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); debug_print(" TotalCalTime: " + totalCALtime); } } else { //// STATE = INIT_HOLD if(state[0] == 2) { if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD starts at: " + tNOW); } // do nothing (OBCP7 is now entirely within the LINE state if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD ends at: " + tNOW); } } else { //// STATE = POINT if(state[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping int[] obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("POINT: POINTobs: " + nbOBS); } if(verbose) { tNOW = time(); debug_print("=== POINT ends at: " + tNOW); } } else { //// STATE = CAL_HOLD if(state[0] == 6) { doProlog = false; if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD starts at: " + tNOW); } calTime = PacsPhotSlewCal(false,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { debug_print("Accumulated CALtime: " + totalCALtime); } if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD ends at: " + tNOW); } } else { //// STATE = NOD if(state[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("NOD: NODobs: " + nbOBS); } } else { //// STATE = LINE if(state[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== SCAN starts at: " + tNOW); } // Do we need code to set BBID?? // Yes, use TMMarker600 TMMarker600(); // Issue OBCP7 for the duration of the scan leg obsTime = PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); totalOBStime = totalOBStime + scanTime; totalOBSover = totalOBSover + scanTime + scanOVER; nbSCANlegs = nbSCANlegs + 1; // Wait scanTime and mark end of BB delay(scanTime); WriteEndBB(); tNOW = time(); if(verbose) { debug_print("=== SCAN mode, leg: " + nbSCANlegs); debug_print(" TotalOBSTime: " + totalOBStime); debug_print(" tacctdec : " + scanOVER); debug_print("=== SCAN ends at: " + tNOW); } } else { //// STATE = FINAL_HOLD if(state[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } PHOT_aot_epilogue(); WriteEndID(); if(verbose) { tNOW = time(); debug_print("=== FinalHOLD ends at: " + tNOW); } } else { //// STATE = END if(state[0] == -1) { tNOW = time(); if(verbose) { debug_print("=== END state; time now: " + tNOW); } } } } } } } } } } int timeObsEnd = time(); int overOBS = totalOBSover - totalOBStime; int overCAL = totalCALover - totalCALtime; if(verbose) { debug_print("+++ OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print(" totalOBStime :" + totalOBStime); debug_print(" totalOBSover :" + overOBS); debug_print(" totalCALtime :" + totalCALtime); debug_print(" totalCALover :" + overCAL); } // Time considerations // The "science" part of the observations lasts tobs seconds (tobs from // PointReq[0]) // Time on source is totalOBStime. Hence int instrumentAndObservationOverhead = tobs - totalOBStime; // Begin "calculation" and report section string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "ObsMode: " + shortDesc + ""; lineCnt = lineCnt + 1; // More pointing information if(pointCase == 12) { msgLine[lineCnt] = "

Chopper throw: " + nodThrow + " [arcsec]

"; lineCnt = lineCnt + 1; double mapArea = boloArea; msgLine[lineCnt] = "

PHOTO footprint: " + dformat(boloLSize,2) + " x " + dformat(boloSSize,2) + " [arcsec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

PHOTO area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } if(pointCase == 21 || pointCase == 31 || pointCase == 22) { msgLine[lineCnt] = "

Raster points/lines: " + m + "/" + n + "

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Step size: " + d1 + " x " + d2 + " [arcsec]

"; lineCnt = lineCnt + 1; // Mapped region double sizeL = boloLSize + double(m - 1) * d1; double sizeS = boloSSize + double(n - 1) * d2; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } if(pointCase == 33) { msgLine[lineCnt] = "

ScanLeg: " + d1 + " [arcsec]; number of legs: " + n + "; leg separation: " + dformat(d2,1) + " [arcsec], scan speed: " + dformat(rate,2) + " [arcsec/sec]

"; lineCnt = lineCnt + 1; // For the mapped area assume that we scan along the Large side of bolo // Size along scan line sizeL = d1 + boloSSize; // Size covered by successive legs sizeS = boloLSize + double(n - 1) * d2; msgLine[lineCnt] = "

PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

"; lineCnt = lineCnt + 1; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } // Nodding pattern msgLine[lineCnt] = "

Nod pattern (as applicable)

"; lineCnt = lineCnt + 1; if(nb_nods == 0) { if(pointCase != 33) { msgLine[lineCnt] = " No nodding, S/C stays at nominal position<"; } else { msgLine[lineCnt] = " No nodding, S/C is in line scan mode<"; } lineCnt = lineCnt + 1; } if(nb_nods == 1) { msgLine[lineCnt] = " A->B "; lineCnt = lineCnt + 1; } if(nb_nods == 2) { msgLine[lineCnt] = " A->B B->A "; lineCnt = lineCnt + 1; } if(nb_nods > 2) { int aux1 = nb_nods - 2; msgLine[lineCnt] = " A->B B->A and " + aux1 + " more A->B or B->A leg(s) "; lineCnt = lineCnt + 1; } // Add dithering bla-bla msgLine[lineCnt] = "

Dithering information

"; lineCnt = lineCnt + 1; if(dither && pointCase == 12) { int half_dither = max_dither / 2; msgLine[lineCnt] = "

Three position spatial dithering performed with the chopper (" + max_dither + " and " + half_dither + " chopper engineering units)

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Dithering information is not applicable.

"; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

Duration information

"; lineCnt = lineCnt + 1; tNOW = time(); msgLine[lineCnt] = "

AOT duration (w/overheads): " + tNOW + " [sec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

(AOT duration comprises 'on-sky' plus setup and CAL during slew)

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Breakdown of AOT duration:

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; // The charged obsOverhead is the MAX between tslew, nominalOverhead if(tslew > obsOverhead) { obsOverhead = tslew; } int tcharged = tobs + obsOverhead; msgLine[lineCnt] = "

AOT cost (includes time to slew to source): " + tobs + " + " + obsOverhead + " = " + tcharged + " [sec]

"; lineCnt = lineCnt + 1; // On-SRC time calculations start here // Uses new algorithm: on-SRC = totalOBStime*boloArea/mapArea // OBS times above is for all pointings. For a raster, have to divide // by number of raster positions, i.e. m*n if(pointCase != 33) { // If steps are smaller than boloXSize, same sky will be seen several times // Compute Short and Long dimension number of sightings (assume source is // placed to maximize number of sightings, i.e. at the proper edge of bolo) // NOTE: exchanged pointStep and lineStep as suggested by Roland V. int nbShort = iceil(boloSSize / lineStep); // Cannot be larger than m if(nbShort > m) { nbShort = m; } int nbLong = iceil(boloLSize / pointStep); // Cannot be larger than n if(nbLong > n) { nbLong = n; } if(verbose) { debug_print("nbShort/nbLong: " + nbShort + "/" + nbLong); } // Time per raster point double auxTIMEold = double(totalOBStime * nbShort * nbLong) / double(m * n); double auxTIME = double(totalOBStime) * boloArea / mapArea; // Small source is a special case where by design the SRC is always in view if(pointCase == 22) { auxTIME = auxTIMEold; } } else { // elementary integration time [sec] will be computed as "transit" time // of the source across the BOLO detector // Case of scan leg size smaller than boloSize double sizeAux = boloSSize; if(d1 <= boloSSize) { sizeAux = d1; } // Assume source is 1st seen on row=1; each successive scan may see again // the same sky region if mapScanCrossScan is smaller than bolo width. // The number of times the same sky is scanned again: if(mapScanCrossScan != 0.0) { int nbCross = iceil(boloLSize / mapScanCrossScan); if(verbose) { debug_print("nbCross: " + nbCross); } } else { nbCross = repFactor; } // nbCross cannot be larger than mapScanNumLegs if(nbCross > mapScanNumLegs) { nbCross = mapScanNumLegs; } if(verbose) { debug_print("nbCross: " + nbCross); } // The "crossing time" double crossTime = sizeAux / rate; if(verbose) { debug_print("crossTime: " + crossTime); } // AuxTime is "crossing time" * number of crossings * repFactor auxTIMEold = double(repFactor * nbCross) * crossTime; // New way of estimating the "observing" time auxTIME = double(totalOBStime) * boloArea / mapArea; } if(verbose) { debug_print("AuxTIMEold: " + auxTIMEold + " [sec]"); debug_print("AuxTIME : " + auxTIME + " [sec]"); } // Pass the pointing mode to RMS (may need it for SRC,REF considerations) double[] pixRMS = PacsPhotNoiseRMS(pointCase,blue,auxTIME); msgLine[lineCnt] = "

Sensitivity information

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Effective on-sky time (one spatial resolution element) : " + dformat(auxTIME,1) + " [sec]

"; lineCnt = lineCnt + 1; // Point source or extended source if(pointCase == 11 || pointCase == 12) { msgLine[lineCnt] = "

Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]; extended RMS " + dformat(pixRMS[2],2) + " [MJy/sr]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]; extended RMS " + dformat(pixRMS[3],2) + " [MJy/sr]

"; lineCnt = lineCnt + 1; } PacsMessageCenter("PACS Photometer AOT",lineCnt,msgLine); // Close messages for HTML format message(""); message(""); // Everything below is new request from RV. Use variable names consistent // with input variables in PacsPhoto.def // Return demanded tuples // ID for band blue1 string bandBlue = "60-85"; if(blue == "blue2") { bandBlue = "85-130"; } double pntRMSBlue = pixRMS[1]; // Watch out for infinite division!! // Better watch out for silly limits (SPR-2627) if(pntRMSBlue > 0.0010) { double pntSNBlu = fluxPntBlu / pntRMSBlue; } else { pntSNBlu = 0.0; } string bandRed = "130-210"; double pntRMSRed = pixRMS[0]; if(pntRMSRed > 0.0010) { double pntSNRed = fluxPntRed / pntRMSRed; } else { pntSNRed = 0.0; } double extRMSBlue = pixRMS[3]; // Watch out for infinite division!! if(extRMSBlue > 0.0010) { double extSNBlu = fluxExtBlu / extRMSBlue; } else { extSNBlu = 0.0; } double extRMSRed = pixRMS[2]; if(extRMSRed > 0.0010) { double extSNRed = fluxExtRed / extRMSRed; } else { extSNRed = 0.0; } {string,double,double,double,double,double,double}[] noiseSummary = [{bandBlue,fluxPntBlu,pntSNBlu,pntRMSBlue,fluxExtBlu,extSNBlu,extRMSBlue},{bandRed,fluxPntRed,pntSNRed,pntRMSRed,fluxExtRed,extSNRed,extRMSRed}]; if(verbose) { debug_print("NoiseSumm: " + noiseSummary); debug_print("OBStime/CALtime/Overhead/chopthrow: " + totalOBStime + "/" + totalCALtime + "/" + instrumentAndObservationOverhead + "/" + nodThrow); } // return {totalOBStime,totalCALtime,instrumentAndObservationOverhead, return {totalOBStime,fromPntReq[1],instrumentAndObservationOverhead,nodThrow,noiseSummary}; } // File : PACS_Spec_Heat_SWON.cus // Missionphase : PACS FM ILT tests // // Purpose : SWON Heaters // // Author : P. Royer // // Arguments : blue & red Heater currents // // Description : SWON Heaters // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jun-2006 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose SWON Heaters // @comment - // block PACS_Spec_Heat_SWON PACS 162 { }{ // Register start of BB WriteBBID($BBID); // // SWON HEATERS // Pacs_DMC_SWON_BD_HEATER(); Pacs_DMC_SWON_RD_HEATER(); // // End of procedure //------------------ } // $Id: PacsEng_orbit_epilogue.E2E,v 1.1 2007/08/24 08:28:44 dcesarsk Exp $ // // Missionphase : FM RMS // // Purpose : Leave PACS in switched off mode // // Author : Diego A. Cesarsky // // Arguments : None // // Description : Calls OBCP_safe // // Dependencies : OBCP_SAFE // // Comments : Use new "no_pointing" request // // Version : 0.1 // History : 0.1 14-feb-2008 Based on AOT's PacsEng_orbit_epilogue // obs PacsEng_orbit_epilogue { }{ bool execute = true; int tih = 0; int tfh = 0; int tp = duration(OBCP_SAFE()); // Add needed time to set/unset OBSID int tset = duration(WriteOBSID($OBSID)); int tunset = duration(WriteEndID()); tp = tp + tset + tunset; // Issue PointReq int[] ts = no_pointing(execute,0,0,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 3) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); // Call OBCP_SAFE OBCP_SAFE(); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // CVS comments : $Id: PHOT_aot_prologue.txt,v 1.8 2008/05/06 13:34:53 vanessa Exp $ // Purpose : SetUp of BOLO preceding AOT (but after orbit_prologue) // // CUS author : DAC // Script file : PHOT_aot_prologue.txt // // Input arguments // type name description // // Return values // Type Description // // Description : Conditions and starts SPU // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 18-jan-2006 DAC // 0.2 21-aug-2007 SRC-3507 Indicate end of BB // 1.0 10-oct-2007 Added input variables after SCR-3628 // 2.0 06-may-2008 Added Gain setup: LOW/HIGH gain obs. int[] block PHOT_aot_prologue_DataRates PACS 212 { string set_gain = "LOW"; int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 3; int nraw_red = 3; bool verbose = true; }{ int timeStart = time(); // Register start of BB WriteBBID($BBID); // before SPU started: set the data rate data_rate(120.0); // Define the elements of time_array int duree_sec = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Setup SPU bool startSPU = true; PHOT_spu_gain_setup(set_gain,comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); // Mark end of BB WriteEndBB(); // Synch bus sync(); // Accumulated duree [milliseconds] int duree_msec = 0; duree_sec = time() - timeStart; // Do nothing for time being if(verbose) { debug_print("PHOT_aot_prologue: " + duree_sec + " [sec]"); } return [duree_sec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; } // Mission phase : Performace Verification Phase // // Purpose : PCD req.1.1.10 Explore the time constant after flux change for // a flux levels using a CS and the background // // Author : Koryo Okumura // // Version : Fri Jul 25 22:27:59 CEST 2008 // // CUS script : procedure Phot_bandpassDirect // // Argument : // string biasTable = "BOLObias_standard_high" : Bias table file name containing the initial values // string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements // int sideField = 7134 : Chopper angle for the FOV next to BB2 // int chop_pos_CS2 = 21196 : Chopper angle for BB2 // // Check before executing : // + Bolometer is already normally operating // // Description : // + All the biases are set group by group // except for VH, VL, VRL and VHBLIND // + Loop over 8 PACS chopper frequencies // + Loop over 3 different biases (set group by group) // + The 4 biases are set to a safe value for caution // Signal plateau length provided by PACS chopper movement : [40, 2, 3, 4, 6, 8, 10, 16] readouts // // Dependencies : Previously obtaind data at high gain (PCD req.1.1.1bis) // // Comments : generated by IA script : cus_PVph_timeCont() // procedure Phot_bandpassDirect { string biasTable = "BOLObias_standard_low"; // Bias table file name containing the initial values string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements int sideField = 7134; // Chopper angle for the FOV next to BB2 int chop_pos_CS2 = 21196; // Chopper angle for BB2 }{ // //********************************************** // Flux is 2.0pW on the bleu // and 5.0pW on the red detector //********************************************** // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // //******************************* // Bias setting of the detectors //******************************* // PHOT_change_biases(biasTable,"DIRECT",gain); // // Set the PACS chopper at the central position // Pacs_DMC_MOVE_CHOP_ABS(664); // //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("ENABLE"); // // //***************************************************** // PACS chopper cycle with 40 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,39,0,0,211,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 2 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,1,0,0,4220,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 3 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,2,0,0,2814,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 4 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,3,0,0,2110,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 6 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,5,0,0,1407,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 8 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,7,0,0,1055,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 10 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,9,0,0,844,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); // //***************************************************** // PACS chopper cycle with 16 readouts per plateau //***************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.8 volts (Vh-Vl)rouge = 1.4 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6195866794124567 volts) Pacs_BOLC_SET_VH_G1(1.6195866794124567); // Set group 1 bol bias 02 (VL) to -0.18041332058754334 volts) Pacs_BOLC_SET_VL_G1(-0.18041332058754334); // Set group 1 bol bias 03 (VRL) to 0.39228760646035554 volts) Pacs_BOLC_SET_VRL_G1(0.39228760646035554); // Set group 1 bol bias 20 (VH_BLIND) to 2.150748241263701 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.150748241263701); // Set group 2 bol bias 01 (VH) to 1.5994185678301416 volts) Pacs_BOLC_SET_VH_G2(1.5994185678301416); // Set group 2 bol bias 02 (VL) to -0.20058143216985835 volts) Pacs_BOLC_SET_VL_G2(-0.20058143216985835); // Set group 2 bol bias 03 (VRL) to 0.3870601305305319 volts) Pacs_BOLC_SET_VRL_G2(0.3870601305305319); // Set group 2 bol bias 20 (VH_BLIND) to 2.1446415902901648 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1446415902901648); // Set group 3 bol bias 01 (VH) to 1.6045521115841876 volts) Pacs_BOLC_SET_VH_G3(1.6045521115841876); // Set group 3 bol bias 02 (VL) to -0.1954478884158125 volts) Pacs_BOLC_SET_VL_G3(-0.1954478884158125); // Set group 3 bol bias 03 (VRL) to 0.3904829415005877 volts) Pacs_BOLC_SET_VRL_G3(0.3904829415005877); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448674347171197 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1448674347171197); // Set group 4 bol bias 01 (VH) to 1.6222411326170851 volts) Pacs_BOLC_SET_VH_G4(1.6222411326170851); // Set group 4 bol bias 02 (VL) to -0.1777588673829149 volts) Pacs_BOLC_SET_VL_G4(-0.1777588673829149); // Set group 4 bol bias 03 (VRL) to 0.38757104906121864 volts) Pacs_BOLC_SET_VRL_G4(0.38757104906121864); // Set group 4 bol bias 20 (VH_BLIND) to 2.1438704571584184 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1438704571584184); // Set group 5 bol bias 01 (VH) to 1.3132230582218842 volts) Pacs_BOLC_SET_VH_G5(1.3132230582218842); // Set group 5 bol bias 02 (VL) to -0.08677694177811572 volts) Pacs_BOLC_SET_VL_G5(-0.08677694177811572); // Set group 5 bol bias 03 (VRL) to 0.41162872563838315 volts) Pacs_BOLC_SET_VRL_G5(0.41162872563838315); // Set group 5 bol bias 20 (VH_BLIND) to 2.1668935855540923 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.1668935855540923); // Set group 6 bol bias 01 (VH) to 1.3489112559674443 volts) Pacs_BOLC_SET_VH_G6(1.3489112559674443); // Set group 6 bol bias 02 (VL) to -0.051088744032555616 volts) Pacs_BOLC_SET_VL_G6(-0.051088744032555616); // Set group 6 bol bias 03 (VRL) to 0.4358587158841909 volts) Pacs_BOLC_SET_VRL_G6(0.4358587158841909); // Set group 6 bol bias 20 (VH_BLIND) to 2.194001745599564 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.194001745599564); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 volts (Vh-Vl)rouge = 2.0 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.226656568920859 volts) Pacs_BOLC_SET_VH_G1(2.226656568920859); // Set group 1 bol bias 02 (VL) to -0.3733434310791411 volts) Pacs_BOLC_SET_VL_G1(-0.3733434310791411); // Set group 1 bol bias 03 (VRL) to 0.4133343027185155 volts) Pacs_BOLC_SET_VRL_G1(0.4133343027185155); // Set group 1 bol bias 20 (VH_BLIND) to 2.175683693772244 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.175683693772244); // Set group 2 bol bias 01 (VH) to 2.1681636849688215 volts) Pacs_BOLC_SET_VH_G2(2.1681636849688215); // Set group 2 bol bias 02 (VL) to -0.4318363150311787 volts) Pacs_BOLC_SET_VL_G2(-0.4318363150311787); // Set group 2 bol bias 03 (VRL) to 0.38315696803457455 volts) Pacs_BOLC_SET_VRL_G2(0.38315696803457455); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401114465902173 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1401114465902173); // Set group 3 bol bias 01 (VH) to 2.197558086531253 volts) Pacs_BOLC_SET_VH_G3(2.197558086531253); // Set group 3 bol bias 02 (VL) to -0.40244191346874686 volts) Pacs_BOLC_SET_VL_G3(-0.40244191346874686); // Set group 3 bol bias 03 (VRL) to 0.4137747711517204 volts) Pacs_BOLC_SET_VRL_G3(0.4137747711517204); // Set group 3 bol bias 20 (VH_BLIND) to 2.170599264094001 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.170599264094001); // Set group 4 bol bias 01 (VH) to 2.218934787827611 volts) Pacs_BOLC_SET_VH_G4(2.218934787827611); // Set group 4 bol bias 02 (VL) to -0.3810652121723889 volts) Pacs_BOLC_SET_VL_G4(-0.3810652121723889); // Set group 4 bol bias 03 (VRL) to 0.40420416023587186 volts) Pacs_BOLC_SET_VRL_G4(0.40420416023587186); // Set group 4 bol bias 20 (VH_BLIND) to 2.162880058229452 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.162880058229452); // Set group 5 bol bias 01 (VH) to 1.7005744752585696 volts) Pacs_BOLC_SET_VH_G5(1.7005744752585696); // Set group 5 bol bias 02 (VL) to -0.2994255247414303 volts) Pacs_BOLC_SET_VL_G5(-0.2994255247414303); // Set group 5 bol bias 03 (VRL) to 0.405802801157604 volts) Pacs_BOLC_SET_VRL_G5(0.405802801157604); // Set group 5 bol bias 20 (VH_BLIND) to 2.159929832927414 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.159929832927414); // Set group 6 bol bias 01 (VH) to 1.7403520579256617 volts) Pacs_BOLC_SET_VH_G6(1.7403520579256617); // Set group 6 bol bias 02 (VL) to -0.2596479420743383 volts) Pacs_BOLC_SET_VL_G6(-0.2596479420743383); // Set group 6 bol bias 03 (VRL) to 0.42942985386424937 volts) Pacs_BOLC_SET_VRL_G6(0.42942985386424937); // Set group 6 bol bias 20 (VH_BLIND) to 2.1862821675938613 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.1862821675938613); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.2 volts (Vh-Vl)rouge = 2.5 volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.8538091680826225 volts) Pacs_BOLC_SET_VH_G1(2.8538091680826225); // Set group 1 bol bias 02 (VL) to -0.3461908319173778 volts) Pacs_BOLC_SET_VL_G1(-0.3461908319173778); // Set group 1 bol bias 03 (VRL) to 0.4347506380689999 volts) Pacs_BOLC_SET_VRL_G1(0.4347506380689999); // Set group 1 bol bias 20 (VH_BLIND) to 2.201031361549265 volts) Pacs_BOLC_SET_VH_BLIND_G1(2.201031361549265); // Set group 2 bol bias 01 (VH) to 2.7664705816035715 volts) Pacs_BOLC_SET_VH_G2(2.7664705816035715); // Set group 2 bol bias 02 (VL) to -0.4335294183964289 volts) Pacs_BOLC_SET_VL_G2(-0.4335294183964289); // Set group 2 bol bias 03 (VRL) to 0.4037860820487398 volts) Pacs_BOLC_SET_VRL_G2(0.4037860820487398); // Set group 2 bol bias 20 (VH_BLIND) to 2.1640513619646233 volts) Pacs_BOLC_SET_VH_BLIND_G2(2.1640513619646233); // Set group 3 bol bias 01 (VH) to 2.8125712702908565 volts) Pacs_BOLC_SET_VH_G3(2.8125712702908565); // Set group 3 bol bias 02 (VL) to -0.3874287297091438 volts) Pacs_BOLC_SET_VL_G3(-0.3874287297091438); // Set group 3 bol bias 03 (VRL) to 0.4341523904806535 volts) Pacs_BOLC_SET_VRL_G3(0.4341523904806535); // Set group 3 bol bias 20 (VH_BLIND) to 2.1931067403535325 volts) Pacs_BOLC_SET_VH_BLIND_G3(2.1931067403535325); // Set group 4 bol bias 01 (VH) to 2.819730301465179 volts) Pacs_BOLC_SET_VH_G4(2.819730301465179); // Set group 4 bol bias 02 (VL) to -0.38026969853482123 volts) Pacs_BOLC_SET_VL_G4(-0.38026969853482123); // Set group 4 bol bias 03 (VRL) to 0.41446697921904235 volts) Pacs_BOLC_SET_VRL_G4(0.41446697921904235); // Set group 4 bol bias 20 (VH_BLIND) to 2.1746146279633423 volts) Pacs_BOLC_SET_VH_BLIND_G4(2.1746146279633423); // Set group 5 bol bias 01 (VH) to 2.107788032540723 volts) Pacs_BOLC_SET_VH_G5(2.107788032540723); // Set group 5 bol bias 02 (VL) to -0.39221196745927667 volts) Pacs_BOLC_SET_VL_G5(-0.39221196745927667); // Set group 5 bol bias 03 (VRL) to 0.4291785586179493 volts) Pacs_BOLC_SET_VRL_G5(0.4291785586179493); // Set group 5 bol bias 20 (VH_BLIND) to 2.187889663679292 volts) Pacs_BOLC_SET_VH_BLIND_G5(2.187889663679292); // Set group 6 bol bias 01 (VH) to 2.1227708861546946 volts) Pacs_BOLC_SET_VH_G6(2.1227708861546946); // Set group 6 bol bias 02 (VL) to -0.37722911384530533 volts) Pacs_BOLC_SET_VL_G6(-0.37722911384530533); // Set group 6 bol bias 03 (VRL) to 0.42286639357818323 volts) Pacs_BOLC_SET_VRL_G6(0.42286639357818323); // Set group 6 bol bias 20 (VH_BLIND) to 2.17836030432271 volts) Pacs_BOLC_SET_VH_BLIND_G6(2.17836030432271); // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); OBCP_chopped_photometry(0,0,15,0,0,528,1,sideField,chop_pos_CS2,9,9,0); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("DISABLE"); // // // Sychronize // sync(); } block Pacs_CcuMonitorDefaultRecycle PACS 2101 { }{ PacsCcuMonitorPeriodDefault(); sync(); } // Missionphase : FMIST // // Purpose : Enable Grat // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_Enable { }{ Pacs_DMC_ENABLE_GRAT_CONT(); delay(1); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Short performance test of Chopper in IMT // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do rectangular chopping for four frequencies with OBCP27 and its // corresponding DMC-sequence 12. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 04-04-07 HD. IST tuned. // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Chopper_imt504 { /* Needed variables to call PacsEng_Spec_Chopper_imt504 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_imt504 */ }{ // 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(Pacs_Spec_Chopper_imt504())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Chopper_imt504(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: SPEC_MOV_CHOP_and_GRAT.txt,v 1.2 2007/04/25 15:14:04 dcesarsk Exp $ // Missionphase : EQM IMT // // Purpose : Move chopper and Grating // // TCL author : HF // TCL file : // CUS author : HF // Script file : SPEC_MOV_CHOP_andGRAT.txt // // Input arguments none // type name description // int chop_pos Chopper default position // int grat_pos Grating default position // // Return values // Type Name Default Description // // Description : Abolute moves // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // // History : 1.0 24-Mar-2005 creation by HF // 1.1 26-apr-2005 DAC Read grat_time from PACSParams table // int[] procedure SPEC_MOV_CHOP_and_GRAT { int chop_pos = 25000; // Chopper position int grat_pos = 500000; // Grating position }{ // Define variables to communicate various durations to HSPOT. // NOTE: time variables may be units of number of ramps (SPEC), // readouts (BOLO) or just [msec]. The calling program must // convert this count into actual duration in true time units [sec] // as/when applicable. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // Total duration (expressed in milliseconds) int duration_msec = 0; // Assume chopper moves very fast => no influence in total duration Pacs_DMC_MOVE_CHOP_ABS(chop_pos); // For grating read positioning time from PACSparams int move_time = iceil(dlookup("PACSparams","grat_time","freq_time")); // Same in [sec] int move_time_sec = Msec2sec(move_time); // debug_print("GRAT moves to " + grat_pos + " in " + move_time_sec + " [sec]"); Pacs_DMC_MOVE_GRAT_ABS(grat_pos); duration_msec = duration_msec + move_time; delay(move_time_sec); // Time spent (not used here) int duree_TCs = time() - time_start; // All time spent here is OVR time duree_num = duration_msec; duree_OVR = duration_msec; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsRangeSpec AOT // // CUS author : DAC // Script file : PacsRangeSpec.def // // Input arguments // type name description // // Return values // // Description : // // Dependencies : // // Preconditions : // // Comments : If the file is called PacsRangeSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsRangeSpec.def // - rename module to PacsRangeSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false // // History: // For history before 24-apr-2007 see v1.42 in CVS // 25-apr-2007 14.4 Suppressed history before today (kept in CVS though) // Use rangeSPOT throughtout (i.e. merged ranges & rangeEXT) // 9-may-2007 14.5 SPR-3186 Use userNODcycles as map repetion for OFF // 22-may-2007 14.6 SPR-3199 Return SRC time without overheads // 29-may-2007 14.7 SPR-3237 // 11-jun-2007 14.8 SPR-3277 Use referenceWave (rangeSPOT{9}) for SED mode // 20-sep-2007 14.9 SPR-3570 RA,DEC offsets may be negative // SCR-3552 Read skewCorrec from PACSyzoffsets; add to pattnod // 24-sep-2007 15.0 SPR-3581 S/N is not computed in SED mode // 28-mar-2008 16.0 remove mapRasterRefXXX replaced by raoff, // decoff and refSelected (refSelected is complement to // chopNod hence not used in our logics) // 29-mar-2008 17.0 Removed section computing ABS or REL offsets: now an HSPOT // functionality // 28-apr-2008 18.0 raoff and decoff had the wrong range: in dgrees now // {int,int,int,{string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[]} obs PacsCal_PacsRangeSpec { /* "rangeSPOT" is a tuple defined by HSPOT */ /* It contains */ /* {id, bluEdge, redEdge, repeatFactor, lineFlux, contFlux, lineWidth, */ /* fluxUnitSel, widthUnitSel, refWave} */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = []; /*------------- following only to use CUS interface -------------------------*/ string[] rangeId = ["Interesting range"]; double[] bluWave = [106.0]; // blue limit in [55.0,220.0] double[] redWave = [209.0]; // red limit in [55.0,220.0] int repeatLine = 1 in [0,10]; double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lineWidth = [400.0]; // line width in [0.0,1000.0] string[] widthUnit = ["kms"]; // width unit in ["kms","micron"] double[] lcontFlux = [111.11]; // continuum flux in [0.0,10000.0] double[] refWave = [180.0]; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order3" in ["order2","order3","sed2","sed3","sed4"]; bool chopNod = true; string density = "nyquist" in ["nyquist","high"]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 2 in [2,32]; int n = 1 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; // RA,DEC or SSO double pointStep = 2.0 in [0.0,480.0]; double lineStep = 2.0 in [0.0,480.0]; bool refSelected = false; // OFF position Needed double raoff = 0.0 in [0.0,360.0]; // units in degrees double decoff = 0.0 in [-90.0,90.0]; // units in degrees int obsOverhead = 180; // Slew overhead bool verbose = true; }{ //*--------- following only when using CUS interface -------------------*/ int rangeIdLength = length(rangeId); int rangeLength = length(rangeSPOT); if(rangeLength == 0) { for(int rloop00 = 0 .. rangeIdLength - 1) { rangeSPOT[rloop00] = {rangeId[rloop00],bluWave[rloop00],redWave[rloop00],repeatLine,lineFlux[rloop00],lcontFlux[rloop00],lineWidth[rloop00],"",widthUnit[rloop00],refWave[rloop00]}; } } //*--------- above only when using CUS interface -------------------*/ // Boolean variables "range" and "sedXXX" are mutually exclusive for HSPOT. For // time being I will use them independently of each other // Specifying bool sed = true is a special case of predefined ranges. // 30-oct-2006 // Variables "sed" or "range" have disappeared from front end. Define as bool range = true; bool sed = false; if(orderSel == "sed2" || orderSel == "sed3" || orderSel == "sed4") { range = false; sed = true; } // Yet to be defined symbol to access CAL-U file info for detector setup // May come from HSPOT front-end in the future // The future has come!!! string confTable = "normal"; // In SED or nyquist sample, we use the option "bright" if(sed || density == "nyquist") { confTable = "bright"; } // mapOff no longer an input variable but still used elsewhere bool mapOff = !chopNod; // to make sure that noone gets funny idea about refSelected refSelected = !chopNod; // New parameter for nodding_pointing bool startAtOFF = false; // Variable "grating" has disapeared from the front end. Since it's used by // several modules, I keep it with its new (default) definition string grating = "nyquist"; // OFF pointing only when in raster mode if(mapOff && source != "large") { error("NOD = false only allowed for large sources"); } // Start of "Pointing" section // // Set messages for HTML format message(""); message(""); // In "sed" mode, rangeSPOT is filled by module PacsRangeSpecSed if(!range) { // Define the RefWave as the mean value of bluWave and redWave // double meanRef = (rangeSPOT[0]{1} + rangeSPOT[0]{2})/2.0; // SPR-3277 Save waveRef first! // Catch case of rangeSPOT not being defined int theLength = length(rangeSPOT); if(theLength == 0) { error("ERROR! Need a reference wavelength for the SED observation (see UM)"); } // caught! Now extract wavelength double waveRef = rangeSPOT[0]{9}; // SPR-3581. Save information to compute S/N double contFlux = rangeSPOT[0]{5}; // Fill rangeSPOT with SED information rangeSPOT = PacsRangeSpecSed(orderSel); // Insure that user given reference is within order range if(waveRef < rangeSPOT[0]{1} || waveRef > rangeSPOT[0]{2}) { error("Reference wave must be comprised between " + rangeSPOT[0]{1} + " and " + rangeSPOT[0]{2} + " for " + orderSel); } // Reference within limits rangeSPOT[0]{9} = waveRef; // SPR-3581. Add information to compute S/N rangeSPOT[0]{5} = contFlux; } // Cannot call with empty "rangeSPOT" int nbRanges = length(rangeSPOT); int nbRanges1 = nbRanges - 1; if(nbRanges == 0) { error("STOP!! There are no spectral ranges defined!"); } // No more than 10 ranges or repetitions int nbRangesRep = 0; for(int loop00 = 0 .. nbRanges - 1) { // Default repetion factor is 1 int repFactor = rangeSPOT[loop00]{3}; if(repFactor == 0) { repFactor = 1; } nbRangesRep = nbRangesRep + repFactor; } if(verbose) { debug_print("Total ranges/repeat: " + nbRangesRep); } if(nbRangesRep > 10) { error("STOP!! The number of ranges/repetitions exceeds 10"); } // Decode "rangeSPOT" (only if verbose mode) if(verbose) { for(int iiii = 0 .. nbRanges1) { debug_print("RANGE or SED: " + orderSel); debug_print("Wave from/to : " + rangeSPOT[iiii]{1} + "/" + rangeSPOT[iiii]{2}); debug_print("RefWave : " + rangeSPOT[iiii]{9}); debug_print("repeat factor: " + rangeSPOT[iiii]{3}); } } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto and PacsLineSpec) // Pointing mode is still undefined int pointCase = 0; // FinePointingMode with setup time if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding"; pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (dithering and no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (dithering and nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(mapOff) { chopNod = false; pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 30; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. // Use special throw value in case of raster w/OFF as we chop between SRC and // CS1 if(mapOff) { throw = "offraster"; } // Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Check that rangeSPOT is commensurate with U-CAL SPEC_BAND_params; get // grating positions on the fly // NOTE: rangeInfo is defined as // {typeOBS,order,blu_grat,red_grat,gratStep,bluWave,redWave} {string,int,int,int,int,double,double}[] rangeInfo = PacsRangeSpecCheckFillRange(rangeSPOT,density,grating,orderSel,verbose); if(verbose) { for(int loopA = 0 .. nbRanges1) { debug_print("++RangeInfo: " + rangeInfo[loopA]); } } // Reject invalid ranges; abort CUS if invalid ranges are present for(int loop000 = 0 .. nbRanges1) { if(rangeInfo[loop00]{1} == 0) { error("Demanded range " + rangeInfo[loop000]{5} + "-" + rangeInfo[loop000]{6} + " [microns] is out of allowed boundaries"); } } // rangeInfo contains all the relevant information. We can sort here, either // by wavelength or by start grating position. Create arrays to be sorted // Define array of wavelengths and start grating positions; create "order" array // in case we want to enforce the no order mixing rule double[] rangeWave = [0.0]; double[] rangeGrat = [0.0]; int[] orders = [0]; // order array as float for sort algorithm double[] dorder = [0.0]; // Populate the arrays for(int loop0 = 0 .. nbRanges1) { rangeWave[loop0] = rangeInfo[loop0]{5}; // SORT algorithm requires float input! rangeGrat[loop0] = double(rangeInfo[loop0]{2}); orders[loop0] = rangeInfo[loop0]{1}; dorder[loop0] = double(rangeInfo[loop0]{1}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbRanges1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("2"); double[] band3 = SPEC_BAND_read("3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 // This case is history: // HSPOT proposes order 1&2 or 1&3, reported as 2 or 3; filter=1 is no // longer possible int filter = 1; // Determine filter based on HSPUT input if(orderSel == "order2" || orderSel == "sed2" || orderSel == "sed4") { filter = 2; } if(orderSel == "order3" || orderSel == "sed3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders + "; FILTER: " + filter); debug_print("The whole OBS will be performed with filter " + filter); } // Sort by order // int [] sortIndex = SortProc(verbose,dorder); // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,rangeGrat); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,rangeWave); // Recast "rangeSPOT" and rangeInfo according to the ordered grating // positions {string,double,double,int,double,double,double,string,string,double}[] sortRanges = clone(rangeSPOT); {string,int,int,int,int,double,double}[] sortRangeInfo = clone(rangeInfo); for(int reSORT = 0 .. nbRanges1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbRanges1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortRanges[reSORT] = rangeSPOT[sortedIndex]; sortRangeInfo[reSORT] = rangeInfo[sortedIndex]; } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 // chop_pos_CS1 chop_pos_CS2 chop_def // detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC{0 -> 8} contains: // capa nb_rdouts_ramp nb_rdouts_subramp comp_mode // glitch_det ramp_fit_alg nb_raw bias_r bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values // NEW. Saturation and capacitor/samples choice // Most SPEC configuration values are obtained from CONF_SPEC_params (read // in PacsSpecDefaults). Have to analyze given fluxes for each reference // wavelength. It may happen that a saturation situation will be found // Review the reference wavelengths, obtain telescope background, and PSF // fraction for(int rangeLOOP0 = 1 .. nbRanges) { int range1 = rangeLOOP0 - 1; waveRef = sortRanges[range1]{9}; contFlux = sortRanges[range1]{5}; // Obtain background and PSF fraction from CALU double telBckg = interpolate("SPEC_BCKG_FRAC","BackG",waveRef); double psfFrac = interpolate("SPEC_BCKG_FRAC","FracPnt",waveRef); debug_print("SATUR. Wave " + waveRef); debug_print("SATUR. Flux " + contFlux); debug_print("SATUR. Backg " + telBckg); debug_print("SATUR. PSF " + psfFrac); debug_print("SATUR. Order " + sortRangeInfo[range1]{1}); } paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module to estimate PACS parameters as a function of the // exposure time given by the user. This is the pilar of the // whole AOT logic. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; double waveMAXnods = 0.0; // Accumulated total OBS time int totalOBS = 0; for(int rangeLOOP = 1 .. nbRanges) { range1 = rangeLOOP - 1; paramsSPECext = PacsRangeSpecEstimatorOBCP27(sortRanges[range1],sortRangeInfo[range1],paramsSPEC,chopNod,verbose); // Copy estimates to respective tuples confSPECblu[rangeLOOP] = paramsSPECext{0}; confSPECred[rangeLOOP] = paramsSPECext{1}; confOBCP[rangeLOOP] = paramsSPECext{2}; // nb_nods below is the quantity used by Estimator to compute its duration int nb_nods = paramsSPECext{3}{0}; // if(verbose) { debug_print("confOBCP[" + rangeLOOP + "]: " + confOBCP[rangeLOOP]); } // Accumulated time totalOBS = totalOBS + paramsSPECext{3}{2}; } if(verbose) { debug_print("Minimum required time: " + totalOBS + " [sec] for " + nb_nods + " nod cycles"); } if(chopNod) { nbNods = userNODcycles; if(verbose) { debug_print("The PointReq will contain " + nbNods + " nod cycles"); } } else { nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

Estimated total OBStime (SRC+REF) for requested ranges: " + totalOBS + "[sec]

"; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Since no NOD was specified the total OBS time is equal" + " to the estimated SRC+REF time. OBS times can be changed" + " by specifying the line(s) repeat factor

"; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

Red channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Blue channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); if(verbose) { debug_print("Duration WriteOBSID: " + timeSetOBSID); } // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double [] keyWAVE = PacsRangeSpecKeyWaves(sortRangeInfo); int nbKeyWAVE = 1; // int nbKeyWAVE = length(keyWAVE); if(verbose) { debug_print("keyWAVES " + keyWAVE); } // With latest versions of CommandOBCP27 the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOTprologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration may be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per nod; nb_nods: " + nb_nods); } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); if(verbose) { debug_print("Duration WriteEndID: " + timeEndID); } // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbRanges per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one needs some time during // slew to perform leading CAL. // Make sure that the Preq is possible (possible reason for failure: too short // dwell time - currently 10 sec int minTdwell = 10; if(timeOBS < minTdwell) { error("Estimated dwell time is too short. Perhaps your range span is too small"); } // // The chopper throws have been read already (PacsSpecDefaults) and angles // have been converted into ENG units (OBCPconf). Here,angles are needed in // [arcsec]; easiest is to read again the relevant CAL-U table. // Read chopper position SRC and REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("MAIN:CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; int thold = 0; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode with nodding, section 3.4 ib = "P02_0"; // Nodding angle is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chop pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode without nodding, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int ncover = 1; // New arguments for pointing request; will be dealt with next iteration int top = 0; raoff = 0.0; decoff = 0.0; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,ncover,thold,nhold,k,top,raoff,decoff); } if(pointCase == 30) { // RasterMode with no nodding and OFF, section 3.5 ib = "P02_0"; // SPR-3237: fix is true, patt is inherited from HSPOT fixed = true; patt = mapRasterAngle; // Raster steps d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; // OFF periodicity (here at beginning and at end of raster) k = m * n; // The number of repetions is given in this case by the NOD count SPR-3186 int nrepeat = userNODcycles; if(nrepeat == 0) { nrepeat = 1; } // Same Tobs during OFF that during "SRC" top = tp; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // RasterMode with nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("=====> Return from " + pointMode + ": " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); } if(verbose) { int tNOW = time(); debug_print("=== Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOFF = nbOFF + 1; // Logic to sum up obsTime if(nbOFF == 1) { int[][] sumUpOffTime = obsTime; } if(nbOFF > 1) { sumUpOffTime = SumFunction(obsTime,sumUpOffTime); } if(verbose) { tNOW = time(); debug_print(" SumUpOffTime: " + sumUpOffTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD started at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL ranges). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // and per wavelength array(s): // [waveSTART,waveEND,order,gratStep,nbGratSteps,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Fill infoArray with data from OBCP27 // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int nbRampPlateau = confOBCP[1]{4} + 1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime (incl. WAIT=1): " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbRanges1) { // Create element [loop3] infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy from/to wavelengths infoArray[1]{1}[loop3]{0} = sortRanges[loop3]{1}; infoArray[1]{1}[loop3]{1} = sortRanges[loop3]{2}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortRangeInfo[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortRangeInfo[loop3]{4}; // copy the number of grating step infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from obsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Add more data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of ranges observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbRanges; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal - 1 - timeSetOBSID; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); } // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Populate the 3rd dimension of infoArray: global timing and AOT information // timeObsEnd is the total duration of the AOT infoArray[2] = {{"RangeSpec",0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Case of SmallSrc with dithering if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // Case of raster/w OFF, repeated map if(source == "large" && mapOff) { infoArray[1]{0}{0} = "RasterOFF"; infoArray[2]{0}{5} = nrepeat; } // Process the information contained in infoArray // NOTE: since implementing waveRef and fluxes, have to pass also // sortRanges and sortRangesExt data to ProcessInfoArray // aotID is no longer needed as only used for Range // but orderSel is needed by PacsSpecRMS // SPR-2927 Return bigTuple with information for plotting // Add nbOBS and nbOFF to ProcessInfoArray {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsProcessInfoArrayRange(infoArray,sortRanges,confOBCP,orderSel,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); //////// Silly code to convert bigTuple into smallTuple //////////////////// // bigTuple is too big for HSPOT. I have to remove the 1st double[] to // please HSPOT. Create smallTupleN {string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[] smallTuple = [{"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}]; // Old returned tuples {int,int,{{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[]} returnTuple = {fromPntReq[0],fromPntReq[1],bigTuple}; // Copy returnTuple onto smallTuple nbRanges = length(bigTuple); // The accumulated SRC+REF time int accumSrceRef = 0; for(int loopR = 0 .. nbRanges - 1) { // Use the nbRanges loop to add up SrceRef times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopR]{6} + infoArray[1]{1}[loopR]{7}; // Define smallTuple smallTuple[loopR] = {"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}; // Extract vectors; retrun CONT noise in mJy // First tuple is always the nominal range. Label it as RangeID + "Nominal" string id = sortRanges[loopR]{0} + "-nominal"; smallTuple[loopR]{0} = id; double[] wave = returnTuple{2}[loopR]{0}{2}; double[] cont = returnTuple{2}[loopR]{0}{3}; double[] line = returnTuple{2}[loopR]{0}{4}; int nbElem = length(wave); for(int loopT1 = 0 .. nbElem - 1) { smallTuple[loopR]{1}[loopT1] = wave[loopT1]; smallTuple[loopR]{2}[loopT1] = 1000.0 * cont[loopT1]; smallTuple[loopR]{3}[loopT1] = line[loopT1]; } wave = returnTuple{2}[loopR]{1}{2}; cont = returnTuple{2}[loopR]{1}{3}; line = returnTuple{2}[loopR]{1}{4}; nbElem = length(wave); // If there is no "free" data id = "undefined"; // Else label second tuple as RangeID + "-free1" if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free1"; } smallTuple[loopR]{4} = id; for(int loopT2 = 0 .. nbElem - 1) { smallTuple[loopR]{5}[loopT2] = wave[loopT2]; smallTuple[loopR]{6}[loopT2] = 1000.0 * cont[loopT2]; smallTuple[loopR]{7}[loopT2] = line[loopT2]; } wave = returnTuple{2}[loopR]{2}{2}; cont = returnTuple{2}[loopR]{2}{3}; line = returnTuple{2}[loopR]{2}{4}; nbElem = length(wave); // If existing, label third tuple as RangeID + "-free2" id = "undefined"; if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free2"; } smallTuple[loopR]{8} = id; for(int loopT3 = 0 .. nbElem - 1) { smallTuple[loopR]{9}[loopT3] = wave[loopT3]; smallTuple[loopR]{10}[loopT3] = 1000.0 * cont[loopT3]; smallTuple[loopR]{11}[loopT3] = line[loopT3]; } // End loop on nbRanges } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; return {accumSrceRef,fromPntReq[1],overPACSandSC,smallTuple}; } // Missionphase : FM ILT // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT Tests. // // Version : 2.0 // // History : 0.1 21-07-06 creation by HD based // on FM IMT script "SPEC_CS_fmilt071112_bb" // cool-down different then to IMT // 0.2 24-07-06 HD. correct Missionphase. // 0.3 24-07-06 HD. delay time adopted for testing. // 0.4 24-07-06 HD. script works. // 0.5 24-07-06 HD. version number updated. // 0.6 24-07-06 HD. history formatted. // 0.7 24-07-06 HD. history formatted. // 0.8 24-07-06 HD. description formatted. // 1.0 23-08-06 HD. SwOn/Enabling of CSs added. // 2.0 23-08-06 HD. script works. // 3.0 07-11-06 HD. Updated on requests by UK. block SPEC_CS_fmilt071112_swon_cs_bb PACS 365 { }{ // Register start of BB WriteBBID($BBID); //Switchon and enabling CSs Pacs_DMC_SWON_BB_1_CONT(); Pacs_DMC_ENABLE_BB_1_CONT(); Pacs_DMC_SWON_BB_2_CONT(); Pacs_DMC_ENABLE_BB_2_CONT(); //-------------------------------------------- // Setup and start diagnostic HK for calibration sources //-------------------------------------------- int cs_diag_hk_length = 16; {int}[] parlist = [{214},{445},{446},{447},{448},{459},{460},{526},{527},{528},{529},{542},{543},{544},{545},{0xffff}]; int[] aux = [214,445,446,447,448,459,460,526,527,528,529,542,543,544,545,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(cs_diag_hk_length,parlist,check_sum); int diag_hk_period = 300; // Diagnostic HK period (in milliseconds) Pacs_DMC_START_DIAG_HK(diag_hk_period); //------------------------------------------------------------------------------ // Heat the calibration sources up to 80 (70.5K;CS1) and 92 // (76.0K;CS2) Ohm --- big step //------------------------------------------------------------------------------ // start temperature CS1 in Ohm double cs1_temp = 80.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // start temperature CS2 in Ohm double cs2_temp = 92.0; // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 50 minutes of heating-up and stay on the desired temperatures do another heat-up delay(3600); // Assume that CSs are on since long and already stabilized, monitor them for 5 minutes only delay(1200); //-------------------------------------------------------------------------------- // Heat the calibration sources up to 85 (72.8K;CS1) and 97 (78.4K;CS2) Ohm --- small step //-------------------------------------------------------------------------------- cs1_temp = 85.0; cs2_temp = 97.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 30 minutes of heating-up and stay on the desired temperatures do cooling-down delay(1800); //------------------------------------------ // Cool both calibration sources down to 39 (50.5K) //------------------------------------------ cs1_temp = 39.0; cs2_temp = 39.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); // Cool down for about 60 minutes delay(60); Pacs_DMC_STOP_DIAG_HK(); // Mark End of Block WriteEndBB(); } // SpireBbScanLine // // $Id: SpireBbScanLine.txt,v 1.2 2006/10/10 10:20:51 kking Exp $ // // Building Block to execute a scan line operation as part of a scan map: // take detector data for a fixed period of time // // Note: this BB assumes that the detector bias and sampling frequency and // the BSM sampling frequency have been set appropriately // // This BB assumes that 2 seconds have been included in the scan time to allow // setting of the BB and STEP at the start of the scan. // It also assumes that 2 seconds have been included at the end of the scan to // reset the STEP parameter // (see SpirePOF5Observing) // double block SpireBbScanLine SPIRE 8451 { int len = 0; // total length of scan int step = 0; }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB ScanLine started"); SpireMsg(2," $Id: SpireBbScanLine.txt,v 1.2 2006/10/10 10:20:51 kking Exp $"); // // check input values int tStart = 2; int tEnd = 2; int osit = len - tStart - tEnd; if(osit < 0) { error("time for scan is less than minimum time required to setup scan"); } // // ..... configuration ..... // // set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP hstr = SpireHexStr(step,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(" + hstr + ")"); Spire_SET_OBS_STEP_RAW(step); // // ..... execution ..... // // wait to end of line wait_until(t + tStart + osit); // // ..... completion ..... // // set STEP hstr = SpireHexStr(0,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(" + hstr + ")"); Spire_SET_OBS_STEP_RAW(0); // wait_until(t + tStart + osit + tEnd); tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB ScanLine ended"); SpireMsg(1," ..Scanning (" + (time() - t) + " seconds)"); // return double(osit); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_Diaghk_Setup { /* No variables to call PacsEng_Spec_Gra_Diaghk_Setup */ int diag_hk_period = 5; // 5 msec diag hk period /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Diaghk_Setup */ }{ // 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(PACS_Spec_Gra_Diaghk_Setup(diag_hk_period))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_Diaghk_Setup(diag_hk_period); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: SpireBbParallelCoolerRecycle.txt,v 1.2 2008/02/06 15:08:02 dcesarsk Exp $ // // History 6-feb-2008 DAC File renamed to SpireBbParalelCoolerRecycle.txt // Did not change BB name to keep current BBID // // This building block executes the cooler recycle procedure // // The instrument should be in the REDY mode before execution of this observation // int block SpirePacsBbCoolerRecycle SPIRE 2569 { }{ int t0 = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Cooler Recycle started"); SpireMsg(2," $Id: SpireBbParallelCoolerRecycle.txt,v 1.2 2008/02/06 15:08:02 dcesarsk Exp $"); // int cmd = 0x0; // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // // Select the current instrument in operation (prime/redundant) string side = "prime"; // // Command List info // int tableid = 0x53; // Table Identifier for CREC VM int startindex = 0; // Start Index in CREC VM Table int nparams = 0x15; // Number of parameters to VM // // Retrieve the VM input parameters int a = ilookup("CoolerRecycling.txt","a",side); // Heat Switch ON current (during Recycling) int b = ilookup("CoolerRecycling.txt","b",side); // Heat Switch OFF current int c = ilookup("CoolerRecycling.txt","c",side); // Pump Heat Switch Actuation Temperature int d = ilookup("CoolerRecycling.txt","d",side); // Pump Heater Dissipation 1 int e = ilookup("CoolerRecycling.txt","e",side); // Pump Condensation Temperature 1 int f = ilookup("CoolerRecycling.txt","f",side); // Pump Heater Dissipation 2 int g = ilookup("CoolerRecycling.txt","g",side); // Pump Condensation Temperature 2 int h = ilookup("CoolerRecycling.txt","h",side); // Pump Heater Dissipation 3 int i = ilookup("CoolerRecycling.txt","i",side); // Pump Heater Dissipation 4 int j = ilookup("CoolerRecycling.txt","j",side); // Pump Condensation Temperature Threshold int k = ilookup("CoolerRecycling.txt","k",side); // Evaporator Condensation Temperature int l = ilookup("CoolerRecycling.txt","l",side); // Evaporator Heat Switch Actuation Temperature int m = ilookup("CoolerRecycling.txt","m",side); // Pump Threshold Temperature int n = ilookup("CoolerRecycling.txt","n",side); // Heat Switch ON current int o = ilookup("CoolerRecycling.txt","o",side); // Sampling Interval (sec) int p = ilookup("CoolerRecycling.txt","p",side); // Heatswitch Timeout (min) int q = ilookup("CoolerRecycling.txt","q",side); // Pump Heating Timeout 1 (min) int r = ilookup("CoolerRecycling.txt","r",side); // Pump Heating Timeout 2 (min) int s = ilookup("CoolerRecycling.txt","s",side); // Evaporator Timeout (min) int t = ilookup("CoolerRecycling.txt","t",side); // Pump Cooling Timeout (min) int u = ilookup("CoolerRecycling.txt","u",side); // Global Timeout (min) // // Set Mode to CREC mois_comment("Set the SPIRE mode to CREC for Cooler Recycle"); SpireSetObsMode("CREC"); // // start executing recycle VM mois_comment("Execute the SPIRE command to perform Automatic Cooler Recycle"); mois_spacon("This command will take about " + (u + 1) + " minutes to execute"); {int}[] crecparams = [{a},{b},{c},{d},{e},{f},{g},{h},{i},{j},{k},{l},{m},{n},{o},{p},{q},{r},{s},{t},{u}]; tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RUN_VM_RAW(" + tableid + "," + startindex + "," + nparams + "," + crecparams + ")"); Spire_RUN_VM_RAW(tableid,startindex,nparams,crecparams); // DAC // Do not wait here; return needed duration, caller will wait as necessary // Wait for completion // Insert a delay equal to the CREC VM global time out plus a minute int howLong = u * 60 + 58; // // Next instructions will be issued by caller // Set MODE to REDY mois_comment("Set the SPIRE mode to REDY"); /// SpireSetObsMode("REDY"); // // completion /// tstr = SpireTimeStr(time()); /// SpireMsg(2," " + tstr + ": BB Cooler Recycle ended"); /// SpireMsg(1," ..Cooler Recycle (" + (time() - t0) + " seconds)"); return howLong; } // $Id$ // Missionphase : PACS PV Phase // // File : PACS_SwOff_chopper_ast_OBS.cus// // // Purpose : Switch on chopper // // Author : HD // CUSification : HD // Arguments : // // Description : Switch off chopper // // Comments : // // Version : 2.0 // History : 0.1 05-jul-2007 Initial version // History : 0.2 12-nov-2007 edited for SVT/PV conformance (MN) // 2.0 04-mar-2008 translated into PV script VDP // obs PacsEng_SwOff_chopper_ast { /* Needed variables to call PacsEng_SwOff_chopper_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_SwOff_chopper_ast */ }{ string on_off = "OFF"; // 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(PACS_Chopper_SWON_SWOF_only(on_off))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_SWON_SWOF_only(on_off); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsEng_Phot_SPU_Setup.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_SPU_Setup_u { /* No variables to call PacsEng_Phot_SPU_Setup_u */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_SPU_Setup_u */ }{ // 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(PACS_Phot_SPU_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_SPU_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsLineSpecEstimatorOBCP27.txt,v 1.16 2007/04/25 15:14:04 dcesarsk Exp $ // Script file : PacsLineSpecEstimatorOBCP27.txt // Purpose : Estimate several PACS parameters for each spectral // line specified by the HSPOT user // // CUS author : DAC // // Input arguments // type name Description // tuple lines spectral line info from HSPOT // tuple waveTuple grating info associated to "lines" // tuple paramsSPECdef confSPECblu & confSPECred & confOBCP // bool noddingSel nodding demanded? // // Return values // Type Description // tuple Derived values for paramsSPECdef // // Description : Fill the PACS state descriptors confSPECx & confOBCP, per // HSPOT defined wavelength, with values obtained from several CAL-U files. // This procedure is called once per spectral line. For each line - identified // here by its order since this is the index into the durations CAL-U file - // the user gives a desired observing time. The OBCP27params table lists the // minimum duration per order, without nodding. If nodding is requested, the // tabulated duration is increased by a factor two; this new duration becomes // the "observing quantum". Any longer time is accomodated by increasing the // number of nods. If no nodding is desired, a longer OBS time is accomodated // by increasing the number of up/down cycles // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-may-2005 DAC // 1.0 22-May-2005 DAC Input argument is just lines; tuples // confXXX are now initialized by calling program // 1.1 22-may-2005 Had to pass "index" to get waveLENGTH // 1.2 25-may-2005 Back to original architecture using "clone" // 1.3 31-May-2005 All elements of confSPEC are now "int" // 1.4 2-Jun-2005 Added TotalTime as input key to OBCPparams look-up table // 1.5 7-Jun-2005 confOBCP is all {int} now // 1.6 9-Jun-2005 CAL file OBCPparams renamed to OBCP27params // 2.0 16-jun-2005 Major change: scale OBS time according to number of grating // steps (durations are computed for grat_steps = 35) // 2.1 17-jun-2005 Allow integration time to be expressed // per wavelength (passed in "lines") // 2.2 26-aug-2005 Added waveTuple as input argument, suppress // totalTime since now in "sortLines" // 3.0 29-aug-2005 Renamed to PacsLineEstimatorOBCP27 since now we use OBCP#27 // Added noddingSel to input arguments, call lines as scalar // (index nolonger needed) // 3.1 2-sep-2005 Added verbose // 3.2 14-sep-2005 Changed definition of "lines" (bool is the last item) // 3.3 6-oct-2005 Duration is now computed by PacsDuree // 3.4 11-oct-2005 Set "lines" as defined in HSPOT // 3.5 13-oct-2005 Correct treatment of nb_nods // 3.6 14-oct-2005 Bettering format of messages // 3.7 11-apr-2006 Define comp_mode_xxx here (since != for SPEC and PHOT) // 4.0 25-apr-2006 Major overhaul after Leuven // 4.1 22-jun-2006 Variable "lines" contains width // 4.2 8-sep-2006 Variable lines contains unit names // 4.3 17-jan-2007 "Improved" messages // 4.4 14-feb-2007 Use SRC/REF time only to compute quantumOBS // 4.5 14-mar-2007 SCR-2942: bright lines {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsLineSpecEstimatorOBCP27 { {string,double,int,double,double,double,string,string} lines = {"NONE",60.2,0,0.0,0.0,0.0,"bla","bla"}; // linesTuple HSPOT {double,int,int,int,int} waveTuple = {0.0,0,0,0,0}; // waveTuple {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; // Default values bool noddingSel = false; // Nodding requested? bool faintLines = true; // Fast OBCP if false bool verbose = false; // print debug information }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confSPECblu = clone(paramsSPECdef{0}); {int,int,int,int,int,int,int,int,int} confSPECred = clone(paramsSPECdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsSPECdef{2}); //////////////// Logic to obtain desired OBS time /////////////////////////// // // ORDER of the current line int order = waveTuple{1}; double waveLEN = waveTuple{0}; // User desired repetition factor for current line int userREPfactor = lines{2}; // Get the "quantum" OBS time for the current order. U-CAL time doubles if // nodding is allowed int nodFactor = 1; if(noddingSel) { nodFactor = 2; int nb_nods = 1; } else { nb_nods = 0; } // Grating info pertaining to the current wavelength is in waveTuple int nb_grat_step_up = waveTuple{3}; int nb_grat_step_dn = waveTuple{3}; int grat_step_up = waveTuple{4}; int grat_step_dn = -grat_step_up; int grat_start_pos = waveTuple{2}; // Get "duration related" parameters from OBCP27params U-CAL table string calNAME = "OBCP27params"; // The acces key is the grating order string key = "" + order; // There is a row per order; it lists main OBCP parameters //Now user input int nb_up_down = ilookup(calNAME,key,"nb_up_down"); int nb_up_down = userREPfactor; int nb_SRC_OFF = ilookup(calNAME,key,"nb_SRC_OFF"); int nb_ramps_plateau = ilookup(calNAME,key,"nb_ramps_plateau"); int nb_CS1_CS2 = ilookup(calNAME,key,"nb_CS1_CS2"); // Estimate the OBS time for this rangeInfo; estimation is for ONE nod only. int nb_rdouts_ramp = confSPECred{1}; int[] dureeOBCP27 = PacsDureeOBCP27(nb_up_down,nb_grat_step_up,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_OFF,nb_rdouts_ramp); // Use SRC/REF time alone (used to be total duration) int quantumOBStime = nodFactor * (dureeOBCP27[1] + dureeOBCP27[2]); // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

Estimated SRC+REF time: " + quantumOBStime + " [sec] for " + waveLEN + " [µm] with line repeated " + userREPfactor + " time(s)

"; lineCnt = lineCnt + 1; // This is complete fantasy; just to check the code //============== React on LINE/CONT fluxes ======================== // Line and continuum flux from HSPOT double lineFLUX = lines{3}; double contFLUX = lines{4}; // Low flux use large integrating capacitor int capa_red = 0; int capa_blu = 0; if(lineFLUX <= 400.0) { capa_red = 4; capa_blu = 8; } if(lineFLUX <= 100.0) { capa_red = 12; capa_blu = 4; } // Pack information into proper tuples confOBCP{0} = nb_up_down; confOBCP{1} = grat_step_up; confOBCP{2} = grat_step_dn; confOBCP{3} = nb_SRC_OFF; confOBCP{4} = nb_ramps_plateau; confOBCP{5} = nb_CS1_CS2; confOBCP{6} = nb_grat_step_up; confOBCP{7} = nb_grat_step_dn; confOBCP{8} = grat_start_pos; // confOBCP { 9} = grat_start_time ; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {15} = chop_pos_CS1 ; // confOBCP {16} = chop_pos_CS2 ; // confOBCP {17} = chop_def ; confOBCP{19} = order; confSPECred{0} = capa_red; // confSPECred{ 1} = nb_rdouts_ramp_red; // confSPECred{ 2} = nb_rdouts_subramp_red; int comp_mode_red = 16; confSPECred{3} = comp_mode_red; // confSPECred{ 4} = glitch_det_red; // confSPECred{ 5} = ramp_fit_alg_red; // confSPECred{ 6 = nb_raw_red; // confSPECred{ 7} = bias_r_red; // confSPECred{ 8} = bias_d_red; confSPECblu{0} = capa_blu; // confSPECblu{ 1} = nb_rdouts_ramp_blu; // confSPECblu{ 2} = nb_rdouts_subramp_blu; int comp_mode_blu = 16; confSPECblu{3} = comp_mode_blu; // confSPECblu{ 4} = glitch_det_blu; // confSPECblu{ 5} = ramp_fit_alg_blu; // confSPECblu{ 6 = nb_raw_blu; // confSPECblu{ 7} = bias_r_blu; // confSPECblu{ 8} = bias_d_blu; // Pass messages to user string msgLabel = "Observing time for " + lines{0}; PacsMessageCenter(msgLabel,lineCnt,msgLine); // Debug info if(verbose) { debug_print("LineEstimatorOBCP27 duration: " + quantumOBStime); } int aux3 = 0; return {confSPECblu,confSPECred,confOBCP,{nb_nods,nb_up_down,quantumOBStime,aux3}}; } // Missionphase : FMIST // // Purpose : Home Grat // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_Home { }{ // ---------------- // HOME THE GRATING // ---------------- // Search for the origin and initialize the position encoder correctly // PARAM: 0 = move towards negative positions; // 1 = move towards positive positions; // Duration: max 70 sec (if the Grating param 'rate' is 3), // depending on the initial position of the grating. // Failure code: 0xAA: Grating controller is not enabled // int grat_home_mode = 0; string[] homeMode = ["NEGATIVE","POSITIVE"]; Pacs_DMC_HOME_GRAT(homeMode[grat_home_mode]); delay(70); // } // SpireBbPhotSerendipity // // $Id: SpireBbPhotSerendipity.txt,v 1.3 2007/04/20 12:26:09 kking Exp $ // // Building Block to take serendipity data for a specified period of time // // If the time specified is less than the minimum then this BB takes the minimum time anyway // // Note: this BB assumes that the detector bias and sampling frequency and // the BSM sampling frequency have been set appropriately // // 20/04/07: v1.3: removed check on opsMode value // block SpireBbPhotSerendipity SPIRE 8452 { string opsMode = ""; int len = 0 in [0,10000]; // scan length in seconds - maximum determined by max time between Tsync }{ message("2 " + time() + ": BB Phot Serendipity started"); message("2 $Id: SpireBbPhotSerendipity.txt,v 1.3 2007/04/20 12:26:09 kking Exp $"); message("3 length = " + len); int t = time(); // // find actual length of BB int tSerendipity = ilookup("SpireParms.txt",opsMode,"TSerendipity"); // minimum time for Serendipity observation if(len < tSerendipity) { len = tSerendipity; } // // ..... configuration ..... // // set BBID message("5 " + time() + "Cmd: Spire_SET_BBID_RAW(" + $BBID + ")"); Spire_SET_BBID_RAW($BBID); // set value delay(2); // allow HSK to reflect new value // // ..... initialisation ..... // // // ..... execution ..... // // start sampling detectors SpireStartDcuData("PF"); // // wait to end of time int tStop = duration(SpireStopDcuData()); wait_until(t + len - tStop - 2); // // stop detector sampling SpireStopDcuData(); // // ..... completion ..... // // wait_until(t + len); message("2 " + time() + ": BB Phot Serendipity ended"); message("0 Serendipity Mode (" + (time() - t) + " seconds)"); // } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Condition SPU for SPECtroscopy observations // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : none // // Description : Simply calling procedure "SPEC_spu_setup". See there for details. // // Dependencies : Only low level PACS TCs // // Comments : // // Version : 2.0 // // History : 1.0 30-Mar-2004 Creation by PR // 1.1 25-oct-2005 DAC Use fit_alg = 0 // 1.2 18-apr-2006 DAC Back to default fit_alg = 1 // Renamed to SPEC_xxxxx_OBS // 1.3 28-aug-2006 TM: clean way of calling SPEC_spu_setup, new default parameter // 1.4 20-nov-2006 Modified defaults for nb_ramp_subramp and ramp_fit_alg // 2.0 04-mar-2008 translated into PV script VDp // obs PacsEng_Spec_spu_setup { /* Needed variables to call PacsEng_Spec_spu_setup */ int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_spu_setup */ }{ // 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(SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : ILT at Garching // // Purpose : // Reduced NEP measurements for the new sequencer test // // Author : Koryo Okumura // // CUS script : procedure PHOT_redArray_DDCS_IST // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // // Description : // + First, all 24 biases are set group by group // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set PACS chopper on CS1 to measure the noise // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_oldSeq_IST(0) // // Version : Thu Oct 04 20:12:46 CEST 2007 // procedure PHOT_redArray_DDCS_IST { int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values }{ int operand = 0; int posCS1 = -21500; int posCS2 = 21500; //********************************* // Apply the old sequencer setting //********************************* // PACS_Phot_Sequencer_Setup(); // //******************************* // Select Filter A (110 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //************************** // Sequence mode : Sb_Sref //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sb_Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb_Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper at the central position //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(0); // //********************************************************************** // Response Measurement // Expected fluxes : 1.7 and 2.0pW on the blue // and 5.3 and 6.2pW on the red //********************************************************************** // TMMarker600(); //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); // // //************************************************************************ // Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //***************************** // Set the PACS chopper on CS1 //***************************** // Pacs_DMC_MOVE_CHOP_ABS(posCS1); // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Short performance test Dark Current // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do dark current measurements in buffer transmission mode on // both CS positions. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and internal CSs switched off. // CDMS has to be switched to burst mode. After the end of the // test go back to nominal mode. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 04-04-07 HD. IST update. // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_dark_current_imt502 { /* Needed variables to call PacsEng_Spec_dark_current_imt502 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_dark_current_imt502 */ }{ // 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(Pacs_Spec_dark_current_imt502())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_dark_current_imt502(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Gra_Diaghk_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Switch on diagnostic hk relevant to the driving SIN & COS signals of the grating // // Author : P. Royer // CUSification : DAC // Arguments : // // Description : Grating diagnostic housekeeping ON // : // Comments : // // // Version : 1.0 // History : 1.0 / 18-Apr-2006 initial version by PR // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Switch on diagnostic housekeeping relevant to grating (driving SIN & COS) // @comment - block PACS_Spec_Gra_Diaghk_SINCOS_Setup PACS 155 { int diag_hk_period = 5; // 5 msec diag hk period }{ // Register start of BB WriteBBID($BBID); // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_GR_IND_SINE 539 // DMC_GR_IND_COS 540 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_GRAT_CTRL_ST 208 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_GRAT_PID_ERR 253 // DMC_GRAT_OUTPUT 452 // DMC_GRAT_IND_READ 512 {int}[] list_tuple = [{539},{540},{256},{257},{556},{564},{560},{567},{208},{250},{251},{252},{253},{452},{512},{0xffff}]; int[] list_int = [539,540,256,257,556,564,560,567,208,250,251,252,253,452,512,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // End of procedure //------------------ // Mark End of Block WriteEndBB(); } // CVSscript : DMC_spec_freq_switch.txt // Description : // Wavelength switching will be required on extended sources. No chopping // will be done. Instead, the grating will be moved in a 2 or 3 position // pattern around the spectral line to be observed. The frequency of // internal calibrations is adjusted by the top loop around observation // and calibration loops. // It is of course possible to have also calibrations outside the // sequence, just before and/or after. // // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows verbatim paragraph 4.2.7 in PACS-ME-LI-005 // version 1.0 // Actual values of input parameters, except values for the // various loop counters, are completely irrelevant and so // are not used. // Loop counters are used to estimate the duree of the // sequence // // Version : 0.1 22-Apr-2005 Creation by TM // History : // // This "dummy" DEC/MEC sequence needs only the loop parameters from the // complete list above // int[] procedure DMC_spec_freq_switch { int nb_full_seq = 1; // number of full sequences int nb_cycles = 8; // nb of grating/readout cycles on the line int nb_ramps_grat = 3; // number of ramps per grating position int nb_CS1 = 1; // number of cycles on CS1 int nb_CS2 = 1; // number of cycles on CS2 }{ // Define variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Pseudo code from PACS OBCPs and DMC Sequences (4.1.7) // WAIT 1 ; have a defined start duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop obs. + cal. for(int outloop = 1 .. nb_full_seq) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; chopper to "on" // LOOP P#3 ; do it P#3 times for(int inloop1 = 1 .. nb_cycles) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // LABEL 33 ; wavelength switching // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#6 ; move grating to P#6 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#7 ; move grating to P#7 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; } // END_LOOP ; end loop measurement // LOOP P#8 ; calibration loop1 for(int inloop2 = 1 .. nb_CS1) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB1 // LABEL 97 ; indicate BB1 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#6 ; move grating to P#6 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#7 ; move grating to P#7 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; } // END_LOOP ; end loop calibration1 // LOOP P#10 ; calibration loop2 for(int inloop3 = 1 .. nb_CS2) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // MOVE_CHOPPER_ABSOLUTE P#11 ; chop to BB2 // LABEL 161 ; indicate BB2 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#6 ; move grating to P#6 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#4 ; move grating to P#4 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_ABSOLUTE P#7 ; move grating to P#7 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_CAL = duree_CAL + nb_ramps_grat; } // END_LOOP ; end loop calibration2 } // END_LOOP ; end main loop // WAIT 1 ; complete last plateau duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // Create time_array int[] time_array = [duree_ramps,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // SpirePacsBbParallelEnd // // $Id: SpirePacsBbParallelEnd.txt,v 1.1 2006/10/11 10:23:40 kking Exp $ // // Building Block to reconfigure the instrument to PHOT_STBY mode from POF5 (scan map) mode // // block SpirePacsBbParallelEnd SPIRE 8338 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Parallel Reconfiguration started"); SpireMsg(2," $Id: SpirePacsBbParallelEnd.txt,v 1.1 2006/10/11 10:23:40 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP to zero tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0000)"); Spire_SET_OBS_STEP_RAW(0x0); // // Move BSM to HOLD int bsmHoldChopPosn = ilookup("BSM.txt","Hold","ChopPosn"); int bsmHoldJiggPosn = ilookup("BSM.txt","Hold","JiggPosn"); SpireBsmMove(bsmHoldChopPosn,bsmHoldJiggPosn); // // Set Mode to PHT_STBY tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(0x0300)"); Spire_SET_OBS_MODE_RAW(0x300); // // Clear OBSID/BBID to null values int obsId = SpireNullObsid(); tstr = SpireTimeStr(time()); hstr = SpireHexStr(obsId,8); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBSID_RAW(" + hstr + ")"); Spire_SET_OBSID_RAW(obsId); tstr = SpireTimeStr(time()); message("5 " + tstr + "Cmd: Spire_SET_BBID_RAW(0x80000000)"); Spire_SET_BBID_RAW(0x80000000); // // ..... completion ..... // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Parallel Reconfiguration ended"); SpireMsg(1," ..Parallel Reconfiguration to PHT_STBY mode (" + (time() - t) + " seconds)"); } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsRangeSpec AOT // // CUS author : DAC // Script file : PacsRangeSpec.def // // Input arguments // type name description // // Return values // // Description : // // Dependencies : // // Preconditions : // // Comments : If the file is called PacsRangeSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsRangeSpec.def // - rename module to PacsRangeSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false // // History: // For history before 24-apr-2007 see v1.42 in CVS // 25-apr-2007 14.4 Suppressed history before today (kept in CVS though) // Use rangeSPOT throughtout (i.e. merged ranges & rangeEXT) // 9-may-2007 14.5 SPR-3186 Use userNODcycles as map repetion for OFF // 22-may-2007 14.6 SPR-3199 Return SRC time without overheads // 29-may-2007 14.7 SPR-3237 // 11-jun-2007 14.8 SPR-3277 Use referenceWave (rangeSPOT{9}) for SED mode // 20-sep-2007 14.9 SPR-3570 RA,DEC offsets may be negative // SCR-3552 Read skewCorrec from PACSyzoffsets; add to pattnod // 24-sep-2007 15.0 SPR-3581 S/N is not computed in SED mode // 28-mar-2008 16.0 remove mapRasterRefXXX replaced by raoff, // decoff and refSelected (refSelected is complement to // chopNod hence not used in our logics) // 29-mar-2008 17.0 Removed section computing ABS or REL offsets: now an HSPOT // functionality // 28-apr-2008 18.0 raoff and decoff had the wrong range: in dgrees now // {int,int,int,{string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[]} obs PacsRangeSpecObs { /* "rangeSPOT" is a tuple defined by HSPOT */ /* It contains */ /* {id, bluEdge, redEdge, repeatFactor, lineFlux, contFlux, lineWidth, */ /* fluxUnitSel, widthUnitSel, refWave} */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = []; /*------------- following only to use CUS interface -------------------------*/ string rangeId0 = "Interesting range"; double bluWave0 = 106.0 in [55.0,220.0]; double redWave0 = 209.0 in [55.0,220.0]; int repeatLine0 = 1 in [0,10]; double lineFlux0 = 111.0 in [0.0,10000.0]; double lineWidth0 = 400.0 in [0.0,1000.0]; string widthUnit0 = "kms" in ["kms","micron"]; double contFlux0 = 111.11 in [0.0,10000.0]; double refWave0 = 180.0; string rangeId1 = "n"; double bluWave1 = 58.0 in [55.0,220.0]; double redWave1 = 65.0 in [55.0,220.0]; int repeatLine1 = 1 in [1,10]; double lineFlux1 = 222.0 in [0.0,10000.0]; double lineWidth1 = 0.22 in [0.0,1000.0]; string widthUnit1 = "micron" in ["kms","micron"]; double contFlux1 = 222.22 in [0.0,10000.0]; double refWave1 = 60.0; string rangeId2 = "n"; double bluWave2 = 150.0 in [55.0,220.0]; double redWave2 = 160.0 in [55.0,220.0]; int repeatLine2 = 3 in [1,10]; double lineFlux2 = 333.0 in [0.0,10000.0]; double lineWidth2 = 0.0 in [0.0,1000.0]; string widthUnit2 = "kms" in ["kms","micron"]; double contFlux2 = 333.33 in [0.0,10000.0]; double refWave2 = 155.0; string rangeId3 = "n"; double bluWave3 = 108.0 in [55.0,220.0]; double redWave3 = 180.0 in [55.0,220.0]; int repeatLine3 = 4 in [1,10]; double lineFlux3 = 444.0 in [0.0,10000.0]; double lineWidth3 = 0.0 in [0.0,1000.0]; string widthUnit3 = "kms" in ["kms","micron"]; double contFlux3 = 444.44 in [0.0,10000.0]; double refWave3 = 118.0; string rangeId4 = "n"; double bluWave4 = 75.0 in [55.0,220.0]; double redWave4 = 90.0 in [55.0,220.0]; int repeatLine4 = 1 in [1,10]; double lineFlux4 = 555.0 in [0.0,10000.0]; double lineWidth4 = 0.0 in [0.0,1000.0]; string widthUnit4 = "kms" in ["kms","micron"]; double contFlux4 = 555.55 in [0.0,10000.0]; double refWave4 = 80.0; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order3" in ["order2","order3","sed2","sed3","sed4"]; bool chopNod = true; string density = "nyquist" in ["nyquist","high"]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 2 in [2,32]; int n = 1 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; // RA,DEC or SSO double pointStep = 2.0 in [0.0,480.0]; double lineStep = 2.0 in [0.0,480.0]; bool refSelected = false; // true for chopNod = false double raoff = 0.0 in [0.0,360.0]; // units in degrees double decoff = 0.0 in [-90.0,90.0]; // units in degrees int obsOverhead = 180; // Slew overhead }{ //*--------- following only when using CUS interface -------------------*/ string isNotSet = "n"; if(rangeId0 != isNotSet) { rangeSPOT[0] = {rangeId0,bluWave0,redWave0,repeatLine0,lineFlux0,contFlux0,lineWidth0,"",widthUnit0,refWave0}; } if(rangeId1 != isNotSet) { rangeSPOT[1] = {rangeId1,bluWave1,redWave1,repeatLine1,lineFlux1,contFlux1,lineWidth1,"",widthUnit1,refWave1}; } if(rangeId2 != isNotSet) { rangeSPOT[2] = {rangeId2,bluWave2,redWave2,repeatLine2,lineFlux2,contFlux2,lineWidth2,"",widthUnit2,refWave2}; } if(rangeId3 != isNotSet) { rangeSPOT[3] = {rangeId3,bluWave3,redWave3,repeatLine3,lineFlux3,contFlux3,lineWidth3,"",widthUnit3,refWave3}; } if(rangeId4 != isNotSet) { rangeSPOT[4] = {rangeId4,bluWave4,redWave4,repeatLine4,lineFlux4,contFlux4,lineWidth4,"",widthUnit4,refWave4}; } //*--------- above only when using CUS interface -------------------*/ // Overall control of debugging messages bool verbose = true; // // Boolean variables "range" and "sedXXX" are mutually exclusive for HSPOT. For // time being I will use them independently of each other // Specifying bool sed = true is a special case of predefined ranges. // 30-oct-2006 // Variables "sed" or "range" have disappeared from front end. Define as bool range = true; bool sed = false; if(orderSel == "sed2" || orderSel == "sed3" || orderSel == "sed4") { range = false; sed = true; } // Yet to be defined symbol to access CAL-U file info for detector setup // May come from HSPOT front-end in the future // The future has come!!! string confTable = "normal"; // In SED or nyquist sample, we use the option "bright" if(sed || density == "nyquist") { confTable = "bright"; } // mapOff no longer an input variable but still used elsewhere bool mapOff = !chopNod; // to make sure that noone gets funny idea about refSelected refSelected = !chopNod; // New parameter for nodding_pointing bool startAtOFF = false; // Variable "grating" has disapeared from the front end. Since it's used by // several modules, I keep it with its new (default) definition string grating = "nyquist"; // OFF pointing only when in raster mode if(mapOff && source != "large") { error("NOD = false only allowed for large sources"); } // Start of "Pointing" section // // Set messages for HTML format message(""); message(""); // In "sed" mode, rangeSPOT is filled by module PacsRangeSpecSed if(!range) { // Define the RefWave as the mean value of bluWave and redWave // double meanRef = (rangeSPOT[0]{1} + rangeSPOT[0]{2})/2.0; // SPR-3277 Save waveRef first! // Catch case of rangeSPOT not being defined int theLength = length(rangeSPOT); if(theLength == 0) { error("ERROR! Need a reference wavelength for the SED observation (see UM)"); } // caught! Now extract wavelength double waveRef = rangeSPOT[0]{9}; // SPR-3581. Save information to compute S/N double contFlux = rangeSPOT[0]{5}; // Fill rangeSPOT with SED information rangeSPOT = PacsRangeSpecSed(orderSel); // Insure that user given reference is within order range if(waveRef < rangeSPOT[0]{1} || waveRef > rangeSPOT[0]{2}) { error("Reference wave must be comprised between " + rangeSPOT[0]{1} + " and " + rangeSPOT[0]{2} + " for " + orderSel); } // Reference within limits rangeSPOT[0]{9} = waveRef; // SPR-3581. Add information to compute S/N rangeSPOT[0]{5} = contFlux; } // Cannot call with empty "rangeSPOT" int nbRanges = length(rangeSPOT); int nbRanges1 = nbRanges - 1; if(nbRanges == 0) { error("STOP!! There are no spectral ranges defined!"); } // No more than 10 ranges or repetitions int nbRangesRep = 0; for(int loop00 = 0 .. nbRanges - 1) { // Default repetion factor is 1 int repFactor = rangeSPOT[loop00]{3}; if(repFactor == 0) { repFactor = 1; } nbRangesRep = nbRangesRep + repFactor; } if(verbose) { debug_print("Total ranges/repeat: " + nbRangesRep); } if(nbRangesRep > 10) { error("STOP!! The number of ranges/repetitions exceeds 10"); } // Decode "rangeSPOT" (only if verbose mode) if(verbose) { for(int iiii = 0 .. nbRanges1) { debug_print("RANGE or SED: " + orderSel); debug_print("Wave from/to : " + rangeSPOT[iiii]{1} + "/" + rangeSPOT[iiii]{2}); debug_print("RefWave : " + rangeSPOT[iiii]{9}); debug_print("repeat factor: " + rangeSPOT[iiii]{3}); } } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto and PacsLineSpec) // Pointing mode is still undefined int pointCase = 0; // FinePointingMode with setup time if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding"; pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (dithering and no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (dithering and nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(mapOff) { chopNod = false; pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 30; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. // Use special throw value in case of raster w/OFF as we chop between SRC and // CS1 if(mapOff) { throw = "offraster"; } // Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Check that rangeSPOT is commensurate with U-CAL SPEC_BAND_params; get // grating positions on the fly // NOTE: rangeInfo is defined as // {typeOBS,order,blu_grat,red_grat,gratStep,bluWave,redWave} {string,int,int,int,int,double,double}[] rangeInfo = PacsRangeSpecCheckFillRange(rangeSPOT,density,grating,orderSel,verbose); if(verbose) { for(int loopA = 0 .. nbRanges1) { debug_print("++RangeInfo: " + rangeInfo[loopA]); } } // Reject invalid ranges; abort CUS if invalid ranges are present for(int loop000 = 0 .. nbRanges1) { if(rangeInfo[loop00]{1} == 0) { error("Demanded range " + rangeInfo[loop000]{5} + "-" + rangeInfo[loop000]{6} + " [microns] is out of allowed boundaries"); } } // rangeInfo contains all the relevant information. We can sort here, either // by wavelength or by start grating position. Create arrays to be sorted // Define array of wavelengths and start grating positions; create "order" array // in case we want to enforce the no order mixing rule double[] rangeWave = [0.0]; double[] rangeGrat = [0.0]; int[] orders = [0]; // order array as float for sort algorithm double[] dorder = [0.0]; // Populate the arrays for(int loop0 = 0 .. nbRanges1) { rangeWave[loop0] = rangeInfo[loop0]{5}; // SORT algorithm requires float input! rangeGrat[loop0] = double(rangeInfo[loop0]{2}); orders[loop0] = rangeInfo[loop0]{1}; dorder[loop0] = double(rangeInfo[loop0]{1}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbRanges1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("2"); double[] band3 = SPEC_BAND_read("3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 // This case is history: // HSPOT proposes order 1&2 or 1&3, reported as 2 or 3; filter=1 is no // longer possible int filter = 1; // Determine filter based on HSPUT input if(orderSel == "order2" || orderSel == "sed2" || orderSel == "sed4") { filter = 2; } if(orderSel == "order3" || orderSel == "sed3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders + "; FILTER: " + filter); debug_print("The whole OBS will be performed with filter " + filter); } // Sort by order // int [] sortIndex = SortProc(verbose,dorder); // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,rangeGrat); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,rangeWave); // Recast "rangeSPOT" and rangeInfo according to the ordered grating // positions {string,double,double,int,double,double,double,string,string,double}[] sortRanges = clone(rangeSPOT); {string,int,int,int,int,double,double}[] sortRangeInfo = clone(rangeInfo); for(int reSORT = 0 .. nbRanges1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbRanges1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortRanges[reSORT] = rangeSPOT[sortedIndex]; sortRangeInfo[reSORT] = rangeInfo[sortedIndex]; } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 // chop_pos_CS1 chop_pos_CS2 chop_def // detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC{0 -> 8} contains: // capa nb_rdouts_ramp nb_rdouts_subramp comp_mode // glitch_det ramp_fit_alg nb_raw bias_r bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values // NEW. Saturation and capacitor/samples choice // Most SPEC configuration values are obtained from CONF_SPEC_params (read // in PacsSpecDefaults). Have to analyze given fluxes for each reference // wavelength. It may happen that a saturation situation will be found // Review the reference wavelengths, obtain telescope background, and PSF // fraction for(int rangeLOOP0 = 1 .. nbRanges) { int range1 = rangeLOOP0 - 1; waveRef = sortRanges[range1]{9}; contFlux = sortRanges[range1]{5}; // Obtain background and PSF fraction from CALU double telBckg = interpolate("SPEC_BCKG_FRAC","BackG",waveRef); double psfFrac = interpolate("SPEC_BCKG_FRAC","FracPnt",waveRef); debug_print("SATUR. Wave " + waveRef); debug_print("SATUR. Flux " + contFlux); debug_print("SATUR. Backg " + telBckg); debug_print("SATUR. PSF " + psfFrac); debug_print("SATUR. Order " + sortRangeInfo[range1]{1}); } paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module to estimate PACS parameters as a function of the // exposure time given by the user. This is the pilar of the // whole AOT logic. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; double waveMAXnods = 0.0; // Accumulated total OBS time int totalOBS = 0; for(int rangeLOOP = 1 .. nbRanges) { range1 = rangeLOOP - 1; paramsSPECext = PacsRangeSpecEstimatorOBCP27(sortRanges[range1],sortRangeInfo[range1],paramsSPEC,chopNod,verbose); // Copy estimates to respective tuples confSPECblu[rangeLOOP] = paramsSPECext{0}; confSPECred[rangeLOOP] = paramsSPECext{1}; confOBCP[rangeLOOP] = paramsSPECext{2}; // nb_nods below is the quantity used by Estimator to compute its duration int nb_nods = paramsSPECext{3}{0}; // if(verbose) { debug_print("confOBCP[" + rangeLOOP + "]: " + confOBCP[rangeLOOP]); } // Accumulated time totalOBS = totalOBS + paramsSPECext{3}{2}; } if(verbose) { debug_print("Minimum required time: " + totalOBS + " [sec] for " + nb_nods + " nod cycles"); } if(chopNod) { nbNods = userNODcycles; if(verbose) { debug_print("The PointReq will contain " + nbNods + " nod cycles"); } } else { nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

Estimated total OBStime (SRC+REF) for requested ranges: " + totalOBS + "[sec]

"; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Since no NOD was specified the total OBS time is equal" + " to the estimated SRC+REF time. OBS times can be changed" + " by specifying the line(s) repeat factor

"; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

Red channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Blue channel

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); if(verbose) { debug_print("Duration WriteOBSID: " + timeSetOBSID); } // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double [] keyWAVE = PacsRangeSpecKeyWaves(sortRangeInfo); int nbKeyWAVE = 1; // int nbKeyWAVE = length(keyWAVE); if(verbose) { debug_print("keyWAVES " + keyWAVE); } // With latest versions of CommandOBCP27 the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOTprologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration may be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per nod; nb_nods: " + nb_nods); } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); if(verbose) { debug_print("Duration WriteEndID: " + timeEndID); } // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbRanges per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one needs some time during // slew to perform leading CAL. // Make sure that the Preq is possible (possible reason for failure: too short // dwell time - currently 10 sec int minTdwell = 10; if(timeOBS < minTdwell) { error("Estimated dwell time is too short. Perhaps your range span is too small"); } // // The chopper throws have been read already (PacsSpecDefaults) and angles // have been converted into ENG units (OBCPconf). Here,angles are needed in // [arcsec]; easiest is to read again the relevant CAL-U table. // Read chopper position SRC and REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("MAIN:CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; int thold = 0; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode with nodding, section 3.4 ib = "P02_0"; // Nodding angle is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chop pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode without nodding, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int ncover = 1; // New arguments for pointing request; will be dealt with next iteration int top = 0; raoff = 0.0; decoff = 0.0; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,ncover,thold,nhold,k,top,raoff,decoff); } if(pointCase == 30) { // RasterMode with no nodding and OFF, section 3.5 ib = "P02_0"; // SPR-3237: fix is true, patt is inherited from HSPOT fixed = true; patt = mapRasterAngle; // Raster steps d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; // OFF periodicity (here at beginning and at end of raster) k = m * n; // The number of repetions is given in this case by the NOD count SPR-3186 int nrepeat = userNODcycles; if(nrepeat == 0) { nrepeat = 1; } // Same Tobs during OFF that during "SRC" top = tp; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // RasterMode with nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("=====> Return from " + pointMode + ": " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); } if(verbose) { int tNOW = time(); debug_print("=== Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOFF = nbOFF + 1; // Logic to sum up obsTime if(nbOFF == 1) { int[][] sumUpOffTime = obsTime; } if(nbOFF > 1) { sumUpOffTime = SumFunction(obsTime,sumUpOffTime); } if(verbose) { tNOW = time(); debug_print(" SumUpOffTime: " + sumUpOffTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD started at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL ranges). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // and per wavelength array(s): // [waveSTART,waveEND,order,gratStep,nbGratSteps,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Fill infoArray with data from OBCP27 // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int nbRampPlateau = confOBCP[1]{4} + 1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime (incl. WAIT=1): " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbRanges1) { // Create element [loop3] infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy from/to wavelengths infoArray[1]{1}[loop3]{0} = sortRanges[loop3]{1}; infoArray[1]{1}[loop3]{1} = sortRanges[loop3]{2}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortRangeInfo[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortRangeInfo[loop3]{4}; // copy the number of grating step infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from obsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Add more data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of ranges observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbRanges; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal - 1 - timeSetOBSID; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); } // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Populate the 3rd dimension of infoArray: global timing and AOT information // timeObsEnd is the total duration of the AOT infoArray[2] = {{"RangeSpec",0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Case of SmallSrc with dithering if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // Case of raster/w OFF, repeated map if(source == "large" && mapOff) { infoArray[1]{0}{0} = "RasterOFF"; infoArray[2]{0}{5} = nrepeat; } // Process the information contained in infoArray // NOTE: since implementing waveRef and fluxes, have to pass also // sortRanges and sortRangesExt data to ProcessInfoArray // aotID is no longer needed as only used for Range // but orderSel is needed by PacsSpecRMS // SPR-2927 Return bigTuple with information for plotting // Add nbOBS and nbOFF to ProcessInfoArray {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsProcessInfoArrayRange(infoArray,sortRanges,confOBCP,orderSel,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); //////// Silly code to convert bigTuple into smallTuple //////////////////// // bigTuple is too big for HSPOT. I have to remove the 1st double[] to // please HSPOT. Create smallTupleN {string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[] smallTuple = [{"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}]; // Old returned tuples {int,int,{{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[]} returnTuple = {fromPntReq[0],fromPntReq[1],bigTuple}; // Copy returnTuple onto smallTuple nbRanges = length(bigTuple); // The accumulated SRC+REF time int accumSrceRef = 0; for(int loopR = 0 .. nbRanges - 1) { // Use the nbRanges loop to add up SrceRef times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopR]{6} + infoArray[1]{1}[loopR]{7}; // Define smallTuple smallTuple[loopR] = {"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}; // Extract vectors; retrun CONT noise in mJy // First tuple is always the nominal range. Label it as RangeID + "Nominal" string id = sortRanges[loopR]{0} + "-nominal"; smallTuple[loopR]{0} = id; double[] wave = returnTuple{2}[loopR]{0}{2}; double[] cont = returnTuple{2}[loopR]{0}{3}; double[] line = returnTuple{2}[loopR]{0}{4}; int nbElem = length(wave); for(int loopT1 = 0 .. nbElem - 1) { smallTuple[loopR]{1}[loopT1] = wave[loopT1]; smallTuple[loopR]{2}[loopT1] = 1000.0 * cont[loopT1]; smallTuple[loopR]{3}[loopT1] = line[loopT1]; } wave = returnTuple{2}[loopR]{1}{2}; cont = returnTuple{2}[loopR]{1}{3}; line = returnTuple{2}[loopR]{1}{4}; nbElem = length(wave); // If there is no "free" data id = "undefined"; // Else label second tuple as RangeID + "-free1" if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free1"; } smallTuple[loopR]{4} = id; for(int loopT2 = 0 .. nbElem - 1) { smallTuple[loopR]{5}[loopT2] = wave[loopT2]; smallTuple[loopR]{6}[loopT2] = 1000.0 * cont[loopT2]; smallTuple[loopR]{7}[loopT2] = line[loopT2]; } wave = returnTuple{2}[loopR]{2}{2}; cont = returnTuple{2}[loopR]{2}{3}; line = returnTuple{2}[loopR]{2}{4}; nbElem = length(wave); // If existing, label third tuple as RangeID + "-free2" id = "undefined"; if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free2"; } smallTuple[loopR]{8} = id; for(int loopT3 = 0 .. nbElem - 1) { smallTuple[loopR]{9}[loopT3] = wave[loopT3]; smallTuple[loopR]{10}[loopT3] = 1000.0 * cont[loopT3]; smallTuple[loopR]{11}[loopT3] = line[loopT3]; } // End loop on nbRanges } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; return {accumSrceRef,fromPntReq[1],overPACSandSC,smallTuple}; } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Start Diag. HK // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do a chopper full field of view scan from -25000 cu to // + 25000 cu and vice versa with steps of 500. The grating is on a position // such that in the blue we are at 87 microns and in the red at // 174 microns. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 7.0 // // History : 1.0 21-07-06 creation by HD. Based on EQM IMT script "SPEC_Chop_fft_eqmimt_obs.txt" // final chopper poistion (TBC). // 3.0 26-07-06 HD. Incremental throw included. // 5.0 26-07-06 HD. script works. // 6.0 07-11-06 HD. Update. // 7.0 05-mar-2008 translated into PV script VDP obs PacsEng_Spec_Chopper_dhk_imt { /* Needed variables to call PacsEng_Spec_Chopper_dhk_imt */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_dhk_imt */ }{ // 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(SPEC_Chopper_dhk_imt_bb())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_Chopper_dhk_imt_bb(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Near real time adjustment of LHe flow for cryocover mirror // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : Background_Radiance_Adjustment.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP 8 to interactively adjust the LHe flow through the // cryocover mirror for telescope background simulation. Chops between // CS1 - 0 - CS2 for a number of specified loops at a given capacitor and // otherwise default detector settings. // // Dependencies : OBCP_spec_2_3_chop, SPEC_heater, SPEC_cre_setup // // Preconditions : PACS must be on and configured for spectroscopy // nominal detector settings and reset interval = 64, default C=0.1pF // // Comments : Can be run with different capacitors for EQM IMT purposes // // Version: 2.0 // History // 1.0 24-Mar-2005 creation by HF // 1.1 25-apr-2005 DAC Corrected for amended OBCP_spec_2_3_chop // 1.2 23-jun-2005 HF, added SPU setup and reset // 1.3 10-Apr-2006 HF, adapted for FM // 1.4 26-Apr-2006 HF, added move to FW position B // 2.0 25-Mar-2008 VDP translated from IST to PV phase syntax // obs PacsEng_Background_Adjustment { /* Needed variables to call PacsEng_Background_Adjustment */ int nb_up_down = 3; // Number of sequences: up down up ... int nb_grat_steps = 5; // Number of grating steps int nb_SRC_OFF = 5; // Nb cycles on/off source/grating position int nb_CS1_CS2 = 0; // Nbr cycles on cal src per grating position int grat_step = 0; // Grating step size int capa_blu = 0; // 0=0.1pf 8=0.2pf 4=0.4pF 12=1pF int capa_red = 0; // 0=0.1pf 8=0.2pf 4=0.4pF 12=1pF /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Background_Adjustment */ }{ // 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(Pacs_Background_Adjustment(nb_up_down,nb_grat_steps,nb_SRC_OFF,nb_CS1_CS2,grat_step,capa_blu,capa_red))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Background_Adjustment(nb_up_down,nb_grat_steps,nb_SRC_OFF,nb_CS1_CS2,grat_step,capa_blu,capa_red); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT Tests. // // Version : 1.0 // // History : // 1.0 09-11-06 HD. Adapted on FM ILT requirements. // 2.0 24-02-07 HD. Adapted for FM ILT. block SPEC_CS_fmilt071112_heatup_cs_bb PACS 476 { }{ // Register start of BB WriteBBID($BBID); //Switchon and enabling CSs Pacs_DMC_SWON_BB_1_CONT(); Pacs_DMC_ENABLE_BB_1_CONT(); Pacs_DMC_SWON_BB_2_CONT(); Pacs_DMC_ENABLE_BB_2_CONT(); //------------------------------------------------------------------------------ // Heat the calibration sources up to 70 (XX.XK;CS1) and 80 // (70.5K;CS2) Ohm --- big step //------------------------------------------------------------------------------ // start temperature CS1 in Ohm double cs1_temp = 70.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // start temperature CS2 in Ohm double cs2_temp = 80.0; // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 60 minutes of heating-up and stay on the desired temperatures do another heat-up delay(3600); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Check performance of flashers under various low power regimes // // // Author : P. Royer // // Arguments : // // Prerequisite : Flashers on // // Description : Loops over low, but increasing currents sent to the flashers // : // Comments : // // // Version : 2.0 // History : 1.0 / 11-Aug-2006 initial version by PR // 1.1 / 05-Apr-2007 Update position of BB // Include SWON/SWOF Flashers // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Check performance of flashers under low power regimes // @comment - // obs PacsEng_Spec_Flash_IST { /* Needed variables to call PacsEng_Spec_Flash_IST */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Flash_IST */ }{ // 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(Pacs_Spec_Flash_IST())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Flash_IST(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script file : OBCP_grat_scan_chop2_fast.txt // Purpose : // OBCP author : HF // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Belongs to Section 3.7: Grating Spectral Line Scan // of PACS-ME-LI-005, issue 1.4 // Consists mainly of a sequence with repetitive up- and // down-scans with the grating around a given center position, // while the chopper is operating as well on either two- or // three-positions. This is OBCP 3.7.3, calling DMC sequence // 17 (in 4.2.2) // // Dependencies : // // Preconditions : // // Comments : WARNING!! This version uses RAW version of START_OBCP // // History : 0.1 26-jun-2006 DAC // 0.2 27-nov-2006 Made grat_step_dn a negative number // int[] block OBCP_grat_scan_chop2_fast PACS 23 { int nb_up_down = 1; // Nb of "up-down" sequences (P#1); int nb_grat_steps = 20; // Nb of grating steps (P#2) int nb_cycles_grat_pos = 2; // Nb of cycles per grating position (P#3); int chop_pos_REF1 = 1000; // Chopper position 1 (P#4) int nb_ramps_plateau = 3; // Nb of readouts per chopper position (P#5); int chop_pos_REF2 = 3000; // Chopper position 2 (P#6) int nb_CS1_CS2 = 1; // Nb of cycles on the internal CSs (P#7); int chop_pos_CS1 = -25000; // Chopper position on CS1 (P#8) int chop_pos_CS2 = 25000; // Chopper position on CS2 (P#9) int grat_step_up = 1600; // Grating step up (P#10) int grat_step_dn = -1600; // Grating step down (P#11) int detector = 2; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 445000; // Starting grating position int grat_time = 40000; // Grating time to move to start [msec] int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopper default position int grat_def_time = 20000; // Time to come back to default position int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; //debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); //debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // OBCP_GRATING_LINE_SCAN_CHOPPED_2(seq, seq_time, // P#1,&,P#11, detector, grat_def, grat_time, // cmp_par_blue, cmp_par_red, grat_def, chop_def, grat_time) // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all parameters filled // by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE ////////////////////////////////////////////////////////////////////////// // Call DEC/MEC code to estimate its duration duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; int[] duree1 = DMC_grat_scan_chop2_fast(nb_up_down,nb_grat_steps,nb_ramps_plateau,nb_CS1_CS2,nb_cycles_grat_pos); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // debug_print("Execution time [msec] from DMC: " + seq_time); // duree_msec(seq_time) duree_msec = duree_msec + t_cmd + seq_time; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 23, requires 21 parameters and calls DEC/MEC #17 string obcp_ID = "GRAT_SCAN_CHOP2_FAST"; int obcp_NB = 23; int obcp_par_nb = 21; int seq_DMC = 17; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_cycles_grat_pos},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,grat_step_up},{13,grat_step_dn},{14,detector},{15,grat_pos},{16,grat_time},{17,comp_mode_blu},{18,comp_mode_red},{19,grat_def},{20,chop_def},{21,grat_def_time}]; Pacs_DPU_START_OBCP_RAW(obcp_NB,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // debug_print(obcp_ID + ": " + time_array); delay(time_array[0]); // Return the array of times return time_array; } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Move Grat Abs // // CUS author : Pierre Royer // // Version : 2.0 // // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Disable { /* Needed variables to call PacsEng_Spec_Gra_IST_Disable */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Disable */ }{ // 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(PACS_Spec_Gra_IST_Disable())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Disable(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS FM Test // // Purpose : Switch on of bolometer groups // // Author : T. Mueller // // File : PHOT_switchon_groups // Arguments : none // // // Description : This script will switch on the different groups // of the instrument. BOLC will start in "HK only" mode. // // Comments : Coded based on PhFPU UM, Draft 5 // // Version : 1.1 // History : 1.0 / 08-Nov-2006 initial version by TM // 1.1 / 08-Nov-2006 TM: autonomy function 17 added // 1.1.1 14-nov-2006 Disable autonomy function for time being // 1.2 17-nov-2006 Enable AF with delay after switchon // 1.3 09-apr-2007 disable AFs before starting // procedure PHOT_switchon_groups { }{ // disable AF 12, AF 15, AF 17 // disable AF 12 (to check for the protection biases) Pacs_DPU_SET_FUNCT("EVENT_BOL_BIAS","DISABLE"); // disable AF 15 (to check for the VSS currents of groups and BUs) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_RO","DISABLE"); // disable AF 17 (to check for group power) Pacs_DPU_SET_FUNCT("EVENT_BOL_V_PWR","DISABLE"); // delay(2); // PC103420 "DMC_SEND_COMMAND_BOLC" SEND COMMAND TO BOL CONTROLLER // PP071420 "BOLOMETER_COMMAND" // // # Execute BOLC initialisation // # for CQM we switched on everything at once, now group by // # group starting with 1 // // # Switch-on group 1 The corresponding bits // # are (2^0)=1, which is 1 in hex. // tcsend PC103420 {PP071420 0x0A000001 LO} // waittime 1.0 int operand = 0xa000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2. The corresponding bits // # are (2^0+2^1)=3, which is 3 in hex. // tcsend PC103420 {PP071420 0x0A000003 LO} // waittime 1.0 operand = 0xa000003; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3. The corresponding bits // # are (2^0+2^2+2^3)=7, which is 7 in hex. // tcsend PC103420 {PP071420 0x0A000007 LO} // waittime 1.0 operand = 0xa000007; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4. The corresponding bits // # are (2^0+2^1+2^2+2^3)=15, which is F in hex. // tcsend PC103420 {PP071420 0x0A00000F LO} // waittime 1.0 operand = 0xa00000f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4,5. The corresponding bits // # are (2^0+2^1+2^2+2^3+2^4)=31, which is 1F in hex. // tcsend PC103420 {PP071420 0x0A00001F LO} // waittime 1.0 operand = 0xa00001f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4,5,6. The corresponding bits // # are (2^0+2^1+2^2+2^3+2^4+2^5)=63, which is 3F in hex. // tcsend PC103420 {PP071420 0x0A00003F LO} // waittime 1.0 operand = 0xa00003f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(8); //------------------------------------ // autonomy function //------------------------------------ // autonomy function 17 "generate_event_pwr" checks the // HK entries: PC_PWR_ANA_P_#, PC_PWR_ANA_N_# and PC_PWR_DIG_#, // with # = [1,2,3,4,5,6,7] Pacs_DPU_SET_FUNCT("EVENT_BOL_V_PWR","ENABLE"); // Wait another 2 sec delay(2); // //----------------- // End of Procedure //----------------- } // Mission phase : Commissioning phase and later // // Purpose : Read a BOLObias calibration table and command bias // voltages for all the groups // and then set direct or DDCS mode and gain // // Author : Koryo Okumura // CUS script : Koryo Okumura // // Arguments : // string biasTable The bias table name // string gain The gain "LOW" or "HIGH" // // Description : Read a bias table in volts and set the direct mode // // Dependencies : None // // Preconditions : Photometer is on and the sequencer is set // // Comments : // // Version : 0.1 // History : 02-Jul-2008, KO: First version // procedure PHOT_set_biases { string biasTable = "BOLObias_ILT_standard_low"; // Bias table [volts] string setting = "DIRECT" in ["DIRECT","DDCS"]; // Readout mode string gain = "LOW" in ["LOW","HIGH"]; // Gain }{ int operand = 0; // //*********************************************** // Bias setting of the detectors //*********************************************** // PHOT_set_bias_volt(biasTable,1); PHOT_set_bias_volt(biasTable,2); PHOT_set_bias_volt(biasTable,3); PHOT_set_bias_volt(biasTable,4); PHOT_set_bias_volt(biasTable,5); PHOT_set_bias_volt(biasTable,6); // if(setting == "DIRECT") { //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //********************************************************** // Sequence mode : Sref_only (meaning set for the bolometer) //********************************************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 operand = 0x9010001; } else { // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sbolo-Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sbolo-Sref"); //# P 09 01 00 00 operand = 0x9010000; } Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //************************************** // Start SPU in the appropriate setting // including bits rounding for high gain //************************************** PHOT_spu_gain_setup(gain,0,0,3,3,true); delay(1); // to sync the bus sync(); } // Missionphase : FM-ILT // // Purpose : Perform Spectroscopy thermal behaviour // // CUS author : TM, DAC // Script file : SPEC_thermal.cus // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.8 // History : 0.1 TM 10-nov-2006 // 0.2 17-nov-2006 DAC&TM Completed script // 0.3 17-nov-2006 TM Completed script // 0.4 02-mar-2007 TM updated for FM, incl. diagHK // 0.5 05-mar-2007 TM updated for chopper and diagHK // 0.6 14-mar-2007 TM updated for OBCPs and diagHK // 0.7 07-apr-2007 new chopper controller parameters, // filter movements after all configurations // 0.8 07-Apr-2008 Changed bias values to in-flight default 30mV/80mV // procedure SPEC_thermal { string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double temp_CS1 = 48.0; double temp_CS2 = 58.0; }{ // wait for a clean start delay(60); // Start "elementary" scripts SPEC_dpu_dmc_setup(); // wait delay(30); // Configure initial configuration for CREs SPEC_init_det_setup(); delay(300); // Default CRE configuration (set default bias, ramp length, and capacitor) // Red ramp length int ramp_len_red = 64; // Blue ramp length int ramp_len_blu = 64; // BIAS_D for red spectro (0-1V) double bias_d_red = 0.03; // BIAS_R for red spectro (0-1V) double bias_r_red = 0.01; // BIAS_D for blue spectro (0-1V) double bias_d_blu = 0.08; // BIAS_R for blue spectro (0-1V) double bias_r_blu = 0.01; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_red = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; double blu_heater_curr = 0.0; SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blu_heater_curr); // wait delay(300); // command the blue detector heater to its operational // temperature SPEC_heater_setup(1.5); delay(300); // // configure diag HK for filterwheel, grating, chopper int diag_hk_period = 5; // DMC_CHOP_CUR_POS 244 // DMC_CHOP_SETPOINT 245 // DMC_CHOP_TARGET 246 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_FWSP_CUR_POS 255 // DMC_FWGRAT_HALL_A 256 // DMC_FWGRAT_HALL_B 257 // DMC_CHOP_OUTPUT 258 // DMC_GRAT_OUTPUT 452 // DMC_FWSPEC_POS_A 555 // DMC_FWSPEC_POS_A 559 // DMC_CHOP_IA 561 {int}[] list_tuple = [{244},{245},{246},{250},{251},{252},{255},{256},{257},{258},{452},{555},{559},{561},{0xffff}]; int[] list_int = [244,245,246,250,251,252,255,256,257,258,452,555,559,561,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // CONFigure SPEC filter wheel CONF_spec_fltw(); delay(30); // CONFigure chopper // DMC_WRT_CHOP_CONF_PAR CONF_chopper("CONFChopper","nom_sky"); CHOP_on_off("ON"); delay(30); // CONFigure Grating CONF_grating("CONFGrat","ISTSafe"); delay(120); // move filter wheel // move 6 times to both positions for(int imove = 1 .. 6) { SPEC_fltw_move("POS A"); SPEC_fltw_move("POS B"); } delay(120); // start OBCP 8 with chopper only (224 sec) OBCP_spec_2_3_chop(1,1,0,0,1,0,0,80,-12000,12000,0,0,1,900000,11000,16,16,500000,0,6000,64); delay(60); // start OBCP 8 with grating only (224 sec) OBCP_spec_2_3_chop(240,1,0,0,1,0,0,0,-12000,12000,133,-133,1,900000,11000,16,16,500000,0,6000,64); delay(60); // start OBCP 8 with chopper and grating only (224 sec) OBCP_spec_2_3_chop(80,1,0,0,1,0,0,1,-12000,12000,133,-133,1,900000,11000,16,16,500000,0,6000,64); delay(120); // stop diag HK again Pacs_DMC_STOP_DIAG_HK(); // configuration of calibration sources and switch on CONF_cs("Both"); CS_on_off("CS1","ON"); CS_on_off("CS2","ON"); delay(60); // CS1 to 48 (55K) and CS2 to 58 (60K) CS_temp("CS1",48.0); CS_temp("CS2",58.0); delay(2700); // Switch off the CSs CS_on_off("CS1","OFF"); CS_on_off("CS2","OFF"); delay(300); // command the red detector heater to 5mA for 5 min Pacs_DMC_SWON_RD_HEATER(); delay(60); Pacs_DMC_SET_R_SPEC_HEAT_C(5.0); delay(300); Pacs_DMC_SET_R_SPEC_HEAT_C(0.0); delay(300); // command the blue detector heater to 5mA for 5 min // for a curing test (to be replaced later by a curing procedure) SPEC_heater_setup(5.0); delay(300); SPEC_heater_setup(1.5); delay(900); // Switch off chopper controller CHOP_on_off("OFF"); delay(120); // Switch off grating controller Pacs_DMC_SWOF_GRAT_CONT(); delay(120); // // // SWITCH OFF BLUE/RED SPECTROMETER ARRAY POWER Pacs_DMC_SWOF_B_SPEC(); delay(1); Pacs_DMC_SWOF_R_SPEC(); delay(300); // Switch-off B and R DEC power, wait 8 sec Pacs_DMC_SWOF_B_DEC(); delay(60); Pacs_DMC_SWOF_R_DEC(); delay(60); // SAFE mode OBCP_SAFE(); //End of procedure } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_Mec_Setup_Cold_Redun { /* variables to call PacsEng_Spec_Gra_Mec_Setup_Cold_Redun */ string calUrow = "ISTSlow_R"; // INSTRUMENT VERSION /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Mec_Setup_Cold_Redun */ }{ // 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(PACS_Spec_Gra_Mec_Setup_Cold_Redun(calUrow))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_Mec_Setup_Cold_Redun(calUrow); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT / IST // // Purpose : Flux check on CS at wavelengths suited for filter // // // Input arguments // type name description // string calsource "CS1" or "CS2" // string filter "A" or "B" // Return values // Type Name Default Description // // Description : Uses OBCP28 // // Dependencies : // // Preconditions : // // Comments : // // History : 1.0 BV 12-03-2007 Creation // 2.0 BV 06-04-2007 Ramp averages // procedure SPEC_fluxref { string calsource = "CS2" in ["CS1","CS2"]; // calsource string filter = "A" in ["A","B"]; // filter }{ int chop_def = 21200; // Position of CS2 if(calsource == "CS1") { chop_def = -21350; } int grating_start = 790000; // for key wavelength in filter A if(filter == "B") { grating_start = 531000; } int capa_red = 0; // Red capacitor int capa_blu = 0; // Blue capacitor // grating start position for scan int grating_stepsize = 168; // grating step size int grating_numsteps = 48; // number of grating steps in one direction int grating_numramps = 2; // number of ramps per grating position int readoutsperramp = 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 chop_pos_CS1 = -21350; int chop_pos_CS2 = 21200; int detector = 1; // Synchronize on this detector 1:Blue 2:Red int nb_CS1_CS2 = 0; // number of cycles on calsources, 0=don't use them int nb_ramps_CS = 3; // number of ramps on CSs int grat_start_time = 15000; // time for grating to start [ms] int grat_def_time = 15000; // CRE settings int ramp_len_blu = readoutsperramp; int ramp_len_red = readoutsperramp; // Set up the blue and red CRE subsystem // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; // Give ENG values for the bias [v] double bias_r_blu = 0.01; double bias_r_red = 0.01; double bias_d_blu = 0.198; double bias_d_red = 0.069; SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // Reset SPU SPEC_spu_reset(); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Pacs_DMC_MOVE_CHOP_ABS(chop_def); Pacs_DMC_MOVE_GRAT_ABS(grating_start); delay(60); OBCP_grat_scan_nochop(num_updown,grating_numsteps,grating_stepsize,-grating_stepsize,grating_numramps,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,nb_ramps_CS,grating_numsteps,chop_def,detector,grating_start,grat_start_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,readoutsperramp); // // Reset spu Pacs_DMC_MOVE_CHOP_ABS(650); SPEC_spu_reset(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Test different reset intervals in spectroscopy // // // // TCL author : HF // TCL file : none // CUS author : HF // Script file : SPEC_Readouts_per_Ramp_test.txt // // Input arguments none // type name description // // Return values none // Type Name Default Description // // Description : Test of different values for readouts per ramp at same flux // level // // // Preconditions : PACS must be switched-on and in Spectroscopy mode // // Comments : // // Version : 2.0 // History : 1.0 29-Mar-2005 creation by HF // 1.1 05-Apr-2005 modify dummy resistor bias and // length of measurement // 1.2 15-Apr-2005 HF, add SPU reset at the end // 1.3 11-Apr-2006 HF, adapted to FM, smallest capacitor // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_Readouts_per_Ramp_Test { /* Needed variables to call PacsEng_Spec_Readouts_per_Ramp_Test */ int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Readouts_per_Ramp_Test */ }{ // 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(Pacs_Spec_Readouts_per_Ramp_Test(ramp_len_red,ramp_len_blu))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Readouts_per_Ramp_Test(ramp_len_red,ramp_len_blu); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Flasher curing : short flashes with dead times -> Temp & signal evolutions // Third part of the Flashers Performance check (curing schemes) // // Author : P. Royer // // Arguments : // // Prerequisite : Flashers on // // Description : Check scheme of flasher curing : short flashes with dead times // : // Comments : // // // Version : 2.1 // History : 1.0 / 09-Jun-2006 initial version by PR // 1.1 / 06-Apr-2007 Updated chop_pos_BB -> FMILT BB2 // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // 2.1 01-Jul-2008 Introduced "final_delay" parameter // // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Flasher curing : short flashes with dead times -> Temp & signal evolutions // @comment - // obs PacsEng_Spec_Curing { /* Needed variables to call PacsEng_Spec_Curing */ int blue_flasher_current = 819; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819; //4mA. [0,4095] = [0,20 mA] int nflash = 3; // Number of flashes int flash_time = 60; // Duration of each flash int idle_time = 120; // Idle time between the flashes int final_delay = 1; // Idle time at the end of the test (flasher cooldown, detector stabilisation), /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Curing */ }{ // 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(PACS_Spec_Curing(blue_flasher_current,red_flasher_current,nflash,flash_time,idle_time,final_delay))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Curing(blue_flasher_current,red_flasher_current,nflash,flash_time,idle_time,final_delay); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. Special HKs. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up 2 housekeeping parameter for diagnostic housekeeping // of the chopper for open loop tests. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : // 1.0 08-11-06 HD. Spec. HK for open loop measurements. block SPEC_Chopper_dhk_imt_perf_bb PACS 395 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 4; {int}[] parlist = [{244},{245},{258},{0xffff}]; int[] aux = [244,245,258,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 0; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Move Grat Abs // // CUS author : Pierre Royer // // Version : 2.0 // // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Move_Abs { /* Needed variables to call PacsEng_Spec_Gra_IST_Move_Abs */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Move_Abs */ }{ // 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(PACS_Spec_Gra_IST_Move_Abs())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Move_Abs(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : SPEC_Chopper_imt504_ast_OBS.cus // // Purpose : Short performance test of Chopper in IMT // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do rectangular chopping for four frequencies with OBCP27 and its // corresponding DMC-sequence 12. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM/FM ILT. // // Version : 3.1 // // History : 1.0 04-04-07 HD. IST tuned. // 2.0 05-07-07 HD. IST Chopper Day. // 3.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 3.1 08-Apr-2008 HF changed to default biases for in-flight procedure Pacs_Spec_Chopper_imt504_ast { }{ // Start chopper diagnostic housekeeping SPEC_Chopper_dhk_imt_bb(); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // Setup CRE and set to rpr32 int ramp_len_red = 32; int ramp_len_blu = 32; double bias_d_red = 0.03; double bias_r_red = 0.01; double bias_d_blu = 0.08; double bias_r_blu = 0.01; int capa_red = 0; int capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // setup the parameters for rectangular chopping with OBCP27 int nb_up_down_27 = 1; int nb_grat_steps_27 = 1; int nb_cycles_grat_def_27 = 10; int chop_pos_REF1_27 = -12386; int nb_ramps_plateau_27 = 4; int chop_pos_REF2_27 = 12047; int nb_CS1_CS2_27 = 10; int chop_pos_CS1_27 = -21350; int chop_pos_CS2_27 = 21200; int grat_step_up_27 = 0; int grat_step_dn_27 = 0; int detector_27 = 1; int grat_pos_27 = 496000; int grat_time_27 = 40000; int comp_mode_blu_27 = 16; int comp_mode_red_27 = 16; int grat_def_27 = 496000; int chop_def_27 = 0; int grat_def_time_27 = 40000; int nb_rdouts_ramp_27 = 32; // Execute OBCP27 with rpr 32 and 3 ramps per chopper:1 Hz SPEC_CRE_No_Heater_setup(32,32,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,3,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,32); // Execute OBCP27 with rpr 32 and 1 ramps per chopper:2 Hz OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,1,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,32); // Execute OBCP27 with rpr 16 and 1 ramps per chopper:4 Hz SPEC_CRE_No_Heater_setup(16,16,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,1,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,16); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // CRE setup to default values SPEC_CRE_No_Heater_setup(64,64,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,12,12); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // $Id: SPEC_spu_setup.txt,v 1.6 2007/08/09 15:40:11 dcesarsk Exp $ // // Missionphase : PACS ILT // // Purpose : Condition SPU for SPECtroscopy observations // // TCL author : Thomas Mueller // TCL file : tm_spec_spu_setup.tcl, version 1.3 // SetupSpectroscopyWEplusFPUsim.tcl v2.8 // CUS author : Diego Cesarsky // Script file : SPEC_spu_setup.txt // // Input arguments // Type Name Default Description // int comp_mode_blu 16 Compression mode Default=16; double=17; // lossless=20; transp=23; 4sec reset=24; // buffer_mode=25, noise=33 // int comp_mode_red 16 As above for RED // int nb_samp_subramp_blu 64 Number of samples per sub-ramp // (>=4 and <= readouts per ramp) // int nb_samp_subramp_red 64 As above for RED // int spu_nraw_blu 3 Number of raw channels transmitted by SPU // int spu_nraw_red 3 As above for RED // int glitch_det 1 Glitch detection; 0=on; 1=off // int ramp_fit_alg 1 Ramp fit algorithm: 0=LstSq fit,1=mean value // bool startSPU true Start SPU after setting values // // Description : Sets values for compression mode, // threshold values (glitch, chopper, grating), raw // channel transmission, sub-ramp and detector // constants, load DPU time and restart SPU. Script // sets its own delays [sec] and returns the total // duration in milliseconds. This version addresses // BLU and RED; could make a BLU only and RED only version // // Dependencies : PACS TCs // // Preconditions : // // Comments : Based on V1.3 of TM's tm_spu_setup.tcl. Both // SPUS and SPUL are initialized to same set of parameters // // Version 1.0 // History : 1.0 25-04-2008 Creation based on v1.0 of SPEC_spu_setup // procedure SPEC_spu_setup_wait_reset { int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] int wait_time = 2400; // Wait time at the end of the SPU setup bool stopSPU = true; // Stop SPU after the wait_time }{ // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // Set the SPU compression modes // (TC arguments are defined as type {int}[], cf. definition of // Pacs_DMC_WRT_SPU_TRAN_MODE; hence define comp_par accordingly) {int}[] comp_par = [{comp_mode_blu},{comp_mode_red}]; // The "checksum" function needs an array as argument, hence use elements // of comp_par cast as an array: int[] aux = [comp_mode_blu,comp_mode_red]; int check_sum = checksum("int",aux); // Issue the TC Pacs_DMC_WRT_SPU_TRAN_MODE(comp_par,check_sum); // Setting of start index of raw channels for SPUS and SPUL string spus_obs_mode = "SPEC"; string spul_obs_mode = "SPEC"; int spus_startraw = 1; int spul_startraw = 1; Pacs_SPUS_RAW_CHAN_TRAN_MODE(spus_obs_mode,nb_raw_spu_blu,spus_startraw); Pacs_SPUL_RAW_CHAN_TRAN_MODE(spul_obs_mode,nb_raw_spu_red,spul_startraw); // Spectro "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in spectroscopy int tfs = 1000; // Threshold for chopper position deviation in spectroscopy int tcs = 100; // Threshold for grating deviation int tgd = 100; // Readouts per SubRamp readback int rsrr = nb_samp_subramp_blu; // Glitch detection for spectroscopy int gdfs = glitch_det; // Ramp fitting algorithm int rfal = ramp_fit_alg; // Sorting algorithm int soal = 4; // lossless compression algorithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; //Logic to optimize fitting if(ramp_fit_alg == 1) { soal = 5; lcal = 4; } // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Spectro "Ottensamer" block ("L" SPU) ppf = 0; ppp = 0; tfs = 1000; tcs = 100; tgd = 100; rsrr = nb_samp_subramp_red; gdfs = glitch_det; rfal = ramp_fit_alg; soal = 4; lcal = 0; pcod = 3; //Logic to optimize fitting if(ramp_fit_alg == 1) { soal = 5; lcal = 4; } // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Send time stamps // DMC_WRT_TIME: Write the time sent by the DPU into the DMC buffer // (No action on this one?) // DPU sends the time to DEC/MEC Pacs_DPU_SEND_TIME(); // DMC_SET_TIME: Set the time previously written by the write time command Pacs_DMC_SET_TIME(); // Start reduction/compression if commanded to do so if(startSPU) { Pacs_SPUS_START_REDUCT_COMPR(); Pacs_SPUL_START_REDUCT_COMPR(); } delay(wait_time); if(startSPU && stopSPU) { Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); } sync(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Fullfunctional Test of Chopper PTD 0.7.5 // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do a chopper full field of view scan from -25000 cu to // + 25000 cu and vice versa with steps of 500. The grating is on a position // such that in the blue we are at 87 microns and in the red at // 174 microns. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 7.0 // // History : 1.0 21-07-06 creation by HD. Based on EQM IMT script "SPEC_Chop_fft_eqmimt_obs.txt" // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // final chopper poistion (TBC). // 3.0 26-07-06 HD. Incremental throw included. // 5.0 26-07-06 HD. script works. // 6.0 07-11-06 HD. Update. // 7.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Spec_Chopper_dhk_stop { /* Needed variables to call PacsEng_Spec_Chopper_dhk_stop */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_dhk_stop */ }{ // 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(PACS_stop_dhk_bb())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_stop_dhk_bb(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : Pierre Royer // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 1.0 27-Feb-2007 Copy of CONF_grating_OBS dedicated to SFT HeII // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // // obs PacsEng_CONF_grating_SFTHeII { /* No variables to call PacsEng_CONF_grating_SFTHeII */ string calUrow = "FMILT"; // INSTRUMENT VERSION string calUname = "CONFGrat"; /* End of needed variables for PacsEng_CONF_grating_SFTHeII */ }{ // 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_grating(calUname,calUrow))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_grating(calUname,calUrow); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : CONF_spec_fltw_Warm.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the spectro filter wheel for Nominal Warm // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 // History : 1.0 4-Jul-2007 PR creation // : procedure CONF_spec_fltw_Warm { }{ string calUname = "CONFFWSPEC"; // FWSPEC CALIBRATION TABLE string calUrow = "FMILT_W"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWSPEC_CONF_PAR(parlist,check_sum); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_CRE_Setup_Warm { /* No variables to call PacsEng_Spec_CRE_Setup_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_Setup_Warm */ }{ // 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(PACS_Spec_CRE_Setup_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_CRE_Setup_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : CONF_spec_fltw.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the spectro filter wheel servo loop // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 13-Oct-2004 Creation by DAC // History : 0.2 4-jul-2006 Removed "return" statement // 1.0 11-Jun-2007 PR New scheme due to new format of configuration command // (DMC UM v.4.3) // : procedure CONF_spec_fltw { }{ string calUname = "CONFFWSPEC"; // FWSPEC CALIBRATION TABLE string calUrow = "FMILT"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWSPEC_CONF_PAR(parlist,check_sum); } // CVS file : SPEC_heater_setup.cus // Missionphase : FM ILT // // Purpose : Set values for the BLUE detector heaters // // Author : DAC // // Arguments : // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 // History : 0.1 17-nov-2006 Copied from SPEC_heater; updated for // inclusion into OpDataBase // : procedure SPEC_heater_setup { double heater_blu = 0.0; //Blue HEATER value (0:0mA, 4095:20mA) }{ // Send the telecommand to DEC/MEC Pacs_DMC_SET_B_SPEC_HEAT_C(heater_blu); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule PACS_Burstmode_Reset as an OBS // // CUS author : DAC // Description : Set/resets OBSID, calls associated procedure // Dependencies : see associated procedure // Preconditions : see associated procedure // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Burstmode_Reset { }{ // 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(PACS_Burstmode_Reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure PACS_Burstmode_Reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script : PACS_Chopper_uk_move_18000_NoConf_ast.cus // Missionphase : SVT / Flight // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-18000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on PACS_Chopper_uk_move_18000_ast_OBS, // but without configuration and with mois comments // // Version : 1.0 // // History : 1.0 17-10-2007 BV First version // procedure PACS_Chopper_uk_move_18000_NoConf_ast { }{ mois_comment("Perform rectangular chopping with step 18000"); // int chop_pos = 18000; // chopper position int cycle = 10; // give cycle # int plateau_time = 2; // select plateau time in sec // Start Diag. HK mois_step("Start Diagnostic housekeeping"); SPEC_Chopper_dhk_5hk_1khz_bb(); mois_step("Enable chopper controller"); // Enable Chopper Controller EnDis_chopper("ON"); delay(5); mois_step("Perform rectangular chopping"); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // do observations int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); mois_step("Disable chopper"); // Disable Chopper Controller EnDis_chopper("OFF"); delay(5); mois_step("Disable diagnostic housekeeping"); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // CVS file : DMC_chop_scan_phot.txt // Missionphase : // // Purpose : Chop increasingly away from start position; then increasingly // closer to start position. Whole operation may be repeated // nb_up_down times // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // // Arguments : (only timing parameters are used in actual call) // int nb_up_down P#1 number of up-down seqs. // int nb_rdouts P#2 number of readouts on step // int nb_steps_up P#3 number of steps up // int nb_steps_dn P#4 number of steps down // int step_up P#5 relative move up // int step_dn P#6 relative move down // // Description : Chop increasing distance from start, then revert // and chop closer and closer to initial position // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows line by line 4.1.9 in PACS-ME-LI-005 // Tally all readouts as REF // // Version : 0.1 6-apr-2006 Creation by DAC // History : int[] procedure DMC_chop_scan_phot { int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 16; // P#2 number of readouts on step int nb_steps_up = 1; // P#3 number of steps up int nb_steps_dn = 1; // P#4 number of steps down }{ // Time keeping variables [readouts] int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Parameterized up and down scan with the PACS chopper. // WAIT 1 ; have a defined start duree_rdouts = duree_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; ensure LABEL 0 // WAIT 1 duree_rdouts = duree_rdouts + 1; duree_OVR = duree_OVR + 1; // LOOP P#1 ; number of up-down seqs. for(int loop1 = 1 .. nb_up_down) { // LABEL 193 ; special LABEL up // LOOP P#3 ; number of steps up for(int loop3 = 1 .. nb_steps_up) { // WAIT P#2 ; number of readouts on step duree_rdouts = duree_rdouts + nb_rdouts; duree_REF = duree_REF + nb_rdouts; // MOVE_CHOPPER_RELATIVE P#5 ; relative move up } // END_LOOP // LOOP P#4 ; number of steps down for(int loop4 = 1 .. nb_steps_dn) { // WAIT P#2 ; number of readouts on step duree_rdouts = duree_rdouts + nb_rdouts; duree_REF = duree_REF + nb_rdouts; // MOVE_CHOPPER_RELATIVE P#6 ; relative move down // LABEL 225 ; special LABEL down } // END_LOOP } // END_LOOP // WAIT P#2 ; integrate on last step duree_rdouts = duree_rdouts + nb_rdouts; duree_REF = duree_REF + nb_rdouts; // WAIT 1 duree_rdouts = duree_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 // END_SEQUENCE // Return durations return [duree_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; } // Missionphase : PACS FM Test // // Purpose : Switch on of bolometer groups // // Author : T. Mueller // // File : PACS_Phot_Switchon // Arguments : none // // // Description : This script will switch on the different groups // of the instrument. BOLC will start in "HK only" mode. // // Comments : Coded based on PhFPU UM, Draft 5 // // Version : 1.0 // History : 1.0 / 08-Nov-2006 initial version by TM // procedure PACS_Phot_Switchon { }{ // PC103420 "DMC_SEND_COMMAND_BOLC" SEND COMMAND TO BOL CONTROLLER // PP071420 "BOLOMETER_COMMAND" // // # Execute BOLC initialisation // # for CQM we switched on everything at once, now group by // # group starting with 1 // // # Switch-on group 1 The corresponding bits // # are (2^0)=1, which is 1 in hex. // tcsend PC103420 {PP071420 0x0A000001 LO} // waittime 1.0 int operand = 0xa000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2. The corresponding bits // # are (2^0+2^1)=3, which is 3 in hex. // tcsend PC103420 {PP071420 0x0A000003 LO} // waittime 1.0 operand = 0xa000003; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3. The corresponding bits // # are (2^0+2^2+2^3)=7, which is 7 in hex. // tcsend PC103420 {PP071420 0x0A000007 LO} // waittime 1.0 operand = 0xa000007; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4. The corresponding bits // # are (2^0+2^1+2^2+2^3)=15, which is F in hex. // tcsend PC103420 {PP071420 0x0A00000F LO} // waittime 1.0 operand = 0xa00000f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4,5. The corresponding bits // # are (2^0+2^1+2^2+2^3+2^4)=31, which is 1F in hex. // tcsend PC103420 {PP071420 0x0A00001F LO} // waittime 1.0 operand = 0xa00001f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // # Switch-on groups 1,2,3,4,5,6. The corresponding bits // # are (2^0+2^1+2^2+2^3+2^4+2^5)=63, which is 3F in hex. // tcsend PC103420 {PP071420 0x0A00003F LO} // waittime 1.0 operand = 0xa00003f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //----------------- // End of Procedure //----------------- } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Template for a PHOT AOT with chopped nodding in raster // OBCP used: OBCP_chopped_photometry (OBCP#3) // Calls nodding_raster_pointing (3.6 in Point document) // Author : DAC // // Arguments : See input list below // // Prerequisite : PACS is PHOT ready (PHOT_orbit_prologue), SPU is stopped // and ready to be (re)configured. // // Description : Uses OBCP3 // Comments : // // Version : 0.1 // History : 0.1 18-feb-2008 DAC // 0.2 19-feb-2008 - Use PacsPhotSlewCal // - Read more input parameters // 1.0 21-oct-2008 - VDP - PSF for DL // // obs PacsCal_Phot_PSF { /* Needed variables to call PHOT_NodRaster */ /* string fltPOS = "POS A" in ["POS A","POS B"]; // Fltw position */ string psfMeth = "flexible" in ["flexible","tripleChop"]; string filter = "blue1" in ["blue1","blue2"]; string gain = "LOW" in ["LOW","HIGH"]; // BOLC gain int nrepeat = 1; /* */ /* OBCP related parameters */ /* */ /* PHOT compression modes */ /* 0x00 BOL0: Default */ /* 0x01 BOL1: Double Compression */ /* 0x02 BOL2: Half Compression */ /* 0x04 BOL4: Lossless Compression */ /* 0x07 BOL7: Transparent */ /* 0x09 BOL9: Buffer Transmission */ int comp_mode_blu = 0x0; // Compression mode int comp_mode_red = 0x0; // Compression mode int nraw_blu = 3; // Number of raw pixels int nraw_red = 3; // Number of raw pixels int nb_SRC_REF = 2; // Nb of SRC-REF1-SRC-REF2 cycles int nb_rd_plateau = 31; // Nb rdouts/plateau (4*nn - 1) int nb_cycles_obs_cal = 1; // Outermost DMC loop int nb_CS1_CS2 = 0; // Loop on CSs /* Pointing parameters */ /* The ofssets are passed directly to the PointReq. Unless changed the */ /* telecope boresight will fall in between SRC and REF */ double ra = 0.0; // RA (returned by xHPOT pop-up window) double dec = 0.0; // DEC (ditto) double srcAngle = 0.0; // For tripleChop, double source position angle on sky [degrees] double yoffset = 0.0; // yoffset [arcsec] used as is in PntReq double zoffset = 0.0; // zoffset [arcsec] used as is in PntReq bool centroid = true; // centroid Method double srcSep = 0.0; // For tripleChop, sources separation [arsec] int naifid = 0; // (Source type: > 0 for Solar System source (N/A for tripleChop method) /* Raster parameters */ int m = 2 in [2,100]; // Number of raster points int n = 1 in [1,100]; // Number of raster lines double d1 = 2.0 in [2.0,480.0]; // Raster point step [arcsec] double d2 = 2.0 in [2.0,480.0]; // Raster line separation [arcsec] bool fixed = false; // Raster in S/C (false) or SKY coordinates (true for tripleChop) double nodthrow = 30.0 in [2.0,960.0]; // Nod throw [arcsec] double chopthrow = 30.0; // Chop throw [arcsec] double patt = 0.0; // Raster pattern orientation double pattnod = 270.0; // Nodding orientation (def: along y-axis) int nnod = 1; // Number of Aa aA ... nods bool startAtB = false; // start at off-nod B position /* NOTE: raster size shall not be larger than 14880x14880 arcsec */ /* Overall "verbosity" */ bool verbose = true; }{ // Compute duration of tasks to be performed during slew to source // Set OBSID int timeOBSID = duration(WriteOBSID($OBSID)); // Condition BOLC to gain setting. This may change the data rate but SPU // is still stopped and a proper comp_mode may be defined // Can I set the gain directly (Thomas says "yes") int timeGAIN = duration(PHOT_set_gain(gain)); // Use PacsPhotSlewCal from AOT code. Define three input tuples // SPU-like parameters {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,comp_mode_blu,0,nraw_blu,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,comp_mode_red,0,nraw_red,0,0,0,0,0}]; // OBCP-like values (none is used since SlewCal takes them from OBCP$params) {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Perform the calibration block now bool doProlog = true; int timeCAL = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter)); // // Before dealing with the OBCP, obtain the chopper position for CS1 & CS2 // (likely not to be used here, but just for completeness) int chop_pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); if(psfMeth == "flexible") { // The chopper moves from -chopthrow/2 to +chopthrow/2 [arcsec] double auxSRC = -chopthrow / 2.0; double auxREF = +chopthrow / 2.0; int chop_pos_SRC = PacsReadChopSky("PHOT_CHOP_sky",auxSRC); int chop_pos_REF = PacsReadChopSky("PHOT_CHOP_sky",auxREF); } else { chopthrow = srcSep; auxSRC = -chopthrow / 2.0; auxREF = +chopthrow / 2.0; chop_pos_SRC = PacsReadChopSky("PHOT_CHOP_sky",auxSRC); chop_pos_REF = PacsReadChopSky("PHOT_CHOP_sky",auxREF); } // Report settings if verbose if(verbose) { debug_print("+++CHOPPER, SRC: " + auxSRC + " [arcsec] -> " + chop_pos_SRC + " [ENG]"); debug_print("+++CHOPPER, REF: " + auxREF + " [arcsec] -> " + chop_pos_REF + " [ENG]"); } // Default position for chopper int chop_def = ilookup("SPEC_MEC_Defaults","Photometry","chopper"); // Duration of OBCP to be performed ON and NOD int tp = duration(OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def)); if(verbose) { debug_print("Duration of OBCP " + tp + " [sec]"); } // tp cannot be shorted than 10 sec if(tp < 10) { error("The OBCP cannot be shorter than 10 sec; adjust your OBCP parameters"); } // // Several arguments needed for "nodding_raster_pointing" // //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = timeOBSID + timeGAIN + timeCAL; if(verbose) { debug_print("+++SlewMinTime is " + tslewmin + " [sec]"); } //Initial hold int tih = 0; //Final hold // Need 1 sec to WriteEndID() and close OBS int tfh = 1; //Use PHOT virtual aperture string ib = "P01_0"; //Issue PointReq // Still undefined pointing variables // Number of points/scan lines before going to OFF int k = 0; // Number of nods/raster/scan before performing a hold int nhold = 0; // Duration of a hold operation int thold = 0; // Time spent at OFF int top = 0; // Coordinates of OFF position double raoff = 0.0; double decoff = 0.0; // Repetitions of pattern // The minimum duration of return slew between repetitions int trepeatmin = 0; // Minimum duration of a "load" operation int tloadmin = 0; // Number of slews before starting a "load" slew int nload = 0; // Issue de PointReq if(psfMeth == "tripleChop") { patt = 0.0; pattnod = 270.0 + srcAngle; if(centroid) { zoffset = 0.5 * srcSep * cos(srcAngle); yoffset = 0.5 * srcSep * sin(srcAngle); } int tpa = tp; int tpb = tpa; int[] ts = nodding_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnod,chopthrow,tpa,tpb,tloadmin,nload,thold,nhold,startAtB); } else { ts = nodding_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodthrow,nnod,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID, move filter, set gain, perform prologue WriteOBSID($OBSID); data_rate(120.0); PHOT_set_gain(gain); PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the OBCP with the known parameters OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } if(state[0] == 7) { tNOW = time(); if(verbose) { debug_print("NOD starts at " + tNOW); } // Call the OBCP with the same parameters as for POINT OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); tNOW = time(); if(verbose) { debug_print("NOD ends at " + tNOW); } } } } // File : PACS_Spec_Flash_SWON.cus // Missionphase : PACS FM ILT tests // // Purpose : SWON Flashers // // Author : P. Royer // // Arguments : blue & red Heater currents // // Description : SWON Flashers // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jun-2006 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose SWON Flashers // @comment - // block PACS_Spec_Flash_SWON PACS 165 { }{ // Register start of BB WriteBBID($BBID); // // SWON FLASHERS // Pacs_DMC_SWON_BD_FLASHER(); Pacs_DMC_SWON_RD_FLASHER(); // // End of procedure //------------------ } // CVS comments : $Id: PacsRangeSpecCheckFillRange.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Missionphase : Operations // // Purpose : Check that HSPOT given ranges agree with U-CAL values, // return corresponding grating positions or null values if // range exceeds U-CAL specifications. Special logic for "SED" // observations // // CUS author : DAC // Script file : PacsRangeSpecRangeCheck.txt // // Input arguments // type name description // {string,double,double,double,double,double, ranges Variable from HSPOT // Returns "rangeInfo": {string,int,int,int,double,double} // {ObsType,ORDER,grat_pos_blue,grat_pos_red,grat_step,wave_blu,wave_red} // returns [0,0,0] when rangeWave is invalid // Description : Compares HSPOT ranges with limits defined in SPEC_BAND_params // CAL file. Returns grating start/stop positions for all // complying ranges; grating positions are obtained from // dedicated CAL files (file names found in SPEC_BAND_params) // Dependencies : low level CUS functions // // Preconditions : // // Comments : // // History : 0.1 21-Jun-2005 DAC // 1.0 15-sep-2005 Adapted for "OBS" CUS script, call argument is "ranges" // 1.1 16-sep-2005 Add gratStep element to rangeInfo; renamed to // PacsRangeSpecCheckFillRange since now it adds gratStep // 1.2 11-may-2006 Element {3} of ranges is now an integer // 1.3 22-jun-2006 ranges now contains lineWidth. grating and density variables // have changed possible values. Call them xxxNEW and use // "conversion" tables not to change the logic of module // 1.4 22-nov-2006 Move verbose into call list // 1.5 25-jan-2007 Read CAL-U using new xcolumn function // 2.0 12-apr-2007 Several changes for SCR-3050. For RANGE find order given // BLU and RED wavelengths; for SED read directly the relevant // CAL-U row based on HSPOT input // 2.1 18-apr-2007 Now keeping user defined rangeID; change some logic to // recognize RANGE and SED // 3.0 27-apr-2007 Define rangeWave as rangeSPOT // 4.0 11-jun-2007 SPR-3281 Change logic: now checks ORDER rather than finding // ORDER. Added orderSel to input list // {string,int,int,int,int,double,double}[] procedure PacsRangeSpecCheckFillRange { {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = [{"SED",55.0,70.0,0,0.0,0.0,0.0,"","",0.0}]; string densityNEW = "high" in ["nyquist","high"]; string gratingNEW = "nyquist" in ["nyquist","nyquist"]; string orderSel = "order3"; bool verbose = false; }{ // Old values of density and grating // string density = "high" in ["high","medium","low"]; // string grating = "medium" in ["fast","low","medium"]; // "Conversion" tables for new nomenclature string density = "high"; if(densityNEW == "nyquist") { density = "low"; } string grating = "medium"; // Variable to map SPEC_BAND_params file in memory string calU = "SPEC_BAND_params"; {string,double,double,int,int,int,string}[] file_map = [{"",0.0,0.0,0,0,0,""}]; // Map the whole SPEC_BANDS_params table in memory and create file_map tuple string[] keyCol = scolumn(calU,"ORDER"); double[] lo = dcolumn(calU,"BLU"); double[] hi = dcolumn(calU,"RED"); int[] lowStep = icolumn(calU,"LOW"); int[] medStep = icolumn(calU,"MED"); int[] hiStep = icolumn(calU,"HI"); string[] name = scolumn(calU,"CAL_FILE"); // Currently SPEC_BAND_params has nrows int nrows = table_size(calU); // Map it to "file_map" for(int order = 0 .. nrows - 1) { file_map[order] = {keyCol[order],lo[order],hi[order],lowStep[order],medStep[order],hiStep[order],name[order]}; } // Number of input range tuples int nbrangeSPOT = length(rangeSPOT); // Review each input range for conformity with SPEC_BAND_params; if OK get // the grating positions for the red and blue edges // Procedure returns tuple rangeInfo: // {typeOBS,ORDER,bluGRAT,redGRAT,stepGRAT,bluWAVE,redWAVE} {string,int,int,int,int,double,double}[] rangeInfo = [{"SED",0,0,0,0,0.0,0.0}]; // Start loop per HSPOT range (in SED mode the range tuple is furnished by // PacsRangeSpecSed) for(int loop0 = 0 .. nbrangeSPOT - 1) { string typeOBS = rangeSPOT[loop0]{0}; double bluHSPOT = rangeSPOT[loop0]{1}; double redHSPOT = rangeSPOT[loop0]{2}; // An all [0,0,0] rangeInfo means contents of rangeSPOT not found rangeInfo[loop0] = {"NONE",0,0,0,0,bluHSPOT,redHSPOT}; bool found = false; // If SED observations, search SPEC_BANDS_params past the // three canonical rows (i.e. ORDER=1, 2, and 3) // In RANGE mode there is no ORDER=1 specification (ORDER can be 2 or 3) // Always check for ORDER=1 and then for given order // Hence, check order from first column and then from ORDERth column // First index into SPEC_BAND_params int index0 = 0; // Establish next index if(orderSel == "order2") { int index1 = 1; } if(orderSel == "order3") { index1 = 2; } bool isRange = orderSel == "order2" || orderSel == "order3"; if(isRange) { int count = 1; int index = index0; while(!found && count < 3) { if(verbose) { debug_print("CheckRange: using index: " + index); } found = bluHSPOT >= file_map[index]{1} && redHSPOT <= file_map[index]{2}; // Found the relevant row in SPEC_BAND_params! if(found) { // Read associated CAL file; obtain grating positions string file_name = file_map[index]{6}; // "Canonical" ORDER 1, 2, or 3, i.e. "RANGE" observations if(verbose) { debug_print("CheckRange found RANGE OBS at index: " + index); } double grat_lo = interpolate(file_name,"grat_pos",bluHSPOT); double grat_hi = interpolate(file_name,"grat_pos",redHSPOT); rangeInfo[loop0]{0} = typeOBS; order = index + 1; rangeInfo[loop0]{1} = order; rangeInfo[loop0]{2} = iround(grat_lo); rangeInfo[loop0]{3} = iround(grat_hi); rangeInfo[loop0]{5} = bluHSPOT; rangeInfo[loop0]{6} = redHSPOT; // Get the gratStep (defined by "density") if(density == "high") { rangeInfo[loop0]{4} = file_map[index]{5}; } if(density == "medium") { rangeInfo[loop0]{4} = file_map[index]{4}; } if(density == "low") { rangeInfo[loop0]{4} = file_map[index]{3}; } // Found } // Not yet found index = index1; count = count + 1; } // Enter error if RANGE not found if(!found) { error("Range " + bluHSPOT + "-" + redHSPOT + " is off allowed bounds"); } // SED observations } else { // Read relevant line according to "sedX" // Entry key to SPEC_BANDS_params int keyINT = 4; ///Now as input argument: orderSel = typeOBS; if(orderSel == "sed3") { keyINT = 5; } if(orderSel == "sed4") { keyINT = 6; } string key = "" + keyINT; // Associated CAL file to obtain grating positions // Update index0 index0 = keyINT - 1; file_name = file_map[index0]{6}; // Entry key to SPEC_SED keyINT = keyINT - 3; key = "" + keyINT; grat_lo = dlookup(file_name,key,"BLU"); grat_hi = dlookup(file_name,key,"RED"); order = ilookup(file_name,key,"ORDER"); rangeInfo[loop0]{0} = typeOBS; rangeInfo[loop0]{1} = order; rangeInfo[loop0]{2} = iround(grat_lo); rangeInfo[loop0]{3} = iround(grat_hi); rangeInfo[loop0]{5} = bluHSPOT; rangeInfo[loop0]{6} = redHSPOT; // Get the gratStep (defined by "grating") if(grating == "low") { rangeInfo[loop0]{4} = file_map[index0]{5}; } if(grating == "medium") { rangeInfo[loop0]{4} = file_map[index0]{4}; } if(grating == "fast") { rangeInfo[loop0]{4} = file_map[index0]{3}; } // SED mode ends here } if(verbose) { debug_print("###CheckFill used table " + file_name); debug_print("###CheckFill grat lo/hi/order: " + grat_lo + "/" + grat_hi + "/" + order); } // End loop on nbRanges } if(verbose) { debug_print("## PacsRangeSpecCheckFillRange reads SPEC_BAND; returns: " + rangeInfo); } return rangeInfo; } // File : PACS_Spec_Flash_SWOF.cus // Missionphase : PACS FM ILT tests // // Purpose : SWOF Flashers // // Author : P. Royer // // Arguments : blue & red Heater currents // // Description : SWOF Flashers // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jun-2006 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose SWOF Flashers // @comment - // block PACS_Spec_Flash_SWOF PACS 167 { }{ // Register start of BB WriteBBID($BBID); // // SWOF FLASHERS // Pacs_DMC_SWOF_BD_FLASHER(); Pacs_DMC_SWOF_RD_FLASHER(); // // End of procedure //------------------ } // $Id: OBCP_grat_scan_chop2.txt,v 1.6 2007/08/22 10:18:28 dcesarsk Exp $ // Purpose : // // OBCP author : HF // TCL file : N/A // CUS author : DAC // Script file : OBCP_27_grat_line_scan_chopped_2.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Belongs to Section 3.8: Grating Spectral Line Scan // of PACS-ME-LI-005 // Consists mainly of a sequence with repetitive up- and // down-scans with the grating around a given center position, // while the chopper is operating as well on either two- or // three-positions. This is OBCP 3.8.2, calling DMC sequence // 12 (in 4.2.2) // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-apr-2005 DAC // 0.2 22-apr-2005 Rearranged arguments P#1 P#2 etc. // 0.3 25-apr-2005 DAC Use same defaults as TM's scripts // 0.4 27-apr-2005 DAC MIB name is GRAT_SCAN_CHOP2 (not _2) // 1.0 26-aug-2005 Renamed to MIB name (but lower case); // corresponding DMC is also renamed // 1.1 21-aug-2007 SRC-3507 Indicate end of BB // int[] block OBCP_grat_scan_chop2 PACS 27 { int nb_up_down = 1; // Nb of "up-down" sequences (P#1); int nb_grat_steps = 100; // Nb of grating steps (P#2) int nb_SRC_REF = 1; // Nb of cycles per grating position (P#3); int chop_pos_REF1 = 1000; // Chopper position 1 (P#4) int nb_ramps_plateau = 1; // Nb of readouts per chopper position (P#5); int chop_pos_REF2 = 3000; // Chopper position 2 (P#6) int nb_CS1_CS2 = 0; // Nb of cycles on the internal CSs (P#7); int chop_pos_CS1 = -25000; // Chopper position on CS1 (P#8) int chop_pos_CS2 = 25000; // Chopper position on CS2 (P#9) int grat_step_up = 1600; // Grating step up (P#10) int grat_step_dn = 1600; // Grating step down (P#11) int detector = 2; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 445000; // Starting grating position int grat_time = 0; // Grating time to move to start [msec] int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopper default position int grat_def_time = 0; // Time to come back to default position int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; //debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); //debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // OBCP_GRATING_LINE_SCAN_CHOPPED_2(seq, seq_time, // P#1,&,P#11, detector, grat_def, grat_time, // cmp_par_blue, cmp_par_red, grat_def, chop_def, grat_time) // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all parameters filled // by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE ////////////////////////////////////////////////////////////////////////// // Call DEC/MEC code to estimate its duration duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; int[] duree1 = DMC_grat_scan_chop2(nb_up_down,nb_grat_steps,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_REF); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // debug_print("Execution time [msec] from DMC: " + seq_time); // duree_msec(seq_time) duree_msec = duree_msec + t_cmd + seq_time; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 27, requires 21 parameters and calls DEC/MEC #12 string obcp_ID = "GRAT_SCAN_CHOP2"; int obcp_par_nb = 21; int seq_DMC = 12; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_SRC_REF},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,grat_step_up},{13,grat_step_dn},{14,detector},{15,grat_pos},{16,grat_time},{17,comp_mode_blu},{18,comp_mode_red},{19,grat_def},{20,chop_def},{21,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // debug_print(obcp_ID + ": " + time_array); delay(time_array[0]); // Mark end of BB WriteEndBB(); // Return the array of times return time_array; } // File : PACS_Spec_Gra_Diaghk_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Switch on diagnostic hk relevant to grating // // Author : B.Vandenbussche // CUSification : DAC // Arguments : // // Description : Grating diagnostic housekeeping ON // : // Comments : // // // Version : 1.6 // History : 1.0 / 12-Jan-2004 initial version by BV // 1.1 / 12-Jan-2004 checksum on actual parameters only - BV // 1.2 / 13-Jan-2004 bug fix in list syntax // 1.3 / 22-Jun-2004 Update for DMC UM 2.8 // 1.4 / 13-Sep-2004 Changed hk period to 5ms // 1.5 / 15-Nov-2004 Inclusion of LL parameter // (unification of -previously 2- diaghk_setup scripts) // 1.6 / 07-Apr-2006 // Turned procedure into block (called by mode) // parametrize diag_hk_period // introduce DMC_GRAT_IND_READ (512) // // ----------------------------------- // @author B. Vandenbussche // @date today // @version 1.6 // @purpose Switch on diagnostic housekeeping relevant to grating // @comment - // ------------------------------ // Uncomment to test the script for tcl syntax using a normal tcl interpreter // source offlinetest.tcl // Uncomment till here ---------- block PACS_Spec_Gra_Diaghk_Setup PACS 150 { int diag_hk_period = 5; // 5 msec diag hk period }{ // Register start of BB WriteBBID($BBID); // DMC_WRT_DIAG_HK_LIST // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_GRAT_CTRL_ST 208 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_GRAT_PID_ERR 253 // DMC_GRAT_PID_ACC 254 // DMC_GRAT_OUTPUT 452 // DMC_GRAT_IND_READ 512 // DMC_GRAT_LL2_CUR 570 {int}[] list_tuple = [{256},{257},{556},{564},{560},{567},{208},{250},{251},{252},{253},{254},{452},{512},{570},{0xffff}]; int[] list_int = [256,257,556,564,560,567,208,250,251,252,253,254,452,512,570,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // End of procedure //----------------- // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Monitor the behaviour of Vrl and VhBlind // as a function of the temperature variation // <=> PCD req.1.1.6. Pixel offset with temperature // // Author : Koryo Okumura // // Argument : // niter : Number of small blocks to repeat // nVrls : Number of VRL values to explore // initialBiasTable : File name of a low gain biase table for the setting during the measurement // finalBiasTable : File name of a high gain biase table to reset at the end // stabilizationWaitTime : stanilization time in seconds // acquisitionTime : data acquisition duration in seconds // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is set // // Description : Observation calling the procedure Phot_small_Vrl_VhBlind // // // Version : 1.0 // History : 0.1 0 Koryo Okumura // 0.2 15-nov-2006 KO Eliminate 0.0 volts // 0.3 01-dec-2006 KO Change for the high gain direct measurement // 1.0 04-mar-2008 VD translated into PV script VDP // 1.1 07-mar-2008 KO Input variables relocated in the first block // 1.2 10-mar-2008 KO Default vhbs and vrls set for the low gain part of the complete version obs PacsEng_Phot_VrlVhBlind { /* Needed variables to call PacsEng_Phot_VrlVhBlind */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ int niter = 1; /*double[] vhbs = [2.0,2.25];*/ /*double[] vrls = [0.05,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];*/ double[] vhbs = [2.4,2.2,2.0,1.8]; double[] vrls = [0.05,0.1,0.2,0.25,0.3,0.4,0.5,0.6,0.65,0.7,0.8]; string initialBiasTable = "BOLObias_preILT_standard_low"; int stabilizationWaitTime = 90; int acquisitionTime = 30; /* End of needed variables for PacsEng_Phot_VrlVhBlind */ }{ // 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(Phot_small_Vrl_VhBlind_IST(niter,vhbs,vrls,initialBiasTable,stabilizationWaitTime,acquisitionTime))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Phot_small_Vrl_VhBlind_IST(niter,vhbs,vrls,initialBiasTable,stabilizationWaitTime,acquisitionTime); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Read a BOLObias calibration table and command bias // voltages for VH, VL, VRL and VH_BLIND group by group // // Author : Koryo Okumura // CUS script : Koryo Okumura modified from PHOT_set_bias_volt.txt // CVS file : PHOT_change_bias_volt.cus // // Arguments : // string calTableName The Cal table name, f.i. BOLObias or BOLOsafe // // Description : Read VH, VL, VRL and VH_BLIND from a given Bias U-CAL // tables in volts and command them // // Dependencies : // // Preconditions : The other biases should be alredy set by PHOT_set_bias // or PHOT_set_bias_volt // // Comments : This script is used especially in calibration purpose // // Version : 2.0 // History : // 24-aug-2006 KO, First try // 22-jul-2008 KO, Reformatted for CP, PV and operation phase // 10-oct-2008 VDP PV logic implemented // obs PacsEng_Phot_change_biases { string biasTable = "BOLObias_standard_high"; // Bias table [volts] string setting = "NO_CHANGE" in ["NO_CHANGE","DIRECT","DDCS"]; // Readout mode string gain = "NO_CHANGE" in ["NO_CHANGE","LOW","HIGH"]; // Gain }{ // 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(PHOT_change_biases(biasTable,setting,gain))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_change_biases(biasTable,setting,gain); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } //$Id: PHOT_dpu_dmc_setup.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : // // Purpose : Prepare DPU and DMC for photometry // // TCL author : TM // TCL file : tm_phot_dpu_dmc_setup.tcl // CUS author : DAC // Script file : PHOT_dpu_dmc_setup.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will set the DPU HK list, write and set the // FPGA timing parameters (if necessary), set the // synchronization source for the sequencer, forward data // to the packet encoder and validate the sciece data // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.1 // History : 0.1 11-apr-2005 creation by DAC; based on V1.2 of TM // 0.2 13-apr-2005 DAC Graded as a procedure // 0.3 20-oct-2005 DAC Use FPGA parameters from SPEC // : 1.0 12-apr-2006 update by TM for new FPGA parameter settings // taking out switch-on of temp sensors // 1.1 11-aug-2006 TM delay(1) introduced between sequential // FPGA parameter settings // 2.0 21-nov-2006 Removed "duree" information; introduced // CAL file holding FPGA parametrer phase_inc // Spelled out FPGA parameters // 2.1 15-jan-2008 Script renamed *txt for PV database, added // demanded TC as per SCR-0797 // 2.2 15-Jul-2008 update IA_CHOP address // 2.3 11-nov-2008 change phase_shift_reg to 1 procedure PHOT_dpu_dmc_setup { string hk_list = "BOTH Array" in ["BOTH Array","BLUE Array","RED Array"]; /* sync source */ /* 1 = synchronize on blue spectrometer ramps */ /* 2 = synchronize on red spectrometer ramps */ /* 4 = synchronize on BOL readouts */ int sync_srce = 4; }{ // Start regular HK Pacs_DPU_SET_HK_LIST("PHOT",hk_list); // Add chop_ia information as per SCR-0797 // Description of DMC_WRT_DIAG_HK_CONF_TAB from DEC/MEC User Manual: // // Custom Hk Configuration Table : This buffer contains configuration data // allowing us to increase the number of available HK measure without // recompiling the application. The table is composed of 10 entries each of // them being 5 words long: //f1. the address of the memory area to monitor // int f1 = 0x3469f; int f1 = 0x346ab; //f2. the size (in words) of the memory area to monitor int f2 = 0x1; //f3. the size (in bytes) of the memory area to monitor int f3 = 0x2; //f4. a pointer to a function performing the monitoring (if you want to use this // field, it is highly probable that you need to patch your code anyway to // upload the new monitoring function). int f4 = 0x0; //f5. the validity at startup (0 = invalid, 1 = valid) int f5 = 0x1; // All the fields are initialized to zero at startup. (for advanced users only) {int}[] params = [{f1},{f2},{f3},{f4},{f5}]; int[] forsum = [f1,f2,f3,f4,f5]; int check_sum = checksum("int",forsum); int wrdLen = 5; Pacs_DMC_WRT_DIAGHK_CONF_TAB(wrdLen,params,check_sum); int iBOL = 4; params = [{iBOL}]; check_sum = checksum("int",[iBOL]); Pacs_DMC_WRT_BOL_REC_OPT(params,check_sum); // DEC/MEC User Manual; section 4.4.3 // 1. and 2. Stop forwarding data to packet encoder (bit 2 set) int iPAR = 4; params = [{iPAR}]; check_sum = checksum("int",[iPAR]); Pacs_DMC_WRT_B_DEC_REC_OPT(params,check_sum); Pacs_DMC_WRT_R_DEC_REC_OPT(params,check_sum); // 3. Upload DMC_WRT_TIMING_FPGA_PAR with {0,1,0,26,0x977602A,0x32} // Write and set FPGA timing parameters // DMC_WRT_TIMING_FPGA_PAR int sync_src_det = 0; // changes for Phase shift from 0 to 1 int phase_shift_reg = 1; int bolc_freq_div = 0; int pd5_reg = 26; //int phase_inc: read from CAL-U file FPGA_params int ctrl_reg = 0x32; // Read phase_inc from CAL-U file FPGA_params. // Here we always read the row "Plast". When updating the CAL-U file rename // the existing "Plast" row to "Pold1", "Pold2", etc. and add the latest // phase_inc in the new row "Plast" int phase_inc = ilookup("FPGA_params","Plast","phase_inc"); int[] aux = [sync_src_det,phase_shift_reg,bolc_freq_div,pd5_reg,phase_inc,ctrl_reg]; check_sum = checksum("int",aux); {int}[] parlist = Array2grp_1(aux); // Write to register and activate Pacs_DMC_WRT_TIMING_FPGA_PAR(parlist,check_sum); // 4. Apply the new parameters Pacs_DMC_SET_TIMING_FPGA_PAR(); // 5. Change the sync signal Pacs_DMC_SYNCHRONIZE_ON_DET(sync_srce); // 6. Wait 1 second delay(1); //7. Upload WRT_TIMING_FPGA_PAR with {0,1,0,26,0x977602A,0x22} ctrl_reg = 0x22; aux = [sync_src_det,phase_shift_reg,bolc_freq_div,pd5_reg,phase_inc,ctrl_reg]; check_sum = checksum("int",aux); parlist = Array2grp_1(aux); // Write to register and activate Pacs_DMC_WRT_TIMING_FPGA_PAR(parlist,check_sum); // 8. Apply the new parameters Pacs_DMC_SET_TIMING_FPGA_PAR(); // 9. Start forwarding data from BOL to SPU (bit 2 is clear) iBOL = 0; params = [{iBOL}]; check_sum = checksum("int",[iBOL]); Pacs_DMC_WRT_BOL_REC_OPT(params,check_sum); // Validate science data photometry Pacs_DMC_VAL_SCI_DATA_BOTH(); } // SpireBbEndObs // // $Id: SpireBbEndObs.txt,v 1.1 2007/08/02 10:15:44 kking Exp $ // // Building Block to reconfigure after an engineering observation // block SpireBbEndObs SPIRE 3 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB End Obs started"); SpireMsg(2," $Id: SpireBbEndObs.txt,v 1.1 2007/08/02 10:15:44 kking Exp $"); // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); delay(1); // // set STEP to one tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0001)"); Spire_SET_OBS_STEP_RAW(0x1); delay(1); // // Clear OBSID/BBID/STEP to null values int obsId = SpireNullObsid(); tstr = SpireTimeStr(time()); hstr = SpireHexStr(obsId,8); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBSID_RAW(" + hstr + ")"); Spire_SET_OBSID_RAW(obsId); delay(1); // // set STEP to zero tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0000)"); Spire_SET_OBS_STEP_RAW(0x0); // tstr = SpireTimeStr(time()); message("5 " + tstr + "Cmd: Spire_SET_BBID_RAW(0x80000000)"); Spire_SET_BBID_RAW(0x80000000); delay(1); // // ..... completion ..... tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB End Obs ended"); SpireMsg(1," ..Obs Reconfiguration (" + (time() - t) + " seconds)"); } // Script file : DMC_grat_line_scan_chop2_fast.txt // Purpose : Compute execution time of DMC #17: // Grating Line Scan with Two position chopping fast // // TCL author : N/A Pseudo code by HF // TCL file : N/A // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Similar to 4.2.2 but without "wait 1" statements // // Dependencies : // // Preconditions : None. // // Comments : No TC are generated; only times are computed // // History : 0.1 26-jun-2006 DAC int[] procedure DMC_grat_scan_chop2_fast { int nb_up_down = 1; // Seq P#1 : Nb of sequences: up down up ... int nb_grat_steps = 1; // Seq P#2 : Nb of grating steps (up/down scans) int nb_ramps_plateau = 1; // Seq P#5 : Nb of ramps per chopper position int nb_CS1_CS2 = 1; // Seq P#7 Nb of cycles on CS, per grating position int nb_cycles_grat_pos = 1; // Seq P#3 : Nb of cycles per grating position }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // WAIT 1 ; have a defined start duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop measurement for(int up_down = 1 .. nb_up_down) { //LOOP P#2 ; grating loop up for(int up = 1 .. nb_grat_steps) { // MOVE_GRATING_RELATIVE P#10 ; increment grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_1 = 1 .. nb_cycles_grat_pos) { // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 3 ; first chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#4 is the SRC position... duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // *Assume* P#5 is the REF position... // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 5 ; next chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#6 is the REF position... duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_1 = 1 .. nb_CS1_CS2) { // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 65 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 129 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan up done } // LOOP P#2 ; grating loop down for(int down = 1 .. nb_grat_steps) { // MOVE_GRATING_RELATIVE P#11 ; decrement grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_2 = 1 .. nb_cycles_grat_pos) { // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 19 ; first chopper pos. // WAIT P#5 ; take P#5 ramps duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 21 ; next chopper pos. // WAIT P#5 ; take P#5 ramps duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_2 = 1 .. nb_CS1_CS2) { // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 81 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 145 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan down done } // END_LOOP ; main loop done } // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // duration, in ramps : 1 + P#1 * 2 * P#2 * {(P#3 + P#7) * (2*P#5)} int duree = 1 + nb_up_down * 2 * nb_grat_steps * ((nb_cycles_grat_pos + nb_CS1_CS2) * 2 * nb_ramps_plateau); debug_print("Formula duration DMC: " + duree + " [ramps]"); debug_print("Computed duration DMC: " + duree_num + " [ramps]"); // Time spent int duree_TCs = time() - time_start; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // CVS comments : $Id: PacsArrayMinMax.txt,v 1.3 2007/05/23 07:25:35 dcesarsk Exp $ // Script file : PacsArrayMinMax.txt // // Purpose : Return the indices for the MIN and MAX element of an array // // CUS author : DAC // // Input arguments // double anyArray[] // // Return values // [indexMin,indexMax] // // Description : Returns the position of the largest/smallest member of // input anyArray // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-apr-2007 DAC // int[] procedure PacsArrayMinMax { double[] anyArray = [0.0]; bool verbose = false; }{ // Establish nbElem of array int nbElem = length(anyArray); // Define return values (-1 means error) int posMin = -1; int posMax = -1; // Impossible boundaries double theMax = -1.0E-30; double theMin = 1.0E30; // Review all elements of anyArray for(int loop = 0 .. nbElem - 1) { double aux = anyArray[loop]; if(aux < theMin) { theMin = aux; posMin = loop; } if(aux > theMax) { theMax = aux; posMax = loop; } } return [posMin,posMax]; } // // Purpose : Exercise all available OBCPs for SPECtroscopy // // // // TCL author : N/A // TCL file : tN/A // CUS author : DAC // Script file : SPEC_all_aots_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : SPEC_setup has been executed // // Comments : // // Version 2.0 // History 0.1 25-apr-2005 DAC // 0.2 26-apr-2005 DAC Added SPEC_spu_setup and PACS_reset // 0.3 26-apr-2005 DAC SPEC_aot_prologue instead of SPEC_spu_setup // 0.4 20-sep-2005 Correcred up/dn grating steps // 0.5 25-oct-2005 DAC Use fit_alg = 0 // 0.6 09-aug-2006 TM updated for both filters, new OBCP, new default parameters // and SPEC_spu_setup (instead of SPEC_aot_prologue) // 0.7 10-aug-2006 TM shorten execution length // 0.8 09-aug-2006 TM synchronisation sources for OBCP27 changed from 2 to 1 // 1.0 17-nov-2006 Reviewed for OpDataBase // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Spec_all_aots { }{ // Register with environment // Start SPU int comp_mode_blu = 16; int comp_mode_red = 16; int nb_samp_subramp_blu = 64; int nb_samp_subramp_red = 64; int nb_raw_spu_blu = 0; int nb_raw_spu_red = 0; int glitch_det = 1; int ramp_fit_alg = 0; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,true); // // Position the filter wheel at POS A // SPEC_fltw_move("POS A"); // // Perform OBCP_spec_2_3_chop with default parameters debug_print("Start OBCP_spec_2_3_chop"); int[] duree = OBCP_spec_2_3_chop(1,16,1,1000,1,-3000,5000,1,-22500,22500,168,-168,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_2_3_chop: " + duree); delay(2); // Perform OBCP_spec_2_3_chop_dither with default parameters debug_print("Start OBCP_spec_2_3_chop_dither"); duree = OBCP_spec_2_3_chop_dither(1,16,1,1000,1,-3000,5000,1,-22500,22500,168,-168,1,461000,20000,16,16,500000,0,10000,100,64); debug_print("Duration from OBCP_spec_2_3_chop_dither: " + duree); delay(2); // Perform OBCP_grat_line_scan_chop_2 with default parameters debug_print("Start OBCP_grat_line_scan_chop_2"); duree = OBCP_grat_line_scan_chop_2(1,32,1,1000,1,3000,1,-22500,22500,168,-168,1,445000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_grat_line_scan_chop_2: " + duree); delay(2); // Perform OBCP_grat_scan_chop2_fast with default parameters debug_print("Start OBCP_grat_scan_chop2_fast"); duree = OBCP_grat_scan_chop2_fast(1,48,1,1000,1,-2000,1,-22500,22500,240,-240,1,445000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_grat_scan_chop2_fast: " + duree); delay(2); // Perform OBCP_grat_scan_nochop with default parameters debug_print("Start OBCP_grat_scan_nochop"); duree = OBCP_grat_scan_nochop(1,20,1600,-1600,3,1,-22500,22500,3,20,0,1,445000,20000,16,16,500000,10000,64); debug_print("Duration from OBCP_grat_scan_nochop: " + duree); delay(2); // Perform OBCP_spec_2_3_chop with default parameters debug_print("Start OBCP_spec_2_3_chop"); duree = OBCP_spec_2_3_chop(1,16,1,1000,1,-3000,5000,1,-22500,22500,2500,-2500,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_2_3_chop: " + duree); delay(2); // Perform OBCP_chop_grat_scan_cal with default parameters debug_print("Start OBCP_chop_grat_scan_cal"); duree = OBCP_chop_grat_scan_cal(1,0,16,133,2,-22500,3,22500,-133,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_chop_grat_scan_cal: " + duree); delay(2); // Perform OBCP_chop_scan_spec with default parameters debug_print("Start OBCP_chop_scan_spec"); duree = OBCP_chop_scan_spec(1,2,80,80,400,-400,1,486000,-16000,20000,16,16,500000,10000,0,64); debug_print("Duration from OBCP_chop_scan_spec: " + duree); delay(2); // Perform OBCP_spec_freq_switch with default parameters debug_print("Start OBCP_spec_freq_switch"); duree = OBCP_spec_freq_switch(2,1000,10,461000,3,454600,467400,1,-22500,1,22500,1,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_freq_switch: " + duree); delay(2); // // Position the filter wheel at POS B // SPEC_fltw_move("POS B"); // // Perform OBCP_spec_2_3_chop with default parameters debug_print("Start OBCP_spec_2_3_chop"); duree = OBCP_spec_2_3_chop(1,16,1,1000,1,-3000,5000,1,-22500,22500,168,-168,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_2_3_chop: " + duree); delay(2); // Perform OBCP_spec_2_3_chop_dither with default parameters debug_print("Start OBCP_spec_2_3_chop_dither"); duree = OBCP_spec_2_3_chop_dither(1,16,1,1000,1,-3000,5000,1,-22500,22500,168,-168,1,461000,20000,16,16,500000,0,10000,100,64); debug_print("Duration from OBCP_spec_2_3_chop_dither: " + duree); delay(2); // Perform OBCP_grat_line_scan_chop_2 with default parameters debug_print("Start OBCP_grat_line_scan_chop_2"); duree = OBCP_grat_line_scan_chop_2(1,32,1,1000,1,3000,1,-22500,22500,168,-168,1,445000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_grat_line_scan_chop_2: " + duree); delay(2); // Perform OBCP_grat_scan_chop2_fast with default parameters debug_print("Start OBCP_grat_scan_chop2_fast"); duree = OBCP_grat_scan_chop2_fast(1,48,1,1000,1,-2000,1,-22500,22500,240,-240,1,445000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_grat_scan_chop2_fast: " + duree); delay(2); // Perform OBCP_grat_scan_nochop with default parameters debug_print("Start OBCP_grat_scan_nochop"); duree = OBCP_grat_scan_nochop(1,20,1600,-1600,3,1,-22500,22500,3,20,0,1,445000,20000,16,16,500000,10000,64); debug_print("Duration from OBCP_grat_scan_nochop: " + duree); delay(2); // Perform OBCP_spec_2_3_chop with default parameters debug_print("Start OBCP_spec_2_3_chop"); duree = OBCP_spec_2_3_chop(1,16,1,1000,1,-3000,5000,1,-22500,22500,2500,-2500,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_2_3_chop: " + duree); delay(2); // Perform OBCP_chop_grat_scan_cal with default parameters debug_print("Start OBCP_chop_grat_scan_cal"); duree = OBCP_chop_grat_scan_cal(1,0,16,133,2,-22500,3,22500,-133,1,461000,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_chop_grat_scan_cal: " + duree); delay(2); // Perform OBCP_chop_scan_spec with default parameters debug_print("Start OBCP_chop_scan_spec"); duree = OBCP_chop_scan_spec(1,2,80,80,400,-400,1,486000,-16000,20000,16,16,500000,10000,0,64); debug_print("Duration from OBCP_chop_scan_spec: " + duree); delay(2); // Perform OBCP_spec_freq_switch with default parameters debug_print("Start OBCP_spec_freq_switch"); duree = OBCP_spec_freq_switch(2,1000,10,461000,3,454600,467400,1,-22500,1,22500,1,20000,16,16,500000,0,10000,64); debug_print("Duration from OBCP_spec_freq_switch: " + duree); delay(2); // // Position the filter wheel at POS A // SPEC_fltw_move("POS A"); // // Stop SPU // PACS_spu_reset(); // Leave environment sync(); } // File : procedure Pacs_Spec_Curing_Concept_Loop // Missionphase : PACS FM ILT tests // // Purpose : Ge:Ga detector Loop // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : bias, integration time, capacity, measurement time, resistor bias // // Description : Loop over bias, integration time and capacity. // // Dependencies : - SPEC_CRE_No_Heater_setup // - SPEC_spu_setup // - PACS_Chop_Move_Abs // - SPEC_spu_reset // // Comments : The input arrays for bias, ramp length & capacitance must have the same length for red & blue // // Version : 1.0 // History : 1.0 / 04-Jul-2008 initial version by PR // procedure Pacs_Spec_Curing_Concept_Loop { int repeat_intern = 10; // Repetition factor inside the bias loop (ramplen+capa loops) double[] bias_blue = [0.08,0.1,0.125,0.15,0.175,0.2]; //bias blue double[] bias_red = [0.02,0.03,0.04,0.05,0.06,0.07]; //bias red red int[] ramp_len_blue = [32,64]; //ramp length blue (set integration time) int[] ramp_len_red = [32,64]; //ramp length red (set integration time) int[] capa_blue = [8,12]; //capacity blue int[] capa_red = [8,12]; //capacity red int meas_time = 60; //observing time in seconds per setting double bias_res_blue = 0.01; //resistor bias blue double bias_res_red = 0.01; //resistor bias red int chop_pos = 21200; // chopper position int grat_pos = 535000; // grating position string filter_pos = "POS A" in ["POS A","POS B"]; // FW position int blue_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int nflash = 1; // Number of flashes int flash_time = 90; // Duration of each flash int interflash_time = 30; // Idle time between the flashes }{ // CURING PARAMETER int curing_mode = 0; // // Position the grating // ==================== Pacs_DMC_MOVE_GRAT_ABS(grat_pos); delay(15); // // Position the chopper // ==================== PACS_Chop_Move_Abs(chop_pos); delay(1); // // Position the filter wheel // ============= SPEC_fltw_move(filter_pos); // delay is contained in the procedure // // Declare the set of CRE variables // =================== double bias_d_blue = bias_blue[0]; double bias_d_red = bias_red[0]; int ramp_blue = ramp_len_blue[0]; int ramp_red = ramp_len_red[0]; int capacity_blue = capa_blue[0]; int capacity_red = capa_red[0]; // // Setup SPU // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 8; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 8; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Ramp fit algorithm [0=LstSq;1=mean value] int ramp_fit_alg = 1; // Start SPU or not [true,false] bool startSPU = true; // // determine length of arrays int bb = length(bias_blue); //length of bias blue int rlb = length(ramp_len_blue); //length of ramp length blue int cb = length(capa_blue); //length of capacity blue // // SPU RESET // SPEC_spu_reset(); delay(1); // // Setup CREs SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // BIAS LOOP // int blc = 0; while(blc < bb) { bias_d_blue = bias_blue[blc]; bias_d_red = bias_red[blc]; // // CURING // // SWON FLASHERS // PACS_Spec_Flash_SWON(); delay(5); // // Actual curing // ----------- for(int loopin = 1 .. nflash) { PACS_Spec_SPU_Reset(); delay(1); curing_mode = 1; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); delay(1); PACS_Spec_Flash_Setup(blue_flasher_current,red_flasher_current); delay(flash_time); PACS_Spec_Flash_Setup(0,0); curing_mode = 0; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(interflash_time); } // // SWOF FLASHERS // PACS_Spec_Flash_SWOF(); delay(10); // // INTERNAL LOOP // int internloop = 0; while(internloop < repeat_intern) { // // RAMP LENGTH LOOP // int rlc = 0; while(rlc < rlb) { ramp_blue = ramp_len_blue[rlc]; ramp_red = ramp_len_red[rlc]; // // CAPACITY LOOP // int clc = 0; while(clc < cb) { capacity_blue = capa_blue[clc]; capacity_red = capa_red[clc]; // // Setup CREs SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // OBSERVATION delay(meas_time); // // SPU RESET SPEC_spu_reset(); delay(1); clc = clc + 1; } rlc = rlc + 1; } // internloop = internloop + 1; } blc = blc + 1; } // // // Return Chopper & grating to default // ===================== Pacs_DMC_MOVE_GRAT_ABS(500000); delay(1); PACS_Chop_Move_Abs(0); delay(15); // // SYNC //= = = sync(); // // End of Script } // $Id: PacsCal_Spec_Rsrf.txt,v 1.2 2008/11/12 18:22:41 bart Exp $ // Missionphase : PACS PV Phase // // // // // Purpose : Deep staring scan for RSRF verification with pointing // // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP28 for executing a deep scan // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // Version : 1.1 // History : 1.0 30-oct-2008 BV Adopted from ILT PACS_Spec_Rsrf_OBS // 1.1 12-nov-2008 BV Corrected state machine section // obs PacsCal_Spec_Rsrf { int chop_def = -21350; // chopper position during grating scan string filter = "POS A" in ["POS A","POS B"]; // Filter wheel position int grating_start = 32000; // grating start position for scan int grating_stepsize = 133; // grating step size int grating_numsteps = 7759; // number of grating steps int grating_numramps = 4; // number of ramps per grating position int readoutsperramp = 64; // number of readouts per ramp int capa_red = 12; // Red capacitor int capa_blu = 0; // Blue capacitor double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.011 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.011 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int naifid = 0; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) double yoffset = 0.0; // yoffset [arcsec] double xoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC }{ // Compute the time // Execute the pointing request bool execute = true; // Slew // Write OBSID during slew int tOBSID = duration(WriteOBSID($OBSID)); // no initial hold int tih = 0; // Final hold // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // Duration of "stable" pointing int tp = imax(1,duration(Pacs_Spec_Rsrf(chop_def,filter,grating_start,grating_stepsize,grating_numsteps,grating_numramps,readoutsperramp,capa_red,capa_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu))); //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tOBSID,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // 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] == 1) { // Declare start of OBS WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Rsrf(chop_def,filter,grating_start,grating_stepsize,grating_numsteps,grating_numramps,readoutsperramp,capa_red,capa_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } } // Script file : PACS_Spec_Gra_IST_Ampl_OBS.cus // // Purpose : Check the Amplitude of the Grating inductosyn by running a loop over it // // CUS author : PR // // Input arguments none // type name description // // Preconditions : PACS in SAFE MODE, or Spectroscopy Mode // In any case, Controller of the Calibration Sources MUST BE OFF // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // procedure Pacs_Spec_Gra_IST_Ampl { }{ // Register start of OBS debug_print("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); debug_print("Configure DIAG_HK"); int diag_hk_period = 5; PACS_Spec_Gra_Diaghk_SINCOS_Setup(diag_hk_period); debug_print("Configure Grating in DEGMODE"); CONF_grating_DEGMODE(); debug_print("Amplitude Loop"); PACS_Spec_Gra_Ampl_Open_Loop(); debug_print("Reset DIAG_HK"); PACS_Diaghk_Reset(); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // $Id$ // Missionphase : PACS // // Purpose : Checking chooper and grating hard limits // // Author : VDP // // Arguments : // // // Description : Computes and checks the start and end values for // chopper and grating hard limits // : // Comments : should be modular // // Version : 0.1 // History : 0.1 22-feb-2008 created VDP // procedure Pacs_HardLimitsCheck { /* variables needed */ int[] grating_pos = [0]; // grating position, steps and nb of steps double chopthrow = 30.0; // chopthrow in arcsec }{ // local variables bool chckboth = false; int g_len = length(grating_pos); // if(g_len != 1) { chckboth = true; } int chop_max = ilookup("SPEC_MEC_Defaults","Spectroscopy","chop_max"); int chop_min = ilookup("SPEC_MEC_Defaults","Spectroscopy","chop_min"); int grat_max = ilookup("SPEC_MEC_Defaults","Spectroscopy","grat_max"); int grat_min = ilookup("SPEC_MEC_Defaults","Spectroscopy","grat_min"); double ref1 = chopthrow / 2.0; double ref2 = -chopthrow / 2.0; int chop_pos1 = PacsReadChopSky("SPEC_CHOP_sky",ref1); int chop_pos2 = PacsReadChopSky("SPEC_CHOP_sky",ref2); if(chop_pos2 < chop_min || chop_pos1 > chop_max) { error("Chopper position exceed hard limits"); } while(chckboth) { int grating_f = grating_pos[0] + grating_pos[1] * grating_pos[2]; int grating_i = grating_pos[0]; if(grating_f >= grat_max || grating_i <= grat_min) { error("Grating position exceeds hard limits"); } } } // CVS comments : $Id: PacsProcessInfoArrayLine.txt,v 1.13 2007/10/25 12:15:42 dcesarsk Exp $ // // Purpose : Process the timing information gathered in infoArray // // CUS author : DAC // // Input arguments // type name description // tuple infoArray // Slew/Point/AOT SlewCal or pointing mode or global AOT info // 0.0 not in use // TotDur duration of the phase Slew/Point/AOT // nbLines number of spectral lines observed in phase Slew/point // nnods number of nod cycles in phase Point // m*n size of raster when applicable // wave1 each of the nbLines wavelengths or waveStart // wave2 each of the nbLines wavelengths or waveEnd // order grating order for line wave // gratStep grating step (needed to estimate "multiplexing") // TOT,SRC,REF,CAL,OVR the canonical OBCP duration (/nod/raster) // // Return values // Type Description // // Description : Use the information in infoArray to compute several times and // overheads, as well as the expected RMS fluctuations for each observed line // infoArray is a three-element tuple: // infoArray[0] contains information on the SlewCal phase // infoArray[1] contains information on the OBS phase // infoArray[2] contains global information on the AOT // // Dependencies : // // Comments : // // History : 0.1 6-Sep-2005 DAC // 0.2 27-sep-2005 Adding elements to compute RMS // 0.3 28-sep-2005 Add nbGratSteps to infoArray // 0.4 29-sep-2005 Add confOBCP to input arguments since I need nb_up_dn !! // 0.5 6-oct-2005 Corrected Raster/Staring logic // 0.6 14-oct-2005 Text of message // 1.0 24-oct-2005 Add HTML tags // 1.1 23-jan-2006 Multiplication by nbNods, mRaster, nRaster no longer needed // since next_state collects time per raster per nod. Also // eliminate "PACS overheads" // 1.2 1-mar-2006 Use dformat for messages // 2.0 11-mar-2006 Deal with LINE and CONT RMS values // 2.1 22-nov-2006 Added "verbose" to input arguments // 3.0 17-jan-2006 "Improved" messages // 3.1 12-feb-2007 Accept as input the tuples lines // 3.2 14-feb-2007 Adapted to amended PacsSpecRMS, simplified code as now // used only with LINE // 3.3 12-apr-2007 Add obsOverhead for SCR-2813 // 3.4 27-apr-2007 SPR-3147: change km/s into kms // 3.5 29-may-2007 SPR-3243 Continuum S/N: mJy/mJy // 3.6 13-jun-2007 SPR-3307 Fewer digits in messages // 3.7 24-oct-2007 Added nbOBS and nbOFF to input arguments; same to // PacsSpecRMS procedure PacsProcessInfoArrayLine { /* infoArray */ {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; /* lines */ /* {id,redshifted wavelength,repeat factor,line flux,continuum flux, */ /* line width,line flux unit,line width unit} */ {string,double,int,double,double,double,string,string}[] lines = []; /* confOBCP */ {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; /* observatory overhead */ int obsOverhead = 180; /* nbOBS and nbOFF */ int nbOBS = 1; int nbOFF = 0; /* verbose? */ bool verbose = true; }{ // Data used here is to be found in // infoArray[0]{0}{2} : tslew from PointReq // infoArray[0]{0}{3} : Number of key waves in AOT // infoArray[0]{1}[]{0} : keyWAVE[] // infoArray[0]{1}[]{5} : sumCalTime[][0] // infoArray[0]{1}[]{6} : sumCalTime[][1] // infoArray[0]{1}[]{7} : sumCalTime[][2] // infoArray[0]{1}[]{8} : sumCalTime[][3] // infoArray[0]{1}[]{9} : sumCalTime[][4] // infoArray[1]{0}{0} : PointReq information (ex. SmSrcDither) // infoArray[1]{0}{1} : Integration time per plateau // infoArray[1]{0}{2} : OBCP duration *per pointing* // infoArray[1]{0}{3} : Number of lines/ranges // infoArray[1]{0}{4} : Number of nod cycles // infoArray[1]{0}{5} : Raster m*n // infoArray[1]{1}[]{0} : Starting wave for line [] // infoArray[1]{1}[]{1} : Ending wave for line [] // infoArray[1]{1}[]{2} : Grating order for line [] // infoArray[1]{1}[]{3} : Grating step for line [] // infoArray[1]{1}[]{4} : Number of grating steps for line [] // infoArray[2]{0}{0} : OBCP information (ex. FreqSwitch) // infoArray[2]{0}{2} : Total duration of AOR (SLEW+OBS) // infoArray[2]{0}{3} : Raster "m" size // infoArray[2]{0}{4} : Raster "n" size // infoArray[2]{0}{5} : Nb of nods (does not seem to be used anywhere) // Number of spectral lines (SlewCal and OBS) int nbKeyWaves = infoArray[0]{0}{3}; int nbLines = infoArray[1]{0}{3}; // Number of nods (OBS) int nbNodCycles = infoArray[1]{0}{4}; // Nb of "pointings" for nbNodCycles int nbNods = 2 * nbNodCycles; if(nbNods == 0) { nbNods = 1; } // Call module to estimate RMS fluctuations; pass information via infoArray // and confOBCP (for nb_up_dn) // To conform with PacsRangeSpec code, define dummy rangeSPOT tuple (needed // by new RMS module) {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = []; // Ditto for "orderSel" {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsSpecRMS("LINE","orderSel",infoArray,rangeSPOT,confOBCP,nbOBS,nbOFF,verbose); // Define variable to extract info from noiseTuple double[][] noiseWave = [[0.0]]; // Useful variables int lineCnt = 0; string[] msgLine = ["Line1"]; // one line of text // Report on nodding pattern and pointing details msgLine[lineCnt] = "PACS AOT: PacsLineSpec"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Pointing mode: " + infoArray[1]{0}{0} + " with " + nbNodCycles + " nod cycles

"; lineCnt = lineCnt + 1; int mRaster = infoArray[2]{0}{3}; int nRaster = infoArray[2]{0}{4}; // When either m or n are >1 then it is raster if(mRaster > 1 || nRaster > 1) { msgLine[lineCnt] = "

Raster size (lines/points):" + mRaster + "/" + nRaster + "

"; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

Nod pattern: nominal position A, or A->B, B->A, etc.

"; lineCnt = lineCnt + 1; if(nbNodCycles == 0) { msgLine[lineCnt] = "

A

"; lineCnt = lineCnt + 1; } if(nbNodCycles == 1) { msgLine[lineCnt] = "

A->B

"; lineCnt = lineCnt + 1; } if(nbNodCycles == 2) { msgLine[lineCnt] = "

A->B B->A

"; lineCnt = lineCnt + 1; } if(nbNodCycles > 2) { int aux1 = nbNodCycles - 2; msgLine[lineCnt] = "

A->B B->A and " + aux1 + " more A<->B leg(s)

"; lineCnt = lineCnt + 1; } PacsMessageCenter("AOT, PointMode and Nodding info",lineCnt,msgLine); // Global timing information for this AOT lineCnt = 0; int totAOT = infoArray[2]{0}{2}; msgLine[lineCnt] = "

AOT total duration: " + totAOT + " [sec]

"; lineCnt = lineCnt + 1; // Next is tslew returned by PntReq int tslew = infoArray[0]{0}{2}; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; PacsMessageCenter("Global AOT durations",lineCnt,msgLine); if(verbose) { debug_print("++ Start ProcessArray debug info"); debug_print(" CalSlew: " + infoArray[0]); debug_print(" OBS : " + infoArray[1]); debug_print(" TotDur : " + infoArray[2]); debug_print("++ End of ProcessArray debug info"); } // Inform the details of SlewCal to HSPOT user // AOT prologue lineCnt = 0; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; // Display message PacsMessageCenter("LINE setup and CAL summary",lineCnt,msgLine); // Re-initialize lineCnt for new series of messages lineCnt = 0; // Continue defining noiseWave for historical reasons (it used to be returned // by PacsSpecRMS, now replaced by bigTuple) for(int loop1 = 0 .. nbLines - 1) { int trueObsTime = infoArray[1]{1}[loop1]{5}; noiseWave[loop1] = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; // CONTinuum noiseWave[loop1][0] = bigTuple[loop1]{0}{1}[0]; noiseWave[loop1][1] = bigTuple[loop1]{0}{1}[1]; noiseWave[loop1][2] = bigTuple[loop1]{0}{1}[2]; noiseWave[loop1][3] = bigTuple[loop1]{0}{1}[3]; // LINE noiseWave[loop1][4] = bigTuple[loop1]{0}{1}[4]; noiseWave[loop1][5] = bigTuple[loop1]{0}{1}[5]; noiseWave[loop1][6] = bigTuple[loop1]{0}{1}[6]; noiseWave[loop1][7] = bigTuple[loop1]{0}{1}[7]; // CONT and LINE for refWave noiseWave[loop1][8] = bigTuple[loop1]{0}{1}[8]; noiseWave[loop1][9] = bigTuple[loop1]{0}{1}[9]; noiseWave[loop1][10] = bigTuple[loop1]{0}{1}[10]; // Estimate resolution for given wavelength and order // Need order and wavelength int order = infoArray[1]{1}[loop1]{2}; double wave = infoArray[1]{1}[loop1]{0}; // Build key to read SPEC_resolution table string keyCOL = "resol" + order; double resolkm = interpolate("SPEC_resolution",keyCOL,wave); // Resolution in microns double resolmic = resolkm * wave / 300000.0; // Compare instrument resolution with line width // User given line width double userWidth = lines[loop1]{5}; // User given width units string unitWidth = lines[loop1]{7}; // Is there a sensitivity degradation? bool sensitDegrad = false; // Assume no degradation double degrad = 1.0; // Avoid division by zero if(resolkm > 0.0) { // Do not compare torchons et servillettes if(unitWidth == "micron" && userWidth > resolmic) { sensitDegrad = true; degrad = sqrt(userWidth / resolmic); } if(unitWidth == "kms" && userWidth > resolkm) { sensitDegrad = true; degrad = sqrt(userWidth / resolkm); } } if(verbose) { debug_print("++line parameters: " + userWidth + " " + unitWidth); debug_print("++sensitDegrad: " + sensitDegrad); debug_print("++Degrad: " + degrad); } // SrcTime includes REF! int trueSrcTime = infoArray[1]{1}[loop1]{6} + infoArray[1]{1}[loop1]{7}; int lineOver = trueObsTime - trueSrcTime; msgLine[lineCnt] = "

" + lines[loop1]{0} + ": " + dformat(infoArray[1]{1}[loop1]{0},2) + " [µm]:

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; } // Display message PacsMessageCenter("SpecLine summary",lineCnt,msgLine); } // CVS comments : $Id: PacsPhotSlewCal.txt,v 1.10 2008/05/06 13:34:53 vanessa Exp $ // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsPhotSlewCal.txt // // Input arguments // Type Description // // Return values // Type Name Default Description // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 DAC 30-Nov-2005 (inspired by PacsSpecSlewCal) // 0.2 DAC 20-sep-2006 Clean up leftovers from SPEC script // 0.3 DAC 6-dec-2006 Adapted to simpler PHOT_fltw_move // 0.4 DAC 27-jun-2007 SPR-3339 Always move filter wheel // 1.0 DAC 10-oct-2007 SCR-3628 Added arguments to call aot_prologue // 1.1 JVP 28-apr-2008 ERROR in filter_id assignation: POS A is LW for the // photometer (remind POS A = SW for spectro) // 1.2 DAC 20-may-2008 Moved FLTW move into DO_PROLOGUE section // 2.0 SCR 4431 VDO: implemetation of data_rates int[] procedure PacsPhotSlewCal_DataRates { bool verbose = true; // Debug_print or not {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,64,0,0,0,0,0,0,0}]; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,64,0,0,0,0,0,0,0}]; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // OBCP parameters bool doPROLOG = true; // Perform/don't AOT prologue string filter = "blue2"; // PHOT filter }{ if(doPROLOG) { data_rate(120.0); } // Array to collect OBCP times per line int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); int[] totalDUREE = [0,0,0,0,0]; // Table of filter wheel positions as per MIB // Actually originally not blue1 = SW = POS B, and blue2 = LW = POS A for // the photmeter if(filter == "blue1") { string filterID = "POS B"; } if(filter == "blue2") { filterID = "POS A"; } // Long sequence to "unpack" default values from tuples int gain_blu = confPHOTblu[0]{0}; int comp_mode_blu = confPHOTblu[0]{3}; int glitch_det_blu = confPHOTblu[0]{4}; int nb_raw_blu = confPHOTblu[0]{6}; int gain_red = confPHOTred[0]{0}; int comp_mode_red = confPHOTred[0]{3}; int glitch_det_red = confPHOTred[0]{4}; int nb_raw_red = confPHOTred[0]{6}; int nb_cycles_obs_cal = confOBCP[0]{0}; int nb_SRC_REF = confOBCP[0]{3}; int nb_rdouts_plateau = confOBCP[0]{4}; int nb_CS1_CS2 = confOBCP[0]{5}; int chop_pos_SRC = confOBCP[0]{12}; int chop_pos_REF1 = confOBCP[0]{13}; int chop_pos_REF2 = confOBCP[0]{14}; int chop_def = confOBCP[0]{17}; int detector = confOBCP[0]{18}; int filterPOS = confOBCP[0]{19}; if(gain_blu == 1 && gain_red == 1) { string set_gain = "LOW"; } else { if(gain_blu == 0 || gain_red == 0) { set_gain = "HIGH"; } } // Issue PHOT_aot_prologue if demanded if(doPROLOG) { totalDUREE = PHOT_aot_prologue(set_gain,comp_mode_blu,comp_mode_red,nb_raw_blu,nb_raw_red,verbose); // Turn the filter wheel int timeFLTW = PHOT_fltw_move(filterID); // increment total duration and overheads totalDUREE[0] = totalDUREE[0] + timeFLTW; totalDUREE[4] = totalDUREE[4] + timeFLTW; } // Issue now OBCP4 for demanded filter // Table OBCP4params has parameter values for CAL using blue1 or blue2 // Get params for demanded filter from OBCP4params string calNAME = "OBCP4params"; // Table acces key is "cal1" or "cal2", corresponding to blue1 and blue2 // respectively. string key = "cal1"; if(filter == "blue2") { key = "cal2"; } nb_cycles_obs_cal = ilookup(calNAME,key,"nb_cycles_obs_cal"); nb_SRC_REF = ilookup(calNAME,key,"nb_SRC_REF"); nb_rdouts_plateau = ilookup(calNAME,key,"nb_rdouts_plateau"); nb_CS1_CS2 = ilookup(calNAME,key,"nb_CS1_CS2"); // Read CS positions from CHOPPERCSparams int pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); // Update OBCP[0] tuple with CAL-U values confOBCP[0]{0} = nb_cycles_obs_cal; confOBCP[0]{3} = nb_SRC_REF; confOBCP[0]{4} = nb_rdouts_plateau; confOBCP[0]{5} = nb_CS1_CS2; confOBCP[0]{15} = pos_CS1; confOBCP[0]{16} = pos_CS2; // Call now OBCP with derived parameters int[] dureeOBCP = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,pos_CS1,pos_CS2,comp_mode_blu,comp_mode_red,chop_def); if(verbose) { debug_print("*** SlewCal OBCP: " + confOBCP[0]); debug_print("*** SlewCal OBCP returns: " + dureeOBCP); } // Tally total durations for(int loop0 = 0 .. 4) { totalDUREE[loop0] = totalDUREE[loop0] + dureeOBCP[loop0]; } if(verbose) { debug_print("***** SlewCal performed CAL: " + key + " requires " + totalDUREE[0] + " [sec]"); } // Leave bus scheduler in a known state (SP1707) sync(); return totalDUREE; } // Mission phase : Performance Verification Phase // // Purpose : Explore the time constant after flux change for a flux levels using the low gain // // Author : Koryo Okumura // // Version : Fri Jul 25 22:30:26 CEST 2008 // // CUS script : mode PacsCal_Phot_bandpassDirect // // Argument : // int sideField = 7134; // Chopper angle for the FOV next to BB2 // int chop_pos_CS2 = 21196; // Chopper angle for BB2 // string biasTable = "BOLObias_standard_low"; // Bias table // string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0s // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops2 = 30; // number of CSs cycles during initial hold // int nLoops5 = 30; // number of CSs cycles during final hold // int nReadout_plateau = 16; // number of readouts per plateau // // Check before executing : // + Bolometer is already normally operating // // Description : OBS script to execute PacsCal_Phot_bandpassDirect // // Dependencies : Previously obtaind data at high gain (PCD req.1.1.1bis) // // Comments : generated by IA script : cus_PVph_timeCont() // obs PacsCal_Phot_bandpassDirect { int sideField = 7134; // Chopper angle for the FOV next to BB2 int chop_pos_CS2 = 21196; // Chopper angle for BB2 string biasTable = "BOLObias_standard_low"; // Bias table string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0s string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per plateau bool verbose = true; }{ // Bus configuration for the Burst mode (7) busconfig (7); int nRdts = readouts_plateau - 1; // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = 0; int timeChgBias0 = duration(PHOT_change_biases(biasTable,"NO_CHANGE","NO_CHANGE")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); //Minimum slew time if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT","LOW")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"LOW")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } int tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeChgBias + timeCal3CPR5 + timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_bandpassDirect(biasTable,gain,sideField,chop_pos_CS2)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(300.0); // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // No biases setting here because nothing changes //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } //************************************ // Call the Phot_bandpassDirect //************************************ Phot_bandpassDirect(biasTable,gain,sideField,chop_pos_CS2); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // $Id // Missionphase : PACS PV Phase // // Purpose : : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // Author : VDP // // Arguments � : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Perform AOT prologue and then OBCP #27 and then AO prologue. // // Comments : // // Version : 1.0 // // History : 0.1 Using example from PacsCal_WaveCalChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping // 2.0 PacsCal version for PV obs PacsCal_PacsSpecSlewCal { /* Needed variables to call PacsSpecSlewCal */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int grat_pos = 500000; // grating start position for scan int grat_time = 0; // tiem for grating to move to start position [msec] int nb_raw_red = 3; // number of red pixels int nb_raw_blu = 3; // number of blue pixels int comp_mode_blu = 16; // compression mode for blue detector int comp_mode_red = 16; // compression mode for red detector int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC int nnod = 1; // number of nods (AB or BA) double chopthrow = 30.0; // chop/nod throw int order = 2; string confTable = "normal" in ["normal","bright"]; bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Verification for grating and chopper hard limits int[] gratpos = [0]; Pacs_HardLimitsCheck(gratpos,chopthrow); // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; string throw = "small"; {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; confSPECblu[0]{3} = comp_mode_blu; confSPECred[0]{3} = comp_mode_red; confSPECblu[0]{6} = nb_raw_blu; confSPECred[0]{6} = nb_raw_red; confOBCP[0]{8} = grat_pos; confOBCP[0]{9} = grat_time; // frstLstGratPos is the last position for the grating after the Cals done // during Slew time... must be same as observations start position: grat_pos // Perform/don't AOT prologue bool doPROLOG = true; // "N/A" in string because of indexing 0,1,2,3 string[] choix = ["N/A","order1","order2","order3"]; string order_str = "" + order; double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); double[] keyWAVE = [keyWAVE1]; //Initial hold int tih = duration(WriteOBSID($OBSID)); int tslewmin = 0; //Final hold int tendobsid = duration(WriteEndID()); int grat_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_def,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); debug_print("ts: " + ts); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); WriteOBSID($OBSID); } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); tNOW = time(); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_def,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // } // End of Observation } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 0.1 22-mar-2006 // History : 1.0 11-feb-2008 Converted into PV script by VDP // obs PacsEng_Spec_Fil_nturns { /* Needed variables to call PacsEng_Spec_Fil_nturns */ int num_turns = 3; // number of 360 deg turns int backward_toA = 0; // direction of FW rotation towards POS A : 0 forward; 1 backward int backward_toB = 0; // direction of FW rotation towards POS B : 0 forward; 1 backward /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Fil_nturns */ }{ // 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(PACS_Spec_Fil_nturns(num_turns,backward_toA,backward_toB))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Fil_nturns(num_turns,backward_toA,backward_toB); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 05-Jul-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Fltw_Mec_Setup { /* No variables to call PacsEng_Phot_Fltw_Mec_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Fltw_Mec_Setup */ }{ // 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())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_phot_fltw(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : Pierre Royer // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // Version : 2.0 // History : 1.0 29-Jul-2007 // History : 2.0 11-feb-2008 Converted into Eng OBS by VDP // // // obs PacsEng_CONF_grating_IST { /* Needed variables to call PacsEng_CONF_grating_IST */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_CONF_grating_IST */ }{ string calUrow = "IST"; string calUname = "CONFGrat"; // 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_grating(calUname,calUrow))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_grating(calUname,calUrow); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : CQM // // Purpose : CONFigure the servo grating loop using parameters read from // a CAL-U file // // Author : Diego A. Cesarsky / Pierre Royer // CUS script : Diego A. Cesarsky / Pierre Royer // // Arguments : This version reads the ROW calUrow of the -calUname CAL-U file // string calUname Name of the CAL-U table // string calUrow Name of the ROW containing the desired controler params // // Description : Reads grating controler parameters from a named row (viz. // IMTwarm, IMTcold, ORBpv1, etc.) of a CAL-U table (default is "GRATconfig"), // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 26-Jan-2006 Creation by DAC // 0.2 12-Jun-2006 Read Rows instead of columns // 0.3 13-jun-2006 Renamed CALU table // 1.0 19-11-2008 Update wrt fm_ist_cus_copy => allows for possibility of frequency filter in the controller // : procedure PACS_Spec_Gra_Set_Ctrl_Par { string calUname = "CONFGrat"; // Calibration Table string calUrow = "FMILT"; // Row in table = Instrument Configuration int homing_mode_rate = 1 in [0,1]; // 0 : rate read from calibration table; 1 : rate forced = 3 (homing request) }{ // Read the demanded column of the given table. // Rows 0 to 8 int word0 = ilookup(calUname,calUrow,"Kp"); int word1 = ilookup(calUname,calUrow,"Ki"); int word2 = ilookup(calUname,calUrow,"Kd"); int word3 = ilookup(calUname,calUrow,"Kf"); int word4 = 3; if(homing_mode_rate == 0) { word4 = ilookup(calUname,calUrow,"Rate"); } int word5 = ilookup(calUname,calUrow,"AccLimit"); int word6 = ilookup(calUname,calUrow,"OutputLimit"); int word7 = ilookup(calUname,calUrow,"Scaling"); int word8 = ilookup(calUname,calUrow,"ErrorLimit"); int word9 = ilookup(calUname,calUrow,"N1"); int word10 = ilookup(calUname,calUrow,"N2"); int word11 = ilookup(calUname,calUrow,"N3"); int word12 = ilookup(calUname,calUrow,"D1"); int word13 = ilookup(calUname,calUrow,"D2"); //CONF_PAR // Create the parameter list tuple {int}[] params = [{word0},{word1},{word2},{word3},{word4},{word5},{word6},{word7},{word8}]; // Create the array for the checksum function int[] aux = [word0,word1,word2,word3,word4,word5,word6,word7,word8]; int chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_PAR(params,chksum); // CONF_FILT // Create the parameter list tuple params = [{word9},{word10},{word11},{word12},{word13}]; // Create the array for the checksum function aux = [word9,word10,word11,word12,word13]; chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_FILT(params,chksum); delay(1); } // CVS comments : $Id: DMC_fixed_fixed_photo.txt,v 1.6 2007/04/25 15:14:03 dcesarsk Exp $ // Script file : DMC_fixed_fixed_photo.txt // Purpose : Compute execution time of DMC #?? // // TCL author : N/A Pseudo code by HF // TCL file : N/A // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : DMC 4.1.8 Fixed-Fixed Chopping in Photometry // Chopping is done to a set (3 pairs) of positions in order // to place positive and negative beams on different // pixels on the array, where the distance between 2 respective // positions stays constant for a while and then the next // position pair is being measured. // The chopper performs the following pattern // // P#2 take nb_rdouts // P#2+P#5 take nb_rdouts } } // P#2+P#6 take nb_rdouts } P#4 times } // } // P#7 take nb_rdouts } // P#7+P#5 take nb_rdouts } } // P#7+P#6 take nb_rdouts } P#4 times } P#1 times // } // P#8 take nb_rdouts } // P#8+P#5 take nb_rdouts } } // P#8+P#6 take nb_rdouts } P#4 times } // // TOTAL readouts (2*P#4 + 1)*3*nb_rdouts // // Usually P#6 = -P#5 so that chopper comes back to starting postion // // Dependencies : // // Preconditions : None. // // Comments : No TC are generated; only times are computed // // History : 0.1 26-jun-2006 DAC // 0.2 22-nov-2006 Removed debug_print // 0.3 14-mar-2007 WAIT=1 is now considered useful data int[] procedure DMC_fixed_fixed_photo { int nb_main_loops = 1; // Seq P#1 Nb of of main loops int nb_rdouts = 159; // Seq P#3 Nb of rdouts per chopper position int nb_chop_cycle = 2; // Seq P#4 Nb of chops per incremental step }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // WAIT 1 ; have a defined start duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LOOP P#1 ; main loop measurement for(int loop0 = 1 .. nb_main_loops) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; start pos. chopper // LABEL 3 ; 1st chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // LOOP P#4 ; do P#4 chops per step for(int loop1 = 1 .. nb_chop_cycle) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#5 ; go to other chop position // LABEL 5 ; 2nd chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#6 ; go back to previous position // LABEL 3 ; 1st chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; } // END_LOOP ; end of chop // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#7 ; go to next position pair // LABEL 7 ; 3rd chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // LOOP P#4 ; do P#4 chops per step for(int loop2 = 1 .. nb_chop_cycle) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#5 ; go to other chop position // LABEL 9 ; 4th chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#6 ; go back to previous position // LABEL 7 ; 3rd chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; } // END_LOOP ; end of chop // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; go to next position pair // LABEL 11 ; 5th chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // LOOP P#4 ; do P#4 chops per step for(int loop3 = 1 .. nb_chop_cycle) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#5 ; go to other chop position // LABEL 13 ; 6th chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_RELATIVE P#6 ; go back to previous position // LABEL 11 ; 5th chopper position // WAIT P#3 ; take P#3 images duree_num = duree_num + nb_rdouts; duree_SRC = duree_SRC + nb_rdouts; } // END_LOOP ; end of chop // END_LOOP ; end main loop } // WAIT 1 ; complete last plateau duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // 8 Parameters: # of main loops (P#1); // Chopper start positions P#2, P#7, P#8; // Size of Relative chopper moves P#5, P#6; // # of chops per incremental step (P#4); // # of readouts per chopper plateau (P#3) // Note: P#3 must be defined such that: (P#3 + 1) mod 4 = 0; P#5 = -P#6; // Sequence duration, in readouts : // 3 + P#1 * 3 * {(1 + P#3) + P#4 * (2 * (1+P#3))} int dur_theor = 3 + nb_main_loops * 3 * (1 + nb_rdouts + nb_chop_cycle * 2 * (1 + nb_rdouts)); // debug_print("Theor duration: " + dur_theor); int[] duree = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // debug_print("++DMC_fixed_fixed: " + duree + " [rdouts]"); return duree; } // File : PACS_Phot_HK_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Prepare for Photometry HK // // Author : H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : This script will only activate Photometry HK // // Comments : // // // Version : 1.0 // History : 1.0 / 18-Nov-2004 initial version // // procedure PACS_Phot_HK_Setup { }{ // DPU_SET_HK_LIST (Phot for both channels) // tcsend PC003380 {PP005380 2} {PP025380 1} // waittime 0.5 Pacs_DPU_SET_HK_LIST("PHOT","BOTH Array"); delay(1); message("Phot HK set"); // --------------------- // End of Procedure // --------------------- } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Exercise all available OBCPs for photometry // // // // TCL author : N/A // TCL file : tN/A // CUS author : DAC // Script file : PHOT_all_aots_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version 2.0 // History 0.1 20-apr-2005 DAC // // 0.2 25-apr-2005 DAC Added moe to POS A at the end // 0.3 25-apr-2005 DAC Start and stop SPU with user given // compression parameters // 0.4 26-apr-2005 DAC Use PACS_spu_reset at end // 0.5 30-sep-2005 Correct typo phot_cal_III (-46145) // 0.6 9-nov-2005 comp_mode_xx were hardcoded in OBCP calls // 0.7 16-jun-2006 DAC Added 2 sec delay between OBCPs // 0.8 3-aug-2006 DAC Corrected OBCP freeze frame // 0.9 9-aug-2006 TM 2 new OBCPs have been added + some cosmetics // 0.95 9-aug-2006 TM, new parameters for chop_scan OBCP // 0.96 9-aug-2006 TM, compression mode hard-coded // 1.0 14-nov-2006 TM: update of chopper positions // 1.1 17-nov-2006 Remove freeze frame // 1.2 11-apr-2007 TM: take out the raw channels // 2.0 25-mar-2008 VDP: Translated from IST to PV phase syntax // obs PacsEng_Phot_all_aots { /* Needed variables to call PacsEng_Phot_all_aots */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_all_aots */ }{ // 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(Pacs_Phot_all_aots())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_all_aots(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_B_Heat_Setup.cus // Missionphase : PACS FM ILT tests // // Purpose : Sets Blue Heater currents // // Author : P. Royer // // Arguments : blue Heater currents // // Description : Sets Heater currents blue // : // Comments : // // // Version : 1.0 // History : 1.0 / 27.02.2007 initial version by PR // procedure PACS_Spec_B_Heat_Setup { double blue_heat_current = 0.0; }{ // SETUP HEATER // Pacs_DMC_SET_B_SPEC_HEAT_C(blue_heat_current); delay(1); } // File : PACS_Phot_SPU_Setup.cus // Missionphase : PACS IST // // Purpose : Prepare SPU for photometry data flow // // Author : T. Mueller, H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : // // Comments : // // Version : 1.6 // History : 1.0 / 10-Nov-2004 initial version // 1.1 / 15-Dec-2004 removed calls to getChkSum // 1.2 / 13-Apr-2006 TM, update for FM, adopted from // "PHOT_spu_setup.txt" // 1.3 / 28-mar-2007 DAC Update for SPUv13 // 1.4 4-apr-2007 SCM back to zero // 1.5 10-apr-2007 SCM back to 1 // 1.6 11-apr-2007 SCM back to 0 // 1.7 16-jun-2007 SCM back to 1 // procedure PACS_Phot_SPU_Setup { }{ // comp_mode_blue integer 2 Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 // comp_mode_red integer 2 Compression red: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 // spus_nraw integer 3 Enter Number of raw channels transmitted by SPUS // spul_nraw integer 3 Enter Number of raw channels transmitted by SPUL int comp_mode_blue = 0; int comp_mode_red = 0; int spus_nraw = 0; int spul_nraw = 0; //-------------------- // Preparation //-------------------- // PC037400 "SPUS_STOP_REDUCT_COMPR" STOP THE APPLICATION PROGRAM IN SPU_SWL Pacs_SPUS_STOP_REDUCT_COMPR(); delay(1); // PC038390 "SPUL_STOP_REDUCT_COMPR" STOP THE APPLICATION PROGRAM IN SPU_LWL Pacs_SPUL_STOP_REDUCT_COMPR(); delay(1); //-------------------------- // SPU compression/reduction //-------------------------- // PC175420 "DMC_WRT_SPU_TRAN_MODE" WRITE THE SPU TRASMISSION MODE // Fixed GroupSize: 1, repetition: 2 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" //set tran_mode [list \ // [list PP067420 $comp_mode_blue] \ // [list PP067420 $comp_mode_red]] //set chksum [getChkSum -d -32 $tran_mode] //eval tcsend PC175420 $tran_mode \{PP066420 $chksum\} //tcsend PC175420 {PP067420 0} {PP067420 0} {PP066420 12606} //waittime 0.5 {int}[] list_tuple = [{comp_mode_blue},{comp_mode_red}]; int[] list_int = [comp_mode_blue,comp_mode_red]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_SPU_TRAN_MODE(list_tuple,chksum); delay(1); //---------------------------------------- // Setting of start index for raw channels //---------------------------------------- int spus_startraw = 1; int spul_startraw = 1; //----------------------- // Raw channel setting //----------------------- // PC035400 "SPUS_RAW_CHAN_TRAN_MODE" RAW CHANNEL TRANSMISSION MODE FOR SPUS // PP050400 "SPUS_OBS_MODE" // PP051400 "SPUS_RCXNB" // PP052400 "SPUS_RCX" // set rawblu [list {PP050400 2} \ // [list PP051400 $spus_nraw] \ // [list PP052400 $spus_startraw]] // eval tcsend PC035400 $rawblu // waittime 0.5 Pacs_SPUS_RAW_CHAN_TRAN_MODE("PHOT",spus_nraw,spus_startraw); delay(1); // PC036390 "SPUL_RAW_CHAN_TRAN_MODE" RAW CHANNEL TRANSMISSION MODE FOR SPUL // PP032390 "SPUL_OBS_MODE" // PP033390 "SPUL_RCXNB" // PP034390 "SPUL_RCX" // set rawred [list {PP032390 2} \ // [list PP033390 $spul_nraw] \ // [list PP034390 $spul_startraw]] //eval tcsend PC036390 $rawred //waittime 0.5 Pacs_SPUL_RAW_CHAN_TRAN_MODE("PHOT",spul_nraw,spul_startraw); delay(1); //------------------------------------- // Setup detector constants photometry //------------------------------------- // Photo "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in photometry int tfp = 1000; // Threshold for chopper position deviation in photometry int tcp = 100; // Glitch detection for photometry (1: no glitch detection) int gdfp = 1; // Override samples to average int navg = 0; // resolution reduction parameter 2 int spr1 = 0; // resolution reduction parameter 3 int spr2 = 0; // resolution reduction parameter 4 int scm = 1; // lossless compression algoithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand int[] aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; int check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // Photo "Ottensamer" block ("L" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) ppf = 0; // PPP: Pre-Processing Parameter ppp = 0; // Threshold for glitch detection in photometry tfp = 1000; // Threshold for chopper position deviation in photometry tcp = 100; // Glitch detection for photometry (1: no glitch detection) gdfp = 1; // Override samples to average navg = 0; // resolution reduction parameter 2 spr1 = 0; // resolution reduction parameter 3 spr2 = 0; // resolution reduction parameter 4 scm = 1; // lossless compression algoithm (0,1,2,3,4) lcal = 0; // PACS Codec Order (3,4) pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); //-------------------- // Send time stamps //-------------------- // PC148420 "DMC_WRT_TIME" WRITE THE TIME SENT BY THE DPU INTO THE DMC BUFFER // Fixed GroupSize: 1, repetition: 2 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // PC007380 "DPU_SEND_TIME" DPU SENDS THE TIME TO DEC/MEC Pacs_DPU_SEND_TIME(); delay(1); // PC077420 "DMC_SET_TIME" SET THE TIME PREVIOUSLY WRITTEN BY THE WRITE TIME COMMAND // tcsend PC077420 // waittime 0.5 Pacs_DMC_SET_TIME(); delay(1); //---------------------------- // Start reduction/compression //---------------------------- // SPUS-START-REDUCT-COMPR // tcsend PC039400 // waittime 0.5 Pacs_SPUS_START_REDUCT_COMPR(); delay(1); // SPUL-START-REDUCT-COMPR // tcsend PC040390 // waittime 0.5 Pacs_SPUL_START_REDUCT_COMPR(); delay(1); //----------------- // End of Procedure //----------------- } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : SFT in Open Loop Mode (warm conditions) // // Author : Markus Nielbock // CUS author : MN // // Description : SFT warm for FM1 chopper in open-loop mode. All 3 coils are // operative. The chopper is commanded between -20 mA and +20mA // in steps of 4 mA. // The first part consists of chopper deflections equivalent to // commanded chopper coil currents between 0 and +/-20 mA, // alternating between positive and negative values. Absolute // position commanding is used. // The second part consists of a ramp of chopper deflections // between -20 and +20 mA, commanded in relative steps of 4 mA. // Finally, the chopper returns to its zero position. // // Dependencies : // // Preconditions : PACS switched-on in spectroscopy mode, chopper is switched // off and disabled, diagnostic HK not running // // Comments : Adapted from PACS_Chopper_SFT_Cold_OpenLoop_OBS.cus // // Version : 1.0 // // History : 1.0 12-03-07 creation by MN // : 2.0 13-02-08 Made into a proc to be called by // "obs" PacsEng_Chpper_SFT_Warm_OpenLoop obs PacsEng_Chopper_SFT_Warm_OpenLoop { }{ // 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(PACS_Chopper_SFT_Warm_OpenLoop())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_SFT_Warm_OpenLoop(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Run a loop of tens of different sets of PID parameters // // Description : For each set, performs a dozen of small and two larger movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV: added MOIS comments // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_Gra_IST_PID_Loop_Less { /* Needed variables to call PacsEng_Spec_Gra_IST_PID_Loop_Less */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_PID_Loop_Less */ }{ // 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(Pacs_Spec_Gra_IST_PID_Loop_Less())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_PID_Loop_Less(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpireBbMove // // $id$ // // telescope movement BB // // K.J. King // block SpireBbMove SPIRE 12032 { int step = 0; }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Move started"); SpireMsg(2," $Id: SpireBbMove.txt,v 1.1 2006/08/10 09:38:57 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP hstr = SpireHexStr(step,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(" + hstr + ")"); Spire_SET_OBS_STEP_RAW(step); // // execute // delay(2); // // ..... completion ..... // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Move ended"); SpireMsg(1," ..Moving (" + (time() - t) + " seconds)"); // } // CVS comments : $Id: OBCP_fixed_fixed_photo.txt,v 1.6 2007/08/22 10:18:28 dcesarsk Exp $ // Script file : OBCP_fixed_fixed_photo.txt // Purpose : // OBCP author : HF // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Belongs to Section 3.1: Two or three position chop PHOTO // of PACS-ME-LI-005, issue 1.4 // This is OBCP 3.1.3, calling DMC sequence // 14 (in 4.1.8). DMC performs the following chopper // pattern: // // P#2 take nb_rdouts // P#2+P#5 take nb_rdouts } } // P#2+P#6 take nb_rdouts } P#4 times } // } // P#7 take nb_rdouts } // P#7+P#5 take nb_rdouts } } // P#7+P#6 take nb_rdouts } P#4 times } P#1 times // } // P#8 take nb_rdouts } // P#8+P#5 take nb_rdouts } } // P#8+P#6 take nb_rdouts } P#4 times } // // TOTAL readouts (2*P#4 + 1)*3*nb_rdouts // // Usually P#6 = -P#5 so that chopper comes back to starting postion // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 26-jun-2006 DAC // 1.0 31-aug-2006 Return the TOTAL duration including TC timing // 1.1 22-nov-2006 Removed debug_print // 1.2 21-aug-2007 SRC-3507 Indicate end of BB int[] block OBCP_fixed_fixed_photo PACS 3 { int nb_main_loops = 1; // Nb of main loops (P#1) int chop_pos_1 = -100; // First chopper position (P#2) int nb_rdouts = 159; // Nb of readouts/chopper plateau (P#3) int nb_chop_cycle = 2; // Nb of chopps per pair of positions (P#4) int chop_throw_1 = 2000; // Chopper throw away from 1st position (P#5) int chop_throw_2 = -2000; // Chopper throw back to 1st position (P#6) int chop_pos_2 = 0; // Second chopper position (P#7) int chop_pos_3 = 100; // Third chopper position (P#8) int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // debug_print("Bolo sample: " + bol_freq + " " + bol_unit); // debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // OBCP_GRATING_Fixed_Fixed_PHOTOMETRY(seq, seq_time, // P#1...P#8, cmp_par_blue, cmp_par_red) // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all parameters filled // by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE ////////////////////////////////////////////////////////////////////////// // Call DEC/MEC code to estimate its duration duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; int[] duree1 = DMC_fixed_fixed_photo(nb_main_loops,nb_rdouts,nb_chop_cycle); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * bol_period) + dmc_margin; duree_SRC = iround(double(duree1[1]) * bol_period); duree_REF = iround(double(duree1[2]) * bol_period); duree_CAL = iround(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + iround(double(duree1[4]) * bol_period) + dmc_margin; // debug_print("Execution time [msec] from DMC: " + seq_time); // duree_msec(seq_time) duree_msec = duree_msec + t_cmd + seq_time; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 3, requires 12 parameters and calls DEC/MEC #?? string obcp_ID = "FIXED_CHOP_PHOT"; int obcp_par_nb = 12; int seq_DMC = 14; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_main_loops},{4,chop_pos_1},{5,nb_rdouts},{6,nb_chop_cycle},{7,chop_throw_1},{8,chop_throw_2},{9,chop_pos_2},{10,chop_pos_3},{11,comp_mode_blu},{12,comp_mode_red}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // debug_print(obcp_ID + "; duration: " + time_array); delay(time_array[0]); // Mark end of BB WriteEndBB(); // Return actual duration time_array[0] = time() - time_start; // Return the array of times return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the spec filter wheel for Redundant Warm // // Author : PR // // Arguments : // // Description : // // Comments : // // Version : 0.1 // History : 0.1 04-Jul-2007 Initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // obs PacsEng_CONF_spec_fltw_R_Warm { /* No variables to call PacsEng_CONF_spec_fltw_R_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_spec_fltw_R_Warm */ }{ // 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_spec_fltw_R_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw_R_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Flasher curing : short flashes with dead times -> Temp & signal evolutions // Third part of the Flashers Performance check (curing schemes) // // Author : P. Royer // // Arguments : // // Prerequisite : Flashers on // // Description : Check scheme of flasher curing : short flashes with dead times // : // Comments : // // // Version : 2.1 // History : 1.0 / 09-Jun-2006 initial version by PR // 1.1 / 06-Apr-2007 Updated chop_pos_BB -> FMILT BB2 // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // 2.1 01-Jul-2008 Introduced "final_delay" parameter // // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Flasher curing : short flashes with dead times -> Temp & signal evolutions // @comment - // obs PacsEng_Spec_Curing_Explore { /* Needed variables to call PacsEng_Spec_Curing */ int blue_flasher_current = 819; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819; //4mA. [0,4095] = [0,20 mA] int nflash = 1; // Number of flashes int flash_time = 60; // Duration of each flash int idle_time = 120; // Idle time between the flashes int nflash_fine = 6; // Number of flashes int flash_time_fine = 10; // Duration of each flash int idle_time_fine = 60; // Idle time between the flashes int final_delay = 120; // Idle time at the end of the test (flasher cooldown, detector stabilisation), /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Curing */ }{ // 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(PACS_Spec_Curing_Explore(blue_flasher_current,red_flasher_current,nflash,flash_time,idle_time,nflash_fine,flash_time_fine,idle_time_fine,final_delay))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Curing_Explore(blue_flasher_current,red_flasher_current,nflash,flash_time,idle_time,nflash_fine,flash_time_fine,idle_time_fine,final_delay); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // // Purpose // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // - 2-3 position chopping AOT with/without calibration block ~0.50h // (1 filter may be sufficient) // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // TCL author : N/A // TCL file : tN/A // CUS author : TM // Script file : PHOT_chopped_photometry_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 20-apr-2005 DAC // 0.2 25-apr-2005 DAC Filter back to POS A // 0.3 25-apr-2005 DAC Start/stop SPU // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 0.5 11-apr-2007 TM update for FM ILT // 1.0 25-mar-2008 VDP Ajusted to match PV phase syntax procedure Pacs_Phot_chopped_photometry { }{ // Register with environment // Start SPU int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; int nraw_red = 0; // PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A PHOT_fltw_move("POS A"); // // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); int[] duree = OBCP_chopped_photometry(8,1000,19,-2000,5000,8,2,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); duree = OBCP_chopped_photometry(9,1000,19,-2000,5000,8,1,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); duree = OBCP_chopped_photometry(10,1000,19,-2000,5000,8,0,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); // // Position the filter wheel at POS B PHOT_fltw_move("POS B"); // // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); duree = OBCP_chopped_photometry(8,1000,19,-2000,5000,8,2,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); duree = OBCP_chopped_photometry(9,1000,19,-2000,5000,8,1,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); duree = OBCP_chopped_photometry(10,1000,19,-2000,5000,8,0,-21350,+21200,0,0,0); debug_print("Duration from OBCP_chopped_photometry: " + duree); // // Position the filter wheel at POS A PHOT_fltw_move("POS A"); // // Stop SPU // PACS_spu_reset(); // Exit environment } // File : PACS_Spec_Heat_Setup.cus // Missionphase : PACS FM ILT tests // // Purpose : Sets Heater currents (blue & red) // // Author : P. Royer // // Arguments : blue & red Heater currents // // Description : Sets Heater currents (blue & red) // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jun-2006 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Sets heater currents (blue & red) // @comment - // block PACS_Spec_Heat_Setup PACS 163 { int blue_heat_current = 0; int red_heat_current = 0; }{ // Register start of BB WriteBBID($BBID); // // SETUP HEATERS // Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(blue_heat_current); delay(1); Pacs_DMC_SET_R_SPEC_HEAT_C_RAW(red_heat_current); delay(1); // // End of procedure //------------------ // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Start Diag. HK Special for Jürgen // // Author : Markus Nielbock // CUS author : MN // // Description : // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 MN 29-03-07. Call special HKs. // : 2.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Spec_Chopper_dhk_5hk_1khz { /* Needed variables to call PacsEng_Spec_Chopper_dhk_5hk_1khz */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_dhk_5hk_1khz */ }{ // 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(SPEC_Chopper_dhk_5hk_1khz_bb())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_Chopper_dhk_5hk_1khz_bb(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //- Staring measurement on one calibration source for low frequency // noise TM, DC (CUS, tcl) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // TCL author : N/A // TCL file : N/A // CUS author : DAC // Script file : PHOT_low_freq_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 27-apr-2005 DAC // 0.2 29-apr-2005 DAC 90 min in one filter (rather than 2x45 min on two filters // 0.3 26-oct-2005 DAC Move chopper back to zero // 0.4 11-apr-2007 TM update for FM // 1.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Phot_low_freq { /* Needed variables to call PacsEng_Phot_low_freq */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_low_freq */ }{ // 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(Phot_lowFreq_DDCS_IST("cs2",2000,"BOLObias_ILT_lowFreq_CS2"))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Phot_lowFreq_DDCS_IST("cs2",2000,"BOLObias_ILT_lowFreq_CS2"); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Staring photometry // DMC Seq. 3 for OBCP 7 // // // Author : Helmut Feuchtgruber // CUS script : Thomas G. Mueller // CVS file : // // Arguments : // nb_loops Number of loops with 2 sec integration time each // // Description : No operation of mechanisms, only a defined loop through a // specified number of bolometer readouts. Therefore this is // composed of a rather trivial and short sequence code. This // sequence will be used during nominal Line Scan observations. // Calibration cycles on the internal calibration sources may // be done before, after and at the turn-over points of the // spacecraft scans, by 4.1.5. // Sequence duration in readouts: 2 + p#1 * 40 // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows line by line 4.1.3 in PACS-ME-LI-005 // // Version : 1.0 13-Apr-2005 Creation by TM // History : // : int[] procedure DMC_phot_staring { int nb_loops = 60; // p01 Number of loops with 2 sec integration time each }{ int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start tallying the duration (measured in number of readouts) int duration_rdouts = 0; // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // LOOP P#1 for(int staring_loop = 1 .. nb_loops) { // LABEL 1 ; start of quadruple // WAIT 40 ; shortest time = 1 sec duration_rdouts = duration_rdouts + 40; duree_SRC = duree_SRC + 40; // END_LOOP } // LABEL 0 ; no sequence anymore // END_SEQUENCE // Define return array int[] time_array = [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_phot_staring: " + time_array); // Return the array of times return time_array; } // File : PACS_Spec_Gra_Ampl_Open_Loop // Missionphapse : PACS FM Test // // Purpose : Performs the determination of the optimal grating inductosyn amplitude in open loop // // Author : P. Royer // Arguments : // // Description : Loops over inductosyn amplitudes and performs a +-10 degrees updown movement for each value // // Prerequisite : CONF_grating_DEGMODE // // Version : 1.0 // History : 1.0 / 02-Mar-2007 PR Creation // procedure PACS_Spec_Gra_Ampl_Open_Loop { }{ int[] ampllist = [1000,1050,1100,1125,1150,1175,1200,1250,1300]; int nsteps = length(ampllist) - 1; {int}[] list_tuple = []; int[] list_int = []; int chksum = 0; int ampl = 1100; // for(int n = 0 .. nsteps) { ampl = ampllist[n]; list_tuple = [{ampl}]; list_int = [ampl]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); delay(180); // Pacs_DMC_MOVE_GRAT_REL_RAW(2730); delay(20); Pacs_DMC_MOVE_GRAT_REL_RAW(-2730); delay(20); // } } ///////////////////////////////////////////////////////////////////////////// /// $Id: PacsPhoto.def,v 1.69 2008/05/14 11:10:32 vanessa Exp $ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsPhoto AOT // CUS author : DAC // Script file : PacsPhoto.def // Return values // Description : // This AOT has to cater to three different source morphologies: // "point", "small", and "large". Each mode requires its own pointing modes. // Available pointing modes (reference is to JBr's document): // NOTE: All modes include operations during SLEW and operations at end of OBS. // NOTE: Updated based on e-mail from MS dated 3-Dec-2005 (denoted UPDATE) // NOTE: Updated after Saclay meeting // ==== "point" // no nodding 2.1 fine_pointing // nodding (includes "hold" periods) 3.4 nodding_pointing // UPDATE: Nodding is always needed ==> eliminate fine_pointing // // ==== "small" // (raster dimensions and steps TBD; expect 2x2 or 3x3) // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding always used ==> nodding_in_raster // // ==== "large" // Can be RASTER or SCAN (freeze mode is based upon a SCANning PointMode) // RASTER // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding not used ==> raster_pointing // // SCAN // There is no nodding and no chopping. "Hold" periods are allowed (mode 2.14) // Leg length is restricted to 20 degrees. // // Dependencies : // // Preconditions : // // Comments : Almost identical to PacsPhoto. Maid differences: // - accept (from XHspot) the following variables: // - nholdIN User defined "nhold", overrides CAL values // - confphotoparams Non-standard CONF_PHOTOparams CAL file // - obcpparams Non standard OBCP3params (point source) or // OBCP4params (small source) CAL files // - Calls two PV dedicated AOT scripts (search _PV in code). // These scripts accept confphotoparams and obcpparams // // History : 0.1 19-may-2008 DAC PV version based on PacsPhoto.def // - Added name of OBCP3params and CONF_PHOT_params files as // input parameters. Activated "nhold" logic // 0.2 20-may-2008 DAC // - Mostly editorial changes (useful for the AOT version // as well) // 0.3 21-may-2008 DAC // - Make nhold an input variable, ignore values in CAL files // (not for the AOT version, where "nhold" in CAL files // seems more adequate) {int,int,int,double,{string,double,double,double,double,double,double}[]} obs PacsCal_PacsPhoto { string blue = "blue1" in ["blue1","blue2"]; int repFactor = 1 in [1,1500]; // Repeat factor: i.e. nb of nods or rasters int nholdIN = 0; // nhold for current pointing mode, replaces CAL values string source = "point" in ["point","small","largeRaster","largeScan","none"]; // SrceSize string confphotparams = "CONF_PHOT_params"; //gain and comp_mode CAL file string obcpparams = "OBCP3params"; //Chop frequency, etc. CAL file string mapScanSpeed = "high" in ["high","medium","low"]; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanConstrFrom = 0.0 in [0.0,360.0]; double mapScanConstrTo = 0.0 in [0.0,360.0]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool mapScanHomCoverage = true; bool mapScanSquare = false; double pointStep = 2.0 in [2.0,480.0]; double lineStep = 2.0 in [2.0,480.0]; string mapRasterAngleRef = "inst" in ["inst","i+c"]; double mapRasterConstrFrom = 0.0 in [0.0,360.0]; double mapRasterConstrTo = 0.0 in [0.0,360.0]; int m = 2 in [2,100]; int n = 1 in [1,100]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; bool dither = false; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target double raoff = 0.0 in [0.0,360.0]; // RA OFF pos. double decoff = 0.0 in [-90.0,90.0]; // DEC OFF pos. bool refSelected = false; // OFF pos. needed int naifid = 0; //RA,DEC or SSO double fluxPntBlu = 116.0 in [0.0,2.0E7]; // Flux density in blue band mJy double fluxPntRed = 150.0 in [0.0,2.0E7]; // Flux density in red band mJy double fluxExtBlu = 116.0 in [0.0,2.0E7]; // Flux in blue band MJy/sr double fluxExtRed = 40.0 in [0.0,2.0E7]; // Flux in red band MJy/sr int obsOverhead = 180; // Slew overhead /* End of input section */ }{ // Begin "pointing" section // Overall "verbosity" bool verbose = true; // New nodding_pointing variable bool startAtOFF = false; // Conversion to deprecated variables bool noddingSel = true; if(source == "largeRaster") { string largeOptions = "raster"; bool mapRasterSel = true; noddingSel = false; } if(source == "largeScan") { largeOptions = "scan"; mapRasterSel = false; noddingSel = false; } int mapRasterNumCycles = repFactor; // Useful variables // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // // Set messages for HTML format message(""); message(""); // Pointing mode has not been established yet int pointCase = 0; // Determine the pointing mode if(source == "point") { // Variable needed to obtain choper throw from CAl-U string srcID = "pointSRC"; // Just for completiness, define a 1x1 raster m = 1; n = 1; // Fine pointing without nodding is disallowed (pointCase remain null) if(!noddingSel) { string pointMode = "basic_fine_pointing"; string shortDesc = "Point source (no nodding)"; // not allowed pointCase = 11; } else { pointMode = "nodding_pointing"; shortDesc = "Point source (nodding and chopping)"; pointCase = 12; string yzoffsetROW = "P" + pointCase; } } if(source == "small") { srcID = "smallSRC"; // Obtain the size of the raster from CAL-U "SMALL_SRC_params" m = ilookup("SMALL_SRC_params","PHOT","mRast"); n = ilookup("SMALL_SRC_params","PHOT","nRast"); pointStep = dlookup("SMALL_SRC_params","PHOT","pointStep"); lineStep = dlookup("SMALL_SRC_params","PHOT","lineStep"); if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = " Small source (no nodding)"; // not allowed // pointCase = 21; } else { pointMode = "nodding_raster_pointing"; shortDesc = "Small source (nodding and chopping)"; pointCase = 22; yzoffsetROW = "P" + pointCase; } } // Large source in Raster Mode if(source == "largeRaster") { srcID = "largeSRC"; if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = "Large source, raster mode (chopping and no nodding)"; pointCase = 31; yzoffsetROW = "P" + pointCase; } else { pointMode = "nodding_in_raster"; shortDesc = "Large source, raster mode (chopping and nodding)"; // not allowed // pointCase = 32; } } // Large source in Scan Mode if(source == "largeScan") { srcID = "largeSRC"; pointMode = "line_scan_pointing"; shortDesc = "Large source, line scan mode (no chopping)"; // For consistency m = 1; n = mapScanNumLegs; pointCase = 33; yzoffsetROW = "P" + pointCase; } // If pointCase is still 0, then something went wrong with the PointMode logic... if(pointCase == 0) { error("NODDING is incompatible with source: " + source); } // The pointing mode has been established. Continue with other input data // from HSPOT if(verbose) { debug_print("================> PointMode: " + pointMode); } // // confPHOT arrays (red and blu) compared to confSPEC // PHOT name SPEC name // confPHOTred{ 0} gain capa_red; // confPHOTred{ 1} N/A nb_rdouts_ramp_red; // confPHOTred{ 2} N/A nb_rdouts_subramp_red; // confPHOTred{ 3} same comp_mode_red; // confPHOTred{ 4} same glitch_det_red; // confPHOTred{ 5} ?? ramp_fit_alg_red; // confPHOTred{ 6 ?? nb_raw_red; // confPHOTred{ 7} N/A bias_r_red; // confPHOTred{ 8} N/A bias_d_red; // // Define confOBCP array. // NOTE: the conf arrays are inherited from PacsSpec, where the [0] element // represented the default values, and the [n] element represented values // to be used with the n-th wavelength. Here - PHOT - [0] still represents // the default values and [1] values corresponding to the chosen filter. // Could even use [1] and [2] for blue1 and blue2.... but will not! {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confPHOTblu and confPHOTred {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,0,0,0,0,0,0}]; // Define paramsPHOT, a "tuple of tuples" // Estimator module returns {confPHOTblu,confPHOTred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOT = {clone(confPHOTblu[0]),clone(confPHOTred[0]),clone(confOBCP[0])}; // including a new section for Low Gain implementation SCR4196 bool isBrightPacs = false; string calUFile = "isBrightPacsTrigger"; // section defining triggering Fluxes (to be read in CALU table) double fluxPntRedTriggerLowGain = dlookup(calUFile,"Red","fluxPntTrigger"); if(blue == "blue1") { double fluxPntBluTriggerLowGain = dlookup(calUFile,"Blue","fluxPntTrigger"); } else { if(blue == "blue2") { fluxPntBluTriggerLowGain = dlookup(calUFile,"Green","fluxPntTrigger"); } } double fluxExtRedTriggerLowGain = dlookup(calUFile,"Red","fluxExtTrigger"); if(blue == "blue1") { double fluxExtBluTriggerLowGain = dlookup(calUFile,"Blue","fluxExtTrigger"); } else { if(blue == "blue2") { fluxExtBluTriggerLowGain = dlookup(calUFile,"Green","fluxExtTrigger"); } } // section test if(fluxPntRedTriggerLowGain <= fluxPntRed || fluxPntBluTriggerLowGain <= fluxPntBlu || fluxExtRedTriggerLowGain <= fluxExtRed || fluxExtBluTriggerLowGain <= fluxExtBlu) { isBrightPacs = true; } // Obtain default values for "Prime" mode // DAC WARNING: using PV dedicated PacsPhotoDefaults script (not for AOT) paramsPHOT = PacsPhotDefaults_PV(srcID,"Prime",confphotparams,isBrightPacs,verbose); // Array [0] of paramsPHOT contains the default values; array [1] // will contain the values based on HSPOT input. Array [1] is a copy of [0]; // only elements depending on HSPOT will be updated // Copy default values to individual "conf" tuples confPHOTblu[0] = paramsPHOT{0}; confPHOTred[0] = paramsPHOT{1}; confOBCP[0] = paramsPHOT{2}; // Now comes the module to estimate PACS parameters as a function of the // exposure time given by the user. // paramsPHOText (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,repeat_factor,nhold,dummy2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsPHOText = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for given HSPOT input. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("++Photo: confOBCP[0]: " + confOBCP[0]); } // DAC WARNING Using PV dedicated PacsPhotEstimatorOBCPn script (not for AOT) paramsPHOText = PacsPhotEstimatorOBCPn_PV(pointCase,blue,obcpparams,repFactor,paramsPHOT,noddingSel,dither,verbose); // Copy estimates to respective tuples confPHOTblu[1] = paramsPHOText{0}; confPHOTred[1] = paramsPHOText{1}; confOBCP[1] = paramsPHOText{2}; int nb_nods = paramsPHOText{3}{0}; int repeat_factor = paramsPHOText{3}{1}; //DAC "nhold" is obtained as an input variable (not for AOT!!) int nhold = nholdIN; ///////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source. // We have to collect the duration of all TCs that will be released after the // PointingRequest // First TC is associated with setting OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsPhotSlewCal to perform AOT prologue and CAL during // slew (with prologue): bool doProlog = true; int timeSlewCalProlog = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCalProlog: " + timeSlewCalProlog); } // Cal during "hold" cycles" (no prologue) doProlog = false; int timeSlewCal = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCal: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsPhotCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsPhotCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // Duration of any nod leg or staring observation // Use OBCP3 for point source // Use OBCP4 for all others, except scan mode if(pointCase == 11 || pointCase == 12) { int timeOBS = duration(PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP3: " + timeOBS); } } if(pointCase == 22 || pointCase == 31) { timeOBS = duration(PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP4: " + timeOBS); } } if(pointCase == 33) { // Estimate how long OBCP7 has to run to cover a scan leg // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec double rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } double timeLEG = mapScanLegLength * 60.0 / rate; // Duration of OBCP7 // For one readout int nb_SRC = 1; confOBCP[1]{3} = nb_SRC; int timeOBS1 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // For 20 readouts nb_SRC = 20; confOBCP[1]{3} = nb_SRC; int timeOBS2 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 19.0; double offset = double(timeOBS1) - slope; // Compute nb_SRC so that OBCP runs during the whole scan leg nb_SRC = iceil((timeLEG - offset) / slope); if(verbose) { debug_print("Duration scan leg: " + timeLEG); debug_print("Needed nb_SRC to fill scan leg: " + nb_SRC); } confOBCP[1]{3} = nb_SRC; timeOBS = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); } if(verbose) { debug_print("confOBCP[1]: " + confOBCP[1]); debug_print("==> Duration OBCP: " + timeOBS + " [sec] per nod; pointCase: " + pointCase); } // Finally deal with PHOT_aot_epilogue and WriteEndID int timeEpilogue = duration(PHOT_aot_epilogue()); int timeEndID = duration(WriteEndID()); timeEpilogue = timeEpilogue + timeEndID; if(verbose) { debug_print("Duration aot_epilogue: " + timeEpilogue); } // We have all elements to issue a Pointing Request and generate TCs // - duration of SlewCAL // - duration of OBS (one pointing) // - nb of nods or nb of raster points // - nhold // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // The nodding step has been estimated already (PacsPhotDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table // Read nod amplitude [arcsec] double nodThrow = dlookup("PHOT_CHOP_params",srcID,"NOD"); int max_dither = confOBCP[1]{1}; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("TimeSlewCal : " + timeSlewCal); debug_print("TimeOBS : " + timeOBS); debug_print("m/n : " + m + "/" + n); debug_print("nb_nods/repeat_factor/nhold: " + nb_nods + "/" + repeat_factor + "/" + nhold); debug_print("NOD amplitude for " + srcID + ": " + nodThrow + " [arcsec]"); int chpSRC = confOBCP[1]{12}; int chpREF1 = confOBCP[1]{13}; int chpREF2 = confOBCP[1]{14}; debug_print("#### CHOP SRC/REF1/REF2: " + chpSRC + "/" + chpREF1 + "/" + chpREF2); debug_print("CHOP dither: " + max_dither); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); } // Issue pointing request // Virtual aperture // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("##Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("##skewCorrec : " + skewCorrec); } // SCAN/RASTER orientation for "scan map" and "chopped raster" // RASTER defines mapRasterAngleRef = "inst" in ["inst", "i+c"]; // SCAN defines mapScanAngleRef = "sky" in ["sky", "inst", "s+c", "i+c"]; // By default S/C moves in instrument coordinates bool useINST = true; if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { useINST = false; } // Act according to pointCase // POINT source, i.e. 3.4 nodding_pointing if(pointCase == 12) { // Issue pointing request (when possible use JBr's variable names for clarity) // SlewCal during slew string ib = "P01_0"; int tslewmin = timeSetOBSID + timeSlewCalProlog; int tih = 0; int tfh = timeEpilogue; bool fixed = false; double pattnod = 0.0 + skewCorrec; int nnods = nb_nods; int tp = timeOBS; int tloadslewmin = 0; int nload = 0; int thold = timeSlewCal; // int nhold Already defined // Do not start at nod position startAtOFF = false; int[] fromPntReq = nodding_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); if(verbose) { debug_print("##### nodding_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tss = fromPntReq[2]; tload = fromPntReq[3]; } // SMALL source or LARGE raster with nodding if(pointCase == 22 || pointCase == 32) { // "nodding_raster_pointing" (3.6 in Pointing document) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; double patt = 0.0; // Chopper moves along -Y-axis pattnod = 270.0 + skewCorrec; // Chop nodThrow was already established // nodThrow = From CAL-U table int k = 0; fixed = false; int nrepeat = repeat_factor; double d1 = pointStep; double d2 = lineStep; thold = timeSlewCal; tp = timeOBS; nnods = nb_nods; // New arguments for pointing request; will be dealt with next iteration int top = 0; raoff = 0.0; decoff = 0.0; nrepeat = repeat_factor; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nnods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); if(verbose) { debug_print("##### nodding_in_raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tss = fromPntReq[3]; tll = fromPntReq[4]; tnod = fromPntReq[5]; tload = fromPntReq[6]; tsop = fromPntReq[7]; trep = fromPntReq[8]; } // SMALL or LARGE source with no nodding if(pointCase == 21 || pointCase == 31) { // raster_pointing (mode 3.5) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; // Perform raster in instrument coordinates fixed = false; //SPR-2431 Raster lines along y-axis patt = 90.0; d1 = pointStep; d2 = lineStep; tp = timeOBS; nrepeat = repeat_factor; thold = timeSlewCal; ///DAC From CAL file nhold = 0; k = 0; top = 0; raoff = 0.0; decoff = 0.0; fromPntReq = raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); if(verbose) { debug_print("##### raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tll = fromPntReq[3]; trep = fromPntReq[4]; tsop = fromPntReq[5]; } if(pointCase == 33) { // line_scan_pointing. Keep (most of) JBr's variable names tslewmin = timeSetOBSID + timeSlewCalProlog; // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } // Case of homogeneous coverage double pi = 3.1415926535; // degrees to radians double dtor = 0.0; double rtod = 0.0; double halfDiag = 0.0; double halfDiagAngle = 0.0; dtor = 2.0 * pi / 360.0; rtod = 1.0 / dtor; halfDiag = sqrt(boloSSize * boloSSize + boloLSize * boloLSize) / 2.0; halfDiagAngle = atan(boloSSize / boloLSize) * rtod; // Add further constraint from RV (SPR-2889) // Add SPR-2699 further logic: mapScanAngleRef overrides ScanHom and ScanSquare if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { mapScanHomCoverage = false; mapScanSquare = false; } // Could simplify logic after SPR-2699 (mapScanHomCoverage cannot be true // unless inst or i+c have been specified) if(mapScanHomCoverage == true && (mapScanAngleRef == "inst" || mapScanAngleRef == "i+c")) { mapScanCrossScan = halfDiag * (abs(sin(dtor * (mapScanAngle + 90.0 - halfDiagAngle))) + abs(cos(dtor * (90.0 - halfDiagAngle - mapScanAngle + 90.0)))); if(verbose) { debug_print("New mapScancCross: " + mapScanCrossScan); } } // Case of square map request if(mapScanSquare == true && mapScanHomCoverage == true) { mapScanNumLegs = iceil(60.0 * (mapScanLegLength / mapScanCrossScan)); if(verbose) { debug_print("New mapScanNumLegs: " + mapScanNumLegs); } } ib = "P01_0"; tih = 0; tfh = timeEpilogue; // Use instrument coordinates unless HSPOT says otherwise fixed = false; if(useINST == false) { fixed = true; } patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeSlewCal; nrepeat = repFactor; if(verbose) { debug_print("Map reference: " + mapScanAngleRef + "=" + fixed); } fromPntReq = line_scan_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,thold,nhold,nrepeat); //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tacc = fromPntReq[2]; tdec = fromPntReq[3]; tl = fromPntReq[4]; tll = fromPntReq[5]; trep = fromPntReq[6]; if(verbose) { debug_print("##### line_scan_with_hold"); } if(verbose) { debug_print("##### rate: " + rate + " arcsec/sec"); } // Here we calculate how long it takes to scan a line [sec] // int scanTime = iceil(d1/rate); // The "consistent" way of doing this is to rely on PntReq information int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; } if(verbose) { debug_print("PointReq: " + fromPntReq + " for pointCase: " + pointCase); debug_print("PointMode: " + pointMode); } // End of "pointing" section }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); debug_print("++++++++++++++++++++++++ State Machine"); } // Initialize some "global" variables int totalOBStime = 0; int totalOBSover = 0; int totalCALtime = 0; int totalCALover = 0; int nbSCANlegs = 0; // Issue TCs int[] state = [0]; int nbOBS = 0; while(state[0] >= 0) { state = next_state(); //// STATE = SLEW if(state[0] == 1) { if(verbose) { int tNOW = time(); debug_print("=== SLEW/CAL starts at: " + tNOW); } // Set OBSID WriteOBSID($OBSID); doProlog = true; int[] calTime = PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); debug_print(" TotalCalTime: " + totalCALtime); } } else { //// STATE = INIT_HOLD if(state[0] == 2) { if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD starts at: " + tNOW); } if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD ends at: " + tNOW); } } else { //// STATE = POINT if(state[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping int[] obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("POINT: POINTobs: " + nbOBS); tNOW = time(); debug_print("=== POINT ends at: " + tNOW); } } else { //// STATE = CAL_HOLD if(state[0] == 6) { doProlog = false; if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD starts at: " + tNOW); } calTime = PacsPhotSlewCal(false,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { debug_print("Accumulated CALtime: " + totalCALtime); tNOW = time(); debug_print("=== CAL-HOLD ends at: " + tNOW); } } else { //// STATE = NOD if(state[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("NOD: NODobs: " + nbOBS); tNOW = time(); debug_print("=== NOD ends at: " + tNOW); } } else { //// STATE = LINE if(state[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== SCAN starts at: " + tNOW); } obsTime = PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); totalOBStime = totalOBStime + scanTime; totalOBSover = totalOBSover + scanTime + scanOVER; nbSCANlegs = nbSCANlegs + 1; if(verbose) { debug_print(" TotalOBSTime: " + totalOBStime); debug_print(" Total w/over: " + totalOBSover); tNOW = tNOW + scanTime; debug_print("=== SCAN leg " + nbSCANlegs + " ends at: " + tNOW); } } else { //// STATE = FINAL_HOLD if(state[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } PHOT_aot_epilogue(); WriteEndID(); if(verbose) { tNOW = time(); debug_print("=== FinalHOLD ends at: " + tNOW); } } else { //// STATE = END if(state[0] == -1) { tNOW = time(); if(verbose) { debug_print("=== END state; time now: " + tNOW); } } } } } } } } } } int timeObsEnd = time(); int overOBS = totalOBSover - totalOBStime; int overCAL = totalCALover - totalCALtime; if(verbose) { debug_print("+++ OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print(" totalOBStime :" + totalOBStime); debug_print(" totalOBSover :" + overOBS); debug_print(" totalCALtime :" + totalCALtime); debug_print(" totalCALover :" + overCAL); } // Time considerations // The "science" part of the observations lasts tobs seconds (tobs from // PointReq[0]) // Time on source is totalOBStime. Hence int instrumentAndObservationOverhead = tobs - totalOBStime; // Begin "calculation" and report section string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "ObsMode: " + shortDesc + ""; lineCnt = lineCnt + 1; // More pointing information if(pointCase == 12) { msgLine[lineCnt] = "

Chopper throw: " + nodThrow + " [arcsec]

"; lineCnt = lineCnt + 1; double mapArea = boloArea; msgLine[lineCnt] = "

PHOTO footprint: " + dformat(boloLSize,2) + " x " + dformat(boloSSize,2) + " [arcsec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

PHOTO area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } if(pointCase == 21 || pointCase == 31 || pointCase == 22) { msgLine[lineCnt] = "

Raster points/lines: " + m + "/" + n + "

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Step size: " + d1 + " x " + d2 + " [arcsec]

"; lineCnt = lineCnt + 1; // Mapped region double sizeL = boloLSize + double(m - 1) * d1; double sizeS = boloSSize + double(n - 1) * d2; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } if(pointCase == 33) { msgLine[lineCnt] = "

ScanLeg: " + d1 + " [arcsec]; number of legs: " + n + "; leg separation: " + dformat(d2,1) + " [arcsec], scan speed: " + dformat(rate,2) + " [arcsec/sec]

"; lineCnt = lineCnt + 1; // For the mapped area assume that we scan along the Large side of bolo // Size along scan line sizeL = d1 + boloSSize; // Size covered by successive legs sizeS = boloLSize + double(n - 1) * d2; msgLine[lineCnt] = "

PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

"; lineCnt = lineCnt + 1; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

"; lineCnt = lineCnt + 1; } // Nodding pattern msgLine[lineCnt] = "

Nod pattern (as applicable)

"; lineCnt = lineCnt + 1; if(nb_nods == 0) { if(pointCase != 33) { msgLine[lineCnt] = " No nodding, S/C stays at nominal position<"; } else { msgLine[lineCnt] = " No nodding, S/C is in line scan mode<"; } lineCnt = lineCnt + 1; } if(nb_nods == 1) { msgLine[lineCnt] = " A->B "; lineCnt = lineCnt + 1; } if(nb_nods == 2) { msgLine[lineCnt] = " A->B B->A "; lineCnt = lineCnt + 1; } if(nb_nods > 2) { int aux1 = nb_nods - 2; msgLine[lineCnt] = " A->B B->A and " + aux1 + " more A->B or B->A leg(s) "; lineCnt = lineCnt + 1; } // Add dithering bla-bla msgLine[lineCnt] = "

Dithering information

"; lineCnt = lineCnt + 1; if(dither && pointCase == 12) { int half_dither = max_dither / 2; msgLine[lineCnt] = "

Three position spatial dithering performed with the chopper (" + max_dither + " and " + half_dither + " chopper engineering units)

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Dithering information is not applicable.

"; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

Duration information

"; lineCnt = lineCnt + 1; tNOW = time(); msgLine[lineCnt] = "

AOT duration (w/overheads): " + tNOW + " [sec]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

(AOT duration comprises 'on-sky' plus setup and CAL during slew)

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Breakdown of AOT duration:

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; // The charged obsOverhead is the MAX between tslew, nominalOverhead if(tslew > obsOverhead) { obsOverhead = tslew; } int tcharged = tobs + obsOverhead; msgLine[lineCnt] = "

AOT cost (includes time to slew to source): " + tobs + " + " + obsOverhead + " = " + tcharged + " [sec]

"; lineCnt = lineCnt + 1; // On-SRC time calculations start here // Uses new algorithm: on-SRC = totalOBStime*boloArea/mapArea // OBS times above is for all pointings. For a raster, have to divide // by number of raster positions, i.e. m*n if(pointCase != 33) { // If steps are smaller than boloXSize, same sky will be seen several times // Compute Short and Long dimension number of sightings (assume source is // placed to maximize number of sightings, i.e. at the proper edge of bolo) // NOTE: exchanged pointStep and lineStep as suggested by Roland V. int nbShort = iceil(boloSSize / lineStep); // Cannot be larger than m if(nbShort > m) { nbShort = m; } int nbLong = iceil(boloLSize / pointStep); // Cannot be larger than n if(nbLong > n) { nbLong = n; } if(verbose) { debug_print("nbShort/nbLong: " + nbShort + "/" + nbLong); } // Time per raster point double auxTIMEold = double(totalOBStime * nbShort * nbLong) / double(m * n); double auxTIME = double(totalOBStime) * boloArea / mapArea; // Small source is a special case where by design the SRC is always in view if(pointCase == 22) { auxTIME = auxTIMEold; } } else { // elementary integration time [sec] will be computed as "transit" time // of the source across the BOLO detector // Case of scan leg size smaller than boloSize double sizeAux = boloSSize; if(d1 <= boloSSize) { sizeAux = d1; } // Assume source is 1st seen on row=1; each successive scan may see again // the same sky region if mapScanCrossScan is smaller than bolo width. // The number of times the same sky is scanned again: if(mapScanCrossScan != 0.0) { int nbCross = iceil(boloLSize / mapScanCrossScan); if(verbose) { debug_print("nbCross: " + nbCross); } } else { nbCross = repFactor; } // nbCross cannot be larger than mapScanNumLegs if(nbCross > mapScanNumLegs) { nbCross = mapScanNumLegs; } if(verbose) { debug_print("nbCross: " + nbCross); } // The "crossing time" double crossTime = sizeAux / rate; if(verbose) { debug_print("crossTime: " + crossTime); } // AuxTime is "crossing time" * number of crossings * repFactor auxTIMEold = double(repFactor * nbCross) * crossTime; auxTIME = double(totalOBStime) * boloArea / mapArea; } if(verbose) { debug_print("AuxTIMEold: " + auxTIMEold + " [sec]"); debug_print("AuxTIME : " + auxTIME + " [sec]"); } // Pass the pointing mode to RMS (may need it for SRC,REF considerations) double[] pixRMS = PacsPhotNoiseRMS(pointCase,blue,auxTIME); msgLine[lineCnt] = "

Sensitivity information

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Effective on-sky time (one spatial resolution element) : " + dformat(auxTIME,1) + " [sec]

"; lineCnt = lineCnt + 1; // Point source or extended source if(pointCase == 11 || pointCase == 12) { msgLine[lineCnt] = "

Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]

"; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]; extended RMS " + dformat(pixRMS[2],2) + " [MJy/sr]

"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]; extended RMS " + dformat(pixRMS[3],2) + " [MJy/sr]

"; lineCnt = lineCnt + 1; } PacsMessageCenter("PACS Photometer AOT",lineCnt,msgLine); // Close messages for HTML format message(""); message(""); // Everything below is new request from RV. Use variable names consistent // with input variables in PacsPhoto.def // Return demanded tuples // ID for band blue1 string bandBlue = "60-85"; if(blue == "blue2") { bandBlue = "85-130"; } double pntRMSBlue = pixRMS[1]; // Watch out for infinite division!! // Better watch out for silly limits (SPR-2627) if(pntRMSBlue > 0.0010) { double pntSNBlu = fluxPntBlu / pntRMSBlue; } else { pntSNBlu = 0.0; } string bandRed = "130-210"; double pntRMSRed = pixRMS[0]; if(pntRMSRed > 0.0010) { double pntSNRed = fluxPntRed / pntRMSRed; } else { pntSNRed = 0.0; } double extRMSBlue = pixRMS[3]; // Watch out for infinite division!! if(extRMSBlue > 0.0010) { double extSNBlu = fluxExtBlu / extRMSBlue; } else { extSNBlu = 0.0; } double extRMSRed = pixRMS[2]; if(extRMSRed > 0.0010) { double extSNRed = fluxExtRed / extRMSRed; } else { extSNRed = 0.0; } {string,double,double,double,double,double,double}[] noiseSummary = [{bandBlue,fluxPntBlu,pntSNBlu,pntRMSBlue,fluxExtBlu,extSNBlu,extRMSBlue},{bandRed,fluxPntRed,pntSNRed,pntRMSRed,fluxExtRed,extSNRed,extRMSRed}]; if(verbose) { debug_print("NoiseSumm: " + noiseSummary); debug_print("OBStime/CALtime/Overhead/chopthrow: " + totalOBStime + "/" + totalCALtime + "/" + instrumentAndObservationOverhead + "/" + nodThrow); } // return {totalOBStime,totalCALtime,instrumentAndObservationOverhead, return {totalOBStime,fromPntReq[1],instrumentAndObservationOverhead,nodThrow,noiseSummary}; } // File : CONF_chopper.cus // Missionphase : PACS FM Test // // Purpose : Configure the chopper servo loop // // Author : DAC/MN // CUSification : DAC/MN // Arguments : // string calUfile CAL-U file // string calUcol Column identifier // // // Description : Read servo loop parameters off a CALU table; a set // of parameters is arranged as a column; different // columns list different sets. Must specify the CALU // file name and the column identification string. // Example: CONF_chopper ("CONFChopper","nom_sky") // // Comments : // // Version : 0.4 // History : 0.1 9-nov-2006 Initial version // 0.2 22-feb-2007 Adapted to revised CONFChopper table // (PosLimit <=> Scaling // 0.3 8-mar-2007 Added 2sec delay at end per HD's mail // 0.4 9-jun-2007 Changed entries for new DECMEC (MN) // 0.4 9-jun-2007 newly optimised parameters (MN) procedure CONF_chopper { string fileU = "CONFChopper"; // CAL-U file string calUcol = "nom_sky"; // Column identifier }{ // # DMC_WRT_CHOP_CONF_PAR (21 params). Use values // obtaied from CALU file int aKp = ilookup(fileU,"Kp",calUcol); int aKi = ilookup(fileU,"Ki",calUcol); int aKd = ilookup(fileU,"Kd",calUcol); int aKf = ilookup(fileU,"Kf",calUcol); int aRate = ilookup(fileU,"Rate",calUcol); int aAccumLimit = ilookup(fileU,"AccumLimit",calUcol); int aOutputLimit = ilookup(fileU,"OutputLimit",calUcol); int aPosLimit = ilookup(fileU,"PosLimit",calUcol); int aErrorLimit = ilookup(fileU,"ErrorLimit",calUcol); int aPosOffset = ilookup(fileU,"PosOffset",calUcol); int aKiCurr = ilookup(fileU,"KiCurr",calUcol); int aSelectFieldPlateLUT = ilookup(fileU,"SelectFieldPlateLUT",calUcol); int aSpare = ilookup(fileU,"Spare",calUcol); int aFilterN1 = ilookup(fileU,"FilterN1",calUcol); int aFilterN2 = ilookup(fileU,"FilterN2",calUcol); int aFilterN3 = ilookup(fileU,"FilterN3",calUcol); int aFilterD1 = ilookup(fileU,"FilterD1",calUcol); int aFilterD2 = ilookup(fileU,"FilterD2",calUcol); int aInductance = ilookup(fileU,"Inductance",calUcol); int aResistance = ilookup(fileU,"Resistance",calUcol); int aControlLoopGain = ilookup(fileU,"ControlLoopGain",calUcol); // Create tuple array and int array {int}[] list_tuple = [{aKp},{aKi},{aKd},{aKf},{aRate},{aAccumLimit},{aOutputLimit},{aPosLimit},{aErrorLimit},{aPosOffset},{aKiCurr},{aSelectFieldPlateLUT},{aSpare},{aFilterN1},{aFilterN2},{aFilterN3},{aFilterD1},{aFilterD2},{aInductance},{aResistance},{aControlLoopGain}]; // Define as int [] to compute check sum int[] list_int = [aKp,aKi,aKd,aKf,aRate,aAccumLimit,aOutputLimit,aPosLimit,aErrorLimit,aPosOffset,aKiCurr,aSelectFieldPlateLUT,aSpare,aFilterN1,aFilterN2,aFilterN3,aFilterD1,aFilterD2,aInductance,aResistance,aControlLoopGain]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_CHOP_CONF_PAR(list_tuple,chksum); delay(2); } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Reduced NEP measurements for the new sequencer test // Search for the optimum bias with 11 values // using the high gain // // Author : Koryo Okumura // // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // int lowFreq_noise_time = 1800; // long noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Instrument is in safe mode // // Description : OBS script of PHOT_redArray_alternatePolarisation_DDCS_IST // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_newSeq_IST(0) // // Version : 1.0 // History : 0.1 Fri Oct 05 12:19:23 CEST 2007 // : 1.0 translated into PV script VDP // obs PacsEng_Phot_redArray_alternatePolarisation_DDCS_IST { /* Needed variables to call PacsEng_Phot_redArray_alternatePolarisation_DDCS_IST */ int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds int lowFreq_noise_time = 1800; // long noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_redArray_alternatePolarisation_DDCS_IST */ }{ // 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(PHOT_redArray_alternatePolarisation_DDCS_IST(response_measure_time,noise_measure_time,lowFreq_noise_time,biasFile))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_redArray_alternatePolarisation_DDCS_IST(response_measure_time,noise_measure_time,lowFreq_noise_time,biasFile); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Gra_Cont_Check_4 // Missionphase : FM IST & Commissioning // // Purpose : Prepare grating mechanism, 2 small moves & disable // // Author : P. Royer // // Arguments : CALIBRATION TABLE (CONFGrat) // ROW of CALU table (CONFGrat) // Row of this table = instrument version // // Description : This script will fully configure the grating, incl. homing, then disable it // // Comments : // // Version : 1.0 // History : 1.0 / 12-JuL-2007 PR // procedure PACS_Spec_Gra_Cont_Check_4 { string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "IST"; // INSTRUMENT VERSION }{ // Configure the grating controller // CONF_grating(calUname,calUrow); delay(10); // // Make small movements for(int j1 = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(117); delay(1); } for(int j2 = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(-117); delay(1); } // Make 2 bigger movements Pacs_DMC_MOVE_GRAT_REL(-233010); delay(15); Pacs_DMC_MOVE_GRAT_REL(233010); delay(15); // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); // //------------------------- // End of Procedure //------------------------- } // File : PACS_Spec_Gra_Mec_Setup.cus // Missionphase : PACS FM ILT // // Purpose : Prepare grating mechanism // // Author : P. Royer // // Arguments : CALIBRATION TABLE (CONFGrat) // ROW of CALU table (CONFGrat) // Row of this table = instrument version // // Description : This script will switch on and set all required // parameters for the grating // // Comments : // // Version : 1.0 // History : 1.0 / 13-Jun-2006 created from a non-calu-using script // procedure PACS_Spec_Gra_Cont_Check_1 { string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "ISTSafe"; // INSTRUMENT VERSION }{ // // Grating home mode: 0 = move to neg. positions; 1 = move to pos. positions int grat_home_mode = 1; // Grating central position (rough) int grat_center_pos = 500000; // //---------------------- // CONTROLLER PARAMETERS //---------------------- // PACS_Spec_Gra_Conf_Calu(calUname,calUrow); // //---------------------- // ADDITIONAL PARAMETERS //---------------------- // // ADDITIONAL PARAMS : 1. GRATING INDUCTOSYN AMPLITUDE // int induct_ampl = ilookup(calUname,calUrow,"InductAmpl"); {int}[] list_tuple = [{induct_ampl}]; int[] list_int = [induct_ampl]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 2. HALL SENSOR OFFSET // int hall_offset = ilookup(calUname,calUrow,"HallOffset"); list_tuple = [{hall_offset}]; list_int = [hall_offset]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_HALLOFFSET(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 3. GRATING RANGE // int range = ilookup(calUname,calUrow,"Range"); list_tuple = [{range}]; list_int = [range]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_RANGE(list_tuple,chksum); // // Amplitude was set => security delay of 3 minutes delay(180); // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(2); // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); // //------------------------- // End of Procedure //------------------------- } // File : PACS_Spec_Gra_Mec_Setup.cus // Missionphase : PACS FM ILT // // Purpose : Prepare grating mechanism // // Author : P. Royer // // Arguments : CALIBRATION TABLE (CONFGrat) // ROW of CALU table (CONFGrat) // Row of this table = instrument version // // Description : This script will switch on and set all required // parameters for the grating, enable the controller, // make a small grating movement // // Comments : // // Version : 1.0 // History : 1.0 / 13-Jun-2006 created from a non-calu-using script // procedure PACS_Spec_Gra_Cont_Check_2 { string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "FMILT"; // INSTRUMENT VERSION }{ // // Grating home mode: 0 = move to neg. positions; 1 = move to pos. positions int grat_home_mode = 1; // Grating central position (rough) int grat_center_pos = 500000; // //---------------------- // CONTROLLER PARAMETERS //---------------------- // PACS_Spec_Gra_Conf_Calu(calUname,calUrow); // //---------------------- // ADDITIONAL PARAMETERS //---------------------- // // ADDITIONAL PARAMS : 1. GRATING INDUCTOSYN AMPLITUDE // int induct_ampl = ilookup(calUname,calUrow,"InductAmpl"); {int}[] list_tuple = [{induct_ampl}]; int[] list_int = [induct_ampl]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 2. HALL SENSOR OFFSET // int hall_offset = ilookup(calUname,calUrow,"HallOffset"); list_tuple = [{hall_offset}]; list_int = [hall_offset]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_HALLOFFSET(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 3. GRATING RANGE // int range = ilookup(calUname,calUrow,"Range"); list_tuple = [{range}]; list_int = [range]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_RANGE(list_tuple,chksum); // // Amplitude was set => security delay of 3 minutes delay(180); // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(5); // Make a small movement Pacs_DMC_MOVE_GRAT_REL(-233010); delay(30); Pacs_DMC_MOVE_GRAT_REL(233010); delay(30); // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); // //------------------------- // End of Procedure //------------------------- } // File : PACS_Spec_Fil_nturns.cus // Missionphase : PACS FM Tests // // Purpose : Position sequence test of spectrometer filterwheel // // Author : PR // // Arguments : // // Description : Moves the Spectrometer filter wheel times // to position 2 and back to position 1 using absolute position // commands. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.0 // History : 1.0 /Mar-2007 Adatped from PACS_Spec_Fil_Testseq // procedure PACS_Spec_Fil_nturns { int num_turns = 3; // number of 360 deg turns int backward_toA = 0; // direction of FW rotation towards POS A : 0 forward; 1 backward int backward_toB = 0; // direction of FW rotation towards POS B : 0 forward; 1 backward }{ debug_print("Start PACS_Spec_Fil_nturns"); int fw_start = 1; // initial filter wheel position (0=A; 1=B) int time_on_fw_pos = 20; // time spent on each FW stop position (sec) //int[] fltPOS = ["POS A","POS B"]; int slew_time = 15; // Minimum time between two filter wheel movements (sec) backward_toA = 2 * backward_toA; backward_toB = 2 * backward_toB; int[] backward = [backward_toA,backward_toB]; int movepar = 0; // SWON FW CONTROLLER Pacs_DMC_SWON_FW_SPEC(); delay(1); Pacs_DMC_MOVE_SPEC_FW_LOC_RAW(fw_start); delay(slew_time); // Move num_turns to position 0 and back to position 1 using absolute location commands for(int loop0 = 1 .. num_turns) { int i = (fw_start + 1) % 2; movepar = i + backward[i]; Pacs_DMC_MOVE_SPEC_FW_LOC_RAW(movepar); delay(slew_time); delay(time_on_fw_pos); i = (fw_start + 2) % 2; movepar = i + backward[i]; Pacs_DMC_MOVE_SPEC_FW_LOC_RAW(movepar); delay(slew_time); delay(time_on_fw_pos); } // RE-SWON GRAT CONTROLLER Pacs_DMC_SWON_GRAT_CONT(); delay(1); //------------------ // End of procedure //------------------ } // $Id // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration during PacsSlew // Author : VDP // // Arguments : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Uses OBCP13 and performs AOT prologue and epilogue // // Comments : // // Dependencies : CONF_SPEC_params : The detector biases are read from column "Normal0" // // Version : 1.0 // // History : 0.1 Using example from PacsCal_WaveCalChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping obs PacsEng_PacsSpecSlewCal_Flex { /* Needed variables to call PacsSpecSlewCal */ /* FW, WAVELENGTH & OBCP parameters */ double[] waves = [60.0]; // Wavelengths int order = 2; string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int nb_up_dn = 1; // nb_up_down OBCP 13 DMCSeq. P#1 int nb_grat_steps = 16; // nb_grating_steps OBCP 13 DMCSeq. P#3 int nb_cycles_grat = 2; // nb_chop_cycles_per_gratpos OBCP 13 DMCSeq. P#5 int nb_ramps_grat_pos = 1; // nb_clean_ramps_per_gratpos OBCP 13 DMCSeq. P#7 /* CRE & SPU PARAMETERS */ int capa_blu = 12; int capa_red = 12; int nb_rdouts_ramp_blu = 64; int nb_rdouts_ramp_red = 64; int nb_rdouts_subramp_blu = 16; int nb_rdouts_subramp_red = 16; int comp_mode_blu = 16; int comp_mode_red = 16; bool verbose = true; }{ // FIXED CRE & SPU Parameters int glitch_det_blu = 1; int glitch_det_red = 1; int ramp_fit_alg_blu = 1; int ramp_fit_alg_red = 1; int nb_raw_blu = 3; int nb_raw_red = 3; int bias_d_blu_mV = ilookup("CONF_SPEC_params","bias_d_blu","Normal0"); int bias_d_red_mV = ilookup("CONF_SPEC_params","bias_d_red","Normal0"); int bias_r_blu_mV = ilookup("CONF_SPEC_params","bias_r_blu","Normal0"); int bias_r_red_mV = ilookup("CONF_SPEC_params","bias_r_red","Normal0"); // FIXED OBCP Parameters // OBCP 13 DMCSeq. P#2 int grat_step_coarse = 0; // OBCP 13 DMCSeq. P#4 string order_str = "" + order; int grat_step_up_fine = ilookup("SPEC_BAND_params",order_str,"HI"); // OBCP 13 DMCSeq. P#6 int chop_pos_CS1 = ilookup("CHOPPERCSparams","SPEC","pos_CS1"); // OBCP 13 DMCSeq. P#8 int chop_pos_CS2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); // OBCP 13 DMCSeq. P#9 : this parameter is set in PacsSpecSlewCal_Flex // int grat_step_dn_fine = -grat_step_up_fine; // Synchronize on this detector 1:Blue 2:Red int detector = 1; // Chopped default position int chop_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); int grat_pos = grat_park; // PacsSpecSlewCal_Flex parks the grating in the end already // // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{capa_blu,nb_rdouts_ramp_blu,nb_rdouts_subramp_blu,comp_mode_blu,glitch_det_blu,ramp_fit_alg_blu,nb_raw_blu,bias_r_blu_mV,bias_d_blu_mV}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{capa_red,nb_rdouts_ramp_red,nb_rdouts_subramp_red,comp_mode_red,glitch_det_red,ramp_fit_alg_red,nb_raw_red,bias_r_red_mV,bias_d_red_mV}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,detector,chop_def}]; // Perform/don't AOT prologue bool doPROLOG = true; // // // "N/A" in string because of indexing 0,1,2,3 //string[] choix = ["N/A","order1","order2","order3"]; //string order_str = "" + order; //double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); //double[] keyWAVE = [keyWAVE1]; // // //Initial hold int tih = duration(WriteOBSID($OBSID)); //Final hold int tendobsid = duration(WriteEndID()); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_park,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsSpecSlewCal_Flex(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,waves,fltPOS,order)); if(verbose) { debug_print("Duration of PacsSpecSlewCal_Flex" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } int[] ts = no_pointing(execute,tih,tfh,tp); debug_print("ts: " + ts); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); // WriteOBSID($OBSID); data_rate(120.0); if(verbose) { debug_print("WriteOBSID at :" + tNOW + " sec"); } tNOW = time(); if(verbose) { debug_print("WriteOBSID ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } tNOW = time(); PacsSpecSlewCal_Flex(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,waves,fltPOS,order); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_park,verbose); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // End of Observation } procedure TestVectorInput { int[] toto = [1]; }{ message("toto: " + toto); } // File : PACS_GeGa_SFT_Init_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Cold SFT of Ge:Ga detector chain // // Author : H. Feuchtgruber // // Arguments : none // // // Description : This script will switch on and set all required parameters // for a test of the Ge:Ga detector chain at RT temperature. // Dummy resistor bias = 10 mV, detector bias = 2 mV // // // Comments : // // Version : 1.0 // History : 1.0 / 16-Nov-2004 initial version // 1.1 7-mar-2006 TeleCommand Pacs_DMC_SET_B_SPEC_HEAT_1_C renamed // TeleCommand Pacs_DMC_SET_B_SPEC_HEAT_2_C renamed // 1.2 24-mar-2006 Large overhaul based on // SetupSpectroscopyWEplusFPUsim.tcl script // 1.3 27-nov-2006 Changed bias_d to LB value: 1mV // 2.0 8-feb-2007 Added switchoff SPECs and DECs // procedure PACS_GeGa_SFT_Init_Warm { }{ debug_print("Start PACS_GeGa_SFT_Init_Warm"); //DPU_SET_HK_LIST (SPEC for both channels) Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); // DMC_WRT_BOL_REC_OPT(ID,LENGTH,4,CHKSUM) int[] argum = [4]; {int}[] argTuple = [{4}]; int chksum = checksum("int",argum); Pacs_DMC_WRT_BOL_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_B_DEC_REC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_R_DEC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_TIMING_FPGA_PAR(ID,LENGTH,16384,40,2,32,0,P//9,CHKSUM) {int}[] list_tuple = [{0x0},{0x0},{0x0},{26},{0x95217cb},{0xb}]; int[] list_int = [0x0,0x0,0x0,26,0x95217cb,0xb]; chksum = checksum("int",list_int); Pacs_DMC_WRT_TIMING_FPGA_PAR(list_tuple,chksum); delay(1); // DMC_SET_TIMING_FPGA_PAR Pacs_DMC_SET_TIMING_FPGA_PAR(); message("Default spectroscopy timing parameters set!"); // Switch off SPECs and DECs // DMC_SWOF_B_SPEC" SWITCH ON BLUE SPECTROMETER ARRAY POWER Pacs_DMC_SWOF_B_SPEC(); delay(1); // "DMC_SWOF_R_SPEC" SWITCH ON RED SPECTROMETER ARRAY POWER Pacs_DMC_SWOF_R_SPEC(); delay(1); // DMC_SWOF_B_DEC SWITCH ON THE BLUE DEC POWER Pacs_DMC_SWOF_B_DEC(); delay(1); // DMC_SWOF_R_DEC" SWITCH ON RED DEC POWER Pacs_DMC_SWOF_R_DEC(); delay(10); // ======== Initial detector setup ==================== // DMC_SWON_B_DEC SWITCH ON THE BLUE DEC POWER Pacs_DMC_SWON_B_DEC(); delay(8); // DMC_SWON_R_DEC" SWITCH ON RED DEC POWER Pacs_DMC_SWON_R_DEC(); delay(8); // Wait after DEC switch-on delay(5); debug_print("DECs are on !"); // Now define the startup Ge:Ga detector setup int read_per_ramp_b = 8; int cre_ctrl_b = 396; int bias_r_b = 0; int bias_d_b = 0; int read_per_ramp_r = 8; int cre_ctrl_r = 396; int bias_r_r = 0; int bias_d_r = 0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SWON_B_SPEC" SWITCH ON BLUE SPECTROMETER ARRAY POWER Pacs_DMC_SWON_B_SPEC(); delay(1); // PC091420 "DMC_SWON_R_SPEC" SWITCH ON RED SPECTROMETER ARRAY POWER Pacs_DMC_SWON_R_SPEC(); delay(1); debug_print("SPECs are on !"); // Wait for CRE HW sequence to finish delay(15); // now select the CREs cre_ctrl_b = 398; cre_ctrl_r = 398; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // Now define the actual Ge:Ga detector setup read_per_ramp_b = 64; cre_ctrl_b = 398; bias_r_b = 41; bias_d_b = 4; read_per_ramp_r = 64; cre_ctrl_r = 398; bias_r_r = 41; bias_d_r = 4; double heater_blue = 0.0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC-SET-PARAM-BOTH-SPEC SET TIMING PARAMTERS FOR BOTH SPEC ARRAYs Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // DMC_SWON_BD_HEATER Pacs_DMC_SWON_BD_HEATER(); delay(1); // DMC_SET_B_SPEC_HEAT_C Pacs_DMC_SET_B_SPEC_HEAT_C(heater_blue); delay(1); debug_print("Detectors are up and running at default settings!"); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); delay(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); delay(1); // # ==== End of detector setup ============== } // Missionphase : // // Purpose : Move the PHOT filter wheel to one of the two defined // positions // // TCL script : N/A // CUS script : Diego A. Cesarsky // // CVS file : PHOT_fltw_move.txt // // Arguments : // Type Name DefVal Description // string flt_id POS A One of two preset positions [POS A, POS B] // // Description : Switch ON filter controller, move wheel, switch OFF // // Dependencies : Low level PACS TCs // // Preconditions : Servo loop already configured // // Comments : useless comment by Bart // Quite useless indeed! // // Version : 0.1 13-Aug-2004 Creation by DAC // History : 0.2 28-Oct-2004 Renamed from FLTW_move.txt; demoded // from BB to simple procedure // 0.3 13-apr-2005 DAC Renamed from BOLO_flt_move, filter_id // is now a string (ENG value) // 0.4 20-1pr-2005 DAC Read wheel move time from PACSparams // 0.5 19-feb-2008 Return time in sec // : int procedure PHOT_fltw_move { string filter_id = "POS A" in ["POS A","POS B"]; }{ // Get the duration of the move int move_time = iceil(dlookup("PACSparams","fltw_time","freq_time")); // Same in [sec] int move_time_sec = Msec2sec(move_time); // debug_print("PHOT fltw moves to " + filter_id + // "; " + move_time_sec + " [sec]"); // Set the filter wheel: switch on the filter/grating controller Pacs_DMC_SWON_FW_PHOTO(); // Move filter to desired position Pacs_DMC_MOVE_PHOT_FW_LOC(filter_id); // Wait move_time_sec sec for wheel to end its movement delay(move_time_sec); // Switch off the controller Pacs_DMC_SWOF_GRAT_CONT(); // Return duration return move_time_sec; } // $Id: PacsEng_Phot_spu_setup.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Setup SPU for photometry data flow // Author : DAC // // Arguments : // // (optionally) starts reduction/compression // // Dependencies : // // Comments : // // Version : 2.0 // History : 1.0 10-nov-2006 DAC // 1.1 13-nov-2006 Start SPU // 1.2 4-apr-2007 nraw = 0 // 2.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Phot_spu_setup_l { /* Needed variables to call PacsEng_Phot_spu_setup_l */ /* Compression modes: default=0, double=1, half=2, lossless=4 */ /* transp=7, buffer=9 */ int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; // Number of raw channels blue SPU int nraw_red = 0; // Number of raw channels red SPU bool startSPU = true; // Start SPU or not [true,false] /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_spu_setup_l */ }{ // 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(PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsProcessInfoArrayRange.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // // Purpose : Process the timing information gathered in infoArray // // CUS author : DAC // // Input arguments // type name description // // tuple sortRanges HSPOT input // id, bluEdge, redEdge, repeatFactor, lineFlux, contFlux, lineWidth // // tuple sortRangesEXT HSPOT input added later // fluxUnitSel, widthUnitSel, refWave // tuple infoArray // Slew/Point/AOT SlewCal or pointing mode or global AOT info // 0.0 not in use // TotDur duration of the phase Slew/Point/AOT // nbLines number of spectral lines observed in phase Slew/point // nnods number of nod cycles in phase Point // m*n size of raster when applicable // wave1 each of the nbLines wavelengths or waveStart // wave2 each of the nbLines wavelengths or waveEnd // order grating order for line wave // gratStep grating step (needed to estimate "multiplexing") // TOT,SRC,REF,CAL,OVR the canonical OBCP duration (/nod/raster) // // Return values // Type Description // // Description : Use the information in infoArray to compute several times and // overheads, as well as the expected RMS fluctuations for each observed line // infoArray is a three-element tuple: // infoArray[0] contains information on the SlewCal phase // infoArray[1] contains information on the OBS phase // infoArray[2] contains global information on the AOT // // Dependencies : // // Comments : // // History : 0.1 6-Sep-2005 DAC // 0.2 27-sep-2005 Adding elements to compute RMS // 0.3 28-sep-2005 Add nbGratSteps to infoArray // 0.4 29-sep-2005 Add confOBCP to input arguments since I need nb_up_dn !! // 0.5 6-oct-2005 Corrected Raster/Staring logic // 0.6 14-oct-2005 Text of message // 1.0 24-oct-2005 Add HTML tags // 1.1 23-jan-2006 Multiplication by nbNods, mRaster, nRaster no longer needed // since next_state collects time per raster per nod. Also // eliminate "PACS overheads" // 1.2 1-mar-2006 Use dformat for messages // 2.0 11-mar-2006 Deal with LINE and CONT RMS values // 2.1 22-nov-2006 Added "verbose" to input arguments // 3.0 17-jan-2006 "Improved" messages // 3.1 12-feb-2007 Accept as input the tuples sortRanges and sortRangesEXT // Renamed to PacsProcessInfoArrayRange; only used // for RANGE due to addition of ranges and rangesEXT // Removed input aotID as only used for PacsRange // 3.2 26-feb-2007 Added order information from HSPOT: needed by PacsSpecRMS // to deal with "free" grating data // 4.0 12-mar-2007 Call PacsSpecRMS with "bigTuple" needed to convey graphic // information to main module // Return bigTuple for use by main // 4.1 12-apr-2007 Add obsOverhead for SCR-2813, implemented SCR-2924 // 4.2 19-apr-2007 Report Best,Worst, etc per "free" range // 4.4 27-apr-2007 SPR-3147: change km/s into kms // 4.5 23-may-2007 SPR-3210: return S/N // 4.5 24-oct-2007 Added nbOBS and nbOFF to input arguments, same to // PacsSpecRMS {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] procedure PacsProcessInfoArrayRange { /* infoArray */ {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; /* rangeSPOT (the sorted version) */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = [{"",0.0,0.0,0,0.0,0.0,0.0,"","",0.0}]; /* confOBCP */ {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; /* order selected by user in HSPOT */ string orderSel = "order2"; /* observatory overhead */ int obsOverhead = 180; /* nbOBS and nbOFF */ int nbOBS = 1; int nbOFF = 0; /* verbose? */ bool verbose = true; }{ // How am I called? if(verbose) { debug_print("PROCArray: ranges : " + rangeSPOT); } // Number of spectral lines (SlewCal and OBS) int nbKeyWaves = infoArray[0]{0}{3}; int nbLines = infoArray[1]{0}{3}; // Number of nods (OBS) int nbNodCycles = infoArray[1]{0}{4}; // Nb of "pointings" for nbNodCycles int nbNods = 2 * nbNodCycles; if(nbNods == 0) { nbNods = 1; } // Call module to estimate RMS fluctuations; pass information via infoArray // and confOBCP (for nb_up_dn) // Array noiseWave[nbLines][8] used to contain: // // noiseWave[lineNb][BwlC,BrC,WwlC,WrC,BwlL,BrL,WwlL,WrL] // // where B: best, W: worst, wl: wavelength, r: RMS, C: continuum, L: line // Add three more elements refWave, rmsCont, rmsLine // Above is now included in "bigTuple" {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsSpecRMS("RANGE",orderSel,infoArray,rangeSPOT,confOBCP,nbOBS,nbOFF,verbose); // Define variable to extract info from noiseTuple double[][] noiseWave = [[0.0]]; // Useful variables int lineCnt = 0; string[] msgLine = ["Line1"]; // one line of text // Report on nodding pattern and pointing details msgLine[lineCnt] = "PACS AOT: PacsRangeSpec"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

Pointing mode: " + infoArray[1]{0}{0} + " with " + nbNodCycles + " nod cycles

"; lineCnt = lineCnt + 1; int mRaster = infoArray[2]{0}{3}; int nRaster = infoArray[2]{0}{4}; // When either m or n are >1 then it is raster if(mRaster > 1 || nRaster > 1) { msgLine[lineCnt] = "

Raster size (lines/points):" + mRaster + "/" + nRaster + "

"; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

Nod pattern: nominal position A, or A->B, B->A, etc.

"; lineCnt = lineCnt + 1; if(nbNodCycles == 0) { msgLine[lineCnt] = "

A

"; lineCnt = lineCnt + 1; } if(nbNodCycles == 1) { msgLine[lineCnt] = "

A->B

"; lineCnt = lineCnt + 1; } if(nbNodCycles == 2) { msgLine[lineCnt] = "

A->B B->A

"; lineCnt = lineCnt + 1; } if(nbNodCycles > 2) { int aux1 = nbNodCycles - 2; msgLine[lineCnt] = "

A->B B->A and " + aux1 + " more A<->B leg(s)

"; lineCnt = lineCnt + 1; } PacsMessageCenter("AOT, PointMode and Nodding info",lineCnt,msgLine); // Global timing information for this AOT lineCnt = 0; int totAOT = infoArray[2]{0}{2}; msgLine[lineCnt] = "

AOT total duration: " + totAOT + " [sec]

"; lineCnt = lineCnt + 1; // Next is tslew returned by PntReq int tslew = infoArray[0]{0}{2}; msgLine[lineCnt] = "
  • CalSlew (with overheads) " + tslew + " [sec]
  • "; lineCnt = lineCnt + 1; // infoArray[1]{0}{2} is defined as the elementary OBCP duration (per nod // and per raster pointing; includes all wavelengths) //int totSRCREF = mRaster * nRaster * nbNods * infoArray[1]{0}{2}; int totSRCREF = infoArray[1]{0}{2}; msgLine[lineCnt] = "
  • SRC/REF (with overheads) " + totSRCREF + " [sec]
  • "; lineCnt = lineCnt + 1; // // int slewSRCREF = totAOT - totSRCREF - tslew; // msgLine[lineCnt] = "
  • Overheads in SRC/REF " + // slewSRCREF + " [sec]
  • "; // lineCnt = lineCnt + 1; int cost = totAOT - tslew; // If slewCal takes longer than obsOverhead, then it becomes the overhead if(tslew > obsOverhead) { obsOverhead = tslew; } cost = cost + obsOverhead; msgLine[lineCnt] = "
  • AOT cost (includes time for slewing to source): " + totSRCREF + " + " + obsOverhead + " [sec] = " + cost + " [sec]
"; lineCnt = lineCnt + 1; PacsMessageCenter("Global AOT durations",lineCnt,msgLine); if(verbose) { debug_print("++ Start ProcessArray debug info"); debug_print(" CalSlew: " + infoArray[0]); debug_print(" OBS : " + infoArray[1]); debug_print(" TotDur : " + infoArray[2]); debug_print("++ End of ProcessArray debug info"); } // Inform the details of SlewCal to HSPOT user // AOT prologue lineCnt = 0; msgLine[lineCnt] = "
  • AOT prologue duration: " + infoArray[0]{1}[nbKeyWaves]{5} + " [sec]
  • "; lineCnt = lineCnt + 1; // For each keyWave for(int loop0 = 0 .. nbKeyWaves - 1) { msgLine[lineCnt] = "
  • KeyWave: " + infoArray[0]{1}[loop0]{0} + " [µm]; CAL duration: " + infoArray[0]{1}[loop0]{5} + " [sec]
  • "; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "
"; lineCnt = lineCnt + 1; // Display message PacsMessageCenter("RANGE setup and CAL summary",lineCnt,msgLine); // Re-initialize lineCnt for new series of messages lineCnt = 0; // Report per LINE // Continue defining noiseWave for historical reasons (it used to be returned // by PacsSpecRMS, now replaced by bigTuple) for(int loop1 = 0 .. nbLines - 1) { noiseWave[loop1] = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; // CONTinuum noiseWave[loop1][0] = bigTuple[loop1]{0}{1}[0]; noiseWave[loop1][1] = bigTuple[loop1]{0}{1}[1]; noiseWave[loop1][2] = bigTuple[loop1]{0}{1}[2]; noiseWave[loop1][3] = bigTuple[loop1]{0}{1}[3]; // LINE noiseWave[loop1][4] = bigTuple[loop1]{0}{1}[4]; noiseWave[loop1][5] = bigTuple[loop1]{0}{1}[5]; noiseWave[loop1][6] = bigTuple[loop1]{0}{1}[6]; noiseWave[loop1][7] = bigTuple[loop1]{0}{1}[7]; // CONT and LINE for refWave noiseWave[loop1][8] = bigTuple[loop1]{0}{1}[8]; noiseWave[loop1][9] = bigTuple[loop1]{0}{1}[9]; noiseWave[loop1][10] = bigTuple[loop1]{0}{1}[10]; int trueObsTime = infoArray[1]{1}[loop1]{5}; // SrcTime includes REF! int trueSrcTime = infoArray[1]{1}[loop1]{6} + infoArray[1]{1}[loop1]{7}; int lineOver = trueObsTime - trueSrcTime; // Report on "free" ranges, if any... // Up to three ranges: 0,1,2 // Tuples can only take literal indexes. Since cannot loop on index, // construct bool "array exists?" of existing ranges bool[] good = [bigTuple[loop1]{0}{1}[0] != 0.0,bigTuple[loop1]{1}{1}[0] != 0.0,bigTuple[loop1]{2}{1}[0] != 0.0]; // good[0] is the nominal range; reported above // Start with good[1] if(good[0]) { msgLine[lineCnt] = "

" + rangeSPOT[loop1]{0} + ": " + infoArray[1]{1}[loop1]{0} + "-" + infoArray[1]{1}[loop1]{1} + " [µm]:

"; lineCnt = lineCnt + 1; // Go ahead and issue messages {int,string[]} freeMsg = {0,[""]}; freeMsg = PacsRangeMessage(bigTuple[loop1]{0}); // Add new messages to already stored messages for(int loopM0 = 0 .. freeMsg{0} - 1) { msgLine[lineCnt] = freeMsg{1}[loopM0]; lineCnt = lineCnt + 1; } // Compute S/N ratios and insert in message stream // NOTE: line in 1E-18; continuum in mJy // Safeguard against division by zero if(bigTuple[loop1]{0}{1}[9] > 0.0010) { double s2nCONT = 0.0010 * rangeSPOT[loop1]{5} / bigTuple[loop1]{0}{1}[9]; msgLine[lineCnt] = "
  • S/N continuum (ref. wavelength): " + dformat(s2nCONT,2) + "
  • "; lineCnt = lineCnt + 1; } if(bigTuple[loop1]{0}{1}[10] > 1.0E-22) { double s2nLINE = 1.0E-18 * rangeSPOT[loop1]{4} / bigTuple[loop1]{0}{1}[10]; msgLine[lineCnt] = "
  • S/N line (ref. wavelength): " + dformat(s2nLINE,2) + "
  • "; lineCnt = lineCnt + 1; } // Estimate resolution for given wavelength and order // This is done here because the elements needed for the computation // are at this level; i.e. it does not belong to bigTuple // Need order and wavelength int order = infoArray[1]{1}[loop1]{2}; double wave = noiseWave[loop1][8]; // Build key to read SPEC_resolution table string keyCOL = "resol" + order; double resolkm = interpolate("SPEC_resolution",keyCOL,wave); // Resolution in microns double resolmic = resolkm * wave / 300000.0; // Deal with possible loss of resolution // Compare instrument resolution with line width // User given line width double userWidth = rangeSPOT[loop1]{6}; // User given width units string unitWidth = rangeSPOT[loop1]{8}; // Is there a sensitivity degradation? bool sensitDegrad = false; // Assume no degradtaion double degrad = 1.0; // Avoid divisiob by zero if(resolkm > 0.0) { // Do not compare torchons et servillettes if(unitWidth == "micron" && userWidth > resolmic) { sensitDegrad = true; degrad = sqrt(userWidth / resolmic); } if(unitWidth == "kms" && userWidth > resolkm) { sensitDegrad = true; degrad = sqrt(userWidth / resolkm); } } if(verbose) { debug_print("++line parameters: " + userWidth + " " + unitWidth); debug_print("++sensitDegrad: " + sensitDegrad); debug_print("++Degrad: " + degrad); } // Add the information to current message stream msgLine[lineCnt] = "
  • FWHM at reference wavelength: " + dformat(resolkm,1) + " [km/s] or " + dformat(resolmic,3) + " [µm]
  • "; lineCnt = lineCnt + 1; if(sensitDegrad) { msgLine[lineCnt] = "
  • Warning: the given line width, " + userWidth + " " + unitWidth + ", exceeds the instrumental FWHM; expect a loss of " + dformat(degrad,1) + " times in the LINE Signal-to-Noise ratio
  • "; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
  • Total duration (SRC+REF+PACS overheads) : " + trueObsTime + " [sec]
  • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
  • SRC+REF (no overheads): " + trueSrcTime + " [sec]
  • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; } // Continue with good[1] if(good[1]) { string assoc = bigTuple[loop1]{1}{0}; // Logic to identify LO and HI wavelength in range int nElem = length(bigTuple[loop1]{1}{2}); double waveLO = bigTuple[loop1]{1}{2}[0]; double waveHI = bigTuple[loop1]{1}{2}[nElem - 1]; msgLine[lineCnt] = "

    " + dformat(waveLO,2) + "-" + dformat(waveHI,2) + " free range1 at " + assoc + "

    "; lineCnt = lineCnt + 1; // Go ahead and issue messages freeMsg = PacsRangeMessage(bigTuple[loop1]{1}); // Add new messages to already stored messages for(int loopM1 = 0 .. freeMsg{0} - 1) { msgLine[lineCnt] = freeMsg{1}[loopM1]; lineCnt = lineCnt + 1; } // Estimate resolution for given wavelength and order // Need order and wavelength order = 1; if(assoc == "order2" || assoc == "order23") { order = 2; } if(assoc == "order3") { order = 3; } wave = bigTuple[loop1]{1}{1}[8]; // Build key to read SPEC_resolution table keyCOL = "resol" + order; resolkm = interpolate("SPEC_resolution",keyCOL,wave); // Resolution in microns resolmic = resolkm * wave / 300000.0; // Add the information to current message stream msgLine[lineCnt] = "
  • FWHM at reference wavelength: " + dformat(resolkm,1) + " [km/s] or " + dformat(resolmic,3) + " [µm]
  • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; } if(good[2]) { assoc = bigTuple[loop1]{2}{0}; // Logic to identify LO and HI wavelength in range nElem = length(bigTuple[loop1]{2}{2}); waveLO = bigTuple[loop1]{2}{2}[0]; waveHI = bigTuple[loop1]{2}{2}[nElem - 1]; msgLine[lineCnt] = "

    " + dformat(waveLO,2) + "-" + dformat(waveHI,2) + " free range2 at " + assoc + "

    "; lineCnt = lineCnt + 1; // Go ahead and issue messages freeMsg = PacsRangeMessage(bigTuple[loop1]{2}); // Add new messages to stored messages for(int loopM2 = 0 .. freeMsg{0} - 1) { msgLine[lineCnt] = freeMsg{1}[loopM2]; lineCnt = lineCnt + 1; } // Estimate resolution for given wavelength and order // This is done here because the elements needed for the computation // are at this level; i.e. it does not belong to bigTuple // Need order and wavelength order = 1; if(assoc == "order2" || assoc == "order23") { order = 2; } if(assoc == "order3") { order = 3; } wave = bigTuple[loop1]{2}{1}[8]; // Build key to read SPEC_resolution table keyCOL = "resol" + order; resolkm = interpolate("SPEC_resolution",keyCOL,wave); // Resolution in microns resolmic = resolkm * wave / 300000.0; // Add the information to current message stream msgLine[lineCnt] = "
  • FWHM at reference wavelength: " + dformat(resolkm,1) + " [km/s] or " + dformat(resolmic,3) + " [µm]
  • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = ""; lineCnt = lineCnt + 1; } // End loop on nbLines } // Display message PacsMessageCenter("SpecRange summary",lineCnt,msgLine); // Return with bigTuple return bigTuple; } // CVS comments : $Id: PacsPhotDefaults.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Purpose : Fill index=0 of OBCP and PHOTxxx tuples with known // sensible default values // // CUS author : DAC // Script file : PacsPhotDefaults.txt // // Input arguments // type name Description // string srcID HSPOT define source ID // // Return values // Type Name Description // tuple confPHOTx & confOBCP electronics and OBCP default parameters // // Description : Give default values to tuples OBCP and PHOT. May // use more information from yet to be created CAL-U files. So far // only "throw" (HSPOT defined) appears necessary as a call argument // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 29-nov-2005 DAC. Based on PacsSpecDefaults // 0.2 18-jan-2006 Introduced string calU variable // 0.3 20-jan-2006 Use new PHOT_CHOP_params table where chopper positions // are defined in arcsec; added verbose // 1.0 1-sep-2006 - Use sourceID instead of "throw" since chopper // throw depends on SRCE // - editorial clean // 2.0 10-oct-2007 Implemented SCR-3628: introduction of CAL-U file // CONF_PHOT_params. This requires adding a new input // variable: primePar {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} procedure PacsPhotDefaults { string srcID = "pointSRC" in ["pointSRC","smallSRC","largeSRC"]; // SourceID string primePar = "Prime" in ["Prime","Parallel"]; // Observing mode bool isBrightPacs = false; bool verbose = true; // Generate bla-bla }{ // Define variables to be used here {int,int,int,int,int,int,int,int,int} confPHOTblu = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int} confPHOTred = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // Open CAL-U with compression, raw pixels, etc. information if(!isBrightPacs) { int gain_red = ilookup("CONF_PHOT_params","gain_red",primePar); } else { gain_red = ilookup("CONF_PHOT_params","gain_red","BrightPacs"); } confPHOTred{0} = gain_red; if(!isBrightPacs) { int gain_blu = ilookup("CONF_PHOT_params","gain_blu",primePar); } else { gain_blu = ilookup("CONF_PHOT_params","gain_blu","BrightPacs"); } confPHOTblu{0} = gain_blu; if(!isBrightPacs) { int comp_mode_red = ilookup("CONF_PHOT_params","comp_mode_red",primePar); } else { comp_mode_red = ilookup("CONF_PHOT_params","comp_mode_red","BrightPacs"); } confPHOTred{3} = comp_mode_red; if(!isBrightPacs) { int comp_mode_blu = ilookup("CONF_PHOT_params","comp_mode_blu",primePar); } else { comp_mode_blu = ilookup("CONF_PHOT_params","comp_mode_blu","BrightPacs"); } confPHOTblu{3} = comp_mode_blu; if(!isBrightPacs) { int nb_raw_red = ilookup("CONF_PHOT_params","nb_raw_red",primePar); } else { nb_raw_red = ilookup("CONF_PHOT_params","nb_raw_red","BrightPacs"); } confPHOTred{6} = nb_raw_red; if(!isBrightPacs) { int nb_raw_blu = ilookup("CONF_PHOT_params","nb_raw_blu",primePar); } else { nb_raw_blu = ilookup("CONF_PHOT_params","nb_raw_blu","BrightPacs"); } confPHOTblu{6} = nb_raw_blu; // Chopper and grating expected at their default positions string calU = "SPEC_MEC_Defaults"; int chop_def = ilookup(calU,"Photometry","chopper"); confOBCP{17} = chop_def; // Position filter wheel at default position // int fw_pos = ilookup(calU,"Photometry","FW"); // Initialize to don't care/don't know int fw_pos = 1; confOBCP{19} = fw_pos; int nb_cycles_obs_cal = 1; confOBCP{0} = nb_cycles_obs_cal; int nb_SRC_OFF = 1; confOBCP{3} = nb_SRC_OFF; int nb_rdouts_plateau = 4; confOBCP{4} = nb_rdouts_plateau; int nb_CS1_CS2 = 0; confOBCP{5} = nb_CS1_CS2; // Read chopper positions [arcsec] and convert to ENG units calU = "PHOT_CHOP_params"; string convU = "PHOT_CHOP_sky"; double auxSRC = dlookup(calU,srcID,"SRC"); int onSRC = PacsReadChopSky(convU,auxSRC); double auxREF1 = dlookup(calU,srcID,"REF1"); int onREF1 = PacsReadChopSky(convU,auxREF1); double auxREF2 = dlookup(calU,srcID,"REF2"); int onREF2 = PacsReadChopSky(convU,auxREF2); // Report settings if verbose if(verbose) { debug_print("++PhotDefaults CHOPPER: " + auxSRC + " [arcsec] -> " + onSRC + " [ENG]"); debug_print("++PhotDefaults CHOPPER: " + auxREF1 + " [arcsec] -> " + onREF1 + " [ENG]"); debug_print("++PhotDefaults CHOPPER: " + auxREF2 + " [arcsec] -> " + onREF2 + " [ENG]"); } confOBCP{12} = onSRC; confOBCP{13} = onREF1; confOBCP{14} = onREF2; // chop_pos_CS1 = confOBCP[0]{15}; // chop_pos_CS2 = confOBCP[0]{16}; int detector = 1; confOBCP{18} = detector; return {confPHOTblu,confPHOTred,confOBCP}; } // Mission phase : Commissioning Phase // // Purpose : Exploration of VH_BLIND values to find the current telescope background level // during the cooling down period of the commissioning phase // // Author : Koryo Okumura // // CUS script : procedure Phot_telescBack // // Argument : // double[] vhbs = [2.4, 2.25, 2.1, 1.95, 1.8]; // VH_BLIND values to explore // int acquisitionTime = 60; // Data acquisition time // string initialBiasTable = "BOLObias_firstTelescBack"; // Biase table file name to use during the measurement // string finalBiasTable = "BOLObias_ILT_standard_low"; // Biase table file name to set after the measurement // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is set // // Description : This procedure should allow to assess the telescope backgroud // using a maximum numer of non saturated pixels // // Update: // 2008-06-27, KO : First try // 2008-07-04, KO : Now uses PHOT_set_biases(initialBiasTable,"DIRECT","LOW") // procedure Phot_telescBack { double[] vhbs = [2.4,2.25,2.1,1.95,1.8]; // VH_BLIND values to explore int acquisitionTime = 60; // Data acquisition time string initialBiasTable = "BOLObias_firstTelescBack"; // Biase table file name to use during the measurement string finalBiasTable = "BOLObias_ILT_standard_low"; // Biase table file name to set after the measurement }{ int stabilizationWaitTime = 60; // Stabilization time // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //********************************************************* // Set the default biases and dtart SPU, then set the gain //********************************************************* // PHOT_set_biases(initialBiasTable,"DIRECT","LOW"); // //*************************** // Loop over VHBlind forward //*************************** int nvhbs = length(vhbs); for(int ivhb = 0 .. nvhbs - 1) { Pacs_BOLC_SET_VH_BLIND_G1(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G2(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G3(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G4(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G5(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G6(vhbs[ivhb]); // Wait for stabilizationWaitTime s for stabilization delay(stabilizationWaitTime); // Measurement during acquisitionTime s TMMarker601(); // mark the beginning of the acquisition delay(acquisitionTime); TMMarker600(); // mark the end of the acquisition } //**************************** // Loop over VHBlind backward //**************************** for(int i = 1 .. nvhbs - 1) { Pacs_BOLC_SET_VH_BLIND_G1(vhbs[nvhbs - i - 1]); Pacs_BOLC_SET_VH_BLIND_G2(vhbs[nvhbs - i - 1]); Pacs_BOLC_SET_VH_BLIND_G3(vhbs[nvhbs - i - 1]); Pacs_BOLC_SET_VH_BLIND_G4(vhbs[nvhbs - i - 1]); Pacs_BOLC_SET_VH_BLIND_G5(vhbs[nvhbs - i - 1]); Pacs_BOLC_SET_VH_BLIND_G6(vhbs[nvhbs - i - 1]); // Wait for stabilizationWaitTime s for stabilization delay(stabilizationWaitTime); // Measurement during acquisitionTime s TMMarker601(); // mark the beginning of the acquisition delay(acquisitionTime); TMMarker600(); // mark the end of the acquisition } // //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // // //*************************** // Loop over VHBlind forward //*************************** for(int ivhb2 = 0 .. nvhbs - 1) { Pacs_BOLC_SET_VH_BLIND_G1(vhbs[ivhb2]); Pacs_BOLC_SET_VH_BLIND_G2(vhbs[ivhb2]); Pacs_BOLC_SET_VH_BLIND_G3(vhbs[ivhb2]); Pacs_BOLC_SET_VH_BLIND_G4(vhbs[ivhb2]); Pacs_BOLC_SET_VH_BLIND_G5(vhbs[ivhb2]); Pacs_BOLC_SET_VH_BLIND_G6(vhbs[ivhb2]); // Wait for stabilizationWaitTime s for stabilization delay(stabilizationWaitTime); // Measurement during acquisitionTime s TMMarker601(); // mark the beginning of the acquisition delay(acquisitionTime); TMMarker600(); // mark the end of the acquisition } //**************************** // Loop over VHBlind backward //**************************** for(int i2 = 1 .. nvhbs - 1) { Pacs_BOLC_SET_VH_BLIND_G1(vhbs[nvhbs - i2 - 1]); Pacs_BOLC_SET_VH_BLIND_G2(vhbs[nvhbs - i2 - 1]); Pacs_BOLC_SET_VH_BLIND_G3(vhbs[nvhbs - i2 - 1]); Pacs_BOLC_SET_VH_BLIND_G4(vhbs[nvhbs - i2 - 1]); Pacs_BOLC_SET_VH_BLIND_G5(vhbs[nvhbs - i2 - 1]); Pacs_BOLC_SET_VH_BLIND_G6(vhbs[nvhbs - i2 - 1]); // Wait for stabilizationWaitTime s for stabilization delay(stabilizationWaitTime); // Measurement during acquisitionTime s TMMarker601(); // mark the beginning of the acquisition delay(acquisitionTime); TMMarker600(); // mark the end of the acquisition } // // sync the bus sync(); } // CVS comments : $Id: PacsSpecAuxRMS.txt,v 1.9 2007/10/25 12:15:42 dcesarsk Exp $ // Purpose : To compute RMS vs. WaveLength; to establish min,max RMS // and their associated wavelength. arrayID // // CUS author : // Script file : PacsSpecAuxRMS.txt // // Input arguments // type name description // string aotID RANGE or LINE AOT // string arrayID ID for current array // double wave Array of wavelengths // double waveRef Wave reference // double intTime Integration time // bool verbose Verbose or not // // Return values // Type Description // tuple {{double[]},{double[],double[],double[]}} // Description : // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 // History : 0.1 12-mar-2007 DAC // 0.2 13-mar-2007 Added "string" to return tuple // 0.3 16-apr-2007 Use arrayID to choose the relevant // sensitivity table. Added logic to // choose one of the four SPECcontline // files // 1.0 23-oct-2007 Added input variable to identify // FreqSwitch // 1.1 24-oct-2007 Accept nbOBS and nbOFF (not used // yet) // {string,double[],double[],double[],double[]} procedure PacsSpecAuxRMS { /* RANGE or LINE AOT */ string aotID = "RANGE"; /* ID for this RMS computation */ string arrayID = "undefined"; /* Array of wavelengths */ double[] wave = [0.0]; /* Wave reference */ double waveRef = 100.0; /* Integration time */ double intTime = 10.0; /* Type of observation */ string obsType = "whatever"; /* nbOBS and nbOFF */ int nbOBS = 1; int nbOFF = 0; /* Verbose or not */ bool verbose = false; }{ // Number of wavelengths in array int nbWaves = length(wave); if(verbose) { debug_print("AuxRMS:Size wave table: " + nbWaves); } // Create arrays for rmsNoiseCONT and rmsNoiseLINE double[] rmsNoiseC = [0.0]; double[] rmsNoiseL = [0.0]; // Integration time related variables // intTime is SRC/REF for chopping !!Each one, not the sum!! // For FreqSwitch, intTime is the total time LINE+REF (assume we switch by a // few pixels) // In either case, the "line" is the result of a subtraction (either SRC-REF // or SRC - shiftedSRC). When both "SRC" and "REF" have the same rms, the RMS // increase introduced by the subtraction operation is sqrt(2). // In raster/OFF, each raster point has a noise ONrms. However, the OFF position // is performed nbOFF times; its rms is OFFrms = ONrms/sqrt(nbOFF). The rms // of the difference is then sqrt(1 + 1/nbOFF) larger. Ignore for raster // for time being double difRMSfactor = sqrt(2.0); // The new frequency switch scheme uses 2 OFF positions to be subtracted // from the SRC - shiftedSRC array. This introduces an extra sqrt(1+1/2) // difRMSfactor = sqrt(2.0)*sqrt(1.5) = sqrt(3.0) if(obsType == "FreqSwitch") { difRMSfactor = sqrt(3.0); } // Scaling factor for tabulated rms (good for 1 sec time) double scale = difRMSfactor / sqrt(intTime); if(verbose) { debug_print("AuxRMS: intTime " + dformat(intTime,2)); debug_print("AuxRMS: difRMSfactor " + dformat(difRMSfactor,2)); debug_print("AuxRMS: scaleRMS" + dformat(scale,3)); } // Establish which sensitivity table shall be used string sensTable = "TBD"; if(arrayID == "order1") { sensTable = "SPECContLine1"; } if(arrayID == "order2") { sensTable = "SPECContLine2"; } if(arrayID == "order3") { sensTable = "SPECContLine3"; } if(arrayID == "order23") { sensTable = "SPECContLine23"; } if(verbose) { debug_print("AuxRMS will use table " + sensTable); } if(sensTable == "TBD") { error("Internal error: did not find proper sensitivity table"); } // Get rms/sec from SPECcontline, a value per wavelength // Create CONT and LINE noise arrays; wave array already exists /// if (verbose) {debug_print("AuxRMS:Wave Interpol From/To]: " /// + wave[0] + "/" + wave[nbWaves-1]);} for(int loop0 = 0 .. nbWaves - 1) { // Current wavelength double waveNow = wave[loop0]; // Get CONT and LINE rms values // Use scale factor to convert into observed noise rmsNoiseC[loop0] = scale * interpolate(sensTable,"contRMS",waveNow); rmsNoiseL[loop0] = scale * interpolate(sensTable,"lineRMS",waveNow); } // Find min and max of rmsNoiseC int[] minmax = PacsArrayMinMax(rmsNoiseC,verbose); double noiseCmin = rmsNoiseC[minmax[0]]; double waveCmin = wave[minmax[0]]; double noiseCmax = rmsNoiseC[minmax[1]]; double waveCmax = wave[minmax[1]]; // Find min and max of rmsNoiseL minmax = PacsArrayMinMax(rmsNoiseL,verbose); double noiseLmin = rmsNoiseL[minmax[0]]; double waveLmin = wave[minmax[0]]; double noiseLmax = rmsNoiseL[minmax[1]]; double waveLmax = wave[minmax[1]]; // Deal with reference wavelength if(verbose) { debug_print("AuxRMS:Interpolate w/lambda " + waveRef); } double noiseRefCont = scale * interpolate(sensTable,"contRMS",waveRef); double noiseRefLine = scale * interpolate(sensTable,"lineRMS",waveRef); // Compute the RMS fluctuations at special wavelengths // Continuum double noiseCref = noiseRefCont; // Line double noiseLref = noiseRefLine; if(verbose) { debug_print("AuxRMS:nbOBS/nbOFF: " + nbOBS + "/" + nbOFF); // debug_print("AuxRMS:rmsCONT min/max: " + noiseCmin + "/" + noiseCmax); debug_print("AuxRMS:RMScont min/waveMin: " + noiseCmin + " [Jy] at " + waveCmin); debug_print("AuxRMS:RMScont max/waveMax: " + noiseCmax + " [Jy] at " + waveCmax); debug_print("AuxRMS:RMScont ref/waveRef: " + noiseCref + " [Jy] at " + waveRef); // debug_print("AuxRMS:rmsLINE min/max: " + noiseLmin + "/" + noiseLmax); debug_print("AuxRMS:RMSline min/waveMin: " + noiseLmin + " [Jy] at " + waveLmin); debug_print("AuxRMS:RMSline max/waveMax: " + noiseLmax + " [Jy] at " + waveLmax); debug_print("AuxRMS:RMSline ref/waveRef: " + noiseLref + " [Jy] at " + waveRef); } // Copy results to noiseWave and return double[] noiseWave = [0.0]; // CONTinuum noiseWave[0] = waveCmin; noiseWave[1] = noiseCmin; noiseWave[2] = waveCmax; noiseWave[3] = noiseCmax; // LINE noiseWave[4] = waveLmin; noiseWave[5] = noiseLmin; noiseWave[6] = waveLmax; noiseWave[7] = noiseLmax; // CONT and LINE for refWave noiseWave[8] = waveRef; noiseWave[9] = noiseCref; noiseWave[10] = noiseLref; if(verbose) { debug_print("AuxRMS:arrayID: " + arrayID); } return {arrayID,noiseWave,wave,rmsNoiseC,rmsNoiseL}; } // CVS comments : $Id: PacsDureeOBCP4.txt,v 1.2 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : Estimate duration of OBCP4 with input parameters // // CUS author : // Script file : PacsDureeOBCP4.txt // // Input arguments // type name description // // Return values // Type Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : V0.1 24-nov-2005 DAC // V0.2 1-Dec-2005 Add OBCP's 5 [sec] overhead to estimate based on DMC duration int[] procedure PacsDureeOBCP4 { int nb_SRC_REF = 4; // p01 Nb of cycles SRC->REF1->SRC->REF2 int nb_rdouts_plateau = 4; // p03 Nb of readouts per chopper plateau int nb_cycles_obs_cal = 1; // p06 Nb of repetions of OBS-CAL cycle int nb_CS1_CS2 = 0; // p07 Nb of cycles CS1->CS2 }{ // Call the corresponding DMC sequence int[] duree = DMC_phot_2_3_chop(nb_SRC_REF,nb_rdouts_plateau,nb_cycles_obs_cal,nb_CS1_CS2); // Convert number of readouts into seconds // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); // string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // debug_print("Bolo sample: " + bol_freq + " " + bol_unit); // debug_print("Bolo period: " + bol_period + "[msec]"); // Convert duration [rdouts] into [msec] // Create return time array; convert into [sec] int[] time_array = [0,0,0,0,0]; for(int aux = 0 .. 4) { time_array[aux] = ifloor(double(duree[aux]) * bol_period); time_array[aux] = Msec2sec(time_array[aux]); } // // V0.2 correction time_array[0] = time_array[0] + 5; time_array[4] = time_array[4] + 5; // Return total duration [sec] to calling program return time_array; } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 4x9 or 4x8 raster on a point source: // Chopped : Noise measured after the 4x8 raster at the off chopper position // during 4*measure_time. The chopped measurement requires 105 arcsec offset. // Non-chopped : Noise measured at last 4 pointings of the 4x9 raster of 13.5 arcsec offset. // // Author : Koryo Okumura // // Version : Thu Jul 24 20:07:29 CEST 2008 // // CUS script : obs PacsCal_Phot_highGainBiasDirect // // Argument : // string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration // int naifid = 2000001; // SSO tracking object number // double ra = 0.0; // RA // double dec = 0.0; // Dec // int measure_time = 120; // measure time in seconds // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops5 = 30; // number of CSs cycles during final hold // int readouts_plateau = 16; // number of readouts per chopper plateau // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // bool chop = true; // Chopping within FOV during the raster // bool verbose = true; // // Check before executing : // + Cooler is recycled // + BOLC is ON // + PHOT_orbit_prologue is executed (then more than the minimum requirement below is fullfilled): // - Bolometers are biased // - Sequencer is activated // // Description : PacsCal script of Phot_highGainBiasDirect // init + During the slew, CSs are measured through 2 filters // + Set a filter corresponding to the given seqNum // + Set the biases group by group // if no_chop // + Set the chopper on the optical center // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x9 raster measurement // if chop // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x8 raster with chopped measurement // + After the raster, noise measurement during 4xmeasure_time // then + After the raster, CSs and sky are measured through 2 filters // stop + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(1) // obs PacsCal_Phot_highGainBiasDirect { string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration int naifid = 2000001; // SSO tracking object number double ra = 0.0; // RA double dec = 0.0; // Dec int measure_time = 120; // measure time in seconds per pointing string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks int nLoops1 = 30; // number of CSs cycles during slew int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per chopper plateau string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE bool chop = true; // Chopping within FOV during the raster bool verbose = true; }{ bool execute = true; int nRdts = readouts_plateau - 1; int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = duration(PHOT_change_biases(endBiasTable,calMode,calGain)); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int tNewSetup = duration(Phot_highGainBiasDirect(select,startBiasTable,endBiasTable)); int tslewmin = 0; int tih = 0; int tfh = 0; // Use PHOTOMETER virtual aperture string ib = "P01_0"; // yoffset [arcsec] (Positive offset to get an empty sky in the last 4 pointings) double yoffset = 13.5; // zoffset [arcsec] double zoffset = 0.0; // Duration of "stable" pointing in seconds int tp = 0; //Issue PointReq int[] ts = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Several arguments needed for "basic_fine_pointing" // time to set OBSID and biases then PacsPhotSlewCal // Minimum slew time if(select == "final") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT","HIGH")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"HIGH")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } } tslewmin = timeOBSID + timeChgBias + timeCal3CPR1 + tNewSetup; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = 0; // Final hold tfh = timeEndID; // Duration of "stable" pointing in seconds tp = 1; //Issue PointReq ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); } else { // Several arguments needed for "basic_raster_pointing" // time to set OBSID and biases then PacsPhotSlewCal int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); // Minimum slew time tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = tNewSetup; // Final hold tfh = timeChgBias + timeCal3CPR5 + timeEndID; // Fixed in the sky coordinates bool fixed = false; // Orientation angle (degrees) double patt = 0.0; // Number of pointings in a leg int m = 4; // Number of legs int n = 9; // Angular distance (arcsec) between 2 pointings double d1 = 26.0; // Angular distance (arcsec) between 2 legs double d2 = 26.5; // Duration of "stable" pointing in seconds if(chop) { int nLoops = measure_time * 40 / (2 * readouts_plateau); tp = duration(OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,644)); // 4x8 raster instead of 4x9 n = 8; // Noise measurements after the raster tfh = tfh + 4 * measure_time + duration(TMMarker602()) + duration(TMMarker600()); // Positive pointing offset for chopping to get negative chopper position offset yoffset = 105.0; } else { tp = measure_time; } // Go to OFF position every k pointings (not relevant with SSO tracking) int k = 0; // time in seconds on the OFF position (not relevant with SSO tracking) int top = 0; // OFF position RA coordinate (not relevant with SSO tracking) double raoff = 0.0; // OFF position Dec coordinate (not relevant with SSO tracking) double decoff = 0.0; //Issue PointReq ts = basic_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,k,top,raoff,decoff); } }{ int tNOW = time(); int[] state = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU if(select == "final") { PHOT_change_biases(calBiasTable,calMode,calGain); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","HIGH"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"HIGH"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); //************************************ // Call the Phot_highGainBiasDirect //************************************ Phot_highGainBiasDirect(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } else { int finalChop = 0; // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //************************************ // Call the Phot_highGainBiasDirect //************************************ Phot_highGainBiasDirect(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } if(chop) { //********************************* // 2 positions chopping in the FOV //********************************* if(state[2] < m * n) { finalChop = -6578; } else { finalChop = 7756; } OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,finalChop); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } if(chop) { TMMarker602(); delay(4 * measure_time); TMMarker600(); } // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } } // CVS comments : $Id: PacsDureeOBCP3.txt,v 1.2 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : Estimate duration of OBCP3 with input parameters // // CUS author : // Script file : PacsDureeOBCP3.txt // // Input arguments // type name description // // Return values // Type Description // // Description : Compute duration of DEC/MEC sequence associated to OBCP3. // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 10-aug-2006 DAC int[] procedure PacsDureeOBCP3 { int nb_main_loops = 1; // p01 Nb of main loops int nb_rdouts_plateau = 159; // p03 Nb of readouts per chopper plateau int nb_chop_cycles = 2; // p04 Nb of chop_cycles }{ // Call the corresponding DMC sequence int[] duree = DMC_fixed_fixed_photo(nb_main_loops,nb_rdouts_plateau,nb_chop_cycles); // Convert number of readouts into seconds // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); // string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // debug_print("Bolo sample: " + bol_freq + " " + bol_unit); // debug_print("Bolo period: " + bol_period + "[msec]"); // Convert duration [rdouts] into [msec] // Create return time array; convert into [sec] int[] time_array = [0,0,0,0,0]; for(int aux = 0 .. 4) { time_array[aux] = ifloor(double(duree[aux]) * bol_period); time_array[aux] = Msec2sec(time_array[aux]); } // // V0.2 correction: add OBCP overheads time_array[0] = time_array[0] + 4; time_array[4] = time_array[4] + 4; // Return total duration [sec] to calling program return time_array; } // CVS comments : $Id: DMC_grat_scan_chop2.txt,v 1.4 2007/04/25 15:14:03 dcesarsk Exp $ // Purpose : Compute execution time of DMC #12: // Grating Line Scan with Two position chopping // // TCL author : N/A Pseudo code by HF // TCL file : N/A // CUS author : DAC // Script file : DMC_12_grat_line_scan_with_2_chop.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Similar to 4.2.1 but with only two chopping positions. // It is meant to allow for faster execution once only two // chopping positions are used on bright targets. // Of the 11 Parameters: // # of "up-down" sequences (P#1); // 2 chopper positions (P#4, P#6); // # of readouts per chopper position (P#5); // # of cycles per grating position (P#3); // size of relative grating move up (P#10); // size of relative grating move down (P#11); // # of cycles on the internal calibration sources (P#7); // position of BB1 (P#8); // position of BB2 (P#9); // # of grating steps (P#2) // only those involved in time estimation are used here. // // Dependencies : // // Preconditions : None. // // Comments : No TC are generated; only times are computed // // History : 0.1 14-apr-2005 DAC // 1.0 26-aug-2005 Renamed to match corresponding OBCP // 2.0 26-jan-2007 Count WAIT=1 after chopper as "good" int[] procedure DMC_grat_scan_chop2 { int nb_up_down = 1; // Seq P#1 Nb of up down sequences int nb_grat_steps = 100; // Seq P#2 Nb of grating steps per up/down scan int nb_ramps_plateau = 1; // Seq P#5 Nb of ramps per chopper plateau int nb_CS1_CS2 = 0; // Seq P#7 Nb of CS1/CS2 per grating position int nb_SRC_REF = 1; // Seq P#3 Nb of SRC/REF per grating position }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // WAIT 1 ; have a defined start duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop measurement for(int up_down = 1 .. nb_up_down) { //LOOP P#2 ; grating loop up for(int up = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // MOVE_GRATING_RELATIVE P#10 ; increment grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_1 = 1 .. nb_SRC_REF) { // WAIT 1 ; sync. for chopper duree_SRC = duree_SRC + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 3 ; first chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#4 is the SRC position... duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper // *Assume* P#5 is the REF position... duree_SRC = duree_SRC + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 5 ; next chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#6 is the REF position... duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_1 = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 65 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 129 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan up done } // LOOP P#2 ; grating loop down for(int down = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // MOVE_GRATING_RELATIVE P#11 ; decrement grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_2 = 1 .. nb_SRC_REF) { // WAIT 1 ; sync. for chopper duree_REF = duree_REF + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 19 ; first chopper pos. // WAIT P#5 ; take P#5 ramps duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_REF = duree_REF + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 21 ; next chopper pos. // WAIT P#5 ; take P#5 ramps duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_2 = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 81 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 145 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan down done } // END_LOOP ; main loop done } // WAIT 1 ; complete last plateau duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // duration, in ramps : 2 + P#1 * 2 * P#2 * {1 + (P#3 + P#7) * (1 + P#5)} int duree = 2 + nb_up_down * 2 * nb_grat_steps * (1 + (nb_SRC_REF + nb_CS1_CS2) * 2 * (1 + nb_ramps_plateau)); // debug_print("Formula duration DMC: " + duree + " [ramps]"); // debug_print("Computed duration DMC: " + duree_num + " [ramps]"); // Time spent int duree_TCs = time() - time_start; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // $Id // Missionphase : PACS PV Phase // // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsPhotSlewCal.txt // // Input arguments // Type Description // // Return values // Type Name Default Description // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 DAC 30-Nov-2005 (inspired by PacsSpecSlewCal) // 0.2 DAC 20-sep-2006 Clean up leftovers from SPEC script // 0.3 DAC 6-dec-2006 Adapted to simpler PHOT_fltw_move // 0.4 DAC 27-jun-2007 SPR-3339 Always move filter wheel // 1.0 DAC 10-oct-2007 SCR-3628 Added arguments to call aot_prologue // obs PacsEng_PacsPhotSlewCal { /* Needed variables to call PacsPhotSlewCal */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int comp_mode_blu = 0; int nb_raw_blu = 3; int comp_mode_red = 0; int nb_raw_red = 3; double chopthrow = 30.0; bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Set OBSID int tobsid = duration(WriteOBSID($OBSID)); // Calibration time during slew if(fltPOS == "POS A") { string filter = "blue2"; } else { if(fltPOS == "POS B") { filter = "blue1"; } } {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,comp_mode_blu,0,nb_raw_blu,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,comp_mode_blu,0,nb_raw_red,0,0,0}]; // OBCP parameters none is given since PacsPhotSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; bool doProlog = true; //Initial hold int tih = duration(WriteOBSID($OBSID)); //Final hold int tendobsid = duration(WriteEndID()); int tepilog = duration(PHOT_aot_epilogue()); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter)); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } int[] ts = no_pointing(execute,tih,tfh,tp); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); // WriteOBSID($OBSID); data_rate(120.0); if(verbose) { debug_print("WriteOBSID at :" + tNOW + " sec"); } tNOW = time(); if(verbose) { debug_print("WriteOBSID ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter); tNOW = time(); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } PHOT_aot_epilogue(); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // End of Observation } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Expert HSPOT version of PACS_GeGa_SFT_Init_Warm // Author : // Arguments : // Prerequisite : // Description : // Comments : // Version : 0.2 // History : 0.1 6-feb-2008 Converted into Eng OBS by DAC // 0.2 14-feb-2008 Renamed to PacsEng_GeGa..... // obs PacsEng_GeGa_SFT_Init_Warm { }{ // 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 = duration(PACS_GeGa_SFT_Init_Warm()); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_GeGa_SFT_Init_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : DMC sequence 6 for OBCP 11: Photometry Calibration II // // // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : DMC_phot_cal_II.txt // // Arguments : # of main loops (P#1); // Chopper start position (P#2); // # readouts per chopper plateau (P#3); // 2 Labels to indicate BB position (P#4, P#5); // 5 chopper positions on the "variable BB" (from P#6 to P#10) // // // Description : // // Dependencies : // // Preconditions : // // Comments : Follows line by line DMC sequence 4.1.6 in PACS OBCPs and // DMC sequences // // Version : 0.1 27-Oct-2004 DAC // History : // : int[] procedure DMC_phot_cal_II { int nb_cal_cycles = 2; // p01 Number of calibartion cycles int nb_rdouts_plateau = 79; // p03 Number of readouts per chopper plateau }{ int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start tallying the duration (measured in number of readouts) int duration_rdouts = 0; // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LOOP P#1 ; main loop measurement for(int main_loop = 1 .. nb_cal_cycles) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; define fixed start pos. // LABEL P#4 ; start quadruple on P#4 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#6 ; go to other BB // LABEL P#5 ; start quadruple on P#5 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; go back to BB1 // LABEL P#4 ; start quadruple on P#4 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#7 ; go to other BB // LABEL P#5 ; start quadruple on P#5 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; go back to BB1 // LABEL P#4 ; start quadruple on P#4 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#8 ; go to other BB // LABEL P#5 ; start quadruple on P#5 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; go back to BB1 // LABEL P#4 ; start quadruple on P#4 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#9 ; go to other BB // LABEL P#5 ; start quadruple on P#5 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; go back to BB1 // LABEL P#4 ; start quadruple on P#4 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#10 ; go to other BB // LABEL P#5 ; start quadruple on P#5 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // END_LOOP ; end main loop } // WAIT 1 ; complete last plateau duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // Define return array int[] time_array = [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_phot_cal_II duration [readouts]: " + duration_rdouts); // Return the array of times return time_array; } // CVS comments : $Id: PHOT_aot_epilogue.txt,v 1.2 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : // Purpose : Stop PHOTOmeter observations at end of AOT // // TCL author : // TCL file : // CUS author : Diego Cesarsky // Script file : PHOT_aot_epilogue.txt // // Input arguments // Type Name Default Description // // Description : Not much for now (just STOP SPU) // // Dependencies : PACS TCs // // Preconditions : // // Comments : // // History : 0.1 19-apr-2006 First creation // 1.0 23-sep-2008 SCR 4431 data_rate procedure PHOT_aot_epilogue { }{ // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); data_rate(0.0); // Sync the bus (function duration will get the "true" duration) sync(); // end of procedure } // $Id // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration during PacsSlew // Author : VDP // // Arguments : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Uses OBCP13 and performs AOT prologue and epilogue // // Comments : // // Version : 1.0 // // History : 0.1 Using example from PacsCal_WaveCalChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping obs PacsEng_PacsSpecSlewCal { /* Needed variables to call PacsSpecSlewCal */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int comp_mode_blu = 16; int comp_mode_red = 16; int nb_raw_blu = 3; int nb_raw_red = 3; int grat_pos = 500000; // grating start position for scan int grat_time = 0; // tiem for grating to move to start position [msec int order = 2; string confTable = "normal" in ["normal","bright"]; double chopthrow = 30.0; bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Verification for grating and chopper hard limits int[] gratpos = [0]; Pacs_HardLimitsCheck(gratpos,chopthrow); // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; string throw = "small"; {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; confSPECblu[0]{3} = comp_mode_blu; confSPECred[0]{3} = comp_mode_red; confSPECblu[0]{6} = nb_raw_blu; confSPECred[0]{6} = nb_raw_red; confOBCP[0]{8} = grat_pos; confOBCP[0]{9} = grat_time; // Here comes the module to estimate PACS parameters as a function of the // exposure time given by the user. This is the pilar of the // whole AOT logic. // frstLstGratPos is the last position for the grating after the Cals done // during Slew time... must be same as observations start position: grat_pos // Perform/don't AOT prologue bool doPROLOG = true; // "N/A" in string because of indexing 0,1,2,3 string[] choix = ["N/A","order1","order2","order3"]; string order_str = "" + order; double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); double[] keyWAVE = [keyWAVE1]; int grat_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); //Initial hold int tih = duration(WriteOBSID($OBSID)); //Final hold int tendobsid = duration(WriteEndID()); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_def,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } int[] ts = no_pointing(execute,tih,tfh,tp); debug_print("ts: " + ts); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); // WriteOBSID($OBSID); data_rate(120.0); if(verbose) { debug_print("WriteOBSID at :" + tNOW + " sec"); } tNOW = time(); if(verbose) { debug_print("WriteOBSID ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } tNOW = time(); PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_def,verbose); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // End of Observation } // CVS comments : $Id: WriteBBID.txt,v 1.6 2007/04/26 15:44:10 dcesarsk Exp $ // Missionphase : // // Purpose : // // CUS script : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // CVS file : WriteBBID.txt // // Input arguments // Type Name DefVal Description // int iBBID N/A BBID obtained from environment // // Description : Write BBID to DEC/MEC; print decoded BBID // to output log // // Dependencies : Pacs_DMC_SET_BBID // DecodeBBID // // Comments : // // Version : 0.1 23-Sep-2004 First creation // History : 0.2 28-Sep-2004 Show BBID "decoded" on output screen. // Remove set_unset choice // 0.3 7-Oct-2004 Rationalize name convention: renamed to // WriteBBID (idem with file name) // 0.4 12-Oct-2004 Added write to EGSE equipment (will have to // add later writes to IST equipment ??) // 0.5 21-Oct-2004 Added write to CDMS // 0.6 9-May-2005 Remove write to EGSE and to CDMS // 0.7 22-nov-2006 Removed debug statement // : // procedure WriteBBID { int iBBID = 0x40000000; // Building Block ID }{ // Write BBID to DEC/MEC and to output log Pacs_DMC_SET_BBID(iBBID); /// DecodeBBID(iBBID); } // File : PACS_Phot_Fil_Testseq.cus // Missionphase : PACS EQM Test // // Purpose : Position sequence test of photometer filterwheel // // Author : BV, modifications by TM // CUSification : DAC // Arguments : // // Description : Moves the Photometer filter wheel times // to position 2 and back to position 1 using absolute position // commands. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.6 // History : 1.0 / 25-Nov-2003 initial version by BV // 1.1 / 05-Jan-2004 Changed step strategy // 1.2 / 13-Jan-2004 Taken out relative commands // 1.3 / 31-May-2004 Positions cfr DMC UM 2.8 // 1.4 / 07-Jul-2004 changed for phot filter wheel // 1.5 / 11-Aug-2004 addition of time_on_fw_pos // 1.6 / 17-Nov-2004 modified for "non-interactive" EQM test procedure PACS_Phot_Fil_Testseq { }{ // fw_start integer 1 Enter initial filter wheel position (0=A; 1=B) // num_turns integer 5 Enter number of 360 deg turns // time_on_fw_pos integer 20 Enter time spent on each FW stop position (sec) int fw_start = 1; int num_turns = 3; int time_on_fw_pos = 20; string[] fltPOS = ["POS A","POS B"]; // Default time for one 'standard' command execution (sec) // set command_time 0.5 // Minimum time between two filter wheel movements (sec) int slew_time = 15; // PC129420 "DMC_SWON_FW_PHOTO" SWITCH ON POWER SUPPLY OF FILTER WHEEL PHOTO // tcsend PC129420 // waittime 0.5 Pacs_DMC_SWON_FW_PHOTO(); delay(1); // Start from position 1 // PC136420 "DMC_MOVE_PHOT_FW_LOC" MOVE PHOTOMETER FILTER WHEEL TO LOCATION // PP075420 "FW_ID" // tcsend PC136420 [list PP075420 $fw_start] // waittime $slew_time Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // Move num_turns to position 0 and back to position 1 using absolute // location commands for(int loop0 = 1 .. num_turns) { int i = (fw_start + 1) % 2; Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[i]); delay(slew_time); delay(time_on_fw_pos); i = (fw_start + 2) % 2; Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[i]); delay(slew_time); delay(time_on_fw_pos); } //------------------ // End of procedure //------------------ } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Quick full spectral scan in about 1 hour in all bands // // // Input arguments Integrating capacitance blue (0,8,4,12) and red; chopper position // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP28 for executing quick full scans in both filters // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // Version : 1.0 // History : 1.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_QuickFullSpectrum { /* Needed variables to call PacsEng_Spec_QuickFullSpectrum */ int chop_def = 650; // chopper position during grating scan int capa_red = 12; // Red capacitor int capa_blu = 0; // Blue capacitor /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_QuickFullSpectrum */ }{ // 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(Pacs_Spec_QuickFullSpectrum(chop_def,capa_red,capa_blu))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_QuickFullSpectrum(chop_def,capa_red,capa_blu); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : Cooler recycling as an ObsMode // // // Author : Diego A. Cesarsky // // Arguments : None // // Description : Simply call BOLO_cooler_cycle // // Dependencies : BOLO_cool_recycle // // Comments : // // Version : 0.3 17-oct-2008 KO // History : 0.2 22-apr-2005 DAC Renamed to BOLO_cooler_OBS to be // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // 0.3 17-oct-2008 KO, extra_cool_time and extra_stab_time variables added // // homegeneous with other OBS scripts // obs PacsEng_BOLO_cooler { /* Needed variables to call PacsEng_BOLO_cooler */ int extra_cool_time = 0; // in second before disconnecting the evaporator from 2K int extra_stab_time = 0; // in second after the end of the recycling procedure /* End of needed variables for PacsEng_BOLO_cooler */ }{ // Four arguments needed for "no_pointing" // 1. Execute the pointing request bool execute = true; // 2. Initial hold // Write OBSID during initial hold int tobsId = duration(WriteOBSID($OBSID)); int tCcu = duration(Pacs_CcuMonitorStartRecycle()); int tih = tobsId + tCcu; // 3. Final hold // Declare OBS finished during final hold int tendId = duration(WriteEndID()); int tCcuDefault = duration(Pacs_CcuMonitorDefaultRecycle()); int tfh = tendId + tCcuDefault; // 4. Duration of "stable" pointing int tp = imax(1,duration(BOLO_cool_recycle(extra_cool_time,extra_stab_time))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); Pacs_CcuMonitorStartRecycle(); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure BOLO_cool_recycle(extra_cool_time,extra_stab_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); Pacs_CcuMonitorDefaultRecycle(); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Burstmode_Setup { }{ // 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(PACS_Burstmode_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure PACS_Burstmode_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : PACS_spu_reset.cus // Missionphase : FM IMT // // Purpose : Reset SPU after photometry data flow // // Author : Bart Vandenbussche // // Arguments : none // Description : Stops SPU // // Dependencies : // Comments : // Version : 1.0 // History : 1.0 18-Apr-2005 BV - copied from SPEC_spu_reset - // procedure PACS_spu_reset { }{ // Stop both "blue" (Long) and "red" (Short) SPU Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); } // SpireBbStartDcuData // // $Id: SpireBbStartDcuData.txt,v 1.1 2006/08/10 09:38:58 kking Exp $ // // Procedure to start generation of detector data TM packets // // // block SpireBbStartDcuData SPIRE 8456 { string datamode = "PF" in ["PF","PSW","PMW","PLW","SF","SSW","SLW"]; //Data mode to be generated, default is PHOT_FULL }{ message("4 " + time() + ": SpireBbStartDcuData started"); message("4 $Id: SpireBbStartDcuData.txt,v 1.1 2006/08/10 09:38:58 kking Exp $"); // // select data mode if(datamode == "PF") { SpireSendDrcuCmd(0x843c0000,0); } if(datamode == "PSW") { SpireSendDrcuCmd(0x843c0001,0); } if(datamode == "PMW") { SpireSendDrcuCmd(0x843c0002,0); } if(datamode == "PLW") { SpireSendDrcuCmd(0x843c0003,0); } if(datamode == "SF") { SpireSendDrcuCmd(0x843c0004,0); } if(datamode == "SSW") { SpireSendDrcuCmd(0x843c0005,0); } if(datamode == "SLW") { SpireSendDrcuCmd(0x843c0006,0); } // // Set number of frames to continuous SpireSendDrcuCmd(0x843d0000,0); // start data collection SpireSendDrcuCmd(0x843e0001,0); // delay(1); message("4 " + time() + ": SpireBbStartDcuData ended"); // } // SpireStopDcuData // // $Id: SpireStopDcuData.txt,v 1.3 2007/04/02 09:50:56 kking Exp $ // // Procedure to stop generation of detector data TM packets // // 30 March 2007: Added additional parameter to RESET_FIFOS message // 02 April 2007: Added additional parameter to RESET_FIFOS cmd // // procedure SpireStopDcuData { }{ message("4 " + time() + ": SpireStopDcuData started"); message("4 $Id: SpireStopDcuData.txt,v 1.3 2007/04/02 09:50:56 kking Exp $"); // // stop data collection SpireSendDrcuCmd(0x843e0000,0); // // flush data from FIFOs message("5 " + time() + "Cmd: Spire_FLUSH_FIFO(0x1000)"); Spire_FLUSH_FIFO_RAW(0x1000); delay(3); message("5 " + time() + "Cmd: Spire_RESET_FIFOS(0x1000)"); Spire_RESET_FIFOS(0x1000); // delay(1); message("4 " + time() + ": SpireStopDcuData ended"); // } // Missionphase : EQM // // Purpose : OnBoardControlProcedure OBCP#13: Chopped Grating // scan calibration (calls DMC sequence 11) // // OBCP author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : OBCP_chop_grat_scan_cal.txt // // Arguments: // Type Name Description // // // Description : This script mimics OBCP_CHOPPED_GRATING_SCANS_CALIBRATION // pseudo script, section 3.11 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DMC_chop_grat_scan_cal // WriteBBID // Comments : // // Version : 0.1 21-Jan-2004 Creation by DAC // History : // int[] block OBCP_chop_grat_scan_cal PACS 13 { int nb_up_dn = 1; // Nb of up down up... cycles (P#1) int grat_step_coarse = 0; // Grating coarse movement (P#2) int nb_grat_steps = 16; // Seq P#3 Nb of grating steps int grat_step_up_fine = 133; // Grating fine movement (P#4) int nb_cycles_grat = 2; // Seq P#5 Nb cycles/grating position int chop_pos_CS1 = -25000; // Chopper position for CS1 (P#6) int nb_ramps_grat_pos = 3; // Seq P#7 Nb of ramps per grating position int chop_pos_CS2 = 25000; // Chopper position for CS2 (P#8) int grat_step_dn_fine = -133; // Grating fine movement (P#9) int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 461000; // Starting grating position int grat_time = 40000; // Time for grating to move to start position int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here // OBCP_CHOPPED_GRATING_SCANS_CALIBRATION(seq, seq_time, P#1,&, P#9, // detector, grat_pos, grat_time, // cmp_par_blue,cmp_par_red, // grat_def, chop_def, grat_def_time) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHKSUM) // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE // The DMC is number seq_DMC=11 and lasts seq_time [msec] // Duration "duree1" is an array with five elements int[] duree1 = DMC_chop_grat_scan_cal(nb_up_dn,nb_grat_steps,nb_cycles_grat,nb_ramps_grat_pos); // Convert duration [ramps] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * ramp_time) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * ramp_time); duree_REF = ifloor(double(duree1[2]) * ramp_time); duree_CAL = ifloor(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * ramp_time) + dmc_margin; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event duree_msec = duree_msec + t_cmd + seq_time; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) duree_msec = duree_msec + t_cmd + grat_def_time; duree_OVR = duree_OVR + t_cmd + grat_def_time; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // end // Now trigger execution of OBCP // This OBCP is number 13, requires 19 parameters and lasts seq_time [msec] string obcp_ID = "INT_CALIB_SPEC"; int obcp_par_nber = 19; int seq_DMC = 11; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_dn},{4,grat_step_coarse},{5,nb_grat_steps},{6,grat_step_up_fine},{7,nb_cycles_grat},{8,chop_pos_CS1},{9,nb_ramps_grat_pos},{10,chop_pos_CS2},{11,grat_step_dn_fine},{12,detector},{13,grat_pos},{14,grat_time},{15,comp_mode_blu},{16,comp_mode_red},{17,grat_def},{18,chop_def},{19,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; // time_elapsed includes the TC uplink "rate time", i.e. 2 TCs/sec time_array[0] = time_elapsed; // Return //Reset Block ID WriteEndBB(); //Return time_array return time_array; } // CVS comments : $Id: OBCP_wave_switch.txt,v 1.2 2008/02/07 16:21:41 dcesarsk Exp $ // // Author OBCP : Helmut Feuchtgruber // CUS script : DAC // // Arguments needed to call OBCP // Type Name DefCal Description // // int nb_dither_steps P1 Number of dither (amplitude P2/step) // int dither_amplitude P2 Dithering amplitude // int nb_switch_cycles P3 Number of switch repeatitions // int param4 P4 First relative move in P3 loop // int nb_ramps_grat P5 number of ramps per grating position // int param6 P6 2nd relative move in P3 loop // int param7 P7 3rd relative move in P3 loop // int param8 P8 4th relative move in P3 loop // int detector Synchronize on this detector 1:Blue 2:Red // int comp_mode_blu Blue compression // int comp_mode_red Red compression // int grat_pos Initial grating position // int chop_pos Chopper position during OBCP // int grat_time Time for grating to move grat_pos // int grat_def Grating default position // int chop_def Chopper default position // int grat_def_time Time to move gratting to grat_def // int nb_rdouts_ramp Number of readouts per ramp // // Description: Following from DMC description (with P4=-P8;P6=-P7) // Start with grating at grat_pos = POS // // OPERATION Where is grating // WAIT 1 POS // LABEL 0 POS // LOOP P1 POS // WAIT 1 POS // MOVE_GRATING_RELATIVE P2 POS + P2 // LOOP P3 POS + P2 // WAIT 1 POS + P2 // MOVE_GRATING_RELATIVE P4 POS + P2 + P4 // LABEL 33 POS + P2 + P4 // WAIT P5 POS + P2 + P4 ------------ LINE // WAIT 1 POS + P2 + P4 // MOVE_GRATING_RELATIVE P6 POS + P2 + P4 + P6 // WAIT P5 POS + P2 + P4 + P6 -------- REF1 // WAIT 1 POS + P2 + P4 + P6 // MOVE_GRATING_RELATIVE P7 POS + P2 + P4 + P6 + P7 // WAIT P5 POS + P2 + P4 ------------- LINE // WAIT 1 POS + P2 + P4 // MOVE_GRATING_RELATIVE P8 POS + P2 + P4 + P8 // WAIT P5 POS + P2 ------------------ REF1 // END_LOOP // END_LOOP // WAIT 1 // LABEL 0 // END_SEQUENCE // In summary: // P5 ramps at positions (1st time into loop; thereafter 2*P2, 3*P2...): // POS + P2 + P4 LINE ==> LINE = POS - P2 - P4 // POS + P2 + P4 + P6 REF1 ==> LINE + P6 // POS + P2 + P4 LINE ==> LINE // POS + P2 REF2 ==> LINE - p4 // // NOTE1: P2 is the "dithering" amplitude per P3 loop // The start grating position before dithering is // POS = nominal_grating@LINE - P4 // NOTE2: REF1 and REF2 are the same if P4 + P6 = 0 => P6 = P8 // // Version : 0.1 16-oct-2007 Creation by DAC // History : // int[] block OBCP_wave_switch PACS 32 { int nb_dither_steps = 8; // P1 Number of dither (amplitude P2/step) int dither_amplitude = 100; // P2 Dithering amplitude int nb_switch_cycles = 1; // P3 Number of switch repeatitions int param4 = 2000; // P4 First relative move in P3 loop int nb_ramps_grat = 1; // P5 number of ramps per grating position int param6 = 1000; // P6 2nd relative move in P3 loop int param7 = -1000; // P7 3rd relative move in P3 loop int param8 = -2000; // P8 4th relative move in P3 loop int detector = 1; // Synchronize on this detector 1:Blue 2:Red int comp_mode_blu = 16; // Blue compression int comp_mode_red = 16; // Red compression int grat_pos = 500000; // Initial grating position int chop_pos = 400; // Chopper position during OBCP int grat_time = 10000; // Time [msec] for grating to move grat_pos int grat_def = 535000; // Grating default position int chop_def = 450; // Chopper default position int grat_def_time = 10000; // Time to move gratting to grat_def int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Register with environment WriteBBID($BBID); // Variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // duree of this OBCP (computed and returned in [msec]) int duree_msec = 0; // OBCP pseudo code // OBCP_WAVELENGTH_SWITCHING2(seq, seq_time, P#1, //... P#8, detector, cmp_par_blue, cmp_par_red, grat_pos, chop_pos, // grat_time, grat_def, chop_def, grat_def_time) // begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_MOVE_CHOP_ABS(chop_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) //; (all parameters filled by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; //DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the execution time int[] duree1 = DMC_wave_switch(nb_dither_steps,nb_switch_cycles,nb_ramps_grat); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; //WAIT(seq_time) duree_msec = duree_msec + t_cmd + seq_time; //; check execution status of the sequence and in case of //failure stop OBCP and issue TM(1,8) + event //DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; //WAIT(grat_def_time) duree_msec = duree_msec + t_cmd + grat_def_time; duree_OVR = duree_OVR + t_cmd + grat_def_time; //Issue TM(1,7) //end //Duration: 10 x 200ms + grat_time + grat_def_time + 0.5s // This procedure calls the sequence described in sec. 4.2.7. // Now trigger execution of OBCP // This OBCP is number 32, requires 19 parameters and calls DEC/MEC #24 /// NOTE: WE DON'T KNOW OBCP_ID YET /// CALL USING NUMBER string obcp_ID = "WAVE_SWITCH_GRAT"; int obcp_nb = 32; int obcp_par_nb = 19; int seq_DMC = 24; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_dither_steps},{4,dither_amplitude},{5,nb_switch_cycles},{6,param4},{7,nb_ramps_grat},{8,param6},{9,param7},{10,param8},{11,detector},{12,comp_mode_blu},{13,comp_mode_red},{14,grat_pos},{15,chop_pos},{16,grat_time},{17,grat_def},{18,chop_def},{19,grat_def_time}]; /// Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); Pacs_DPU_START_OBCP_RAW(obcp_nb,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Wait for execution of OBCP delay(time_array[0]); // Mark end of BB WriteEndBB(); // Return the array of times return time_array; } // File : PACS_Spec_Heat_SFT.cus // Missionphase : PACS FM ILT tests // // Purpose : Flashers Short Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends current to both flashers for short times, the goal is only to see some reaction in the HK // // // Prerequisite : The flashers are SWITCHED ON ALREADY // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 1.0 // History : 1.0 / 08-Jun-2006 initial version by PR // : 2.0 13-02-08 Made into a proc to be called by // PV "obs" PacsEng_Spec_Flash_SFT // Removed WriteOBID/WriteEndID unnecessary: called in Obs // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Flashers Short Functional Test // @comment - // procedure PACS_Spec_Flash_SFT { }{ // 0.1 mA -> 1.0 mA -> 0.0 mA // PACS_Spec_Flash_Setup(20,20); delay(30); PACS_Spec_Flash_Setup(0,0); delay(30); PACS_Spec_Flash_Setup(205,205); delay(30); PACS_Spec_Flash_Setup(0,0); delay(30); // } // $Id$ // Missionphase : PACS PV Phase // // File : WriteOBSID_ast_OBS.cus// // Version : 0.1 // // Purpose : Configure the chopper servo loop // // Author : MN // CUSification : MN // Arguments : // // Description : Write OBS ID to system // // Comments : // // Version : 2.0 // History : 1.0 12-nov-2007 initial version // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_WriteOBSID_ast { /* Needed variables to call PacsEng_WriteOBSID_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_WriteOBSID_ast */ }{ int myOBSID = $OBSID; // 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(WriteOBSID($OBSID))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: SPEC_fltw_move.txt,v 1.3 2007/04/25 15:14:05 dcesarsk Exp $ // Missionphase : // // Purpose : Change filter wheel in spectroscopy // Attention: there is only one controller for // the filter wheels and the grating, but different // sets of controller parameters! // // Author : Thomas Mueller // CUS script : Diego A. Cesarsky // CVS file : SPEC_fltw_move.txt // // Arguments : //Type Name DefVal Description //int filter_id 1 Position of spectroscopic filter wheel // // Description : This script will change the spectrometer filter // into a specified position. This can be a predefined // position (with mode = 'ABS') or a relative position // (with mode = 'REL'). // // This script performs the following operations (section // 4.4.8 of the DEC/MEC User's Manual): // "Consider that the grating is powered on and that an // acquisition sequence has ended. To change the filter wheel // position now: // 1. Disable the grating controller (DMC_DISABLE_GRAT_CONT) // 2. Switch-on the spectro filter wheel controller // (DMC_SWON_FW_SPEC). Note : this will switch-off the // grating controller and the photo filter wheel controller // but the grating position encoder will remain powered-on // and will then continue reading the position. // 3. Any of the 2 move commands can be sent // 4. Switch-on the grating controller (DMC_SWON_GRAT_CONT) // 5. Enable the grating controller (DMC_ENABLE_GRAT_CONT) // 6. Start the new acquisition sequence." // // NOTE: THIS SCRIPT IGNORES REL MODES // // Dependencies : // // Comments : This script should be executed after the // switch-on procedure and the MEC setup // // Version : 0.1 11-Oct-2004 Creation by DAC, based on TM's // V1.1 of tm_spec_fil_switch.tcl // History : 0.2 18-Oct-2004 Normalized variable names // 0.3 22-apr-2005 DAC Converted into procedure // Removed useless delays, read move time // from PACSparams // : int procedure SPEC_fltw_move { string filter_id = "POS A" in ["POS A","POS B"]; // Predefined positions [POS A, POS B] }{ // Accumulated duration [milliseconds] int duration_msec = 0; // Disable grating controller Pacs_DMC_DISABLE_GRAT_CONT(); // Switch on power supply of SPEC filter wheel Pacs_DMC_SWON_FW_SPEC(); // Move filterwheel to the predefined position Pacs_DMC_MOVE_SPEC_FW_LOC(filter_id); // Get the duration of the move int move_time = iceil(dlookup("PACSparams","fltw_time","freq_time")); // Same in [sec] int move_time_sec = Msec2sec(move_time); delay(move_time_sec); duration_msec = duration_msec + move_time; // Switch on grating controller Pacs_DMC_SWON_GRAT_CONT(); // Enable grating controller Pacs_DMC_ENABLE_GRAT_CONT(); return duration_msec; } // Missionphase : PACS FM ILT tests // // Purpose : FoV scan Spectroscopy (OBCP_chop_scan_spec) // // Author : P. Royer // // Arguments : // SPU setup arguments // OBCP_chop_scan_spec arguments // Filter wheel position // // Prerequisite : // // Description : // SPU Setup // Position Filter Wheel // OBCP_chop_scan_spec (FoV scan) // SPU reset // // Dependencies : // SPEC_spu_setup // SPEC_spu_reset // OBCP_chop_scan_spec (calling DMC_chop_scan_spec) // // Comments : We are supposed in PACS spectro before to run this procedure // => no CRE setup here // // Version : 1.0 // History : 1.0 / 14-Mar-2008 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose FoV scan Spectroscopy (OBCP_chop_scan_spec) // @comment - // procedure PACS_Spec_Fov_Scan { int nb_samp_subramp_blu = 64; // Red Subramp length (directly connected to ramp_fit_alg) int nb_samp_subramp_red = 64; // Blue Subramp length int ramp_fit_alg = 0 in [0,1]; // Ramp fit algorithm [0=LstSq;1=mean value] string filter_pos = "POS A" in ["POS A","POS B"]; int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 1; // P#2 number of ramps on step int nb_steps_up = 300; // P#3 number of steps up int nb_steps_dn = 300; // P#4 number of steps down int step_up = 150; // P#5 relative move up int step_dn = -150; // P#6 relative move down int detector = 1; // Detector to SYNCH on int grat_pos = 535000; // Grating position int chop_start_pos = 0; // Chopper start position int grat_time = 20000; // Grating time int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 535000; // Grating default int grat_def_time = 40000; // Grating default time int chop_def = 0; // Chopper default position int nb_rdouts_ramp = 64; // Ramp length }{ // //int ramp_len_red = 64; // Red ramps length //int ramp_len_blu = 64; // Blue ramps length //double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) //double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) //int capa_red = 8; // Capacitor red (0=100f,4=300f,8=1pf,12=3pF) //int capa_blu = 8; // Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // // CRE SETUP --> SUPPOSED IN PACS-SPECTRO --> CRE SETUP SKIPPED // NOTE: capa_xxx is added to cre_ctrl_xx within SPEC_cre_setup // //double bias_r_red = 0.011; // in [0.0,1.0]; // BIAS_R for red spectro (0-1V) //double bias_r_blu = 0.011; // in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) //int cre_ctrl_red = 386; //int cre_ctrl_blu = 386; //SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // // SPU SETUP // ====== // Register with environment WriteOBSID($OBSID); // Start SPU int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,true); // // Position the filter wheel // ============== SPEC_fltw_move(filter_pos); // // OBCP_chop_scan_spec // ============= OBCP_chop_scan_spec(nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp); // // Stop SPU // ===== SPEC_spu_reset(); // // SYNC // === sync(); } // File : PACS_GeGa_SFT_Init_Cold_He2.cus // Missionphase : PACS EQM Test // // Purpose : Cold SFT of Ge:Ga detector chain // // Author : H. Feuchtgruber // // Arguments : none // // // Description : Copy of PACS_GeGa_SFT_Init_Cold with different dummy voltages // // // Comments : // // Version : 1.3 // History : 1.0 / 6-Nov-2006 initial version // 1.1 13-nov-2006 Resistor bias have changed // 1.2 12-oct-2007 BV : Included mois comments // 1.3 8-Apr-08 HF adapted to in-flight default biases procedure PACS_GeGa_SFT_Init_Cold_He2 { }{ mois_comment("Start of procedure PACS_GeGa_SFT_init_cold_He2"); debug_print("Start PACS_GeGa_SFT_Init_Cold"); mois_step("Set DPU housekeeping list to spectroscopy"); //DPU_SET_HK_LIST (SPEC for both channels) Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); mois_step("Configure DMC for communication with the DECs"); // DMC_WRT_BOL_REC_OPT(ID,LENGTH,4,CHKSUM) int[] argum = [4]; {int}[] argTuple = [{4}]; int chksum = checksum("int",argum); Pacs_DMC_WRT_BOL_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_B_DEC_REC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_R_DEC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,chksum); delay(1); mois_step("Write default spectroscopy timing parameters to FPGA"); // DMC_WRT_TIMING_FPGA_PAR(ID,LENGTH,16384,40,2,32,0,P//9,CHKSUM) {int}[] list_tuple = [{0x0},{0x0},{0x0},{26},{0x95217cb},{0xb}]; int[] list_int = [0x0,0x0,0x0,26,0x95217cb,0xb]; chksum = checksum("int",list_int); Pacs_DMC_WRT_TIMING_FPGA_PAR(list_tuple,chksum); delay(1); // DMC_SET_TIMING_FPGA_PAR Pacs_DMC_SET_TIMING_FPGA_PAR(); message("Default spectroscopy timing parameters set!"); mois_step("Detector setup"); // ======== Initial detector setup ==================== // DMC_SWON_B_DEC SWITCH ON THE BLUE DEC POWER Pacs_DMC_SWON_B_DEC(); delay(8); // DMC_SWON_R_DEC" SWITCH ON RED DEC POWER Pacs_DMC_SWON_R_DEC(); delay(8); // Wait after DEC switch-on delay(5); debug_print("DECs are on !"); // Now define the startup Ge:Ga detector setup int read_per_ramp_b = 8; int cre_ctrl_b = 396; int bias_r_b = 0; int bias_d_b = 0; int read_per_ramp_r = 8; int cre_ctrl_r = 396; int bias_r_r = 0; int bias_d_r = 0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SWON_B_SPEC" SWITCH ON BLUE SPECTROMETER ARRAY POWER Pacs_DMC_SWON_B_SPEC(); delay(1); // PC091420 "DMC_SWON_R_SPEC" SWITCH ON RED SPECTROMETER ARRAY POWER Pacs_DMC_SWON_R_SPEC(); delay(1); debug_print("SPECs are on !"); // Wait for CRE HW sequence to finish delay(15); // now select the CREs cre_ctrl_b = 398; cre_ctrl_r = 398; mois_step("Write the detector parameters"); // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // Now define the actual Ge:Ga detector setup read_per_ramp_b = 64; cre_ctrl_b = 398; bias_r_b = 41; bias_d_b = 328; read_per_ramp_r = 64; cre_ctrl_r = 398; bias_r_r = 41; bias_d_r = 123; double heater_blue = 0.0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC-SET-PARAM-BOTH-SPEC SET TIMING PARAMTERS FOR BOTH SPEC ARRAYs Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); mois_step("Switch on detector heater"); // DMC_SWON_BD_HEATER Pacs_DMC_SWON_BD_HEATER(); delay(1); // DMC_SET_B_SPEC_HEAT_C Pacs_DMC_SET_B_SPEC_HEAT_C(heater_blue); delay(1); debug_print("Detectors are up and running at default settings!"); mois_step("Select synchronisation detector and set valid science data flag"); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); delay(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); delay(1); // # ==== End of detector setup ============== } // Script : PACS_Chopper_uk_move_12000_NoConf_ast.cus // Missionphase : SVT / Flight // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on PACS_Chopper_uk_move_12000_ast_OBS, // but without configuration and with mois comments // // Version : 1.0 // // History : 1.0 17-10-2007 BV First version // procedure PACS_Chopper_uk_move_12000_NoConf_ast { }{ mois_comment("Perform rectangular chopping with step 12000"); // int chop_pos = 12000; // chopper position int cycle = 10; // give cycle # int plateau_time = 2; // select plateau time in sec // Start Diag. HK mois_step("Start Diagnostic housekeeping"); SPEC_Chopper_dhk_5hk_1khz_bb(); mois_step("Enable chopper controller"); // Enable Chopper Controller EnDis_chopper("ON"); delay(5); mois_step("Perform rectangular chopping"); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // do observations int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); mois_step("Disable chopper"); // Disable Chopper Controller EnDis_chopper("OFF"); delay(5); mois_step("Disable diagnostic housekeeping"); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // Missionphase : // // Purpose : Perform the cooler recycling // // TCL author : TM // TCL file : tm_phot_cooler_recycling.tcl // CUS author : DAC // Script file : BOLO_cool_recycle.txt // // Input arguments // type name description // N/A // // Return values // Type Description // int [] Several duration times // // Description : see PhFPU UM, chapter 4 // // Dependencies : // // Preconditions : // // Comments : Based on the PhFPU UM Draft 6.0 and abundant e-mail // exchanges with SAp // // Version : 2.0 // History : 0.1 08-Apr-2005 creation by DAC; based on TM's // version 1.0 of 24-Sep-2004 // 0.2 15-apr-2005 DAC Forgot WriteBBID!! // 0.3 18-apr-2005 DAC Added Switch Off All Groups // and SetOn All Temp Probes // 0.4 20-sep-2005 Added DPU_SET_HK_LIST to "PHOT" // and to "NO_PRIME" // 0.5 21-sep-2005 Zeroed several HEATER currents // 1.0 26-sep-2005 Added delay(600) as the last operation // 1.1 28-sep-2005 Modified as per Marcs's mail: // "replace: // step 0 (1.18 mA on HSE, 0.0 mA on HSP, wait 300 sec) // step 1 (1.4 mA on HSE, wait 600 sec) // by // step 1(1.4 mA on HSE, 0.0 mA on HSP, wait 600 sec)" // 1.2 7-mar-2006 ....HEATER_CURR renamed to HEATER_CUR // 1.3 26-apr-2006 update with respect to // Preparation_au_recyclage.txt and // Recyclage_Auto_Time.txt and // starting out of SAFE mode (groups // are on, but not biases are set and // temperature sensors are on) // 1.4 10-oct-2006 autonomy function added // 1.5 08-nov-2006 TM: checked for groups off // 1.6 13-nov-2006 TM: cleaning of SP and HSP to zero // 1.7 14-nov-2006 Wait 15 minutes before enabling autonomy function // 1.8 30-nov-2006 Wait 20 minutes before enabling autonomy function // 1.9 09-apr-2007 Modifications of AFs // 2.0 11-apr-2007 SP heater current set explicitly to zero // 2.1 17-oct-2008 KO, extra_cool_time and extra_stab_time variables added // int[] block BOLO_cool_recycle PACS 2003 { int extra_cool_time = 0; // in second before disconnecting the evaporator from 2K int extra_stab_time = 0; // in second after the end of the recycling procedure }{ // disable AF 14 (to check for TEMP_EV < 0.3 K) Pacs_DPU_SET_FUNCT("EVENT_BOL_T_FPU","DISABLE"); // disable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","DISABLE"); // enable AF 18 (to check if the current of the sorption pump heater is below 30mA) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP2","ENABLE"); // // Obtain and set Block ID WriteBBID($BBID); // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others // NOTE: here all durations are given in [sec] int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Set HK to PHOT Pacs_DPU_SET_HK_LIST("PHOT","BOTH Array"); // content of "Preparation_au_recyclage.txt" // Set SP heater current to to 0.00000000 amperes (0) // # P 07 01 0000 int operand = 0x7010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); int t_wait = 1; delay(t_wait); duree_num = t_wait; duree_OVR = t_wait; // Set HSP heater current to to 0.00000000 amperes (0) // # P 07 02 0000 operand = 0x7020000; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 1; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // Set HSE heater current to to 0.00140000 amperes (3572) // # P 07 03 0DF4 // Attendre 300000 ms // # S 01 0493E0 operand = 0x7030df4; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 300; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // Set HSE heater current to to 0.00118000 amperes (3011) // # P 07 03 0BC3 // Attendre 900000 ms // # S 01 0DBBA0 operand = 0x7030bc3; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 900; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; //***************************************************************** //** ** //** Automatic Cooling reclycling ** //** ("Recyclage_Auto_Time.txt") ** //** ** //***************************************************************** // // - 23/01/06 Procedure of reclycling in Saclay cryostat with Phfpu MV // - note : this is timing version without temperature test // // Initialisation of BOLC // // Set temp probe on/off FF hexa // # P 07 00 00 FF // // Initialisation of LTU // // Inhiber enregistrement TM // # S 08 // Valider enregistrement TM // # S 09 // // Initial conditions // TEMP_SP < 10K // TEMP_EV < 2K // // Set SP heater current to to 0.02730000 amperes (2231) // # P 07 01 08B7 // // Attendre 2100000 ms // # S 01 200B20 operand = 0x70108b7; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 2100; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // Set SP heater current to to 0.00700000 amperes (580) // # P 07 01 0244 // // Attendre 2820000 ms // # S 01 2B07A0 operand = 0x7010244; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 2820; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // Additional wait time for the evaporator cooling down delay(extra_cool_time); duree_num = duree_num + extra_cool_time; duree_OVR = duree_OVR + extra_cool_time; // // Set HSE heater current to to 0.00000000 amperes (0) // # P 07 03 0000 // // Attendre 720000 ms // # S 01 0AFC80 operand = 0x7030000; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 720; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // Set SP heater current to to 0.00000000 amperes (0) // # P 07 01 0000 operand = 0x7010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 1; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // Set HSP heater current to to 0.00140000 amperes (3569) // # P 07 02 0DF1 // // Attendre 480000 ms // # S 01 075300 operand = 0x7020df1; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 480; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // Set HSP heater current to to 0.00118000 amperes (3010) // # P 07 02 0BC2 operand = 0x7020bc2; Pacs_DMC_SEND_COMMAND_BOLC(operand); t_wait = 1; delay(t_wait); duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; // // ************************ // ** ** // ** end recycling ** // ** ** // ************************ // Last message debug_print("Recycling completed, in about 20 min, TEMP_EV < 0.3 K"); t_wait = 1200; duree_num = duree_num + t_wait; duree_OVR = duree_OVR + t_wait; delay(t_wait); // // AF settings // // disable AF 18 (to check if the current of the sorption pump heater is below 30mA) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP2","DISABLE"); // enable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","ENABLE"); // // Set HK to NO PRIME (to have the clean SAFE settings again) Pacs_DPU_SET_HK_LIST("NO_PRIME","BOTH Array"); // // Additional wait time for the evaporator temperature stabilisation delay(extra_stab_time); duree_num = duree_num + extra_stab_time; duree_OVR = duree_OVR + extra_stab_time; // // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // Author : PR // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_DEG_MODE_Diaghk_Setup { /* No variables to call PacsEng_Spec_Gra_DEG_MODE_Diaghk_Setup */ int diag_hk_period = 5; // 5 msec diag hk period /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_DEG_MODE_Diaghk_Setup */ }{ // 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(PACS_Spec_Gra_DEG_MODE_Diaghk_Setup(diag_hk_period))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_DEG_MODE_Diaghk_Setup(diag_hk_period); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script : PacsEng_Chopper_AutoOpt.txt // Missionphase : Commissioning // // Purpose : Check a series of different chopper controller settings by // chopping between +/- 12000 units (~4 deg) // // Author : Markus Nielbock/Helmut Dannerbauer // CUS author : MN/HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions: PACS switched on and Chopper switched off. // // Comments : This script is based on the commanding script // PACS_Chopper_uk_move_12000_OBS.cus // // Version : 1.1 // // History : 1.0 20-Nov-2007 (MN) Script to do simple chopper cycle // 1.1 10-Mar-2008 (MN) adopted extended CUS naming conventions // // Initialise input parameters: // Defines control parameter range, loops run from k(p,i,c,f)min to // k(p,i,c,f)max defining the inverse of the ratio of parameter change w.r.t. // the default value. obs PacsEng_Chopper_AutoOpt { int kpmin = 0 in [-3,3]; int kpmax = 0 in [-3,3]; int kimin = 0 in [-3,3]; int kimax = 0 in [-3,3]; int kcmin = 0 in [-3,3]; int kcmax = 0 in [-3,3]; int kfmin = 0 in [-3,3]; int kfmax = 0 in [-3,3]; }{ // duration int tOPT = duration(Pacs_Chopper_AutoOpt(kpmin,kpmax,kimin,kimax,kcmin,kcmax,kfmin,kfmax)); int tOBSID = duration(WriteOBSID($OBSID)); int tEndID = duration(WriteEndID()); int tp = tOPT + tOBSID + tEndID; // Issue the pointing request int[] fromPntReq = no_pointing(true,0,0,tp); }{ // The state machine int[] stateVar = [0]; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 3) { // Get OBSID from environment //Send OBSID to DMC WriteOBSID($OBSID); data_rate(120.0); Pacs_Chopper_AutoOpt(kpmin,kpmax,kimin,kimax,kcmin,kcmax,kfmin,kfmax); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Moves the grating back & forth throughout the RSRF, with long wait times, to study the transients // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : // // Description : // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON and ENABLED // The FWSPEC is placed on position B // // Comments : // // Version : 2.0 // // History : 1.0 06-Apr-2007 PR Creation // History :2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Time_Constant_IST { /* Needed variables to call PacsEng_Spec_Time_Constant_IST */ int idle_time = 240; /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Time_Constant_IST */ }{ // 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(PACS_Spec_Time_Constant_IST(idle_time))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Time_Constant_IST(idle_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Two or three position chopping with dithering followed by // calibration readouts chopping between CS1 and CS2. Chopping // to the REF positions is done with dithering. // // DMC author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : DMC_spec_2_3_chop_dither.txt // // Arguments used by the calling OBCP // // Type Name DefVal Description : // int nb_up_down number of up-down sequences // int nb_grat_steps number of grating steps // int nb_SRC_OFF nb cycles on/off source per grating positn // int chop_pos_REF1: chopper position 1 // int nb_ramps_plateau number of ramps per chopper plateau // int chop_pos_REF2 chopper position 2 // int chop_pos_REF3 chopper position 3 // int nb_CS1_CS2 number of cycles on the calibration sources // per grating positn // int chop_pos_CS1 chopper position on CS1 // int chop_pos_CS2 chopper position on CS2 // int grat_step_up step size of relative grating move up // int grat_step_dn step size of relative grating move down // // Description : // Default sequence for spectral line observations. The // chopping pattern is identical to the analogous photometry // case, however the number of chopper/readout cycles per // grating step can be given as a parameter. Currently it is // assumed that we do internal calibration measurements inside // this sequence on every grating step. "Up" and "Down" scans will // cover the same absolute grating positions in equidistant steps, // commanded by MOVE_GRATING_RELATIVE. The initial absolute start // position of the grating will be commanded before, from // within the OBCP (3.9). The number of grating steps for a // line scan is determined by nb_grat_steps. The sequence may // consist of at least 7 LOOPs. // Explicitly: //For the number of UP/DOWN sequences // For each of the P#2 grating positions going up // Repeat P#3 times // SRC P#4 // OFF P#6 // SRC P#4 // OFF P#7 // End repeat P#3 times // Repeat P#8 times // CS1 P#9 // CS2 P#10 // End repeat P#8 times // End of for each of the P#2 grating positions going up // For each of the P#2 grating positions going down // Repeat P#3 times // SRC P#4 // OFF P#6 // SRC P#4 // OFF P#7 // End repeat P#3 times // Repeat P#8 times // CS1 P#9 // CS2 P#10 // End repeat P#8 times // End of for each of the P#2 grating positions going down //End for the number of UP/DOWN sequences // This procedure returns its duration // in number_of_ramps. It is up to the calling program to // convert number_of_ramps into [sec] (this procedure does // not know the duree of each ramp) // // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows verbatim paragraph 4.2.1 in PACS-ME-LI-005 // Actual values of input parameters, except values for the // various loop counters, are completely irrelevant and so // are not used. // Loop counters are used to estimate the duree of the // sequence // // Version : 0.1 22-apr-2005 DAC from DEC/MEC #8, viz. // DMC_spec_2_3_chop // History : // // This "dummy" DEC/MEC sequence needs only the loop parameters from the // complete list above // int[] procedure DMC_spec_2_3_chop_dither { int nb_up_down = 1; // Number of sequences: up down up ... int nb_grat_steps = 10; // Number of grating steps int nb_SRC_OFF = 10; // Nb cycles on/off source/grating position int nb_ramps_plateau = 10; // Number of ramps per chopper plateau int nb_CS1_CS2 = 10; // Nbr cycles on cal src per grating position }{ // Define variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Pseudo code from PACS OBCPs and DMC Sequences (4.1.2) // // WAIT 1 ; have a defined start // Accumulated duree_ramps in number of ramps duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop measurement for(int outloop = 1 .. nb_up_down) { // LOOP P#2 ; grating loop up for(int gratUPloop = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#11 ; increment grating position // LOOP P#3 ; chop readout cycle for(int onoffUPloop = 1 .. nb_SRC_OFF) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE_DITHER P#6 ; chopper to P#6 (REF1) // LABEL 5 ; next chopper pos. // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE_DITHER P#7 ; chopper to P#7 (REF2) // LABEL 7 ; last chopper pos. // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; } // END_LOOP ; chop readout cycle // LOOP P#8 ; calibration loop for(int csUPloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS1; chop to CS1 // LABEL 65 ; CS1 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS2 ; chop to CS2 // LABEL 129 ; CS2 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; } // END_LOOP ; calibration done } // END_LOOP ; grating scan up done // LOOP P#2 ; grating loop down for(int gratDNloop = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE grat_step_dn ;decrement grating position // LOOP P#3 ; chop readout cycle for(int onoffDNloop = 1 .. nb_SRC_OFF) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE_DITHER P#6 ; chopper to P#6 (REF1) // LABEL 5 ; next chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 (SRC) // LABEL 3 ; first chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_SRC = duree_SRC + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE_DITHER P#7 ; chopper to P#7 (REF2) // LABEL 7 ; last chopper pos. // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_REF = duree_REF + nb_ramps_plateau; } // END_LOOP ; chop readout cycle done // LOOP P#8 ; calibration loop for(int csDNloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to P#9 (CS1) // LABEL 65 ; CS1 // WAIT P#5 ; take nb_ramps_plateau duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#10 ; chop to P#10 (CS2) // LABEL 129 ; CS2 // WAIT P#5 ; take P#5 ramps duree_ramps = duree_ramps + nb_ramps_plateau; duree_CAL = duree_CAL + nb_ramps_plateau; } // END_LOOP ; calibration done } // END_LOOP ; grating scan up done } // END_LOOP ; main loop done // WAIT 1 ; complete last plateau duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // Create time_array int[] time_array = [duree_ramps,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_spec_2_3_chop_dither duration: " + time_array); return time_array; } // // $Id$ // Missionphase : PACS PV Phase // // // // Preconditions : see associated procedure // // Comments : // Version : 1.0 // // History : 0.1 22-mar-2006 // History : 1.0 04-mar-2008 Converted into PV script by VDP // obs PacsEng_Spec_Gra_Diaghk_SINCOS_Setup { /* Needed variables to call PacsEng_Spec_Gra_Diaghk_SINCOS_Setup */ int diag_hk_period = 5; // 5 msec diag hk period /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Diaghk_SINCOS_Setup */ }{ // 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(PACS_Spec_Gra_Diaghk_SINCOS_Setup(diag_hk_period))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_Diaghk_SINCOS_Setup(diag_hk_period); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.1 for the Commissioning Phase // Check the bias/signal relationship using CSs // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_lowGainBias1_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0 // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_lowGainBias1_direct // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_CommPh_lowGainBias1(1, "LOW") // // Version : Mon Jul 14 06:40:46 CEST 2008 // obs PacsCal_Phot_lowGainBias1_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0 bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); //Minimum slew time int tslewmin = 0; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeOBSID; //Final hold int tfh = timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_lowGainBias1_direct(measure_time,startBiasTable,endBiasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the Phot_lowGainBias1_direct Phot_lowGainBias1_direct(measure_time,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // $Id: PacsCal_WaveCalChop.txt,v 1.3 2008/04/21 09:48:07 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration and instrumental profile // with Chop/Nod // Author : HF // // Arguments � : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Uses OBCP27 for executing a parameterized scan of any length, // �stepsize etc. Represents a generic chopped grating scan // Comments : // // Version : 1.0 // // History : 0.1 Using example from PacsCal_WaveCalNoChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping obs PacsCal_WaveCalChop { /* Needed variables to call WaveCalChop */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int grat_pos = 500000; // grating start position for scan int grat_time = 0; // time for grating to move to start position [msec] int grat_step_up = 200; // grating step size int nb_ramps_plateau = 1; // number of readouts per grating position int grat_step_dn = 200; // grating step size int nb_grat_steps = 50; // number of grating steps in one direction int order = 2; // end position for order selection: 1=Red, 2= or 3= Blue) int nb_SRC_REF = 3; // number of ramps (cycles) per grating position int nb_CS1_CS2 = 0; // nb of cycles on internal CS int nb_rdouts_ramp = 64; // number of readouts per ramp int nb_up_down = 1; // number of grating updown scans int nb_raw_red = 3; // number of red pixels int nb_raw_blu = 3; // number of blue pixels 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 comp_mode_blu = 16; // compression mode for blue detector int detector = 1; // 1=blue 2=red (sync on detector) int comp_mode_red = 16; // compression mode for red detector 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; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC int nnod = 1; // number of nods (AB or BA) double chopthrow = 30.0; // chop/nod throw in arcsec bool startAtB = false; // false = start AB cycle (true = start BA cycle) bool fixed = false; // false=nod in instrument coordinates, true= nod ccw with respect to north on sky double pattnod = 270.0; // Nod along chop direction is about 270 degree bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Set OBSID int tobsid = duration(WriteOBSID($OBSID)); // Verification for grating and chopper hard limits int[] gratpos = [0]; Pacs_HardLimitsCheck(gratpos,chopthrow); // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,comp_mode_blu,nb_raw_blu,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,comp_mode_red,nb_raw_red,0,0,0,0,0,0}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // frstLstGratPos is the last position for the grating after the Cals done // during Slew time... must be same as observations start position: grat_pos // Perform/don't AOT prologue bool doPROLOG = true; // "N/A" in string because of indexing 0,1,2,3 string[] choix = ["N/A","order1","order2","order3"]; string order_str = "order" + order; // if(choix[order] != "order1") { // double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); double keyWL = PacsSpecKeyWaves(order_str); double[] keyWAVE = [keyWL]; int tpacsSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); // } else { // keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); // double keyWAVE2 = dlookup("KEY_WAVES",order_str,"KeyWave2"); // keyWAVE = [keyWAVE1,keyWAVE2]; // tpacsSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); // } //Initial hold int tih = 0; //Final hold int tendobsid = duration(WriteEndID()); int grat_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_def,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,chopthrow,detector)); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; int tloadmin = 0; int nload = 0; int thold = 0; int nhold = 0; int tpa = tp; int tpb = tp; //Issue PointReq int tslewmin = tobsid + tpacsSlewCal; if(verbose) { debug_print("Slewing time is:" + tslewmin + "sec"); } int[] ts = nodding_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnod,chopthrow,tpa,tpb,tloadmin,nload,thold,nhold,startAtB); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); // slew time calibration WriteOBSID($OBSID); if(verbose) { debug_print("Slewing starts at :" + tNOW + " sec"); } if(choix[order] == "order1") { PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); } else { PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); } tNOW = time(); if(verbose) { debug_print("Slewing ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,chopthrow,detector); tNOW = time(); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 7) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation at NOD starts at :" + tNOW + " sec"); } WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,chopthrow,detector); tNOW = time(); if(verbose) { debug_print("Observation at NOD ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_def,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } } // End of Observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_HK_Setup { /* No variables to call PacsEng_Phot_HK_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_HK_Setup */ }{ // 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(PACS_Phot_HK_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_HK_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Spectrometer FoV Scan on the cryo cover // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 11-Mar-2008 Converted into PV script by PR // obs PacsEng_Spec_Fov_Scan { /* Needed variables to call PacsEng_Spec_FoV_Scan */ int grat_pos = 535000; // Grating position (grating is fixed) string filter_pos = "POS A" in ["POS A","POS B"]; int chop_start_pos = -23500; // Chopper start position int nb_steps_up = 310; // P#3 number of steps up int step_up = 150; // P#5 step_up: relative move up int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 2; // P#2 number of ramps on step int nb_rdouts_ramp = 64; // Ramp length used in computation of OBCP duration only int nb_samp_subramp_blu = 64; // Red Subramp length (directly connected to ramp_fit_alg) int nb_samp_subramp_red = 64; // Blue Subramp length int ramp_fit_alg = 0 in [0,1]; // Ramp fit algorithm [0=LstSq;1=mean value] /* End of needed variables for PacsEng_Spec_FoV_Scan */ }{ // Fixed Parameters int nb_steps_dn = -nb_steps_up; // P#4 number of steps down int step_dn = -step_up; // P#6 relative move down int grat_time = 15000; // Grating time int grat_def_time = 15000; // Grating default time int chop_def = 650; // Chopper default position int detector = 1; // Detector to SYNCH on int grat_def = 500000; // Grating default int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression // int chop_limit_dn = ilookup("SPEC_MEC_Limits","Nominal","chop_min"); int chop_limit_up = ilookup("SPEC_MEC_Limits","Nominal","chop_max"); int chop_max_pos = chop_start_pos + nb_steps_up * step_up; if(chop_start_pos < chop_limit_dn) { error("ERROR! chop_start_pos " + chop_start_pos + " is beyond the max allowed negative chopper throw " + chop_limit_dn); } if(chop_max_pos > chop_limit_up) { error("ERROR! chop_max_pos " + chop_max_pos + " is beyond the max allowed positive chopper throw " + chop_limit_up); } // // 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(PACS_Spec_Fov_Scan(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Fov_Scan(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : ILT at Garching // // Purpose : Monitor the behaviour of Vrl and VhBlind // as a function of the temperature variation // <=> PCD req.1.1.6. Pixel offset with temperature // // Author : Koryo Okumura // // CUS script : procedure Phot_small_Vrl_VhBlind // // Argument : // niter : Number of small blocks to repeat // nVrls : Number of VRL values to explore // lowGainTable : File name of a low gain biase table for the setting during the measurement // highGainTable : File name of a high gain biase table to reset at the end // stabilizationWaitTime : stanilization time in seconds // acquisitionTime : data acquisition duration in seconds // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is set // // Description : Small exploration of Vrl and VhBlind // // Version : Wed Nov 15 2006 // procedure Phot_small_Vrl_VhBlind_IST { int niter = 1; // Number of iterations double[] vhbs = [2.18]; // VH_BLIND values to explore double[] vrls = [0.0,0.1,0.2,0.3,0.4,0.5,0.6]; // VRL values to explore string initialBiasTable = "BOLObias_preILT_standard_low"; // Biase table file name to use during the measurement int stabilizationWaitTime = 30; // Stabilization time int acquisitionTime = 30; // Data acquisition time }{ //************************************* // Create a set of VRL values to explore //************************************* // double[] vrls = []; // for(int i = 0 .. nVrls - 1) { // vrls[i] = 0.6 * double(i) / double(nVrls - 1); // } // //********************** // Set the default biases //********************** // PHOT_set_bias_volt(initialBiasTable,1); PHOT_set_bias_volt(initialBiasTable,2); PHOT_set_bias_volt(initialBiasTable,3); PHOT_set_bias_volt(initialBiasTable,4); PHOT_set_bias_volt(initialBiasTable,5); PHOT_set_bias_volt(initialBiasTable,6); // // //************************************************************ // Sequence mode : blocking on CKRL for the mode non-hache //************************************************************ // // Set all groups bol bias 09 (CKRLH) to 2.0 volts Pacs_BOLC_SET_CKRLH_ALL(2.0); // Set all groups bol bias 10 (CKRLL) to 2.0 volts Pacs_BOLC_SET_CKRLL_ALL(2.0); // Set all groups bol bias 12 (VDECX-L) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0xc0000); // Set all groups bol bias 11 (VDECX-H) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0xb0000); // //*************************** // Sequence mode : Sb_only //*************************** // // Stop SPU PACS_Phot_SPU_Reset(); // Set seq mode Sb_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb_only"); //# P 09 01 00 02 int operand = 0x9010002; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // //************************************** // Only low gain for this reduced version //************************************** // Pacs_BOLC_SET_GAIN("LOW"); // //******************************* // Repeat as much as niter times //******************************* for(int j = 0 .. niter - 1) { TMMarker602(); // mark the beginning of an iteration //******************* // Loop over VHBlind //******************* for(int ivhb = 0 .. length(vhbs) - 1) { Pacs_BOLC_SET_VH_BLIND_G1(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G2(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G3(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G4(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G5(vhbs[ivhb]); Pacs_BOLC_SET_VH_BLIND_G6(vhbs[ivhb]); //***************** // Increment on Vrl //***************** for(int ivrl = 0 .. length(vrls) - 1) { Pacs_BOLC_SET_VRL_G1(vrls[ivrl]); Pacs_BOLC_SET_VRL_G2(vrls[ivrl]); Pacs_BOLC_SET_VRL_G3(vrls[ivrl]); Pacs_BOLC_SET_VRL_G4(vrls[ivrl]); Pacs_BOLC_SET_VRL_G5(vrls[ivrl]); Pacs_BOLC_SET_VRL_G6(vrls[ivrl]); // Wait for stabilizationWaitTime s for stabilization delay(stabilizationWaitTime); // Measurement during acquisitionTime s TMMarker601(); // mark the beginning of the acquisition delay(acquisitionTime); TMMarker600(); // mark the end of the acquisition } } } //********************** // Set the default biases //********************** // PHOT_set_bias_volt(initialBiasTable,1); PHOT_set_bias_volt(initialBiasTable,2); PHOT_set_bias_volt(initialBiasTable,3); PHOT_set_bias_volt(initialBiasTable,4); PHOT_set_bias_volt(initialBiasTable,5); PHOT_set_bias_volt(initialBiasTable,6); // //**************************** // Sequence mode : Sb-Sref //**************************** // // Stop SPU PACS_Phot_SPU_Reset(); // Set seq mode Sref_only only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb-Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); } // $Id: PacsCal_WaveCalNoChop.txt,v 1.3 2008/04/21 09:48:07 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration and instrumental profile // Author : HF // // Arguments : // // Prerequisite : PACS must be on and configured for Photometry // // Description : Uses OBCP4 for executing a parameterized // // Comments : // // Version : 0.2 // History : 0.1 29-apr-2008 VDP created // obs PacsCal_OBCP_chop_scan_phot { /* Pacs_OBCP_chop_scan_phot parameters */ int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 80; // P#2 number of readouts on step int nb_steps_up = 163; // P#3 number of steps up int nb_steps_dn = 163; // P#4 number of steps down int step_up = 287; // P#5 relative move up int step_dn = -287; // P#6 relative move down int detector = 4; // Detector to SYNCH on int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression int chop_start = -23500; // Chopper start position int chop_def = 648; // Chopper default position /* Pointing basic parameters */ int naifid = 0; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // zoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DECoff }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = 0; //Initial hold int tih = imax(1,duration(WriteOBSID($OBSID))); //Final hold int tfh = imax(1,duration(WriteEndID())); //Duration of "stable" pointing int tp = duration(Pacs_OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def)); //Use SPECTRO virtual aperture string ib = "P01_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { WriteOBSID($OBSID); data_rate(120.0); } else { if(state[0] == 3) { // Pacs_OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); } else { if(state[0] == 5) { data_rate(0.0); WriteEndID(); } } } } } // SpireTimeStr // // a procedure to convert a time into a string in the form // [nnnnn] // string procedure SpireTimeStr { int t = 0; }{ string s = ""; if(t < 10) { s = "[0000"; } else { if(t < 100) { s = "[000"; } else { if(t < 1000) { s = "[00"; } else { if(t < 10000) { s = "[0"; } } } } // return s + t + "]"; } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : SWOF Grat // // CUS author : Pierre Royer // // Version : 2.0 // // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_SWOF { /* Needed variables to call PacsEng_Spec_Gra_IST_SWOF */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_SWOF */ }{ // 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(PACS_Spec_Gra_IST_SWOF())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_SWOF(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_SFT_Cooler { /* No variables to call PacsEng_Phot_SFT_Cooler */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_SFT_Cooler */ }{ // 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(PACS_Phot_SFT_Cooler())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_SFT_Cooler(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT // // Purpose : Move chopper in open-loop mode // // Author : Markus Nielbock // CUS author : MN // // Description : This building block moves the chopper while in open-loop // mode. The parameters are assumed in ROU representing // current settings that are directly sent to the chopper. // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched on, enabled and in // open-loop mode // // Comments : // // Version : 1.0 // // History : 1.0 08-03-07 creation by MN // Begin Mode description block PACS_SPEC_Chopper_OpenLoop_MoveRel_BB PACS 433 { int chop_pos = 0; }{ // Get BBID from environment int myBBID = $BBID; // Send BBID to DMC WriteBBID(myBBID); // Moving chopper debug_print("Commanding chopper movement of " + chop_pos); Pacs_DMC_MOVE_CHOP_REL(chop_pos); // Mark End of Block WriteEndBB(); } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 4x9 raster on a point source // and the noise on a off pointing position. An offset in -Y allows to // measure the noise during the last 4 pointings. // // Author : Koryo Okumura // // Version : Tue Oct 21 21:30:06 CEST 2008 // // CUS script : procedure Phot_highGainBiasDDCS // // Argument : // string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // According to "select" set the photometer in a configuration before a raster // - ginit or binit : // + Set a filter corresponding to the given "selection" // + Set the biases group by group // + Set the chopper on the optical center // - in geberal : // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a raster measurement by the calling obs script PacsCal_Phot_highGainBiasDDCS_Fix or PacsCal_Phot_highGainBiasDDCS // - final : // + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(0, "HIGH") // procedure Phot_highGainBiasDDCS { string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values }{ if(select == "ginit") { // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //************************************************* // Set the biases and start SPU, then set the gain //************************************************* // PHOT_change_biases(startBiasTable,"DDCS","HIGH"); // //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // //********************************************************************** // Measurement // Background fluxes 1.42pW on green and 2.30pW on red //********************************************************************** // // sync the bus sync(); } if(select == "g2_0") { //*********************************************************** // Bias 1 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.75094768124925 Volts Pacs_BOLC_SET_VH_G1(1.75094768124925); // Set group 1 bol bias 02 (VL) to -0.24905231875075018 Volts Pacs_BOLC_SET_VL_G1(-0.24905231875075018); // Set group 1 bol bias 03 (VRL) to 0.3918388258383415 Volts Pacs_BOLC_SET_VRL_G1(0.3918388258383415); // Set group 1 bol bias 20 (VH_BLIND) to 1.9757719534369664 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9757719534369664); // Set group 2 bol bias 01 (VH) to 1.7296294246267632 Volts Pacs_BOLC_SET_VH_G2(1.7296294246267632); // Set group 2 bol bias 02 (VL) to -0.2703705753732367 Volts Pacs_BOLC_SET_VL_G2(-0.2703705753732367); // Set group 2 bol bias 03 (VRL) to 0.38693824560138157 Volts Pacs_BOLC_SET_VRL_G2(0.38693824560138157); // Set group 2 bol bias 20 (VH_BLIND) to 1.9712771794265684 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9712771794265684); // Set group 3 bol bias 01 (VH) to 1.7452969724184209 Volts Pacs_BOLC_SET_VH_G3(1.7452969724184209); // Set group 3 bol bias 02 (VL) to -0.2547030275815792 Volts Pacs_BOLC_SET_VL_G3(-0.2547030275815792); // Set group 3 bol bias 03 (VRL) to 0.4019047966425416 Volts Pacs_BOLC_SET_VRL_G3(0.4019047966425416); // Set group 3 bol bias 20 (VH_BLIND) to 1.9856555083999508 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9856555083999508); // Set group 4 bol bias 01 (VH) to 1.7549351960384105 Volts Pacs_BOLC_SET_VH_G4(1.7549351960384105); // Set group 4 bol bias 02 (VL) to -0.24506480396158947 Volts Pacs_BOLC_SET_VL_G4(-0.24506480396158947); // Set group 4 bol bias 03 (VRL) to 0.38892171880861637 Volts Pacs_BOLC_SET_VRL_G4(0.38892171880861637); // Set group 4 bol bias 20 (VH_BLIND) to 1.9964766297831422 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9964766297831422); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.0667806623904608 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0667806623904608); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.0097642426404527 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0097642426404527); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g2_6") { //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2256987621800386 Volts Pacs_BOLC_SET_VH_G1(2.2256987621800386); // Set group 1 bol bias 02 (VL) to -0.37430123781996166 Volts Pacs_BOLC_SET_VL_G1(-0.37430123781996166); // Set group 1 bol bias 03 (VRL) to 0.41334172597806756 Volts Pacs_BOLC_SET_VRL_G1(0.41334172597806756); // Set group 1 bol bias 20 (VH_BLIND) to 2.0192631495623288 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0192631495623288); // Set group 2 bol bias 01 (VH) to 2.1673874562213715 Volts Pacs_BOLC_SET_VH_G2(2.1673874562213715); // Set group 2 bol bias 02 (VL) to -0.4326125437786287 Volts Pacs_BOLC_SET_VL_G2(-0.4326125437786287); // Set group 2 bol bias 03 (VRL) to 0.38321731411378657 Volts Pacs_BOLC_SET_VRL_G2(0.38321731411378657); // Set group 2 bol bias 20 (VH_BLIND) to 1.989822118649329 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.989822118649329); // Set group 3 bol bias 01 (VH) to 2.196655238181291 Volts Pacs_BOLC_SET_VH_G3(2.196655238181291); // Set group 3 bol bias 02 (VL) to -0.4033447618187093 Volts Pacs_BOLC_SET_VL_G3(-0.4033447618187093); // Set group 3 bol bias 03 (VRL) to 0.41376523915084223 Volts Pacs_BOLC_SET_VRL_G3(0.41376523915084223); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974223811023644 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974223811023644); // Set group 4 bol bias 01 (VH) to 2.218046432212362 Volts Pacs_BOLC_SET_VH_G4(2.218046432212362); // Set group 4 bol bias 02 (VL) to -0.38195356778763806 Volts Pacs_BOLC_SET_VL_G4(-0.38195356778763806); // Set group 4 bol bias 03 (VRL) to 0.40418226637506666 Volts Pacs_BOLC_SET_VRL_G4(0.40418226637506666); // Set group 4 bol bias 20 (VH_BLIND) to 2.0115372929968998 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0115372929968998); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.0718745871509667 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0718745871509667); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.002949534142909 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002949534142909); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "g3_0") { //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.630480092102173 Volts Pacs_BOLC_SET_VH_G1(2.630480092102173); // Set group 1 bol bias 02 (VL) to -0.369519907897827 Volts Pacs_BOLC_SET_VL_G1(-0.369519907897827); // Set group 1 bol bias 03 (VRL) to 0.43563232543788716 Volts Pacs_BOLC_SET_VRL_G1(0.43563232543788716); // Set group 1 bol bias 20 (VH_BLIND) to 1.9970659739489551 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9970659739489551); // Set group 2 bol bias 01 (VH) to 2.540806848783851 Volts Pacs_BOLC_SET_VH_G2(2.540806848783851); // Set group 2 bol bias 02 (VL) to -0.459193151216149 Volts Pacs_BOLC_SET_VL_G2(-0.459193151216149); // Set group 2 bol bias 03 (VRL) to 0.3915670429941497 Volts Pacs_BOLC_SET_VRL_G2(0.3915670429941497); // Set group 2 bol bias 20 (VH_BLIND) to 1.9980729055318742 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9980729055318742); // Set group 3 bol bias 01 (VH) to 2.566432198930704 Volts Pacs_BOLC_SET_VH_G3(2.566432198930704); // Set group 3 bol bias 02 (VL) to -0.4335678010692957 Volts Pacs_BOLC_SET_VL_G3(-0.4335678010692957); // Set group 3 bol bias 03 (VRL) to 0.4115794454004439 Volts Pacs_BOLC_SET_VRL_G3(0.4115794454004439); // Set group 3 bol bias 20 (VH_BLIND) to 1.995245288255046 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995245288255046); // Set group 4 bol bias 01 (VH) to 2.6034961033850488 Volts Pacs_BOLC_SET_VH_G4(2.6034961033850488); // Set group 4 bol bias 02 (VL) to -0.39650389661495106 Volts Pacs_BOLC_SET_VL_G4(-0.39650389661495106); // Set group 4 bol bias 03 (VRL) to 0.4162615057139231 Volts Pacs_BOLC_SET_VRL_G4(0.4162615057139231); // Set group 4 bol bias 20 (VH_BLIND) to 2.001247804904634 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001247804904634); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.0194454064367697 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0194454064367697); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 1.997491742243546 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.997491742243546); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "binit") { //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // //************************************************* // Set the biases and start SPU, then set the gain //************************************************* // PHOT_change_biases(startBiasTable,"DDCS","HIGH"); // //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // //********************************************************************** // Measurement // Background fluxes 2.53pW on blue and 2.30pW on red //********************************************************************** // // sync the bus sync(); } if(select == "b2_0") { //*********************************************************** // Bias 1 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.75094768124925 Volts Pacs_BOLC_SET_VH_G1(1.75094768124925); // Set group 1 bol bias 02 (VL) to -0.24905231875075018 Volts Pacs_BOLC_SET_VL_G1(-0.24905231875075018); // Set group 1 bol bias 03 (VRL) to 0.3918388258383415 Volts Pacs_BOLC_SET_VRL_G1(0.3918388258383415); // Set group 1 bol bias 20 (VH_BLIND) to 1.9757719534369664 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9757719534369664); // Set group 2 bol bias 01 (VH) to 1.7296294246267632 Volts Pacs_BOLC_SET_VH_G2(1.7296294246267632); // Set group 2 bol bias 02 (VL) to -0.2703705753732367 Volts Pacs_BOLC_SET_VL_G2(-0.2703705753732367); // Set group 2 bol bias 03 (VRL) to 0.38693824560138157 Volts Pacs_BOLC_SET_VRL_G2(0.38693824560138157); // Set group 2 bol bias 20 (VH_BLIND) to 1.9712771794265684 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9712771794265684); // Set group 3 bol bias 01 (VH) to 1.7452969724184209 Volts Pacs_BOLC_SET_VH_G3(1.7452969724184209); // Set group 3 bol bias 02 (VL) to -0.2547030275815792 Volts Pacs_BOLC_SET_VL_G3(-0.2547030275815792); // Set group 3 bol bias 03 (VRL) to 0.4019047966425416 Volts Pacs_BOLC_SET_VRL_G3(0.4019047966425416); // Set group 3 bol bias 20 (VH_BLIND) to 1.9856555083999508 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9856555083999508); // Set group 4 bol bias 01 (VH) to 1.7549351960384105 Volts Pacs_BOLC_SET_VH_G4(1.7549351960384105); // Set group 4 bol bias 02 (VL) to -0.24506480396158947 Volts Pacs_BOLC_SET_VL_G4(-0.24506480396158947); // Set group 4 bol bias 03 (VRL) to 0.38892171880861637 Volts Pacs_BOLC_SET_VRL_G4(0.38892171880861637); // Set group 4 bol bias 20 (VH_BLIND) to 1.9964766297831422 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9964766297831422); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.0667806623904608 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0667806623904608); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.0097642426404527 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0097642426404527); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b2_6") { //*********************************************************** // Bias 2 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2256987621800386 Volts Pacs_BOLC_SET_VH_G1(2.2256987621800386); // Set group 1 bol bias 02 (VL) to -0.37430123781996166 Volts Pacs_BOLC_SET_VL_G1(-0.37430123781996166); // Set group 1 bol bias 03 (VRL) to 0.41334172597806756 Volts Pacs_BOLC_SET_VRL_G1(0.41334172597806756); // Set group 1 bol bias 20 (VH_BLIND) to 2.0192631495623288 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0192631495623288); // Set group 2 bol bias 01 (VH) to 2.1673874562213715 Volts Pacs_BOLC_SET_VH_G2(2.1673874562213715); // Set group 2 bol bias 02 (VL) to -0.4326125437786287 Volts Pacs_BOLC_SET_VL_G2(-0.4326125437786287); // Set group 2 bol bias 03 (VRL) to 0.38321731411378657 Volts Pacs_BOLC_SET_VRL_G2(0.38321731411378657); // Set group 2 bol bias 20 (VH_BLIND) to 1.989822118649329 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.989822118649329); // Set group 3 bol bias 01 (VH) to 2.196655238181291 Volts Pacs_BOLC_SET_VH_G3(2.196655238181291); // Set group 3 bol bias 02 (VL) to -0.4033447618187093 Volts Pacs_BOLC_SET_VL_G3(-0.4033447618187093); // Set group 3 bol bias 03 (VRL) to 0.41376523915084223 Volts Pacs_BOLC_SET_VRL_G3(0.41376523915084223); // Set group 3 bol bias 20 (VH_BLIND) to 1.9974223811023644 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9974223811023644); // Set group 4 bol bias 01 (VH) to 2.218046432212362 Volts Pacs_BOLC_SET_VH_G4(2.218046432212362); // Set group 4 bol bias 02 (VL) to -0.38195356778763806 Volts Pacs_BOLC_SET_VL_G4(-0.38195356778763806); // Set group 4 bol bias 03 (VRL) to 0.40418226637506666 Volts Pacs_BOLC_SET_VRL_G4(0.40418226637506666); // Set group 4 bol bias 20 (VH_BLIND) to 2.0115372929968998 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0115372929968998); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.0718745871509667 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0718745871509667); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.002949534142909 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002949534142909); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "b3_0") { //*********************************************************** // Bias 3 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.630480092102173 Volts Pacs_BOLC_SET_VH_G1(2.630480092102173); // Set group 1 bol bias 02 (VL) to -0.369519907897827 Volts Pacs_BOLC_SET_VL_G1(-0.369519907897827); // Set group 1 bol bias 03 (VRL) to 0.43563232543788716 Volts Pacs_BOLC_SET_VRL_G1(0.43563232543788716); // Set group 1 bol bias 20 (VH_BLIND) to 1.9970659739489551 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9970659739489551); // Set group 2 bol bias 01 (VH) to 2.540806848783851 Volts Pacs_BOLC_SET_VH_G2(2.540806848783851); // Set group 2 bol bias 02 (VL) to -0.459193151216149 Volts Pacs_BOLC_SET_VL_G2(-0.459193151216149); // Set group 2 bol bias 03 (VRL) to 0.3915670429941497 Volts Pacs_BOLC_SET_VRL_G2(0.3915670429941497); // Set group 2 bol bias 20 (VH_BLIND) to 1.9980729055318742 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9980729055318742); // Set group 3 bol bias 01 (VH) to 2.566432198930704 Volts Pacs_BOLC_SET_VH_G3(2.566432198930704); // Set group 3 bol bias 02 (VL) to -0.4335678010692957 Volts Pacs_BOLC_SET_VL_G3(-0.4335678010692957); // Set group 3 bol bias 03 (VRL) to 0.4115794454004439 Volts Pacs_BOLC_SET_VRL_G3(0.4115794454004439); // Set group 3 bol bias 20 (VH_BLIND) to 1.995245288255046 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.995245288255046); // Set group 4 bol bias 01 (VH) to 2.6034961033850488 Volts Pacs_BOLC_SET_VH_G4(2.6034961033850488); // Set group 4 bol bias 02 (VL) to -0.39650389661495106 Volts Pacs_BOLC_SET_VL_G4(-0.39650389661495106); // Set group 4 bol bias 03 (VRL) to 0.4162615057139231 Volts Pacs_BOLC_SET_VRL_G4(0.4162615057139231); // Set group 4 bol bias 20 (VH_BLIND) to 2.001247804904634 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.001247804904634); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.0194454064367697 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0194454064367697); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 1.997491742243546 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.997491742243546); // Wait for 60 s for stabilization delay(60); // Now start a raster // // sync the bus sync(); } if(select == "final") { //******************************** // Epilogue : Set the end biases //******************************** PHOT_change_biases(endBiasTable,"DIRECT","LOW"); // // sync the bus sync(); } } // CVS comments : $Id: PacsMessageCenter.txt,v 1.3 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : // // CUS author : // Script file : PacsMessageCenter.txt // // Input arguments // type name description // // Return values // Type Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 2-Sep-2005 DAC // 13-oct-2005 Try different HTML directives procedure PacsMessageCenter { string who = "From where"; // who issues the message(s) int nbRows = 0; // number of rows string[] msgLine = ["Line1"]; // one line of text }{ // No empty messages! if(nbRows > 0) { message("

    " + who + "

    "); // message(" "); for(int rows = 0 .. nbRows - 1) { // message("

    " + msgLine[rows] + "

    "); message(msgLine[rows]); } } } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.9 Measure time constants after cosmic ray impact // // Author : Koryo Okumura // // Version : Oct 29 2008 // // CUS script : mode PacsCal_Phot_glitch // // Argument : // string biasTable = "BOLObias_standard_low"; // Bias table // string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements // int measureTime = 1200; // Measurement duration in seconds // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0s // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // // Check before executing : // + Bolometer is already normally operating // // Description : OBS script to execute PacsCal_Phot_glitch // // Dependencies : None // // Comments : None // obs PacsCal_Phot_glitch { string biasTable = "BOLObias_standard_low"; // Bias table string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements int measureTime = 1400; // Measurement duration in seconds double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0s string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks string calGain = "NO_CHANGE" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "NO_CHANGE" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per plateau bool verbose = true; }{ // Bus configuration for the Burst mode (7) busconfig (7); // Several arguments needed for "basic_fine_pointing" int nRdts = readouts_plateau - 1; //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal // int timeOBSID = imax(1, duration(WriteOBSID($OBSID))+ duration(data_rate(300.0))); // int timeEndID = imax(1, duration(data_rate(0.0))+ duration(WriteEndID())); int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = 0; int timeChgBias0 = duration(PHOT_change_biases(biasTable,"NO_CHANGE","NO_CHANGE")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"HIGH",3,3,false)); //Minimum slew time if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT","LOW")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"LOW")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } int tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeChgBias + timeCal3CPR5 + timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_glitch(biasTable,gain,measureTime)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(300.0); // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // No biases setting here because nothing changes //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } //******************************** // Call the Phot_glitch //******************************** Phot_glitch(biasTable,gain,measureTime); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","LOW"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"LOW"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // File : PACS_Spec_FlashHeat_Diaghk_Setup.cus // Missionphase : PACS FM ILT tests // // Purpose : Switch on diagnostic hk relevant to Flashers & Heaters // // Author : P. Royer // // Arguments : // // Description : Flashers & Heaters diagnostic housekeeping ON // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jul-2006 creation // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Switch on diagnostic housekeeping relevant to Flashers & Heaters // @comment - // block PACS_Spec_FlashHeat_Diaghk_Setup PACS 173 { int diag_hk_period = 100; // 1: synch w/ BLUE DET 2: synch w/ RED DET >4: period in ms 0: 1KHz (not to use w/ science) }{ // Register start of BB WriteBBID($BBID); // DMC_WRT_DIAG_HK_LIST // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_DECB_FLASH_C 315 // DMC_DECB_FLASH_V 316 // DMC_DECR_FLASH_C 383 // DMC_DECR_FLASH_V 384 // DMC_DECB_HEAT_C 281 // DMC_DECB_HEAT_V 282 // DMC_DECR_HEAT_C 349 // DMC_DECR_HEAT_V 350 {int}[] list_tuple = [{315},{316},{383},{384},{281},{282},{349},{350},{0xffff}]; int[] list_int = [315,316,383,384,281,282,349,350,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // End of procedure //------------------ } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_HK_Setup { /* No variables to call PacsEng_Spec_HK_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_HK_Setup */ }{ // 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(PACS_Spec_HK_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_HK_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_CRE_Setup_Cold { /* No variables to call PacsEng_Spec_CRE_Setup_Cold */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_Setup_Cold */ }{ // 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(PACS_Spec_CRE_Setup_Cold())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_CRE_Setup_Cold(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script file : SPEC_dpu_dmc_setup.cus // Missionphase : // // Purpose : Prepare DPU and DMC for spectrometry // // TCL author : N/A // TCL file : N/A // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will set the DPU HK list, write and set the // FPGA timing parameters (if necessary), sforward data // to the packet encoder and validate the sciece data // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 3-jul-2006 DAC; based on TM's list // 0.2 16-nov-2006 Reviewed for inclusion in OpDataBase; // Moved input argument to body // 1.0 15-jan-2008 Script renamed *txt for PV database, added // demanded TC as per SCR-0797 // 1.1 15-Jul-2008 new IA_CHOP address procedure SPEC_dpu_dmc_setup { }{ // Set HK list string hk_list = "BOTH Array"; Pacs_DPU_SET_HK_LIST("SPEC",hk_list); // Add chop_ia information as per SCR-0797 // Description of DMC_WRT_DIAG_HK_CONF_TAB from DEC/MEC User Manual: // // Custom Hk Configuration Table : This buffer contains configuration data // allowing us to increase the number of available HK measure without // recompiling the application. The table is composed of 10 entries each of // them being 5 words long : //1. the address of the memory area to monitor // int f1 = 0x3469f; int f1 = 0x346ab; //2. the size (in words) of the memory area to monitor int f2 = 0x1; //3. the size (in bytes) of the memory area to monitor int f3 = 0x2; //4. a pointer to a function performing the monitoring (if you want to use this // field, it is highly probable that you need to patch your code anyway to // upload the new monitoring function). int f4 = 0x0; //5. the validity at startup (0 = invalid, 1 = valid) int f5 = 0x1; // All the fields are initialized to zero at startup. (for advanced users only) {int}[] params = [{f1},{f2},{f3},{f4},{f5}]; int[] forsum = [f1,f2,f3,f4,f5]; int check_sum = checksum("int",forsum); int wrdLen = 5; Pacs_DMC_WRT_DIAGHK_CONF_TAB(wrdLen,params,check_sum); //------------------------------------------------- // Stop forwarding data to packet encoder //------------------------------------------------- // Don't forward data to Packet Encoder int aux0 = 4; params = [{aux0}]; check_sum = checksum("int",[aux0]); Pacs_DMC_WRT_BOL_REC_OPT(params,check_sum); // DMC_WRT_B_DEC_REC_OPT: Blue DEC receiver options aux0 = 4; params = [{aux0}]; check_sum = checksum("int",[aux0]); Pacs_DMC_WRT_B_DEC_REC_OPT(params,check_sum); aux0 = 4; params = [{aux0}]; check_sum = checksum("int",[aux0]); Pacs_DMC_WRT_R_DEC_REC_OPT(params,check_sum); // Write and set FPGA timing parameters (if necessary) // DMC_WRT_TIMING_FPGA_PAR(see DEC UM Section 4.2.1.3) // USe SPEC values int[] aux = [0x0,0x0,0x0,26,0x95217cb,0xb]; check_sum = checksum("int",aux); {int}[] parlist = Array2grp_1(aux); Pacs_DMC_WRT_TIMING_FPGA_PAR(parlist,check_sum); // DMC_SET_TIMING_FPGA_PAR: Copy parameters set by WRT_TIMING to registers Pacs_DMC_SET_TIMING_FPGA_PAR(); } // // Purpose : Exercise OBCP for chopper scan in photometry // // // // TCL author : N/A // TCL file : N/A // CUS author : TM // Script file : OBCP_chop_scan_phot_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise OBCP for chopper scan in photometry // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version 1.0 // History 0.1 09-oct-2006 TM // 0.2 10-nov-2006 Calls PHOT_spu_reset (used to be PACS_spu_reset) // 1.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_OBCP_chop_scan_phot { int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 80; // P#2 number of readouts on step int nb_steps_up = 163; // P#3 number of steps up int nb_steps_dn = 163; // P#4 number of steps down int step_up = 287; // P#5 relative move up int step_dn = -287; // P#6 relative move down int detector = 4; // Detector to SYNCH on int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression int chop_start = -23500; // Chopper start position int chop_def = 648; // Chopper default position }{ // Register with environment // Start SPU int nraw_blu = 0; int nraw_red = 0; PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_chop_scan_phot with default parameters debug_print("Start OBCP_chop_scan_phot"); int[] duree = OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); delay(2); debug_print("Duration from OBCP_chop_scan_phot:" + duree); // // Position the filter wheel at POS B and repeat everything // PHOT_fltw_move("POS B"); // // Perform OBCP_chop_scan_phot with default parameters debug_print("Start OBCP_chop_scan_phot"); duree = OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); delay(2); debug_print("Duration from OBCP_chop_scan_phot:" + duree); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Stop SPU // PHOT_spu_reset(); // Leave environment } // SpireMsg // // $id$ // // Output a string as a message and optionally as a debug string // // This procedure allows message strings to be output to the debug_print // stream as well as the message stream. This allows the developer to // see messages even if the calling procedure stops or crashes before // it ends // procedure SpireMsg { int level = 0 in [0,5]; // message level string msg = ""; }{ int debugLevel = -1; // debug level - all messages with a level <= to this are out put to the debug_print stream // // output message message("" + level + msg); // // output debug string, if required if(level <= debugLevel) { debug_print(msg); } } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Template for a PHOT AOT with chopped nodding in raster // OBCP used: OBCP_chopped_photometry (OBCP#3) // Calls nodding_raster_pointing (3.6 in Point document) // Author : DAC // // Arguments : See input list below // // Prerequisite : PACS is PHOT ready (PHOT_orbit_prologue), SPU is stopped // and ready to be (re)configured. // // Description : Uses OBCP3 // Comments : // // Version : 0.1 // History : 0.1 18-feb-2008 DAC // 0.2 19-feb-2008 - Use PacsPhotSlewCal // - Read more input parameters // obs PacsCal_PHOT_NodRaster { /* Needed variables to call PHOT_NodRaster */ string fltPOS = "POS A" in ["POS A","POS B"]; // Fltw position double chopthrow = 30.0; // Chop throw [arcsec] string gain = "LOW" in ["LOW","HIGH"]; // BOLC gain /* */ /* OBCP related parameters */ /* */ /* PHOT compression modes */ /* 0x00 BOL0: Default */ /* 0x01 BOL1: Double Compression */ /* 0x02 BOL2: Half Compression */ /* 0x04 BOL4: Lossless Compression */ /* 0x07 BOL7: Transparent */ /* 0x09 BOL9: Buffer Transmission */ int comp_mode_blu = 0x0; // Compression mode int comp_mode_red = 0x0; // Compression mode int nraw_blu = 3; // Number of raw pixels int nraw_red = 3; // Number of raw pixels int nb_SRC_REF = 2; // Nb of SRC-REF1-SRC-REF2 cycles int nb_rd_plateau = 31; // Nb rdouts/plateau (4*nn - 1) int nb_cycles_obs_cal = 1; // Outermost DMC loop int nb_CS1_CS2 = 0; // Loop on CSs /* Pointing parameters */ /* The ofssets are passed directly to the PointReq. Unless changed the */ /* telecope boresight will fall in between SRC and REF */ double yoffset = 0.0; // yoffset [arcsec] used as is in PntReq double zoffset = 0.0; // zoffset [arcsec] used as is in PntReq double ra = 0.0; // RA (returned by xHPOT pop-up window) double dec = 0.0; // DEC (ditto) /* Raster parameters */ int m = 2 in [2,100]; // Number of raster points int n = 1 in [1,100]; // Number of raster lines double d1 = 2.0 in [2.0,480.0]; // Raster point step [arcsec] double d2 = 2.0 in [2.0,480.0]; // Raster line separation [arcsec] bool fixed = false; // Raster in S/C or SKY coordinates double nodthrow = 30.0 in [2.0,960.0]; // Nod throw [arcsec] double patt = 0.0; // Raster pattern orientation double pattnod = 270.0; // Nodding orientation (def: along y-axis) int nnod = 1; // Number of Aa aA ... nods /* NOTE: raster size shall not be larger than 14880x14880 arcsec */ /* Overall "verbosity" */ bool verbose = true; }{ // Compute duration of tasks to be performed during slew to source // Set OBSID int timeOBSID = duration(WriteOBSID($OBSID)); // Condition BOLC to gain setting. This may change the data rate but SPU // is still stopped and a proper comp_mode may be defined // Can I set the gain directly (Thomas says "yes") int timeGAIN = duration(PHOT_set_gain(gain)); // Use PacsPhotSlewCal from AOT code. Define three input tuples // SPU-like parameters {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,comp_mode_blu,0,nraw_blu,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,comp_mode_red,0,nraw_red,0,0,0,0,0}]; // OBCP-like values (none is used since SlewCal takes them from OBCP$params) {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Perform the calibration block now // Cal block uses filter blue1 (posA) and blue2 (posB) string filter = "blue1"; if(fltPOS == "POS B") { filter = "blue2"; } bool doProlog = true; int timeCAL = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter)); // // Before dealing with the OBCP, obtain the chopper position for CS1 & CS2 // (likely not to be used here, but just for completeness) int chop_pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); // The chopper moves from -chopthrow/2 to +chopthrow/2 [arcsec] double auxSRC = -chopthrow / 2.0; double auxREF = +chopthrow / 2.0; int chop_pos_SRC = PacsReadChopSky("PHOT_CHOP_sky",auxSRC); int chop_pos_REF = PacsReadChopSky("PHOT_CHOP_sky",auxREF); // Report settings if verbose if(verbose) { debug_print("+++CHOPPER, SRC: " + auxSRC + " [arcsec] -> " + chop_pos_SRC + " [ENG]"); debug_print("+++CHOPPER, REF: " + auxREF + " [arcsec] -> " + chop_pos_REF + " [ENG]"); } // Default position for chopper int chop_def = ilookup("SPEC_MEC_Defaults","Photometry","chopper"); // Duration of OBCP to be performed ON and NOD int tp = duration(OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def)); if(verbose) { debug_print("Duration of OBCP " + tp + " [sec]"); } // tp cannot be shorted than 10 sec if(tp < 10) { error("The OBCP cannot be shorter than 10 sec; adjust your OBCP parameters"); } // // Several arguments needed for "nodding_raster_pointing" // //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = timeOBSID + timeGAIN + timeCAL; if(verbose) { debug_print("+++SlewMinTime is " + tslewmin + " [sec]"); } //Initial hold int tih = 0; //Final hold // Need 1 sec to WriteEndID() and close OBS int tfh = 1; //Use PHOT virtual aperture string ib = "P01_0"; //Non-solar source int naifid = 0; //Issue PointReq // Still undefined pointing variables // Number of points/scan lines before going to OFF int k = 0; // Number of nods/raster/scan before performing a hold int nhold = 0; // Duration of a hold operation int thold = 0; // Time spent at OFF int top = 0; // Coordinates of OFF position double raoff = 0.0; double decoff = 0.0; // Repetitions of pattern int nrepeat = 1; // The minimum duration of return slew between repetitions int trepeatmin = 0; // Minimum duration of a "load" operation int tloadmin = 0; // Number of slews before starting a "load" slew int nload = 0; // Issue de PointReq int[] ts = nodding_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodthrow,nnod,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID, move filter, set gain, perform prologue WriteOBSID($OBSID); data_rate(120.0); PHOT_set_gain(gain); PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the OBCP with the known parameters OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } if(state[0] == 7) { tNOW = time(); if(verbose) { debug_print("NOD starts at " + tNOW); } // Call the OBCP with the same parameters as for POINT OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); tNOW = time(); if(verbose) { debug_print("NOD ends at " + tNOW); } } } } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : SWON Grat // // CUS author : Pierre Royer // Version : 2.0 // // // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_SWON { /* Needed variables to call PacsEng_Spec_Gra_IST_SWON */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_SWON */ }{ // 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(PACS_Spec_Gra_IST_SWON())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_SWON(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS AVM ILT // // Purpose : Select the sequence mode // // Author TCL : T. Mueller // Author CUS : DAC // // Arguments : none // // // Description : This script will select the sequence mode for the bolometers // After executing the sequencer setup the default sequencer // mode is "Sb-Sref" // // Comments : Coded based on PhFPU UM, Draft 2, March 31, 2004 // // Version : 1.0 19-apr-2005 (based on v1.0 of TM, 20-apr-2004) // History : 1.0 // // Purpose : Select the sequencer mode // // Arguments // type name default Description // string seq_mode "Sb_Sref" // int[] procedure PHOT_change_seq_mode { string seq_mode = "Sb_Sref" in ["Sb_Sref","Sb_only","Sref_only","Sb_Sref_diff","Sb_Sref_unip_pos","Sb_Sref_unip_neg"]; // Sequencer mode }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); //------------------------------------------------ // SET BOLC SEQ MODE //------------------------------------------------ Pacs_BOLC_SET_SEQ_MODE(seq_mode); //----------------- // End of Procedure // Time spent int duree_TCs = time() - time_start; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 16-oct-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_CRE_1pF0bias_Setup_Warm { /* No variables to call PacsEng_Spec_CRE_1pF0bias_Setup_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_1pF0bias_Setup_Warm */ }{ // 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(PACS_Spec_CRE_1pF0bias_Setup_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_CRE_1pF0bias_Setup_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpireNullObsid // // $Id: SpireNullObsid.txt,v 1.1 2006/08/10 09:38:58 kking Exp $ // // A procedure to return the value of the null OBSID for this observation. // This entails taking the current OBSID and zeroing the lowest 28 bits // leaving the location bits in place. // // int procedure SpireNullObsid { }{ message("4 " + time() + ": NuLL_OBSID started"); message("4 $Id: SpireNullObsid.txt,v 1.1 2006/08/10 09:38:58 kking Exp $"); message("3 OBSID = " + $OBSID); // int obsId = $OBSID & 0xf0000000; // message("3 SpireNullObsid = " + obsId); message("4 " + time() + ": SpireNullObsid ended"); // return obsId; } // CVS comments : $Id: PacsPhotNoiseRMS.txt,v 1.6 2007/04/25 15:14:04 dcesarsk Exp $ // CVS file : PacsPhotNoiseRMS.txt // // Purpose : Returns minimum detectable flux [mJy] for S/N=1 // // Author : Diego A. Cesarsky // CUS script : DAC // // Arguments : pointCase // filterID // time_on // // Description : Noise computation based on sensitivity for time_on = 1 [sec] // // Dependencies : // // Preconditions : // // Comments : Based on D. Lutz's "Guesstimator.pro" // Newer version based on Alpog's 22-may-2006 e-mail // // Version : 0.1 6-Dec-2004 Creation by DAC // History : 0.2 4-sep-2006 // - Use new PHOTnoise table (based on alpog's e-mail 22-may-2006). // - Accept PointCase (may need it for SRC,REF considerations) // 0.3 10-oct-2006 SPR-2378 // - the factors sqrt(2) in point source and scan map mode // and and 1/sqrt(2) in small and large raster shall be removed, // as these factors are already taken into account in the values provided // by Albrecht Poglitsch (photometer_noise.txt) to account for (chopped) // background subtraction, where TIME is the pure "science time" // 1.0 3-nov-2006 Compute also extended source RMS reading updated // PHOTnoise CAL-U table; module returns now 4 values: // rms[0], rms[1] : point source BLU and RED // rms[2], rms[3] : extended source BLU and RED // : double[] procedure PacsPhotNoiseRMS { int pointCase = 21; // The PointCase code of PacsPhoto string filter = "blue1" in ["blue1","blue2"]; // Filter ID double intTIME = 1.0; // ON source time [sec] }{ // Sensitivity [Jy] per filter, i.e. flux for which S/N=1 is obtained in 1 sec // assuming the source is always seen on the detector (excludes the noise // from 'off' subtraction) string calU = "PHOTnoise"; // Point Source. Here the SRC is always in view if(pointCase == 11 || pointCase == 12) { double sensRED = dlookup(calU,"red","point"); double sensBLU = dlookup(calU,filter,"point"); // Compute "noise" after intTIME [sec] of integration [mJy] double pntRMSred = 1000.0 * sensRED / sqrt(intTIME); double pntRMSblu = 1000.0 * sensBLU / sqrt(intTIME); double extRMSred = 0.0; double extRMSblu = 0.0; } // Small source or raster map. Here the SRC is in view 1/2 time if(pointCase == 21 || pointCase == 22 || pointCase == 31 || pointCase == 32) { // Point source sensRED = dlookup(calU,"red","small"); sensBLU = dlookup(calU,filter,"small"); // Extended source double extsensRED = dlookup(calU,"red","EXTsmall"); double extsensBLU = dlookup(calU,filter,"EXTsmall"); // Compute "noise" after intTIME [sec] of integration [mJy] pntRMSred = 1000.0 * sensRED / sqrt(intTIME); pntRMSblu = 1000.0 * sensBLU / sqrt(intTIME); extRMSred = extsensRED / sqrt(intTIME); extRMSblu = extsensBLU / sqrt(intTIME); } // Scan mode. Here the SRC is always in view if(pointCase == 33) { // Point source sensRED = dlookup(calU,"red","scan"); sensBLU = dlookup(calU,filter,"scan"); // Extended source extsensRED = dlookup(calU,"red","EXTscan"); extsensBLU = dlookup(calU,filter,"EXTscan"); // Compute "noise" after intTIME [sec] of integration [mJy] pntRMSred = 1000.0 * sensRED / sqrt(intTIME); pntRMSblu = 1000.0 * sensBLU / sqrt(intTIME); extRMSred = extsensRED / sqrt(intTIME); extRMSblu = extsensBLU / sqrt(intTIME); } return [pntRMSred,pntRMSblu,extRMSred,extRMSblu]; } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.9 Measure time constants after cosmic ray impact // // Author : Koryo Okumura // // Version : Oct 29 2008 // // CUS script : procedure Phot_glitch // // Argument : // string biasTable = "BOLObias_standard_high" : Bias table file name containing the initial values // string gain = "LOW" in ["LOW","HIGH"] : gain used during the measurements // int mesureTime = 1200 : Measurement duration in seconds // // Check before executing : // + Bolometer is already normally operating // // Description : // + All the biases are set group by group // + Set the direct mode // + Data acquisition in buffer transmission mode and in burst mode // // Dependencies : None // // Comments : None // procedure Phot_glitch { string biasTable = "BOLObias_standard_low"; // Bias table file name containing the initial values string gain = "LOW" in ["LOW","HIGH"]; // gain used during the measurements int measureTime = 1200; // Measurement duration in seconds }{ // //******************************* // Select Filter A (100 microns) //******************************* PHOT_fltw_move("POS A"); // //******************************* // Bias setting of the detectors //******************************* // PHOT_change_biases(biasTable,"DIRECT",gain); // // Set the PACS chopper at the central position // Pacs_DMC_MOVE_CHOP_ABS(664); // //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("ENABLE"); // // Set SPU to the default mode PHOT_spu_setup(9,9,0,0,true); delay(measureTime); // // Stop SPU PHOT_spu_setup(0,0,0,0,true); //************************ // Set DPU for Burst mode //************************ Pacs_DPU_SET_BUS_LIST("DISABLE"); // // Sychronize // sync(); } // Script file : PACS_Spec_Gra_IST_Check_4_OBS.cus // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating (incl Homing), enable & disable the grating after 2 relative movements. // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV - added MOIS comments // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // procedure Pacs_Spec_Gra_IST_Check_4 { }{ // Register start of OBS mois_comment("Start of procedure: home & perform a few movements"); // debug_print("Configure Nominal SPEC_HK"); mois_step("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // debug_print("Configure DIAG_HK"); mois_step("Configure DIAG_HK"); PACS_Spec_Gra_Diaghk1khz_Setup(); // debug_print("Configure/Enable/Home/Move/Disable Grating"); mois_step("Configure/Enable/Disable Grating"); string calUname = "CONFGrat"; string calUrow = "IST"; PACS_Spec_Gra_Cont_Check_4(calUname,calUrow); // mois_comment("Reset DIAG_HK"); debug_print("Reset DIAG_HK"); PACS_Diaghk_Reset(); // debug_print("PACS to SAFE MODE"); mois_comment("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // File : CONF_grating.cus // Missionphase : PACS FM ILT // // Purpose : Prepare grating mechanism // // Author : P. Royer // // Arguments : CALIBRATION TABLE (CONFGrat) // ROW of CALU table (CONFGrat) // Row of this table = instrument version // // Description : This script will switch on and set all required // parameters for the grating // // Comments : // // Version : 1.0 // History : 1.0 / 13-Jun-2006 created from a non-calu-using script // 1.1 / 08-Nov-2006 Additional delay after setting the inductosyn amplitude // 1.2 / 09-Nov-2006 Homing always occurs with a rate of 3 (1 deg/sec), the rate is only set after // 1.2.1 17-nov-2006 Homing mode to 0 // 1.2.2 29-nov-2006 Homing mode to 1 // 1.2.3 30-nov-2006 Homing back to 0 // procedure CONF_grating { string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "ISTSafe"; // INSTRUMENT VERSION }{ // // Grating home mode: 0 = move to neg. positions; 1 = move to pos. positions int grat_home_mode = 0; // Grating central position (rough) int grat_center_pos = 500000; // //---------------------- // CONTROLLER PARAMETERS 1. Force A SAFE HOMING RATE (3) //---------------------- // int homing_mode_rate = 1; PACS_Spec_Gra_Set_Ctrl_Par(calUname,calUrow,homing_mode_rate); // //---------------------- // ADDITIONAL PARAMETERS //---------------------- // // ADDITIONAL PARAMS : 1. GRATING INDUCTOSYN AMPLITUDE // int induct_ampl = ilookup(calUname,calUrow,"InductAmpl"); {int}[] list_tuple = [{induct_ampl}]; int[] list_int = [induct_ampl]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 2. HALL SENSOR OFFSET // int hall_offset = ilookup(calUname,calUrow,"HallOffset"); list_tuple = [{hall_offset}]; list_int = [hall_offset]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_HALLOFFSET(list_tuple,chksum); delay(1); // // ADDITIONAL PARAMS : 3. GRATING RANGE // int range = ilookup(calUname,calUrow,"Range"); list_tuple = [{range}]; list_int = [range]; chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_RANGE(list_tuple,chksum); delay(1); // // DELAY NECESSARY FOR FM ILT (CAN BE SUPPRESSED IN FLIGHT, when correct value is defaulted in OBSW) // NECESSARY WAIT TIME AFTER SETTING THE AMPLITUDE // delay(180); // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(1); // // ---------------- // HOME THE GRATING // ---------------- // Search for the origin and initialize the position encoder correctly // PARAM: 0 = move towards negative positions; // 1 = move towards positive positions; // Duration: max 70 sec (if the Grating param 'rate' is 3), // depending on the initial position of the grating. // Failure code: 0xAA: Grating controller is not enabled // string[] homeMode = ["NEGATIVE","POSITIVE"]; Pacs_DMC_HOME_GRAT(homeMode[grat_home_mode]); delay(70); // //---------------------- // CONTROLLER PARAMETERS 2. USE RATE FROM THE CHOSEN CALIBRATION TABLE //---------------------- // homing_mode_rate = 0; PACS_Spec_Gra_Set_Ctrl_Par(calUname,calUrow,homing_mode_rate); delay(1); // //------------------------- // End of Procedure //------------------------- } // Script file : PACS_Spec_Gra_IST_Check_1_OBS.cus // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating, enable & disable the grating after a few seconds. // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV Added MOIS comments // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax procedure Pacs_Spec_Gra_IST_Check_1 { }{ mois_comment("Start of procedure: Configure the grating and enable for 5s (no homing)"); // Register start of OBS // mois_step("Configure Nominal SPEC_HK"); debug_print("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // mois_step("Configure DIAG_HK"); debug_print("Configure DIAG_HK"); PACS_Spec_Gra_Diaghk1khz_Setup(); // debug_print("Configure/Enable/Disable Grating"); mois_step("Configure/Enable/Disable Grating"); string calUname = "CONFGrat"; string calUrow = "IST"; PACS_Spec_Gra_Cont_Check_1(calUname,calUrow); // mois_step("Reset DIAG_HK"); debug_print("Reset DIAG_HK"); PACS_Diaghk_Reset(); // mois_step("PACS to SAFE MODE"); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // Script file : PACS_Spec_Gra_IST_Check_2_OBS.cus // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating, enable & disable the grating after two relative movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV : Mois comments // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // procedure Pacs_Spec_Gra_IST_Check_2 { }{ mois_comment("Start of procedure: Enable and perfom a few movements, disable (no homing)"); // Register start of OBS // debug_print("Configure Nominal SPEC_HK"); mois_step("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // debug_print("Configure DIAG_HK"); mois_step("Configure Nominal SPEC_HK"); PACS_Spec_Gra_Diaghk1khz_Setup(); // debug_print("Configure/Enable/Disable Grating"); mois_step("Configure/Enable/Disable Grating"); string calUname = "CONFGrat"; string calUrow = "IST"; PACS_Spec_Gra_Cont_Check_2(calUname,calUrow); // debug_print("Reset DIAG_HK"); mois_step("Reset DIAG_HK"); PACS_Diaghk_Reset(); // mois_step("PACS to SAFE MODE"); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 8x4 raster on a point source (not SSO): // Noise is measured after the 8x4 raster at the off pointing position during "timeOFF". // // Author : Koryo Okumura // // Version : Thu Jul 24 20:07:51 CEST 2008 // // CUS script : obs PacsCal_Phot_highGainBiasDDCS_Fix // // Argument : // string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration // double ra = 70.7235; // RA 4h42m53.64s // double dec = 36.1148; // Dec +36d06m53.4s // double raoff = 70.82; // OFF position RA coordinaten // double decoff = 36.21; // OFF position Dec coordinate // int measure_time = 120; // measure time in seconds // int timeOFF = 480; // time of noise measurement in seconds on the OFF position // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops5 = 30; // number of CSs cycles during final hold // int readouts_plateau = 16; // number of readouts per chopper plateau // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // bool chop = true; // Chopping within FOV during the raster // bool verbose = true; // // Check before executing : // + Cooler is recycled // + BOLC is ON // + PHOT_orbit_prologue is executed (then more than the minimum requirement below is fullfilled): // - Bolometers are biased // - Sequencer is activated // // Description : PacsCal script of Phot_highGainBiasDDCS // init + During the slew, CSs are measured through 2 filters // + Set a filter corresponding to the given seqNum // + Set the biases group by group // if no_chop // + Set the chopper on the optical center // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x9 raster measurement // if chop // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x8 raster with chopped measurement // + After the raster, noise measurement during 4xmeasure_time // then + After the raster, CSs and sky are measured through 2 filters // stop + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(0) // obs PacsCal_Phot_highGainBiasDDCS_Fix { string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration double ra = 70.7235; // RA 4h42m53.64s double dec = 36.1148; // Dec +36d06m53.4s double raoff = 70.82; // OFF position RA coordinaten double decoff = 36.21; // OFF position Dec coordinate int measure_time = 120; // measure time in seconds per pointing int timeOFF = 480; // time of noise measurement in seconds on the OFF position string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks int nLoops1 = 30; // number of CSs cycles during slew int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per chopper plateau string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE bool chop = true; // Chopping within FOV during the raster bool verbose = true; }{ bool execute = true; int nRdts = readouts_plateau - 1; int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = duration(PHOT_change_biases(endBiasTable,calMode,calGain)); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int tNewSetup = duration(Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable)); int tslewmin = 0; int tih = 0; int tfh = 0; // Use PHOTOMETER virtual aperture string ib = "P01_0"; // SSO tracking object number int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // zoffset [arcsec] double zoffset = 0.0; // Duration of "stable" pointing in seconds int tp = 0; //Issue PointReq int[] ts = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Several arguments needed for "basic_fine_pointing" // time to set OBSID and biases then PacsPhotSlewCal // Minimum slew time if(select == "final") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS","HIGH")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"HIGH")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } } tslewmin = timeOBSID + timeChgBias + timeCal3CPR1 + tNewSetup; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = 0; // Final hold tfh = timeEndID; // Duration of "stable" pointing in seconds tp = 1; //Issue PointReq ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); } else { // Several arguments needed for "basic_raster_pointing" // time to set and reset BBID int timeBBID = imax(1,duration(TMMarker601()) + duration(TMMarker600())); // time to set OBSID and biases then PacsPhotSlewCal int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); // Minimum slew time tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = tNewSetup; // Final hold tfh = timeChgBias + timeCal3CPR5 + timeEndID; // Fixed in the sky coordinates bool fixed = false; // Orientation angle (degrees) double patt = 0.0; // Number of pointings in a leg int m = 8; // Number of legs int n = 4; // Angular distance (arcsec) between 2 pointings double d1 = 26.0; // Angular distance (arcsec) between 2 legs double d2 = 26.5; // Duration of "stable" pointing in seconds if(chop) { int nLoops = measure_time * 40 / (2 * readouts_plateau); tp = duration(OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,644)); // Positive pointing offset for chopping to get negative chopper position offset yoffset = 105.0; } else { tp = measure_time; } // Go to OFF position every k pointings (not relevant with SSO tracking) int k = m * n; // time in seconds on the OFF position (not relevant with SSO tracking) int top = timeOFF + timeBBID; //Issue PointReq ts = basic_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,k,top,raoff,decoff); } }{ int tNOW = time(); int[] state = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU if(select == "final") { PHOT_change_biases(calBiasTable,calMode,calGain); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS","HIGH"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"HIGH"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); //************************************ // Call the Phot_highGainBiasDDCS //************************************ Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } else { int finalChop = 0; // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //************************************ // Call the Phot_highGainBiasDDCS //************************************ Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } if(chop) { //********************************* // 2 positions chopping in the FOV //********************************* OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,-6578); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 4) { tNOW = time(); if(verbose) { debug_print("OFF pointing starts at " + tNOW); } //******************************** // OFF position noise measurement //******************************** TMMarker601(); delay(timeOFF); TMMarker600(); tNOW = time(); if(verbose) { debug_print("OFF pointing ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } } // Mission phase : ILT at Garching // // Purpose : Set the direct mode of the PACS bolometer // // Author : Koryo Okumura // // CUS script : procedure PhotSetDirectMode // // Argument : None // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // // Description : // // Dependencies : None // // Comments : This script has been written to recover the direct mode // // Version : Thu Dec 07 2006 // procedure PhotSetDirectMode { }{ //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); } // Missionphase : IMT // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT Tests. // // Version : 1.0 // // History : 1.0 Retuned on IST requirements. block SPEC_CS_imt511_bb PACS 380 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- //------------------------------------------------------------------------------ // Heat the calibration sources up to 48 (55K;CS1) and 58 // (60.0K;CS2) Ohm --- big step //------------------------------------------------------------------------------ // start temperature CS1 in Ohm double cs1_temp = 48.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // start temperature CS2 in Ohm double cs2_temp = 58.0; // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); // Assume that CSs are on since long and already stabilized, monitor them for 5 minutes only delay(300); //-------------------------------------------------------------------------------- // Heat the calibration sources up to 53 and 63 Ohm --- small step //-------------------------------------------------------------------------------- cs1_temp = 53.0; cs2_temp = 63.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); //After 30 minutes of heating-up and stay on the desired temperatures do cooling-down delay(1800); //------------------------------------------ // Cool both calibration sources down to 39 (50.5K) //------------------------------------------ cs1_temp = 39.0; cs2_temp = 39.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); // Cool down for about 30 minutes delay(1800); //------------------------------------------ // Go to default values of 48 (CS1) and 58 (CS2) //------------------------------------------ cs1_temp = 48.0; cs2_temp = 58.0; // Set the temperature of the black body 1 Pacs_DMC_SET_TEMP_BB_1(cs1_temp); // Set the temperature of the black body 2 Pacs_DMC_SET_TEMP_BB_2(cs2_temp); // Mark End of Block WriteEndBB(); } // File : PACS_Spec_Gra_Mec_Setup_Cold.cus // Missionphase : PACS EQM Test // // Purpose : Prepare grating mechanism for cold test // // Author : T. Mueller, P. Royer, H. Feuchtgruber // CUSification : DAC // Arguments : none // // Description : This script will switch on and set all required // parameters for the grating // // Comments : // // Version : 1.0 // History : 1.0 / 15-Nov-2004 adapted from spec_mec_setup.tcl v1.3 // 1.1 7-mar-2006 GRAT_INDUCT renamed // 1.2 7-apr-2006 homeMode changed to [NEG,POS] // Add synch on detector // Removed INDUC command // procedure PACS_Spec_Gra_Mec_Setup_Cold { }{ // Grating home mode: 0 = move to neg. positions; 1 = move to pos. positions int grat_home_mode = 0; // Grating central position (rough) int grat_center_pos = 500000; // Add synchronize on BOLO readout to insure that grating moves (see DEC/MEC // status bit DMC_GRAT_CTRL_ST bit 27) // Apparently the grating homes only if a synch source is defined // Synch on BOLO readouts (4) Pacs_DMC_SYNCHRONIZE_ON_DET_RAW(4); //------------------------------------- // GRATING (cold controller parameters) //------------------------------------- // PC162420 "DMC_WRT_GRAT_CONF_PAR" WRITE THE PARAMETERS TO CONFIGURE THE // GRATING SERVO LOOP // Fixed GroupSize: 1, repetition: 9 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // set grat_par [list [list PP067420 [expr 0x250]] \ // [list PP067420 [expr 0x2710]] \ // [list PP067420 [expr 0x5]] \ // {PP067420 0} \ // [list PP067420 [expr 0x3]] \ // [list PP067420 [expr 0x51EAE1]] \ // [list PP067420 [expr 0x3331]] \ // [list PP067420 [expr 0x800]] \ // [list PP067420 [expr 0x7FFFFFFF]]] // set chksum [getChkSum -d -32 $grat_par] // eval tcsend PC162420 $grat_par \{PP066420 $chksum\} // waittime 0.5 {int}[] list_tuple = [{0x250},{0x2710},{0x5},{0x0},{0x3},{0x51eae1},{0x3331},{0x800},{0x7fffffff}]; int[] list_int = [0x250,0x2710,0x5,0x0,0x3,0x51eae1,0x3331,0x800,0x7fffffff]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_GRAT_CONF_PAR(list_tuple,chksum); // PC108420 "DMC_SWON_GRAT_CONT" SWITCH ON GRATING CONTROLLER // tcsend PC108420 // waittime 0.5 Pacs_DMC_SWON_GRAT_CONT(); delay(1); // PC203420 "DMC_WRT_GRAT_INDUCT_SIGN" REVERSE THE SIGN OF THE INDUCTOSYN // POSITION READOUT // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" int induct_par = 1; list_tuple = [{induct_par}]; list_int = [induct_par]; chksum = checksum("int",list_int); // eval tcsend PC203420 $induct_par \{PP066420 $chksum\} // waittime 0.5 /// Pacs_DMC_WRT_GRAT_INDUC_AMPL(list_tuple,chksum); /// delay(1); // PC110420 "DMC_ENABLE_GRAT_CONT" ENABLE GRATING CONTROLLER // tcsend PC110420 // waittime 0.5 Pacs_DMC_ENABLE_GRAT_CONT(); delay(1); // PC114420 "DMC_HOME_GRAT" MOVE GRATING TO THE HOME POSITION // PP077420 "HOMING_MODE" // Search for the origin and initialize the position encoder correctly // PARAM: 0 = move towards negative positions; // 1 = move towards positive positions; // Duration: max 70 sec (if the Grating PID is 3), depending on the // initial position of the grating. // Failure code: 0xAA: Grating controller is not enabled //tcsend PC114420 [list PP077420 $grat_home_mode] // waittime 70 string[] homeMode = ["NEGATIVE","POSITIVE"]; Pacs_DMC_HOME_GRAT(homeMode[grat_home_mode]); delay(70); // PC112420 "DMC_MOVE_GRAT_ABS" MOVE GRATING TO AN ABSOLUTE POSITION // PP079420 "SET_POINT" // tcsend PC112420 [list PP079420 $grat_center_pos] // waittime 30 Pacs_DMC_MOVE_GRAT_ABS(grat_center_pos); delay(30); //------------------------- // End of Procedure //------------------------- } // File : PACS_Spec_Flash_SFT_Warm.cus // Missionphase : PACS FM ILT tests // // Purpose : Flashers Short Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends current to both flashers for short times, the goal is only to see some reaction in the HK // // // Prerequisite : The flashers are SWITCHED ON ALREADY // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 2.0 // History : 1.0 / 08-Jun-2006 initial version by PR // 1.1 / 09-Oct-2006 replacement 1mA -> 0.05mA // 2.0 / 13-Feb-2008 Made into a proc to be called by // PV standard "obs" PacsEng_Spec_Flash_SFT_Warm // removed call for WriteOBSID/WriteEndID // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Flashers Short Functional Test // @comment - // procedure PACS_Spec_Flash_SFT_Warm { }{ // // 0.05 mA -> 0.1 mA -> 0.0 mA // PACS_Spec_Flash_Setup(10,10); delay(30); PACS_Spec_Flash_Setup(20,20); delay(30); PACS_Spec_Flash_Setup(0,0); delay(30); // } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Perform Setup Spectroscopy with redundant control parameters // // CUS author : BV // // Input arguments // type name description // string fltPOS Initial filter wheel position // double temp_CS1 Calibration source 1 temperature (resistance value) // double temp_CS2 Calibration source 2 temperature (resistance value) // // Return values // Type Name Default Description // // Description : Perform PACS setup for spectroscopy with redundant control parameters // // Dependencies : // // Preconditions : // // Comments : // // Version : 2.0 // // History : 1.0 BV 10-04-2007 Initial version based on SPEC_setup_OBS // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_setup_redundant { /* Needed variables to call PacsEng_Spec_setup_redundant */ string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double temp_CS1 = 48.0; double temp_CS2 = 58.0; double blu_heater_curr = 0.78; // Heater current [mA] /* End of needed variables for PacsEng_Spec_setup_redundant */ }{ // 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(SPEC_setup_redundant(fltPOS,temp_CS1,temp_CS2,blu_heater_curr))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_setup_redundant(fltPOS,temp_CS1,temp_CS2,blu_heater_curr); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id $ // Description : // // Dependencies : // // Comments : Follows verbatim paragraph 4.2.10 in PACS-ME-LI-005 // version 1.6 // Actual values of input parameters, except values for the // various loop counters, are completely irrelevant and so // are not used. // Loop counters are used to estimate the duree of the // sequence // // Version : 0.1 15-oct-2007 Creation by DAC // History : // // This debugging DEC/MEC computes grating positions procedure PacsDebug_wave_switch { int pos = 1000; // Grating start position int nb_dither_steps = 7; // number of dithering steps int nb_switch_cycles = 1; // nb of L-R-L-R cycles per dithering int param2 = 200; // DMC P#2 int param4 = -2000; // DMC P#4 int param6 = -2000; // DMC P#6 int param7 = 2000; // DMC P#7 int param8 = 2000; // DMC P#8 }{ // Pseudo code from PACS OBCPs and DMC Sequences (4.1.7) // WAIT 1 ; have a defined start // LABEL 0 ; set Label to 0 int grat = pos; // LOOP P1 main loop for number of shifts for(int outLOOP = 1 .. nb_dither_steps) { // WAIT 1 sync. for chopper // MOVE_GRATING_RELATIVE P2 move grating by P2 = shift grat = grat + param2; debug_print("Dithering loop at step: " + outLOOP + "; grating at: " + grat); // LOOP P3 P3 times core loop for(int inLOOP = 1 .. nb_switch_cycles) { // MOVE_GRATING_RELATIVE P4 move grating by P4 grat = grat + param4; int low = grat - 3200; int hi = grat + 3200; debug_print("----LINE at: " + grat + "; " + low + "<>" + hi); // MOVE_GRATING_RELATIVE P6 move grating by P6 grat = grat + param6; low = grat - 3200; hi = grat + 3200; debug_print("----REF1 at: " + grat + "; " + low + "<>" + hi); // MOVE_GRATING_RELATIVE P7 move grating by P7 grat = grat + param7; low = grat - 3200; hi = grat + 3200; debug_print("----LINE at: " + grat + "; " + low + "<>" + hi); // MOVE_GRATING_RELATIVE P8 move grating by P8 grat = grat + param8; low = grat - 3200; hi = grat + 3200; debug_print("----REF2 at: " + grat + "; " + low + "<>" + hi); // END_LOOP } // END_LOOP } // WAIT 1 complete last plateau // LABEL 0 no sequence anymore // END_SEQUENCE } // CVS comments : $Id$ // Script file : PacsCal_SpirePacsParallel.txt // // Purpose : "Expert" clone of SpirePacsParallel // // CUS author : DAC // // Input arguments // // tuple sortRangesEXT HSPOT input added later // {string,double[],double[],double[],double[]} tinyTuple // // Description : All functionalities of SpirePacsParallel but possibility // to override CAL-U parameters for selected parameters PLUS // option to perform an OFF position at begin/end of scan. // Uses modified script SpirePOF5Observing_PV to be able to // pass variable "patt" obtained from the user input // Dependencies : // // Comments : // // Version : 0.1 17-jul-2008 DAC. Based on DAC's v0.4.4.1 of SpirePacs // History : 0.1 17-jul-2008 DAC // - Removed unused variables mapOrientation* // - Add line scan with off PointReq; OFF is done on // user input request // - User gives the pattern angle // - No need to add TMMarker600 at begin of scan lines // since SpireBb #8451 is started there // - Inquire duration of OFF observation {{string,double,double}[],double,double,int} obs PacsCal_SpirePacsParallel { double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target double raoff = 0.0; // Absolute RA of OFF position double decoff = 0.0; // Absolute DEC of OFF position bool refSelected = false; // OFF position needed string blue = "blue1" in ["blue1","blue2"]; // PACS blue filter selection double mapSize1 = 30.0 in [30.0,1200.0]; // map length (arcminutes) double mapSize2 = 30.0 in [30.0,1200.0]; // map height (arcminutes) double patt = 0.0; // Scan pattern orientation string mapScanRate = "fast" in ["fast","slow"]; string scanDirection = "nominal" in ["nominal","orthogonal"]; //Parallel/Orthogonal bool obsWithOff = true; // Perform the scan with/without OFF int offSeconds = 10; //Duration of OFF [seconds] }{ bool verbose = false; // Debug print verbosity // // ********************************************* // pointing mode parameters for SPIRE // ********************************************* // // string obsMode = "Par"; if(mapScanRate == "fast") { obsMode = obsMode + "_F"; } else { obsMode = obsMode + "_S"; } if(scanDirection == "nominal") { obsMode = obsMode + "_N"; } else { obsMode = obsMode + "_O"; } SpireMsg(3," Observation Mode:" + obsMode); int nMaps = ilookup("OpsParms.txt",obsMode,"NMaps"); int nRepetitions = 1; // // ***** observing mode parameters ***** {double,double,int,int,int,int} pof5Obs = SpirePOF5Observing_PV(obsMode,nRepetitions * nMaps,mapSize1,mapSize2,patt); double mapOsit = pof5Obs{0}; int nRepeats = pof5Obs{2}; int nLines = pof5Obs{3}; int nCal = pof5Obs{4}; int nFlash = pof5Obs{5}; // // pointing mode input parameters: {int,int,int,int,int,double,double} pof5Point = SpirePOF5Pointing(obsMode,nRepeats,nLines,nCal,nFlash); // // // ********************************************* // pointing mode parameters for PACS // ********************************************* // Before issue PointReq need to do some nitty-gritty for PACS // NOTE: Re-use as much as possible code from PacsPhoto AOT. // NOTE: the conf arrays are inherited from PacsSpec, where the [0] element // represented the default values, and the [n] element represented values // to be used with the n-th wavelength. For PHOT, [0] still represents // the default values and [1] values corresponding to the chosen filter. // NOTE: In this version BOLOs acquire data all the time, no OBCP is needed // to start data taking {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confPHOTblu and confPHOTred {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,0,0,0,0,0,0}]; // Define paramsPHOT, a "tuple of tuples" // Estimator module returns {confPHOTblu,confPHOTred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOT = {clone(confPHOTblu[0]),clone(confPHOTred[0]),clone(confOBCP[0])}; // Obtain default values (here for largeSRC) // THIS LINE HAS BEEN UPDATED // paramsPHOT = PacsPhotDefaults("largeSRC","Parallel",verbose); bool isBrightPacs = false; paramsPHOT = PacsPhotDefaults("largeSRC","Parallel",isBrightPacs,verbose); // Array [0] of paramsPHOT contains the default values; array [1] // will contain the values based on HSPOT input. Array [1] is a copy of [0]; // only elements depending on HSPOT will be updated // Copy default values to individual "conf" tuples confPHOTblu[0] = paramsPHOT{0}; confPHOTred[0] = paramsPHOT{1}; confOBCP[0] = paramsPHOT{2}; // Get the durations of each activity: // - AOT prologue // - CAL observation // - Start OBCP (not really needed since BOLO acquires data non-stop) // - Possible CAL during "hold" // - AOT epilogue // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source. // First TC is associated with setting OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Next call PacsPhotSlewCal. This script conditions the BOLO if doProlog is // set to true or just performs a calibration using an alredy conditioned BOLO // The time needed to perform these activities during slew is // Calibration alone: bool doProlog = false; int timeCal = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { SpireMsg(3,"Duration of SlewCal: " + timeCal); } // Same but including prologue doProlog = true; int timeCalProlog = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { SpireMsg(3,"Duration of SlewCalProlog: " + timeCalProlog); } // The total PACS time needed during slew is timeCalProlog + timeSetOBSID; // Do not lose time with OBCPs. BOLOs are only stopped with AOT_epilogue // Deal with PHOT_aot_epilogue and WriteEndID int timeEpilogue = duration(PHOT_aot_epilogue()); int timeEndID = duration(WriteEndID()); timeEpilogue = timeEpilogue + timeEndID; if(verbose) { SpireMsg(3,"Duration aot_epilogue: " + timeEpilogue); } // OFF calculations now // Will use OBCP_phot_staring with offSeconds and sam comp_mode as CAL // block int dureeOFF = duration(OBCP_phot_staring(offSeconds,confPHOTblu[0]{3},confPHOTred[0]{3})); // ********************************************* // set up telescope pointing mode // ********************************************* // default values int naifid = 0; // no tracking in this mode double mapOffsetY = 0.0; // no offsetting in this mode double mapOffsetZ = 0.0; // no offsetting in this mode // fixed parameters string ib = slookup("OpsParms.txt",obsMode,"Boresight"); // Use SPIRE instrument boresight double deltaY = dlookup("OpsParms.txt",obsMode,"DeltaY"); // offset to pixel centre from boresight in Y direction (arcsecs) double deltaZ = dlookup("OpsParms.txt",obsMode,"DeltaZ"); // offset to pixel centre from boresight in Z direction (arcsecs) bool fixed = blookup("OpsParms.txt",obsMode,"Fixed"); // pattern angle definition // double patt = dlookup("OpsParms.txt",obsMode,"Patt"); // direction of scan lines in instrument coordinates double yOffset = mapOffsetY * 60.0 + deltaY; // offset to observation position from target in Y direction (arcsecs) double zOffset = mapOffsetZ * 60.0 + deltaZ; // offset to observation position from target in Z direction (arcsecs) // calculated parameters int tSlewMin = timeSetOBSID + timeCalProlog + pof5Point{0}; int tih = pof5Point{1}; int tfh = timeEpilogue + pof5Point{2}; int n = nLines; double scanLength = pof5Obs{1}; double d2 = pof5Point{5}; double rate = pof5Point{6}; // int tHold = timeCal + pof5Point{3}; int nHold = pof5Point{4}; int nRepeat = nRepeats; // Relevant for scan_with_off only // perform OFF at begin and end int k = n; // At OFF do the CAL block without prologue int top = dureeOFF; int tLoadMin = 0; int nLoad = 0; // if obsWithOff is false, perform the riginal pointing request if(!obsWithOff) { int[] ts = line_scan_pointing(true,tSlewMin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yOffset,zOffset,n,scanLength,d2,rate,tHold,nHold,nRepeat); } else { // Replaced with different pointing request ts = line_scan_with_off_pointing(true,tSlewMin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yOffset,zOffset,n,scanLength,d2,rate,k,top,raoff,decoff,nRepeat,tHold,nHold,tLoadMin,nLoad); } //Info from API (nomenclature from Jon Br) int tobs = ts[0]; int tslew = ts[1]; int tacc = ts[2]; int tdec = ts[3]; int tl = ts[4]; int tll = ts[5]; if(verbose) { if(!obsWithOff) { SpireMsg(3,"##### line_scan_pointing"); } else { SpireMsg(3,"##### line_scan_with_off_pointing"); } SpireMsg(3,"##### rate: " + rate + " arcsec/sec"); SpireMsg(3,"##### PntReq: " + ts); SpireMsg(3,"##### tobs : " + tobs); SpireMsg(3,"##### tslew: " + tslew); SpireMsg(3,"##### tacc : " + tacc); SpireMsg(3,"##### tdec : " + tdec); SpireMsg(3,"##### tl : " + tl); SpireMsg(3,"##### tll : " + tll); } // How long it takes to scan a line [sec] int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; // fetch timing information // bool initFlash = blookup("SpireParms.txt",obsMode,"InitFlash"); // initial flash flag bool endFlash = blookup("SpireParms.txt",obsMode,"EndFlash"); // final flash flag int tFlash = duration(SpireBbPcalFlash("PFlash",0)); // time for a PCAL flash int tSerendipity = duration(SpireBbPhotSerendipity(obsMode,0)); // minimum time for a serendipity observation }{ // ***************************************** // Display input parameters // ***************************************** SpireMsg(3," Parallel Mode Input values:"); SpireMsg(3," ..RA: " + ra); SpireMsg(3," ..Dec: " + dec); SpireMsg(3," ..blue: " + blue); SpireMsg(3," ..mapSize1: " + mapSize1); SpireMsg(3," ..mapSize2: " + mapSize2); SpireMsg(3," ..mapScanRate: " + mapScanRate); SpireMsg(3," ..scanDirection: " + scanDirection); SpireMsg(3," Fixed values:"); SpireMsg(3," ..ib: " + ib); SpireMsg(3," ..patt: " + patt); SpireMsg(3," ..d2: " + d2); SpireMsg(3," ..rate: " + rate); SpireMsg(3," PACS Parms:"); SpireMsg(3," SPIRE Parms:"); SpireMsg(3," ..initFlash: " + initFlash); SpireMsg(3," ..endFlash: " + endFlash); SpireMsg(3," Line Scan with Hold Pointing Mode Input values:"); SpireMsg(3," ..tSlewMin: " + tSlewMin); SpireMsg(3," ..tInitHold: " + tih); SpireMsg(3," ..tFInalHold: " + tfh); SpireMsg(3," ..nLines: " + nLines); SpireMsg(3," ..scanLength: " + scanLength); SpireMsg(3," ..tHold: " + tHold); SpireMsg(3," ..nHold: " + nHold); SpireMsg(3," Line Scan Pointing Mode Output values:"); SpireMsg(3," ..tobs: " + tobs); SpireMsg(3," ..tslew: " + tslew); SpireMsg(3," ..tacc: " + tacc); SpireMsg(3," ..tdec: " + tdec); SpireMsg(3," ..tl: " + tl); SpireMsg(3," ..tll: " + tll); // ***************************************** // execute observation // ***************************************** SpireMsg(0,"Observation Start"); SpireMsg(0," Uses SPIRE observing mode POF5 (Scan Map)"); SpireMsg(3," $Id: SpirePacsParallel.txt,v 1.16 2007/10/10 07:54:48 dcesarsk Exp $"); // // State machine ///////////////////////// start of "commanding" section ////////////////////// SpireMsg(3,"++++++++++++++++++++++++ Start Command Section"); SpireMsg(3,"$$$$$$$$$$$$$$$$ State Machine $$$$$$$$$$$$$$$$$$"); // Initialize some "global" variables int totalOBStime = 0; int totalOBSover = 0; int totalCALtime = 0; int totalCALover = 0; int nbSCANlegs = 0; string tstr = ""; // time string int otf = 0x8000; // On Target Flag double srcTime = 0.0; // total on source integration time int nl = 0; // line counter double s = 0.0; // Issue TCs int[] state = [0]; int nbOBS = 0; int nbOFF = 0; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { // *********************** SLEWING tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " Slewing to start position"); if(verbose) { int tNOW = time(); SpireMsg(3,"=== SLEW/CAL starts at: " + tNOW); } // set up observation parameters SpireBbObsConfig(0x500); WriteOBSID($OBSID); data_rate(120.0); // perform serendipity operation if possible if(tslew > tSerendipity + tSlewMin) { SpireBbPhotSerendipity(obsMode,tslew - tSlewMin - 2); } // configure instrument for operations SpirePacsBbParallelConfig(); doProlog = true; int[] calTime = PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; // if(verbose) { tNOW = time(); SpireMsg(3,"=== SLEW/CAL ends at: " + tNOW); SpireMsg(3," TotalCalTime: " + totalCALtime); } } if(state[0] == 2) { // *********************** INITIAL HOLD tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " Initialising Instrument"); if(verbose) { tNOW = time(); SpireMsg(3,"=== INIT_HOLD starts at: " + tNOW); } // initialise instrument SpireBbPOF5Init(); // calibrate if necessary if(initFlash || nFlash < nLines) { tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " PCAL Calibration inserted"); SpireBbPcalFlash("PFlash",otf); SpireBbStartDcuData("PF"); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== INIT_HOLD ends at: " + tNOW); } } if(state[0] == 3) { // *********************** POINT if(verbose) { tNOW = time(); SpireMsg(3,"=== INIT_HOLD starts at: " + tNOW); } // code for things to do during POINT would come here nbOBS = nbOBS + 1; if(verbose) { SpireMsg(3,"POINT: POINTobs: " + nbOBS); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== INIT_HOLD ends at: " + tNOW); } } if(state[0] == 4) { // *********************** OFF if(verbose) { tNOW = time(); SpireMsg(3,"=== OFF starts at: " + tNOW); } // Stare during offSeconds bolometer readouts OBCP_phot_staring(offSeconds,confPHOTblu[0]{3},confPHOTred[0]{3}); nbOFF = nbOFF + 1; if(verbose) { SpireMsg(3,"OFF: OFFobs: " + nbOFF); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== OFF ends at: " + tNOW); } } if(state[0] == 5) { // *********************** FINAL HOLD tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " Reconfiguring Instrument"); if(verbose) { tNOW = time(); SpireMsg(3,"=== FINAL_HOLD starts at: " + tNOW); } // reconfigure instrument SpireBbStopDcuData(); // calibrate if necessary if(endFlash || nFlash < nLines) { tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " PCAL Calibration inserted"); SpireBbPcalFlash("PFlash",otf | nl); } // reconfigure back to PHOT_STBY configuration SpirePacsBbParallelEnd(); // PHOT_aot_epilogue(); data_rate(0.0); WriteEndID(); // if(verbose) { tNOW = time(); SpireMsg(3,"=== FINAL_HOLD ends at: " + tNOW); } } if(state[0] == 6) { // *********************** CAL_HOLD tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " PCAL Calibration inserted"); if(verbose) { tNOW = time(); SpireMsg(3,"=== FINAL_HOLD starts at: " + tNOW); } // Calibrate SPIRE SpireBbStopDcuData(); SpireBbPcalFlash("PFlash",otf | nl); SpireBbStartDcuData("PF"); // Calibrate PACS doProlog = false; calTime = PacsPhotSlewCal(false,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { SpireMsg(3,"Accumulated CALtime: " + totalCALtime); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== FINAL_HOLD ends at: " + tNOW); } } if(state[0] == 7) { // *********************** NOD if(verbose) { tNOW = time(); SpireMsg(3,"=== NOD starts at: " + tNOW); } // code for things to do during POINT would come here nbOBS = nbOBS + 1; if(verbose) { SpireMsg(3,"NOD: NODobs: " + nbOBS); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== NOD ends at: " + tNOW); } } if(state[0] == 8) { // *********************** LINE int line = state[2]; int t = time(); tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " Instrument scanning"); SpireMsg(2," " + tstr + " Line " + nl); if(verbose) { tNOW = time(); SpireMsg(3,"=== LINE starts at: " + tNOW); } s = SpireBbScanLine(tl,otf | nl); wait_until(t + tl); srcTime = srcTime + s; nl = nl + 1; SpireBbMove(0); // // Do we need code to set BBID?? totalOBStime = totalOBStime + scanTime; totalOBSover = totalOBSover + scanTime + scanOVER; nbSCANlegs = nbSCANlegs + 1; if(verbose) { SpireMsg(3,"=== SCAN mode, leg: " + nbSCANlegs); SpireMsg(3," TotalOBSTime: " + totalOBStime); } // if(verbose) { tNOW = time(); SpireMsg(3,"=== LINE ends at: " + tNOW); } } } assert (time() == ts[0] + ts[1]); if(verbose) { tNOW = time(); SpireMsg(3,"=== END state; time now: " + tNOW); } int timeObsEnd = time(); int overOBS = totalOBSover - totalOBStime; int overCAL = totalCALover - totalCALtime; if(verbose) { SpireMsg(3,"+++ OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); SpireMsg(3," totalOBStime :" + totalOBStime); SpireMsg(3," totalOBSover :" + overOBS); SpireMsg(3," totalCALtime :" + totalCALtime); SpireMsg(3," totalCALover :" + overCAL); } tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + " Observation Finished"); // ***************************************** // time estimation parameters for SPIRE // ***************************************** double sourceFluxPSW = -1.0; double sourceFluxPMW = -1.0; double sourceFluxPLW = -1.0; double sourceBrightPSW = -1.0; double sourceBrightPMW = -1.0; double sourceBrightPLW = -1.0; {string,double,double,double,double,bool,double,double,double}[] estimates = []; estimates = SpirePOF5Estimate(obsMode,double(nRepetitions),rate,sourceFluxPSW,sourceFluxPMW,sourceFluxPLW,sourceBrightPSW,sourceBrightPMW,sourceBrightPLW); // ***************************************** // time estimation parameters for PACS // ***************************************** // Slew overheads: nrepeat*[tacc + (numLegs - 1)*tll] int slewOVER = nRepeat * (tacc + (n - 1) * tll); SpireMsg(3,"slewOVER/numLegs/nrep: " + slewOVER + "/" + n + "/" + nRepeat); // Estimate how long a given sky region has been seen // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // Elementary integration time [sec] will be computed as fraction of bolo area // wrt to total mapped area // The mapped area has dimensions map1 and map2 double map1 = boloSSize + scanLength; double map2 = boloLSize + double(n - 1) * d2; double mapArea = map1 * map2; double auxTIME = double(totalOBStime) * boloArea / mapArea; SpireMsg(3," BoloArea: " + boloArea + " [arcsec2]"); SpireMsg(3," MapArea : " + mapArea + " [arcsec2]"); SpireMsg(3," Total tOBS : " + totalOBStime + " [sec]"); SpireMsg(3," On-SRC tOBS : " + auxTIME + " [sec]"); // Pass the pointing mode to RMS (may need it for SRC,REF considerations) int pointCase = 33; double[] pixRMS = PacsPhotNoiseRMS(pointCase,blue,auxTIME); SpireMsg(3,"RMS noise: " + pixRMS); // // ***************************************** // return time estimation parameters // ***************************************** double hLoss = dlookup("OpsParms.txt",obsMode,"HLoss"); // map height loss int observationOhds = timeObsEnd - iround(srcTime) - tslew; double efficiency = mapSize1 * mapSize2 * 3600.0 / (scanLength * (d2 * double(nLines - 1) - hLoss)); SpireMsg(3," Efficiency: " + efficiency); SpireMsg(3," Overheads: " + observationOhds); // Return: band, point source noise, extended source noise // SPR-2876: red/blue were exchanged // Pnt source sensitivities double pntBLU = pixRMS[1]; double pntRED = pixRMS[0]; // Add extended source sensitivities (there were place holders because // missing "extended" estimate at the time) double extBLU = pixRMS[3]; double extRED = pixRMS[2]; {string,double,double}[] noiseLevels = [{"PACS Blue",pntBLU,extBLU},{"PACS Red",pntRED,extRED},{"SPIRE 250",estimates[0]{2},estimates[0]{7}},{"SPIRE 350",estimates[1]{2},estimates[1]{7}},{"SPIRE 500",estimates[2]{2},estimates[2]{7}}]; return {noiseLevels,efficiency,srcTime,observationOhds}; } // File : PACS_Spec_Heat_SFT.cus // Missionphase : PACS FM ILT tests // // Purpose : Heaters Short Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends current to both heaters for short times, the goal is only to see some reaction in the HK // // // Prerequisite : The heaters are SWITCHED ON ALREADY // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 2.0 // History : 1.0 / 08-Jun-2006 initial version by PR // 2.0 / 14-Feb-2008 Made into a procedure to be called // by PacsEng_Spec_Heat_SFT // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Heaters Short Functional Test // @comment - // procedure PACS_Spec_Heat_SFT { }{ // 0.1mA -> 1.0 mA -> 0.0 mA // PACS_Spec_Heat_Setup(20,20); delay(30); PACS_Spec_Heat_Setup(205,205); delay(30); PACS_Spec_Heat_Setup(0,0); delay(30); } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Setup SPU for photometry data flow // Author : DAC // // Arguments : // // (optionally) starts reduction/compression // // Dependencies : // // Comments : // // Version : 2.0 // History : 1.0 10-nov-2006 DAC // 1.1 13-nov-2006 Start SPU // 1.2 4-apr-2007 nraw = 0 // 2.0 04-mar-2008 translated into PV script VDP // obs PacsEng_Phot_spu_setup { /* Needed variables to call PacsEng_Phot_spu_setup */ /* Compression modes: default=0, double=1, half=2, lossless=4 */ /* transp=7, buffer=9 */ int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; // Number of raw channels blue SPU int nraw_red = 0; // Number of raw channels red SPU bool startSPU = true; // Start SPU or not [true,false] /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_spu_setup */ }{ // 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(PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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 PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); } if(state[0] == 5) { // Declare end of OBS WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PV phase // // Purpose : Wavelength calibration and instrumental profile // Source is observed chopping/nodding // // CUS author : DAC, based on WaveCalNoChop // Script file : WaveCalChop.txt // // // Description : Uses OBCP27 for executing a parameterized scan of any length, stepsize etc. // Represents a generic nchopped grating scan // // Dependencies : SPEC_heater, SPEC_cre_setup // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : Can be run for wavelength calibration, instrumental profile and ghost search // Version : 0.1 // History : 0.1 21-sep-2007 DAC adapted from WaveCalNoChop // // procedure WaveCalChop { string fltPOS = "POS A"; // Filter wheel position (0="POS A", 1="POS B") int grat_pos = 500000; // grating start position for scan int grat_time = 0; // Grating time to move to start [msec] int grat_step_up = 200; // grating step size int grat_step_dn = 200; // grating steop size down int nb_grat_steps = 50; // number of grating steps in one direction int nb_CS1_CS2 = 0; // nb of cycles on internal CS int nb_rdouts_ramp = 64; // number of readouts per ramp int nb_ramps_plateau = 1; //Nb of readouts per chopper position int nb_up_down = 1; // number of grating updown scans 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 nb_SRC_REF = 3; // nb of cycles (ramps) per grating position double chopthrow = 30.0; int detector = 1; // 1= blue detecor 2=red detector }{ // Condition the CREs and detectors int ramp_len_blu = nb_rdouts_ramp; int ramp_len_red = nb_rdouts_ramp; // Set up the blue and red CRE subsystem // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Set BLUE heater parameters (mA) double heater_blu = 0.78; SPEC_heater_setup(heater_blu); // // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // Reset SPU SPEC_spu_reset(); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Move the filter wheel SPEC_fltw_move(fltPOS); // Get CSn positions from dedicated CAL-U file double ref1 = chopthrow / 2.0; double ref2 = -chopthrow / 2.0; int chop_pos_REF1 = PacsReadChopSky("SPEC_CHOP_sky",ref1); int chop_pos_REF2 = PacsReadChopSky("SPEC_CHOP_sky",ref2); int chop_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); // int grat_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // grat_def should be grat_pos in this case int chop_pos_CS1 = ilookup("CHOPPERCSparams","SPEC","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); int grat_def_time = 0; // Time to come back to default position set to 0 // because grating already in position // int[] duree3 = OBCP_grat_scan_chop2(nb_up_down,nb_grat_steps,nb_SRC_REF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_pos,chop_def,grat_def_time,nb_rdouts_ramp); // Reset SPU SPEC_spu_reset(); } // Missionphase : FM // // Purpose : Exercise OBCP for chopped photometry // // // // TCL author : N/A // TCL file : N/A // CUS author : TM // Script file : OBCP_chopped_photometry_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise OBCP for chopped photometry // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version 0.1 // History 0.1 09-oct-2006 TM // procedure Pacs_OBCP_chopped_photometry { int nb_SRC_REF = 8; // p01 Number of observations in OBS loop int chop_pos_SRC = 1000; // p02 Chopper position for SRCE int nb_rdouts_plateau = 39; // p03 Number of readouts per chopper position int chop_pos_REF1 = -2000; // p04 Chopper position for BKG1 int chop_pos_REF2 = 5000; // p05 Chopper position for BB2 int nb_cycles_obs_cal = 2; // p06 Number of obs/cal cycles int nb_CS1_CS2 = 2; // p07 Number of observations in CAL loop int chop_pos_CS1 = -25000; // p08 Chopper position for CS1 int chop_pos_CS2 = 25000; // p09 Chopper position for CS2 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position }{ // Register with environment // Start SPU int nraw_blu = 3; int nraw_red = 3; PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); int[] duree = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); // // Position the filter wheel at POS B and repeat everything // PHOT_fltw_move("POS B"); // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); duree = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Stop SPU // PACS_spu_reset(); sync(); } // File : PACS_Phot_Cold_Startinputsignal.cus // Missionphase : PACS FM Test // // Purpose : BOLC starting the input signal for cold (2-4K) environment // // Author : T. Mueller // CUSification : DAC // Arguments : none // // // Description : See PhFPU UM, draft 5, chapter 4.2.5 // // Comments : Coded based on PhFPU UM, draft 5, chapter 4.2.5 // // Version : 1.5 // History : 1.0 / 18-Nov-2004 initial version by TM // 1.1 7-mar-2006 TC SEND_COMMAND_TO_BOLC renamed // 1.2 11-aug-2006 TM update for PhFPU UM, draft 5, chapter 4.2.5 // 1.3 27-oct-2006 OB (!) updated according to equivalent 300K test, increased wait times from 5 to 10 seconds // 1.4 08-nov-2006 TM update for SPU stop/start and wait times // 1.5 13-nov-2006 TM wait time after GND_BU increased to 3 sec // procedure PACS_Phot_Cold_Startinputsignal { }{ // --------------------------------------------- // Functional tests at 4K and 2K // --------------------------------------------- // start recording TM //# S 09 // Set data mode Bolo & HK //# P 09 02 00 01 int operand = 0x9020001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Reset bias all groups //# P 00 00 00 00 operand = 0x0; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Validate TM recording //# S 09 delay(20); // Set all groups bol bias 22 (VDD-PROT-BU) ON (1) //# P 00 16 0001 operand = 0x160001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 21 (VDD-PROT-CL) ON (1) //# P 00 15 0001 operand = 0x150001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 23 (GND-BU) ON (1) //# P 00 17 0001 operand = 0x170001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(3); // Set all groups bol bias 05 (VCH) to 0.00000000 Volt (0) //# P 00 05 0000 operand = 0x50000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 19 (VGL-BU) to 2.60000000 Volt (2125) //# P 00 13 084D operand = 0x13084d; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 18 (VDL-BU) to 4.20000000 Volt (3435) //# P 00 12 0D6B operand = 0x120d6b; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 17 (VSS-BU) to 1.50000000 Volt (1227) //# P 00 11 04CB operand = 0x1104cb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start of BU test // --------------------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); TMMarker601(); // --------------------------------------------- // Set seq mode Sref only //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Set all groups bol bias 15 (VGG) to 0.00000000 Volt (1) //# P 00 0F 0001 operand = 0xf0001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set gain low //# P 08 00 00 01 operand = 0x8000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 1.50000000 Volt (1227) //# P 00 14 04CB operand = 0x1404cb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 1.40050000 Volt (1146) //# P 00 10 047A operand = 0x10047a; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // output level should be around 30000 ADU // --------------------------------------------- // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.42000000 Volt (1162) //# P 00 10 048A operand = 0x10048a; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.44000000 Volt (1178) //# P 00 10 049A operand = 0x10049a; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.46000000 Volt (1195) //# P 00 10 04AB operand = 0x1004ab; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.52000000 Volt (1244) //# P 00 14 04DC operand = 0x1404dc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.54000000 Volt (1260) //# P 00 14 04EC operand = 0x1404ec; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.56000000 Volt (1276) //# P 00 14 04FC operand = 0x1404fc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // --------------------------------------------- // End of BU test // --------------------------------------------- // We set the system to "PEL commute" mode // --------------------------------------------- // Set all groups bol bias 15 (VGG) to 1.30000000 Volt (1064) //# P 00 0F 0428 operand = 0xf0428; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 2.60000000 Volt (2128) //# P 00 10 0850 operand = 0x100850; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 08 (VGL) to 3.00000000 Volt (3447) //# P 00 08 0D77 operand = 0x80d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 06 (VDL) to 3.00000000 Volt (3447) //# P 00 06 0D77 operand = 0x60d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 07 (VSS) to 1.30000000 Volt (1494) //# P 00 07 05D6 operand = 0x705d6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start of VRL test TMMarker601(); // --------------------------------------------- // Set all groups bol bias 11 (VDECX-H) to 0.00000000 Volt (0) //# P 00 0B 0000 operand = 0xb0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 1.50000000 Volt (1724) //# P 00 09 06BC operand = 0x906bc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 1.50000000 Volt (1724) //# P 00 0A 06BC operand = 0xa06bc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 14 (VSMS-L) to 3.00000000 Volt (3447) //# P 00 0E 0D77 operand = 0xe0d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 13 (VSMS-H) to 0.00000000 Volt (0) //# P 00 0D 0000 operand = 0xd0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 15 (VGG) to 1.15000000 Volt (941) //# P 00 0F 03AD operand = 0xf03ad; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // The CL current (I_VSS_BU) should be between 100 and 300 nA TMMarker601(); // --------------------------------------------- // Set all groups bol bias 20 (VH_BLIND) to 1.75000000 Volt (1432) //# P 00 14 0598 operand = 0x140598; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 00 03 00E6 operand = 0x300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 00 03 0159 operand = 0x30159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 00 03 01CC operand = 0x301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 00 03 0159 operand = 0x30159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 00 03 00E6 operand = 0x300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // --------------------------------------------- // fin de test de VRL for all groups // --------------------------------------------- // --------------------------------------------- // VRL test group-by-group // --------------------------------------------- // group 1 TMMarker602(); // --------------------------------------------- // Set group 1 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 01 03 00E6 operand = 0x10300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 1 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 01 03 01CC operand = 0x10301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 1 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 01 03 00E6 operand = 0x10300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 2 TMMarker602(); // --------------------------------------------- // Set group 2 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 02 03 00E6 operand = 0x20300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 2 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 02 03 01CC operand = 0x20301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 2 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 02 03 00E6 operand = 0x20300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 3 TMMarker602(); // --------------------------------------------- // Set group 3 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 03 03 00E6 operand = 0x30300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 3 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 03 03 01CC operand = 0x30301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 3 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 03 03 00E6 operand = 0x30300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 4 TMMarker602(); // --------------------------------------------- // Set group 4 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 04 03 00E6 operand = 0x40300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 4 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 04 03 01CC operand = 0x40301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 4 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 04 03 00E6 operand = 0x40300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 5 TMMarker602(); // --------------------------------------------- // Set group 5 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 05 03 00E6 operand = 0x50300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 5 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 05 03 01CC operand = 0x50301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 5 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 05 03 00E6 operand = 0x50300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 6 TMMarker602(); // --------------------------------------------- // Set group 6 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 06 03 00E6 operand = 0x60300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 6 bol bias 03 (VRL) to 0.40000000 Volt (460) //# P 06 03 01CC operand = 0x60301cc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 6 bol bias 03 (VRL) to 0.20000000 Volt (230) //# P 06 03 00E6 operand = 0x60300e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // end of test group-by-group TMMarker600(); // --------------------------------------------- // Set all groups bol bias 09 (CKRLH) to 0.00000000 Volt (0) //# P 00 09 0000 operand = 0x90000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 0.00000000 Volt (0) //# P 00 0A 0000 operand = 0xa0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 11 (VDECX-H) to 2.00000000 Volt (2298) //# P 00 0B 08FA operand = 0xb08fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 2.00000000 Volt (2298) //# P 00 0C 08FA operand = 0xc08fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 04 (VINJ) to 3.00000000 Volt (3447) //# P 00 04 0D77 operand = 0x40d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 1.70000000 Volt (1391) //# P 00 14 056F operand = 0x14056f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set gain high //# P 08 00 00 00 operand = 0x8000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); TMMarker601(); // Set all groups bol bias 01 (VH) to 0.50000000 Volt (575) //# P 00 01 023F operand = 0x1023f; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 02 (VL) to -0.15000000 Volt (416) //# P 00 02 01A0 operand = 0x201a0; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 01 (VH) to 0.00000000 Volt (0) //# P 00 01 0000 operand = 0x10000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 02 (VL) to 0.00000000 Volt (0) //# P 00 02 0000 operand = 0x20000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //--------------------------------- // Extra wait 30000 ms for a noise check TMMarker603(); delay(30); TMMarker601(); //--------------------------------- //# S 01 001388 // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 2.00000000 Volt (2298) //# P 00 09 08FA operand = 0x908fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sb only //# P 09 01 00 02 operand = 0x9010002; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); //--------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sref only //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sb-Sref //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 // Close TM file //# S 08 // --------------------------------------------- //----------------- // End of Procedure //----------------- } // CVS comments : $Id: PacsLineSpecKeyWaves.txt,v 1.3 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : Give a series of KeyWaves given an array of UserWaves, // This version gives one KeyWave per represented order in // UserWaves // // CUS author : DAC // Script file : PacsLineSpecKeyWaves.txt // // Input arguments // type name Description // tuple waveTuple Grating info associated to HSPOT defined spectral lines // // Return values // Type Description // double [] Array of "key" wavelengths from CAL-U file // Description : Sort input waveUSER by order. For each order, compute // the mean wavelength; return the waveKEY closest to the // mean wavelength // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 8-jun-2005 DAC // 0.2 21-jun-2005 READ_key_wave_table renamed to // PacsReadKeyWave; module removed from this // file, created as stand-alone // 1.0 26-aug-2005 Use new SPEC_get_grat_info, hence // input argument is now waveTuple // 1.1 13-apr-2006 Order KeyWaves by increasiing order double[] procedure PacsLineSpecKeyWaves { {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; // waveTuple }{ // Local variables int[] orders = [0]; double[] waves = [0.0]; double nORDER1 = 0.0; double nORDER2 = 0.0; double nORDER3 = 0.0; double sum1 = 0.0; double sum2 = 0.0; double sum3 = 0.0; double[] answer = [0.0]; // Associate wavelengths to their respective order int nbWAVES = length(waveTuple); for(int loop1 = 0 .. nbWAVES - 1) { // Create vector of intermediate results orders[loop1] = waveTuple[loop1]{1}; waves[loop1] = waveTuple[loop1]{0}; } // Compute mean wavelength for each order for(int loop2 = 0 .. nbWAVES - 1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1.0; sum1 = sum1 + waves[loop2]; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1.0; sum2 = sum2 + waves[loop2]; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1.0; sum3 = sum3 + waves[loop2]; } } // Compute mean values and fetch closest key wavelength int nb_answer = 0; if(nORDER1 >= 1.0) { sum1 = sum1 / nORDER1; double keyWAVE1 = PacsReadKeyWave("1",sum1); answer[nb_answer] = keyWAVE1; nb_answer = nb_answer + 1; } if(nORDER2 >= 1.0) { sum2 = sum2 / nORDER2; double keyWAVE2 = PacsReadKeyWave("2",sum2); answer[nb_answer] = keyWAVE2; nb_answer = nb_answer + 1; } if(nORDER3 >= 1.0) { sum3 = sum3 / nORDER3; double keyWAVE3 = PacsReadKeyWave("3",sum3); answer[nb_answer] = keyWAVE3; nb_answer = nb_answer + 1; } return answer; } // CVS comments : $Id: PacsPhotSlewCal.txt,v 1.10 2008/05/06 13:34:53 vanessa Exp $ // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsPhotSlewCal.txt // // Input arguments // Type Description // // Return values // Type Name Default Description // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 DAC 30-Nov-2005 (inspired by PacsSpecSlewCal) // 0.2 DAC 20-sep-2006 Clean up leftovers from SPEC script // 0.3 DAC 6-dec-2006 Adapted to simpler PHOT_fltw_move // 0.4 DAC 27-jun-2007 SPR-3339 Always move filter wheel // 1.0 DAC 10-oct-2007 SCR-3628 Added arguments to call aot_prologue // 1.1 JVP 28-apr-2008 ERROR in filter_id assignation: POS A is LW for the // photometer (remind POS A = SW for spectro) // 1.2 DAC 20-may-2008 Moved FLTW move into DO_PROLOGUE section // 2.0 SCR 4431 VDO: implemetation of data_rates int[] procedure PacsPhotSlewCal { bool verbose = true; // Debug_print or not {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,64,0,0,0,0,0,0,0}]; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,64,0,0,0,0,0,0,0}]; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // OBCP parameters bool doPROLOG = true; // Perform/don't AOT prologue string filter = "blue2"; // PHOT filter }{ // Array to collect OBCP times per line int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); int[] totalDUREE = [0,0,0,0,0]; // Table of filter wheel positions as per MIB // Actually originally not blue1 = SW = POS B, and blue2 = LW = POS A for // the photmeter if(filter == "blue1") { string filterID = "POS B"; } if(filter == "blue2") { filterID = "POS A"; } // Long sequence to "unpack" default values from tuples int gain_blu = confPHOTblu[0]{0}; int comp_mode_blu = confPHOTblu[0]{3}; int glitch_det_blu = confPHOTblu[0]{4}; int nb_raw_blu = confPHOTblu[0]{6}; int gain_red = confPHOTred[0]{0}; int comp_mode_red = confPHOTred[0]{3}; int glitch_det_red = confPHOTred[0]{4}; int nb_raw_red = confPHOTred[0]{6}; int nb_cycles_obs_cal = confOBCP[0]{0}; int nb_SRC_REF = confOBCP[0]{3}; int nb_rdouts_plateau = confOBCP[0]{4}; int nb_CS1_CS2 = confOBCP[0]{5}; int chop_pos_SRC = confOBCP[0]{12}; int chop_pos_REF1 = confOBCP[0]{13}; int chop_pos_REF2 = confOBCP[0]{14}; int chop_def = confOBCP[0]{17}; int detector = confOBCP[0]{18}; int filterPOS = confOBCP[0]{19}; if(gain_blu == 1 && gain_red == 1) { string set_gain = "LOW"; } else { if(gain_blu == 0 || gain_red == 0) { set_gain = "HIGH"; } } // Issue PHOT_aot_prologue if demanded if(doPROLOG) { totalDUREE = PHOT_aot_prologue(set_gain,comp_mode_blu,comp_mode_red,nb_raw_blu,nb_raw_red,verbose); // Turn the filter wheel int timeFLTW = PHOT_fltw_move(filterID); // increment total duration and overheads totalDUREE[0] = totalDUREE[0] + timeFLTW; totalDUREE[4] = totalDUREE[4] + timeFLTW; } // Issue now OBCP4 for demanded filter // Table OBCP4params has parameter values for CAL using blue1 or blue2 // Get params for demanded filter from OBCP4params string calNAME = "OBCP4params"; // Table acces key is "cal1" or "cal2", corresponding to blue1 and blue2 // respectively. string key = "cal1"; if(filter == "blue2") { key = "cal2"; } nb_cycles_obs_cal = ilookup(calNAME,key,"nb_cycles_obs_cal"); nb_SRC_REF = ilookup(calNAME,key,"nb_SRC_REF"); nb_rdouts_plateau = ilookup(calNAME,key,"nb_rdouts_plateau"); nb_CS1_CS2 = ilookup(calNAME,key,"nb_CS1_CS2"); // Read CS positions from CHOPPERCSparams int pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); // Update OBCP[0] tuple with CAL-U values confOBCP[0]{0} = nb_cycles_obs_cal; confOBCP[0]{3} = nb_SRC_REF; confOBCP[0]{4} = nb_rdouts_plateau; confOBCP[0]{5} = nb_CS1_CS2; confOBCP[0]{15} = pos_CS1; confOBCP[0]{16} = pos_CS2; // Call now OBCP with derived parameters int[] dureeOBCP = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,pos_CS1,pos_CS2,comp_mode_blu,comp_mode_red,chop_def); if(verbose) { debug_print("*** SlewCal OBCP: " + confOBCP[0]); debug_print("*** SlewCal OBCP returns: " + dureeOBCP); } // Tally total durations for(int loop0 = 0 .. 4) { totalDUREE[loop0] = totalDUREE[loop0] + dureeOBCP[loop0]; } if(verbose) { debug_print("***** SlewCal performed CAL: " + key + " requires " + totalDUREE[0] + " [sec]"); } // Leave bus scheduler in a known state (SP1707) sync(); return totalDUREE; } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. Special HKs. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up 2 housekeeping parameter for diagnostic housekeeping // of the chopper for open loop tests. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : // 1.0 08-11-06 HD. Spec. HK for open loop measurements. block SPEC_Chopper_dhk_imt_spec_bb PACS 390 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 3; {int}[] parlist = [{244},{258},{0xffff}]; int[] aux = [244,258,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 0; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // FileName : PACS_Spec_Gra_Mec_Setup_Redun_OBS.cus // Missionphase : Operations // // Purpose : Schedule the associated CUS procedure // // CUS author :HF // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Versions : 2.0 // History : 1.0 02-Aug-2007 Simple copy of PACS_Spec_Gra_Mec_Setup_OBS.cus // for use in SFT redundant // 2.0 14-Feb-2008 Made into a procedure to be called by // by PacsEng_Spec_gra_Mec_Setup_Cold_redun // // // VARIOUS INSTRUMENT VERSION AVAILABLE FROM THE CALU (2006.06.14) // Different rows here pertain to different PACS models or environmental conditions // Row BreadBoard Values used at the pre-ILT Level, with the dummy/breadboard version of the mechanisms // Row DMCUMWarm Values extracted from the DMC User Manual v4.0 (OBSW 6.000). Warm conditions. Nominal chain. // Row DMCUMWarmRedun Values extracted from the DMC User Manual v4.0 (OBSW 6.000). Warm conditions. Redundant chain. // Row DMCUM Values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Nominal chain. // Row DMCUMRedun Values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Redundant chain. // Row DMCUMFreqSwitch Values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Nominal chain. Frequency Switching // Row DMCUMFreqSwitchRedun values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Redundant chain. Frequency Switching // Row DMCUMFast Values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Nominal chain. Rate->12 (4 degrees / second) // Row DMCUMFastRedun Values extracted from the DMC User Manual v4.0 (OBSW 6.000). 4.2 K. Redundant chain. Rate->12 (4 degrees / second) // procedure PACS_Spec_Gra_Mec_Setup_Cold_Redun { string calUrow = "ISTSlow_R"; // INSTRUMENT VERSION }{ // GRATING CALIBRATION TABLE : CONFGrat // ------------------------------------ string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE // // call procedure PACS_Spec_Gra_Mec_Setup(calUname,calUrow); } // File : PACS_Spec_SPU_Buffer_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Prepare SPU for spectroscopy buffer transmission mode // // Author : T. Mueller, H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : // // Comments : // // Version : 1.2 // History : 1.0 / 16-Nov-2004 initial version // 1.1 6-apr-2006 DMC v6.0.1 // 1.2 28-mar-2007 DAC Update for SPU V13.x // procedure PACS_Spec_SPU_Buffer_Setup { }{ debug_print("Start PACS_Spec_SPU_Buffer_Setup"); int comp_mode = 25; int spu_nraw = 3; //-------------------- // Preparation //-------------------- Pacs_SPUS_STOP_REDUCT_COMPR(); delay(1); Pacs_SPUL_STOP_REDUCT_COMPR(); delay(1); //-------------------------- // SPU compression/reduction //-------------------------- {int}[] list_tuple = [{comp_mode},{comp_mode}]; int[] list_int = [comp_mode,comp_mode]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_SPU_TRAN_MODE(list_tuple,chksum); delay(1); //---------------------------------------------------------- // Setting of start index of raw channels for SPUS and SPUL //---------------------------------------------------------- int spus_startraw = 1; int spul_startraw = 1; //------------------------ // Raw channel settings //------------------------ Pacs_SPUS_RAW_CHAN_TRAN_MODE("SPEC",spu_nraw,spus_startraw); delay(1); Pacs_SPUL_RAW_CHAN_TRAN_MODE("SPEC",spu_nraw,spul_startraw); delay(1); //--------------------------------------------- // Sub-ramp and detector const. setting to SPU // Spectro "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in spectroscopy int tfs = 1000; // Threshold for chopper position deviation in spectroscopy int tcs = 100; // Threshold for grating deviation int tgd = 100; // Readouts per SubRamp readback int rsrr = 16; // Glitch detection for spectroscopy int gdfs = 1; // Ramp fitting algorithm int rfal = 0; // Sorting algorithm int soal = 4; // lossless compression algorithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand int[] aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; int check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Spectro "Ottensamer" block ("L" SPU) ppf = 0; ppp = 0; tfs = 1000; tcs = 100; tgd = 100; rsrr = 16; gdfs = 1; rfal = 0; soal = 4; lcal = 0; pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); //-------------------- // Send time stamps //-------------------- // PC148420 "DMC_WRT_TIME" WRITE THE TIME SENT BY THE DPU INTO THE DMC BUFFER // Fixed GroupSize: 1, repetition: 2 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // PC007380 "DPU_SEND_TIME" DPU SENDS THE TIME TO DEC/MEC //tcsend PC007380 //waittime 0.5 Pacs_DPU_SEND_TIME(); delay(1); // PC077420 "DMC_SET_TIME" SET THE TIME PREVIOUSLY WRITTEN BY THE WRITE TIME COMMAND // tcsend PC077420 // waittime 0.5 Pacs_DMC_SET_TIME(); delay(1); //---------------------------- // Start reduction/compression //---------------------------- // SPUS-START-REDUCT-COMPR // tcsend PC039400 // waittime 0.5 Pacs_SPUS_START_REDUCT_COMPR(); delay(1); // SPUL-START-REDUCT-COMPR // tcsend PC040390 // waittime 0.5 Pacs_SPUL_START_REDUCT_COMPR(); delay(1); //----------------- // End of Procedure //----------------- } // $Id$ // Missionphase : PACS PV Phase // // Script : PACS_Chopper_uk_move_21000_ast_OBS.cus // // // Missionphase : IST Chopper Day // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-21000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on the commanding during the CQM/FM ILT. // // Version : 4.0 // // History : 1.0 02-03-07 HD. Script to do simple chopper cycle // 2.0 05-07-07 HD. IST Chopper Day // 3.0 05-07-07 MN. edited for SVT/PV conformance // : 4.0 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Chopper_uk_move_21000_ast { /* Needed variables to call PacsEng_Chopper_uk_move_21000_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_uk_move_21000_ast */ }{ // 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(PACS_Chopper_uk_move_21000_NoConf_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_uk_move_21000_NoConf_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsSpecWaveArray.txt,v 1.5 2007/10/19 15:32:56 dcesarsk Exp $ // Purpose : To create an array given values for 1st and last element, // subjected to the following rules: // - at least 10 elements // - at most 120 elements // - nominal step = 0.5 // // CUS author : // Script file : PacsSpecWaveArray.txt // // Input arguments // type name description // // Return values // Type Description // // Description : Utility for PacsSpecRMS. Given waveLO and waveHI, compute // a [waveArray] subjected to the following rules: // - at least 10 elements // - at most 120 elements // - nominal waveStep = 0.5 // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 // History : 0.1 10-mar-2007 DAC // double[] procedure PacsSpecWaveArray { /* Input wavelengths */ double waveLO = 100.0; double waveHI = 110.0; bool verbose = true; }{ if(verbose) { debug_print("AUX:LO and HI: " + waveLO + "/" + waveHI); } // Nominal waveStep double[] waveStep = [5.0E-4,0.0010,0.01,0.05,0.1,0.2,0.5,1.0,2.0]; // Input span double span = abs(waveHI - waveLO); // Nb of samples with nominal step int stepIndex = 4; int nbSamples = ifloor(span / waveStep[stepIndex]); // Is it within range? while(nbSamples > 120 && stepIndex <= 7) { stepIndex = stepIndex + 1; nbSamples = ifloor(span / waveStep[stepIndex]); } while(nbSamples < 10 && stepIndex >= 1) { stepIndex = stepIndex - 1; nbSamples = ifloor(span / waveStep[stepIndex]); } // Take estimated nbSamples and compute exact waveStep double theStep = span / double(nbSamples); if(verbose) { debug_print("AUX:Size RMS table: " + nbSamples + "; Sample: " + theStep); } // Create and fill wave array double[] wave = [0.0]; for(int loop = 0 .. nbSamples) { wave[loop] = waveLO + double(loop) * theStep; } return wave; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_CRE_Setup_Cold_HeI { /* No variables to call PacsEng_Spec_CRE_Setup_Cold_HeI */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_Setup_Cold_HeI */ }{ // 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(PACS_Spec_CRE_Setup_Cold_HeI())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_CRE_Setup_Cold_HeI(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Gra_Diaghk1khz_Setup.cus // Missionphase : PACS FM ILT // // Purpose : Switch on 1khz diagnostic hk relevant to grating // // Author : B.Vandenbussche // // Arguments : // // Description : Grating diagnostic housekeeping ON - 1khz // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-nov-2006 initial version by BV // // ----------------------------------- // @author B. Vandenbussche // @date today // @version 1.0 // @purpose Switch on diagnostic housekeeping relevant to grating at 1khz // @comment - // ------------------------------ // Uncomment to test the script for tcl syntax using a normal tcl interpreter // source offlinetest.tcl // Uncomment till here ---------- block PACS_Spec_Gra_Diaghk1khz_Setup PACS 157 { }{ // Register start of BB WriteBBID($BBID); // Rate : 1Khz int diag_hk_period = 0; // DMC_WRT_DIAG_HK_LIST // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_OUTPUT 452 {int}[] list_tuple = [{256},{257},{250},{251},{452},{0xffff}]; int[] list_int = [256,257,250,251,452,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // End of procedure //----------------- // Mark End of Block WriteEndBB(); } // File : PACS_Spec_Flash_IST.cus // // Purpose : Check performance of flashers under various low power regimes // // // Author : P. Royer // // Arguments : // // Prerequisite : Flashers on // // Description : Loops over low, but increasing currents sent to the flashers // : // Comments : // // // Version : 2.0 // History : 1.0 / 11-Aug-2006 initial version by PR // 1.1 / 05-Apr-2007 Update position of BB // Include SWON/SWOF Flashers // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Check performance of flashers under low power regimes // @comment - // procedure Pacs_Spec_Flash_IST { }{ // // Position FWSPEC on POS B // SPEC_fltw_move("POS B"); // // SWON FLASHERS PACS_Spec_Flash_SWON(); // // Internal parameters // ------------------- int chop_pos_BB1 = -21350; int chop_pos_BB2 = 21200; // int nchop = 1; double[] multi = [1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,15.0,20.0]; int stab_time = 5; // // 20.475 = 0.1 mA double current_step = 20.475; double current_ini = 0.0; int current = 0; // // Set the Flashers to initial values // ---------------------------------- // PACS_Spec_Flash_Setup(current_ini, current_ini); // delay(stab_time); // // Loop on low power regimes // ------------------------- for(int loop = 1 .. length(multi)) { current = ifloor(current_ini + multi[loop - 1] * current_step); for(int loopin = 1 .. nchop) { // OPERATE ON BB1 PACS_Chop_Move_Abs(chop_pos_BB1); delay(stab_time); PACS_Spec_Flash_Setup(current,current); delay(stab_time); PACS_Spec_Flash_Setup(0,0); delay(2 * stab_time); // OPERATE ON BB2 PACS_Chop_Move_Abs(chop_pos_BB2); delay(stab_time); PACS_Spec_Flash_Setup(current,current); delay(stab_time); PACS_Spec_Flash_Setup(0,0); delay(2 * stab_time); } } // // Reset the Flashers to 0 current // ------------------------------ PACS_Spec_Flash_Setup(0,0); delay(20); // // SWOF FLASHERS PACS_Spec_Flash_SWOF(); // } // Missionphase : FM ILT // // Purpose : Move chopper absolute // // Author : Pierre Royer // // CVS file : // // Arguments : // // Description : // // Dependencies : // // Preconditions : // // Comments : // // // Version : 1.0 // // History : 1.0 08-Jun-2006 Creation by PR // procedure PACS_Chop_Move_Abs { int chop_pos = 0; //Chopper target position }{ Pacs_DMC_MOVE_CHOP_ABS_RAW(chop_pos); delay(1); } // Missionphase : // // Purpose : Stops the diagnostic housekeeping // // Author : // CUS author : // // Description : // // Dependencies : // // Preconditions : PACS switched-on // // Comments : // // Version : 2.0 // // History : 0.1 04-05-06 creation by SC // 1.0 24-07-06 SC. test script. // 2.0 25-07-06 SC. script works. // block SPEC_DiagHK_DynRange_block_stop PACS 404 { }{ // Register start of BB WriteBBID($BBID); // Diagnostic HK stops Pacs_DMC_STOP_DIAG_HK(); // Mark End of Block WriteEndBB(); } command PacsCcuMonitorPeriodRecycle HFKACQP2 { } { bus_schedule(SC, 0); } // CVS file : CONF_spec_fltw_R.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the spectro filter wheel Redundant Cold // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 1.0 04-Jul-2007 PR // procedure CONF_spec_fltw_R { }{ string calUname = "CONFFWSPEC"; // FWSPEC CALIBRATION TABLE string calUrow = "FMILT_R"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWSPEC_CONF_PAR(parlist,check_sum); } // File : PACS_Chopper_EnDis_PlateauTest_NoConf_ast.cus // Missionphase : SVT / flight // // Purpose : Switch-on/switch-off and enanle/disable test of chopper at pos 3000 // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : Flight procedure to verify the stability of the chopper. // Produces diagnostic housekeeping data, enables the // chopper, move to pos 3000 for 300 seconds, and disables again. // // Comments : Copied from PACS_Chopper_EnDis_Test_ast300_OBS // without the configuration and with MOIS comments // // Version : 1.0 // History : 1.0 17-Oct-2007 BV initial version // // procedure PACS_Chopper_EnDis_PlateauTest_NoConf_ast { }{ mois_comment("Start of procedure: verify the stability of the PACS chopper during 5sec at pos 3000"); // Time 5 sec int n = 5; // Chopper position 3000 int pos = 3000; // mois_step("Enable diagnostic housekeeping"); // Set diagnostic HK (1 kHz, 4 parameters) PACS_Chopper_EnDis_Test_dhk("ON"); delay(10); // mois_step("Switch on and enable chopper for 5 seconds at position 3000"); // Switch on and enable chopper for n seconds, while n is given by the user PACS_Chopper_SWON_SWOF_only("ON"); delay(20); EnDis_chopper("ON"); delay(20); PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(pos); delay(n); //Go Back to Zero Position PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(0); delay(1); EnDis_chopper("OFF"); delay(20); PACS_Chopper_SWON_SWOF_only("OFF"); delay(20); mois_step("Stop diagnostic housekeeping"); // Stop diagnostic HK PACS_Chopper_EnDis_Test_dhk("OFF"); } // $Id: PacsCal_Spec_QuickFullSpectrum.txt,v 1.2 2008/11/12 18:22:41 bart Exp $ // Missionphase : PACS PV Phase // // // // // Purpose : Quick full spectral scan in about 1 hour in all bands with pointing // // // Input arguments Integrating capacitance blue (0,8,4,12) and red; chopper position // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP28 for executing quick full scans in both filters // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // Version : 1.1 // History : 1.0 23-oct-2008 BV Adopted from PacsEng_Spec_QuickFullSpectrum // 1.1 12-nov-2008 BV corrected state machine section // obs PacsCal_Spec_QuickFullSpectrum { int chop_def = 650; // chopper position during grating scan int capa_red = 12; // Red capacitor int capa_blu = 0; // Blue capacitor int naifid = 0; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) double yoffset = 0.0; // yoffset [arcsec] double xoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC }{ // Compute the time // Execute the pointing request bool execute = true; // Slew // Write OBSID during slew int tOBSID = duration(WriteOBSID($OBSID)); // no initial hold int tih = 0; // Final hold 12-nov-2008 BV corrected state machine section // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // Duration of "stable" pointing int tp = imax(1,duration(Pacs_Spec_QuickFullSpectrum(chop_def,capa_red,capa_blu))); //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tOBSID,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // 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] == 1) { // Declare start of OBS WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_QuickFullSpectrum(chop_def,capa_red,capa_blu); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } } // Mission phase : Performance Verification Phase // // Purpose : PCD req.1.1.1 for the Performance Verification Phase // Check the bias/signal relationship using CSs and the central FOV // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_lowGainBiasDirect // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0s // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_lowGainBiasDirect // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_lowGainBias(1, "LOW") // // Version : Mon Jul 14 05:57:16 CEST 2008 // obs PacsCal_Phot_lowGainBiasDirect { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0s int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeSetBias = duration(PHOT_set_biases(endBiasTable,"DIRECT","LOW")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false)); //Minimum slew time int tslewmin = timeOBSID + timeSetBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeSetBias + timeCal3CPR5 + timeEndID; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_lowGainBiasDirect(measure_time,startBiasTable,endBiasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } //************************************ // Call the Phot_lowGainBiasDirect //************************************ Phot_lowGainBiasDirect(measure_time,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,664,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } ///////////////////////////////////////////////////////////////////////////// /// $Id: PacsPhoto.def,v 1.69 2008/05/14 11:10:32 vanessa Exp $ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsPhoto AOT // CUS author : DAC // Script file : PacsPhoto.def // Return values // Description : // This AOT has to cater to three different source morphologies: // "point", "small", and "large". Each mode requires its own pointing modes. // Available pointing modes (reference is to JBr's document): // NOTE: All modes include operations during SLEW and operations at end of OBS. // NOTE: Updated based on e-mail from MS dated 3-Dec-2005 (denoted UPDATE) // NOTE: Updated after Saclay meeting // ==== "point" // no nodding 2.1 fine_pointing // nodding (includes "hold" periods) 3.4 nodding_pointing // UPDATE: Nodding is always needed ==> eliminate fine_pointing // // ==== "small" // (raster dimensions and steps TBD; expect 2x2 or 3x3) // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding always used ==> nodding_in_raster // // ==== "large" // Can be RASTER or SCAN (freeze mode is based upon a SCANning PointMode) // RASTER // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding not used ==> raster_pointing // // SCAN // There is no nodding and no chopping. "Hold" periods are allowed (mode 2.14) // Leg length is restricted to 20 degrees. // // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 2-Sep-2005 DAC // 4.5 2-may-2007 For history before today see CVS // Fixed SPR-3160 as tih = duration(OBCP7) // 4.6 22-may-2007 SPR-3211 Include overheads in Calibration time // 4.6.1 31-may-2007 Renamed patt to pattnod in "nodding_pointing" // 4.6.2 27-jun-2007 SPR-3339 Correct SlewCal module // 4.7 20-sep-2007 SCR-3552 Add skewCorrec (in PACSyzoffsets) to pattnod // 4.8 10-oct-2007 SCR-3628 Add Prime/Parallel to PacsPhotDefaults // 5.0 14-jan-2008 DAC Use standard names for RA,DEC // 6.0 28-apr-2008 VDP SPR3689: fixed mapScanLegLength to be decimal // ..... SCR 4196: implement Low Gain for Bright sources // 6.1 24-jun-2008 DAC MapScanLength back to integer // 6.2 17-jul-2008 DAC Inserted TMMarker600 at begin of each scan leg // 7.0 15-sep-2008 VDP implement data_rates and HK rates SCR 4431 // 7.1 26-sep-2008 VDP remove data_rate (already in WriteOBSID and // PHOT_aot_proplogue/epilogue // Merged with DAC on the fly modif // 7.2 30-sep-2008 VDP MapScanLegLength back to double // 7.3 9-oct-2008 VDP&DAC Debugged SCAN mode: removed no longer needed // TMMarker, delay() and WriteBBend. Remove // use of OBCP7 // {int,int,int,double,{string,double,double,double,double,double,double}[]} obs PacsPhoto { string blue = "blue1" in ["blue1","blue2"]; int repFactor = 1 in [1,1500]; // Hard limit for source = "point" string source = "point" in ["point","small","largeRaster","largeScan","none"]; // SrceSize string mapScanSpeed = "high" in ["high","medium","low"]; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanConstrFrom = 0.0 in [0.0,360.0]; double mapScanConstrTo = 0.0 in [0.0,360.0]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool mapScanHomCoverage = true; bool mapScanSquare = false; double pointStep = 2.0 in [2.0,480.0]; double lineStep = 2.0 in [2.0,480.0]; string mapRasterAngleRef = "inst" in ["inst","i+c"]; double mapRasterConstrFrom = 0.0 in [0.0,360.0]; double mapRasterConstrTo = 0.0 in [0.0,360.0]; int m = 2 in [2,100]; int n = 1 in [1,100]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; bool dither = false; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; //RA,DEC or SSO double fluxPntBlu = 116.0 in [0.0,2.0E7]; // Flux density in blue band mJy double fluxPntRed = 150.0 in [0.0,2.0E7]; // Flux density in red band mJy double fluxExtBlu = 116.0 in [0.0,2.0E7]; // Flux in blue band MJy/sr double fluxExtRed = 40.0 in [0.0,2.0E7]; // Flux in red band MJy/sr int obsOverhead = 180; // Slew overhead /* End of input section */ }{ // Begin "pointing" section // Overall "verbosity" bool verbose = false; // New nodding_pointing variable bool startAtOFF = false; // Conversion to deprecated variables bool noddingSel = true; if(source == "largeRaster") { string largeOptions = "raster"; bool mapRasterSel = true; noddingSel = false; } if(source == "largeScan") { largeOptions = "scan"; mapRasterSel = false; noddingSel = false; } int mapRasterNumCycles = repFactor; // Useful variables // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // // Set messages for HTML format message(""); message(""); // Pointing mode has not been established yet int pointCase = 0; // Determine the pointing mode if(source == "point") { // Variable needed to obtain choper throw from CAl-U string srcID = "pointSRC"; // Just for completiness, define a 1x1 raster m = 1; n = 1; // Fine pointing without nodding is disallowed (pointCase remain null) if(!noddingSel) { string pointMode = "basic_fine_pointing"; string shortDesc = "Point source (no nodding)"; // not allowed pointCase = 11; } else { pointMode = "nodding_pointing"; shortDesc = "Point source (nodding and chopping)"; pointCase = 12; string yzoffsetROW = "P" + pointCase; } } if(source == "small") { srcID = "smallSRC"; // Obtain the size of the raster from CAL-U "SMALL_SRC_params" m = ilookup("SMALL_SRC_params","PHOT","mRast"); n = ilookup("SMALL_SRC_params","PHOT","nRast"); pointStep = dlookup("SMALL_SRC_params","PHOT","pointStep"); lineStep = dlookup("SMALL_SRC_params","PHOT","lineStep"); if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = " Small source (no nodding)"; // not allowed // pointCase = 21; } else { pointMode = "nodding_raster_pointing"; shortDesc = "Small source (nodding and chopping)"; pointCase = 22; yzoffsetROW = "P" + pointCase; } } // Large source in Raster Mode if(source == "largeRaster") { srcID = "largeSRC"; if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = "Large source, raster mode (chopping and no nodding)"; pointCase = 31; yzoffsetROW = "P" + pointCase; } else { pointMode = "nodding_in_raster"; shortDesc = "Large source, raster mode (chopping and nodding)"; // not allowed // pointCase = 32; } } // Large source in Scan Mode if(source == "largeScan") { srcID = "largeSRC"; pointMode = "line_scan_pointing"; shortDesc = "Large source, line scan mode (no chopping)"; // For consistency m = 1; n = mapScanNumLegs; pointCase = 33; yzoffsetROW = "P" + pointCase; } // If pointCase is still 0, then something went wrong with the PointMode logic... if(pointCase == 0) { error("NODDING is incompatible with source: " + source); } // The pointing mode has been established. Continue with other input data // from HSPOT if(verbose) { debug_print("================> PointMode: " + pointMode); } // // confPHOT arrays (red and blu) compared to confSPEC // PHOT name SPEC name // confPHOTred{ 0} gain capa_red; // confPHOTred{ 1} N/A nb_rdouts_ramp_red; // confPHOTred{ 2} N/A nb_rdouts_subramp_red; // confPHOTred{ 3} same comp_mode_red; // confPHOTred{ 4} same glitch_det_red; // confPHOTred{ 5} ?? ramp_fit_alg_red; // confPHOTred{ 6 ?? nb_raw_red; // confPHOTred{ 7} N/A bias_r_red; // confPHOTred{ 8} N/A bias_d_red; // // Define confOBCP array. // NOTE: the conf arrays are inherited from PacsSpec, where the [0] element // represented the default values, and the [n] element represented values // to be used with the n-th wavelength. Here - PHOT - [0] still represents // the default values and [1] values corresponding to the chosen filter. // Could even use [1] and [2] for blue1 and blue2.... but will not! {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confPHOTblu and confPHOTred {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,0,0,0,0,0,0}]; // Define paramsPHOT, a "tuple of tuples" // Estimator module returns {confPHOTblu,confPHOTred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOT = {clone(confPHOTblu[0]),clone(confPHOTred[0]),clone(confOBCP[0])}; // including a new section for Low Gain implementation SCR4196 bool isBrightPacs = false; string calUFile = "isBrightPacsTrigger"; // section defining triggering Fluxes (to be read in CALU table) double fluxPntRedTriggerLowGain = dlookup(calUFile,"Red","fluxPntTrigger"); if(blue == "blue1") { double fluxPntBluTriggerLowGain = dlookup(calUFile,"Blue","fluxPntTrigger"); } else { if(blue == "blue2") { fluxPntBluTriggerLowGain = dlookup(calUFile,"Green","fluxPntTrigger"); } } double fluxExtRedTriggerLowGain = dlookup(calUFile,"Red","fluxExtTrigger"); if(blue == "blue1") { double fluxExtBluTriggerLowGain = dlookup(calUFile,"Blue","fluxExtTrigger"); } else { if(blue == "blue2") { fluxExtBluTriggerLowGain = dlookup(calUFile,"Green","fluxExtTrigger"); } } // section test if(fluxPntRedTriggerLowGain <= fluxPntRed || fluxPntBluTriggerLowGain <= fluxPntBlu || fluxExtRedTriggerLowGain <= fluxExtRed || fluxExtBluTriggerLowGain <= fluxExtBlu) { isBrightPacs = true; } // Obtain default values for "Prime" mode paramsPHOT = PacsPhotDefaults(srcID,"Prime",isBrightPacs,verbose); // Array [0] of paramsPHOT contains the default values; array [1] // will contain the values based on HSPOT input. Array [1] is a copy of [0]; // only elements depending on HSPOT will be updated // Copy default values to individual "conf" tuples confPHOTblu[0] = paramsPHOT{0}; confPHOTred[0] = paramsPHOT{1}; confOBCP[0] = paramsPHOT{2}; // Now comes the module to estimate PACS parameters as a function of the // exposure time given by the user. // paramsPHOText (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,repeat_factor,nhold,dummy2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsPHOText = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for given HSPOT input. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("++Photo: confOBCP[0]: " + confOBCP[0]); } paramsPHOText = PacsPhotEstimatorOBCPn(pointCase,blue,repFactor,paramsPHOT,noddingSel,dither,verbose); // Copy estimates to respective tuples confPHOTblu[1] = paramsPHOText{0}; confPHOTred[1] = paramsPHOText{1}; confOBCP[1] = paramsPHOText{2}; int nb_nods = paramsPHOText{3}{0}; int repeat_factor = paramsPHOText{3}{1}; int nhold = paramsPHOText{3}{2}; ///////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source. // We have to collect the duration of all TCs that will be released after the // PointingRequest // First TC is associated with setting OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsPhotSlewCal to perform AOT prologue and CAL during // The time needed to perform these activities during slew is // with no prologue: bool doProlog = false; int timeSlewCal = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCal: " + timeSlewCal); } // With prologue doProlog = true; int timeSlewCalProlog = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCalProlog: " + timeSlewCalProlog); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsPhotCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsPhotCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // Duration of any nod leg or staring observation // Use OBCP3 for point source // Use OBCP4 for all others, except scan mode if(pointCase == 11 || pointCase == 12) { int timeOBS = duration(PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP3: " + timeOBS); } } if(pointCase == 22 || pointCase == 31) { timeOBS = duration(PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP4: " + timeOBS); } } if(pointCase == 33) { // Estimate how long OBCP7 has to run to cover a scan leg // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec double rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } double timeLEG = mapScanLegLength * 60.0 / rate; // Duration of OBCP7 // For one readout int nb_SRC = 1; confOBCP[1]{3} = nb_SRC; int timeOBS1 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // For 20 readouts nb_SRC = 20; confOBCP[1]{3} = nb_SRC; int timeOBS2 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 19.0; double offset = double(timeOBS1) - slope; // Compute nb_SRC so that OBCP runs during the whole scan leg nb_SRC = iceil((timeLEG - offset) / slope); if(verbose) { debug_print("Duration scan leg: " + timeLEG); debug_print("Needed nb_SRC to fill scan leg: " + nb_SRC); } confOBCP[1]{3} = nb_SRC; timeOBS = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); } if(verbose) { debug_print("confOBCP[1]: " + confOBCP[1]); debug_print("==> Duration OBCP: " + timeOBS + " [sec] per nod; pointCase: " + pointCase); } // Finally deal with PHOT_aot_epilogue and WriteEndID int timeEpilogue = duration(PHOT_aot_epilogue()); int timeEndID = duration(WriteEndID()); timeEpilogue = timeEpilogue + timeEndID; if(verbose) { debug_print("Duration aot_epilogue: " + timeEpilogue); } // We have all elements to issue a Pointing Request and generate TCs // - duration of SlewCAL // - duration of OBS (one pointing) // - nb of nods or nb of raster points // - nhold ///DAC nhold = 0; ///DAC // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // The nodding step has been estimated already (PacsPhotDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table // Read nod amplitude [arcsec] double nodThrow = dlookup("PHOT_CHOP_params",srcID,"NOD"); int max_dither = confOBCP[1]{1}; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("TimeSlewCal : " + timeSlewCal); debug_print("TimeOBS : " + timeOBS); debug_print("m/n : " + m + "/" + n); debug_print("nb_nods/repeat_factor/nhold: " + nb_nods + "/" + repeat_factor + "/" + nhold); debug_print("NOD amplitude for " + srcID + ": " + nodThrow + " [arcsec]"); int chpSRC = confOBCP[1]{12}; int chpREF1 = confOBCP[1]{13}; int chpREF2 = confOBCP[1]{14}; debug_print("#### CHOP SRC/REF1/REF2: " + chpSRC + "/" + chpREF1 + "/" + chpREF2); debug_print("CHOP dither: " + max_dither); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); } // Issue pointing request // Virtual aperture // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("##Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("##skewCorrec : " + skewCorrec); } // SCAN/RASTER orientation for "scan map" and "chopped raster" // RASTER defines mapRasterAngleRef = "inst" in ["inst", "i+c"]; // SCAN defines mapScanAngleRef = "sky" in ["sky", "inst", "s+c", "i+c"]; // By default S/C moves in instrument coordinates bool useINST = true; if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { useINST = false; } // Act according to pointCase // POINT source, i.e. 3.4 nodding_pointing if(pointCase == 12) { // Issue pointing request (when possible use JBr's variable names for clarity) // SlewCal during slew string ib = "P01_0"; int tslewmin = timeSetOBSID + timeSlewCalProlog; int tih = 0; int tfh = timeEpilogue; bool fixed = false; double pattnod = 0.0 + skewCorrec; int nnods = nb_nods; int tp = timeOBS; int tloadslewmin = 0; int nload = 0; int thold = timeSlewCal; // int nhold Already defined // Do not start at nod position startAtOFF = false; int[] fromPntReq = nodding_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); if(verbose) { debug_print("##### nodding_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tss = fromPntReq[2]; tload = fromPntReq[3]; } // SMALL source or LARGE raster with nodding if(pointCase == 22 || pointCase == 32) { // "nodding_raster_pointing" (3.6 in Pointing document) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; double patt = 0.0; // Chopper moves along -Y-axis pattnod = 270.0 + skewCorrec; // Chop nodThrow was already established // nodThrow = From CAL-U table int k = 0; fixed = false; int nrepeat = repeat_factor; double d1 = pointStep; double d2 = lineStep; thold = timeSlewCal; tp = timeOBS; nnods = nb_nods; // New arguments for pointing request; will be dealt with next iteration int top = 0; double raoff = 0.0; double decoff = 0.0; nrepeat = repeat_factor; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nnods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); if(verbose) { debug_print("##### nodding_in_raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tss = fromPntReq[3]; tll = fromPntReq[4]; tnod = fromPntReq[5]; tload = fromPntReq[6]; tsop = fromPntReq[7]; trep = fromPntReq[8]; } // SMALL or LARGE source with no nodding if(pointCase == 21 || pointCase == 31) { // raster_pointing (mode 3.5) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; // Perform raster in instrument coordinates fixed = false; //SPR-2431 Raster lines along y-axis patt = 90.0; d1 = pointStep; d2 = lineStep; tp = timeOBS; nrepeat = repeat_factor; thold = timeSlewCal; nhold = 0; k = 0; top = 0; raoff = 0.0; decoff = 0.0; fromPntReq = raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); if(verbose) { debug_print("##### raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tll = fromPntReq[3]; trep = fromPntReq[4]; tsop = fromPntReq[5]; } if(pointCase == 33) { // line_scan_pointing. Keep (most of) JBr's variable names tslewmin = timeSetOBSID + timeSlewCalProlog; // Case of homogeneous coverage double pi = 3.1415926535; // degrees to radians double dtor = 0.0; double rtod = 0.0; double halfDiag = 0.0; double halfDiagAngle = 0.0; dtor = 2.0 * pi / 360.0; rtod = 1.0 / dtor; halfDiag = sqrt(boloSSize * boloSSize + boloLSize * boloLSize) / 2.0; halfDiagAngle = atan(boloSSize / boloLSize) * rtod; // Add further constraint from RV (SPR-2889) // Add SPR-2699 further logic: mapScanAngleRef overrides ScanHom and ScanSquare if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { mapScanHomCoverage = false; mapScanSquare = false; } // Could simplify logic after SPR-2699 (mapScanHomCoverage cannot be true // unless inst or i+c have been specified) if(mapScanHomCoverage == true && (mapScanAngleRef == "inst" || mapScanAngleRef == "i+c")) { mapScanCrossScan = halfDiag * (abs(sin(dtor * (mapScanAngle + 90.0 - halfDiagAngle))) + abs(cos(dtor * (90.0 - halfDiagAngle - mapScanAngle + 90.0)))); if(verbose) { debug_print("New mapScancCross: " + mapScanCrossScan); } } // Case of square map request if(mapScanSquare == true && mapScanHomCoverage == true) { mapScanNumLegs = iceil(60.0 * mapScanLegLength / mapScanCrossScan); if(verbose) { debug_print("New mapScanNumLegs: " + mapScanNumLegs); } } ib = "P01_0"; tih = 0; tfh = timeEpilogue; // Use instrument coordinates unless HSPOT says otherwise fixed = false; if(useINST == false) { fixed = true; } patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeSlewCal; nhold = 0; nrepeat = repFactor; if(verbose) { debug_print("Map reference: " + mapScanAngleRef + "=" + fixed); } fromPntReq = line_scan_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,thold,nhold,nrepeat); //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tacc = fromPntReq[2]; tdec = fromPntReq[3]; tl = fromPntReq[4]; tll = fromPntReq[5]; trep = fromPntReq[6]; if(verbose) { debug_print("##### line_scan_with_hold"); } if(verbose) { debug_print("##### rate: " + rate + " arcsec/sec"); } // Here we record how long it takes to scan a line [sec] int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; } if(verbose) { debug_print("PointReq: " + fromPntReq + " for pointCase: " + pointCase); debug_print("PointMode: " + pointMode); } // End of "pointing" section }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); debug_print("++++++++++++++++++++++++ State Machine"); } // Initialize some "global" variables int totalOBStime = 0; int totalOBSover = 0; int totalCALtime = 0; int totalCALover = 0; int nbSCANlegs = 0; // Issue TCs int[] state = [0]; int nbOBS = 0; while(state[0] >= 0) { state = next_state(); //// STATE = SLEW if(state[0] == 1) { if(verbose) { int tNOW = time(); debug_print("=== SLEW/CAL starts at: " + tNOW); } // Set OBSID WriteOBSID($OBSID); doProlog = true; int[] calTime = PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); debug_print(" TotalCalTime: " + totalCALtime); } } else { //// STATE = INIT_HOLD if(state[0] == 2) { if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD starts at: " + tNOW); } // do nothing (OBCP7 is now entirely within the LINE state if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD ends at: " + tNOW); } } else { //// STATE = POINT if(state[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping int[] obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("POINT: POINTobs: " + nbOBS); } if(verbose) { tNOW = time(); debug_print("=== POINT ends at: " + tNOW); } } else { //// STATE = CAL_HOLD if(state[0] == 6) { doProlog = false; if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD starts at: " + tNOW); } calTime = PacsPhotSlewCal(false,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { debug_print("Accumulated CALtime: " + totalCALtime); } if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD ends at: " + tNOW); } } else { //// STATE = NOD if(state[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("NOD: NODobs: " + nbOBS); } } else { //// STATE = LINE if(state[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== SCAN starts at: " + tNOW); } // Issue OBCP7 for the duration of the scan leg obsTime = PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); totalOBStime = totalOBStime + scanTime; totalOBSover = totalOBSover + scanTime + scanOVER; nbSCANlegs = nbSCANlegs + 1; tNOW = time(); if(verbose) { debug_print("=== SCAN mode, leg: " + nbSCANlegs); debug_print(" TotalOBSTime: " + totalOBStime); debug_print(" tacctdec : " + scanOVER); debug_print("=== SCAN ends at: " + tNOW); } } else { //// STATE = FINAL_HOLD if(state[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } PHOT_aot_epilogue(); WriteEndID(); if(verbose) { tNOW = time(); debug_print("=== FinalHOLD ends at: " + tNOW); } } else { //// STATE = END if(state[0] == -1) { tNOW = time(); if(verbose) { debug_print("=== END state; time now: " + tNOW); } } } } } } } } } } int timeObsEnd = time(); int overOBS = totalOBSover - totalOBStime; int overCAL = totalCALover - totalCALtime; if(verbose) { debug_print("+++ OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print(" totalOBStime :" + totalOBStime); debug_print(" totalOBSover :" + overOBS); debug_print(" totalCALtime :" + totalCALtime); debug_print(" totalCALover :" + overCAL); } // Time considerations // The "science" part of the observations lasts tobs seconds (tobs from // PointReq[0]) // Time on source is totalOBStime. Hence int instrumentAndObservationOverhead = tobs - totalOBStime; // Begin "calculation" and report section string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "ObsMode: " + shortDesc + ""; lineCnt = lineCnt + 1; // More pointing information if(pointCase == 12) { msgLine[lineCnt] = "

    Chopper throw: " + nodThrow + " [arcsec]

    "; lineCnt = lineCnt + 1; double mapArea = boloArea; msgLine[lineCnt] = "

    PHOTO footprint: " + dformat(boloLSize,2) + " x " + dformat(boloSSize,2) + " [arcsec]

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    PHOTO area: " + dformat(mapArea,0) + " [arcsec2]

    "; lineCnt = lineCnt + 1; } if(pointCase == 21 || pointCase == 31 || pointCase == 22) { msgLine[lineCnt] = "

    Raster points/lines: " + m + "/" + n + "

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Step size: " + d1 + " x " + d2 + " [arcsec]

    "; lineCnt = lineCnt + 1; // Mapped region double sizeL = boloLSize + double(m - 1) * d1; double sizeS = boloSSize + double(n - 1) * d2; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

    PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

    "; lineCnt = lineCnt + 1; } if(pointCase == 33) { msgLine[lineCnt] = "

    ScanLeg: " + d1 + " [arcsec]; number of legs: " + n + "; leg separation: " + dformat(d2,1) + " [arcsec], scan speed: " + dformat(rate,2) + " [arcsec/sec]

    "; lineCnt = lineCnt + 1; // For the mapped area assume that we scan along the Large side of bolo // Size along scan line sizeL = d1 + boloSSize; // Size covered by successive legs sizeS = boloLSize + double(n - 1) * d2; msgLine[lineCnt] = "

    PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

    "; lineCnt = lineCnt + 1; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

    PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

    "; lineCnt = lineCnt + 1; } // Nodding pattern msgLine[lineCnt] = "

    Nod pattern (as applicable)

    "; lineCnt = lineCnt + 1; if(nb_nods == 0) { if(pointCase != 33) { msgLine[lineCnt] = " No nodding, S/C stays at nominal position<"; } else { msgLine[lineCnt] = " No nodding, S/C is in line scan mode<"; } lineCnt = lineCnt + 1; } if(nb_nods == 1) { msgLine[lineCnt] = " A->B "; lineCnt = lineCnt + 1; } if(nb_nods == 2) { msgLine[lineCnt] = " A->B B->A "; lineCnt = lineCnt + 1; } if(nb_nods > 2) { int aux1 = nb_nods - 2; msgLine[lineCnt] = " A->B B->A and " + aux1 + " more A->B or B->A leg(s) "; lineCnt = lineCnt + 1; } // Add dithering bla-bla msgLine[lineCnt] = "

    Dithering information

    "; lineCnt = lineCnt + 1; if(dither && pointCase == 12) { int half_dither = max_dither / 2; msgLine[lineCnt] = "

    Three position spatial dithering performed with the chopper (" + max_dither + " and " + half_dither + " chopper engineering units)

    "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

    Dithering information is not applicable.

    "; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

    Duration information

    "; lineCnt = lineCnt + 1; tNOW = time(); msgLine[lineCnt] = "

    AOT duration (w/overheads): " + tNOW + " [sec]

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    (AOT duration comprises 'on-sky' plus setup and CAL during slew)

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Breakdown of AOT duration:

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • On-sky time (w/overheads): " + tobs + " [sec]
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • (actual on-sky time: " + totalOBStime + " [sec])
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Setup and CAL during slew (w/overheads): " + tslew + " [sec]
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • (actual calibration time: " + totalCALtime + " [sec])
    "; lineCnt = lineCnt + 1; // The charged obsOverhead is the MAX between tslew, nominalOverhead if(tslew > obsOverhead) { obsOverhead = tslew; } int tcharged = tobs + obsOverhead; msgLine[lineCnt] = "

    AOT cost (includes time to slew to source): " + tobs + " + " + obsOverhead + " = " + tcharged + " [sec]

    "; lineCnt = lineCnt + 1; // On-SRC time calculations start here // Uses new algorithm: on-SRC = totalOBStime*boloArea/mapArea // OBS times above is for all pointings. For a raster, have to divide // by number of raster positions, i.e. m*n if(pointCase != 33) { // If steps are smaller than boloXSize, same sky will be seen several times // Compute Short and Long dimension number of sightings (assume source is // placed to maximize number of sightings, i.e. at the proper edge of bolo) // NOTE: exchanged pointStep and lineStep as suggested by Roland V. int nbShort = iceil(boloSSize / lineStep); // Cannot be larger than m if(nbShort > m) { nbShort = m; } int nbLong = iceil(boloLSize / pointStep); // Cannot be larger than n if(nbLong > n) { nbLong = n; } if(verbose) { debug_print("nbShort/nbLong: " + nbShort + "/" + nbLong); } // Time per raster point double auxTIMEold = double(totalOBStime * nbShort * nbLong) / double(m * n); double auxTIME = double(totalOBStime) * boloArea / mapArea; // Small source is a special case where by design the SRC is always in view if(pointCase == 22) { auxTIME = auxTIMEold; } } else { // elementary integration time [sec] will be computed as "transit" time // of the source across the BOLO detector // Case of scan leg size smaller than boloSize double sizeAux = boloSSize; if(d1 <= boloSSize) { sizeAux = d1; } // Assume source is 1st seen on row=1; each successive scan may see again // the same sky region if mapScanCrossScan is smaller than bolo width. // The number of times the same sky is scanned again: if(mapScanCrossScan != 0.0) { int nbCross = iceil(boloLSize / mapScanCrossScan); if(verbose) { debug_print("nbCross: " + nbCross); } } else { nbCross = repFactor; } // nbCross cannot be larger than mapScanNumLegs if(nbCross > mapScanNumLegs) { nbCross = mapScanNumLegs; } if(verbose) { debug_print("nbCross: " + nbCross); } // The "crossing time" double crossTime = sizeAux / rate; if(verbose) { debug_print("crossTime: " + crossTime); } // AuxTime is "crossing time" * number of crossings * repFactor auxTIMEold = double(repFactor * nbCross) * crossTime; // New way of estimating the "observing" time auxTIME = double(totalOBStime) * boloArea / mapArea; } if(verbose) { debug_print("AuxTIMEold: " + auxTIMEold + " [sec]"); debug_print("AuxTIME : " + auxTIME + " [sec]"); } // Pass the pointing mode to RMS (may need it for SRC,REF considerations) double[] pixRMS = PacsPhotNoiseRMS(pointCase,blue,auxTIME); msgLine[lineCnt] = "

    Sensitivity information

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Effective on-sky time (one spatial resolution element) : " + dformat(auxTIME,1) + " [sec]

    "; lineCnt = lineCnt + 1; // Point source or extended source if(pointCase == 11 || pointCase == 12) { msgLine[lineCnt] = "

    Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]

    "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

    Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]; extended RMS " + dformat(pixRMS[2],2) + " [MJy/sr]

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]; extended RMS " + dformat(pixRMS[3],2) + " [MJy/sr]

    "; lineCnt = lineCnt + 1; } PacsMessageCenter("PACS Photometer AOT",lineCnt,msgLine); // Close messages for HTML format message(""); message(""); // Everything below is new request from RV. Use variable names consistent // with input variables in PacsPhoto.def // Return demanded tuples // ID for band blue1 string bandBlue = "60-85"; if(blue == "blue2") { bandBlue = "85-130"; } double pntRMSBlue = pixRMS[1]; // Watch out for infinite division!! // Better watch out for silly limits (SPR-2627) if(pntRMSBlue > 0.0010) { double pntSNBlu = fluxPntBlu / pntRMSBlue; } else { pntSNBlu = 0.0; } string bandRed = "130-210"; double pntRMSRed = pixRMS[0]; if(pntRMSRed > 0.0010) { double pntSNRed = fluxPntRed / pntRMSRed; } else { pntSNRed = 0.0; } double extRMSBlue = pixRMS[3]; // Watch out for infinite division!! if(extRMSBlue > 0.0010) { double extSNBlu = fluxExtBlu / extRMSBlue; } else { extSNBlu = 0.0; } double extRMSRed = pixRMS[2]; if(extRMSRed > 0.0010) { double extSNRed = fluxExtRed / extRMSRed; } else { extSNRed = 0.0; } {string,double,double,double,double,double,double}[] noiseSummary = [{bandBlue,fluxPntBlu,pntSNBlu,pntRMSBlue,fluxExtBlu,extSNBlu,extRMSBlue},{bandRed,fluxPntRed,pntSNRed,pntRMSRed,fluxExtRed,extSNRed,extRMSRed}]; if(verbose) { debug_print("NoiseSumm: " + noiseSummary); debug_print("OBStime/CALtime/Overhead/chopthrow: " + totalOBStime + "/" + totalCALtime + "/" + instrumentAndObservationOverhead + "/" + nodThrow); } // return {totalOBStime,totalCALtime,instrumentAndObservationOverhead, return {totalOBStime,fromPntReq[1],instrumentAndObservationOverhead,nodThrow,noiseSummary}; } // File : PACS_Spec_Gra_Tune_PID // Missionphase : PACS FM Test // // Purpose : Dedicated test as input to CSL to constrain the Grating PID parameters // // Author : P. Royer // Arguments : grat_start_pos : grating starting position // // Description : positions the grating at ~ 5 degrees from hard stop // executes 10 small grating steps up & down // executes a big grating step up (~ 5 degrees) // // Comments : . Prerequisite : spec_mec_setup has been executed // . Diag HK is supposed to be recorded at 1KHz // // Version : 1.0 // History : 1.0 / 19-Apr-2006 // block PACS_Spec_Gra_Tune_PID PACS 156 { int grat_start_pos = 80000; // grating starting position (~3 degrees from the hard stop) }{ // Register start of BB WriteBBID($BBID); // PARAMETERS // int nsteps_small = 5; // nb of small grating steps int nsteps_big = 4; // nb of big grating steps int grat_step_small = 117; // size of small grating steps int grat_step_big = 233010; // size of big grating steps int slew_time_small = 1; // slew time for small grating steps int slew_time_big = 15; // slew time for big grating steps int grat_step_small_neg = -grat_step_small; // small grating step for movements down // // PRE-POSITION THE GRATING // Pacs_DMC_MOVE_GRAT_ABS(grat_start_pos); delay(45); // // GRATING MOVEMENTS (small steps loops, separated by big steps) // for(int loop1 = 1 .. nsteps_big) { for(int loop2 = 1 .. nsteps_small) { Pacs_DMC_MOVE_GRAT_REL(grat_step_small); delay(slew_time_small); } for(int loop3 = 1 .. nsteps_small) { Pacs_DMC_MOVE_GRAT_REL(grat_step_small_neg); delay(slew_time_small); } Pacs_DMC_MOVE_GRAT_REL(grat_step_big); delay(slew_time_big); } // // FINAL LOOPS ON SMALL STEPS // for(int loop4 = 1 .. nsteps_small) { Pacs_DMC_MOVE_GRAT_REL(grat_step_small); delay(slew_time_small); } for(int loop5 = 1 .. nsteps_small) { Pacs_DMC_MOVE_GRAT_REL(grat_step_small_neg); delay(slew_time_small); } // // RE-POSITION THE GRATING // Pacs_DMC_MOVE_GRAT_ABS(500000); delay(45); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating (incl Homing), enable & disable the grating after 2 relative movements. // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV - added MOIS comments // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Gra_IST_Check_4 { /* Needed variables to call PacsEng_Spec_Gra_IST_Check_4 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Check_4 */ }{ // 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(Pacs_Spec_Gra_IST_Check_4())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_Check_4(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating, enable & disable the grating after a few seconds. // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV Added MOIS comments // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax obs PacsEng_Spec_Gra_IST_Check_1 { /* Needed variables to call PacsEng_Spec_Gra_IST_Check_1 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Check_1 */ }{ // 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(Pacs_Spec_Gra_IST_Check_1())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_Check_1(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Check the Stability of the grating under a given set of controller parameters // // Description : Configuration of the grating, enable & disable the grating after two relative movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV : Mois comments // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Gra_IST_Check_2 { /* Needed variables to call PacsEng_Spec_Gra_IST_Check_2 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Check_2 */ }{ // 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(Pacs_Spec_Gra_IST_Check_2())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_Check_2(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Purpose : returns KeyWaves given the OrderSel // This version gives one KeyWave per represented order in // UserWaves // // CUS author : JDP // Script file : PacsSpecKeyWaves.txt // // Input arguments // type name Description // string orderSel oder selection // // Return values // Type Description // double [] Key wavelength associated with orderSel // Description : get Key Wave a function of orderSel from calU file // Dependencies : // // Preconditions : // // Comments : // // History : 1.0 14-may-2008 created double procedure PacsSpecKeyWaves { string orderSel = "order2" in ["order2","order3","sed2","sed3","sed4"]; }{ string calUFile = "KEY_WAVES"; // Local variables string order = "2"; double waves = 0.0; if(orderSel == "order2" || orderSel == "sed2") { order = "2"; waves = dlookup(calUFile,order,"KeyWave1"); } else { if(orderSel == "order3" || orderSel == "sed3") { order = "3"; waves = dlookup(calUFile,order,"KeyWave1"); } else { if(orderSel == "sed4") { order = "23"; waves = dlookup(calUFile,order,"KeyWave1"); } } } sync(); return waves; } // CVS comments : $Id: PacsSpecSlewCal_Flex.txt,v 1.13 2008/02/07 16:17:14 dcesarsk Exp $ // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsSpecSlewCal_Flex.txt // // Input arguments // Type Name Description // bool verbose Debug_print or not // {int,int,int,int, // int,int,int,int,int} [] confSPECblu BLUE SPU parameters // {int,int,int,int, // int,int,int,int,int} [] confSPECred RED SPU parameters // {int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int}[] confOBCP OBCP parameters // bool doPROLOG Perform/don't AOT prologue // double [] keyWAVE One or several key wavelengths // int filter Where to move FltW (as order) // // Return values // Type Name Description // int[][5] time_array The 5 times (TOT,SRC,REF,CAL,OVR) per key line // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 DAC 10-may-2006 New version losely based on old // PacsSpecSlewCal. Implies recasting OBCP13params as // other OBCP CAL-U files // 0.2 30-may-2006 Adapted to SPEC_get_grat_info modified for freq switch // 0.3 1-jun-2006 ORDER 2 and 3 are nolonger simultaneously allowed // Use grating strategy as OBCP22 and 27: grating remains // where DMC left it (grat_def_time = 0) // 1.0 15-feb-2007 SlewCal is supposed to leave the grating ready to start // observing the 1st "science" line // 16-feb-2007 Error in call to OBCP: grating should remain at // new_grat_def_pos (was grat_park) // 1.1 14-mar-2007 Add extraConf in call to SPEC_get_grat_info // 1.2 8-may-2007 Add orderSel needd by SPEC_get_grat_info // 1.3 10-oct-2007 SCR3632. SPEC_get_grat_info is called with KHI int[][] procedure PacsSpecSlewCal_Flex { /* verbose debug print */ bool verbose = false; /* SPEC parameters for BLU and RED */ {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{12,64,16,16,1,1,3,80,30}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{12,64,16,16,1,1,3,80,30}]; /* OBCP parameters */ {int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{1,0,1,133,1,-21200,2,21350,1,664}]; /* Perform/don't AOT prologue */ bool doPROLOG = true; /* One or several key wavelengths */ double[] waves = [60.0]; /* Where to leave FltW (as order) */ string fltPOS = "POS A"; /* User defined grating order */ int order = 2; }{ // Array to collect OBCP times per line // NOTE: time variables in units of either number of ramps (SPEC) or // number of readouts (BOLO) or plain seconds. The calling program // must convert, if applicable, this information into actual duration // in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), CAL source, // and overheads (wait for something). Total duration is given by duree_num. // If no error, this duration must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); int[] totalDUREE = [0,0,0,0,0]; int[][] dureeCalKey = [[0,0,0,0,0]]; // Long sequence to "unpack" default values from tuples // // UNPACK confSPEC blu & red // int capa_blu = confSPECblu[0]{0}; int nb_rdouts_ramp_blu = confSPECblu[0]{1}; int nb_rdouts_subramp_blu = confSPECblu[0]{2}; int comp_mode_blu = confSPECblu[0]{3}; int glitch_det_blu = confSPECblu[0]{4}; int ramp_fit_alg_blu = confSPECblu[0]{5}; int nb_raw_blu = confSPECblu[0]{6}; int bias_r_blu_mV = confSPECblu[0]{7}; int bias_d_blu_mV = confSPECblu[0]{8}; int capa_red = confSPECred[0]{0}; int nb_rdouts_ramp_red = confSPECred[0]{1}; int nb_rdouts_subramp_red = confSPECred[0]{2}; int comp_mode_red = confSPECred[0]{3}; int glitch_det_red = confSPECred[0]{4}; int ramp_fit_alg_red = confSPECred[0]{5}; int nb_raw_red = confSPECred[0]{6}; int bias_r_red_mV = confSPECred[0]{7}; int bias_d_red_mV = confSPECred[0]{8}; // // UNPACK confOBCP // int nb_up_dn = confOBCP[0]{0}; int grat_step_coarse = confOBCP[0]{1}; int nb_grat_steps = confOBCP[0]{2}; int grat_step_up_fine = confOBCP[0]{3}; int nb_cycles_grat = confOBCP[0]{4}; int chop_pos_CS1 = confOBCP[0]{5}; int nb_ramps_grat_pos = confOBCP[0]{6}; int chop_pos_CS2 = confOBCP[0]{7}; int detector = confOBCP[0]{8}; int chop_def = confOBCP[0]{9}; // We will scan by decreasing grating angle, i.e. negative step size: // OBCP 13 P#9 int grat_step_dn_fine = -grat_step_up_fine; string order_str = "" + order; // PARAMETERS STILL TO BE CHECKED // double[] keyWAVE = [65.0]; //string orderSel = "order"+order_str; // END PARAMETERS STILL TO BE CHECKED // Bias voltages (needed by SPEC_aot_prologue) are commanded in (double) volts double bias_r_blu = double(bias_r_blu_mV) / 1000.0; double bias_d_blu = double(bias_d_blu_mV) / 1000.0; double bias_r_red = double(bias_r_red_mV) / 1000.0; double bias_d_red = double(bias_d_red_mV) / 1000.0; if(verbose) { debug_print(" "); debug_print("confSPEC: capa_blu " + capa_blu); debug_print("confSPEC: nb_rdouts_ramp_blu " + nb_rdouts_ramp_blu); debug_print("confSPEC: nb_rdouts_subramp_blu " + nb_rdouts_subramp_blu); debug_print("confSPEC: comp_mode_blu " + comp_mode_blu); debug_print("confSPEC: glitch_det_blu " + glitch_det_blu); debug_print("confSPEC: ramp_fit_alg_blu " + ramp_fit_alg_blu); debug_print("confSPEC: nb_raw_blu " + nb_raw_blu); debug_print("confSPEC: bias_r_blu_mV " + bias_r_blu_mV); debug_print("confSPEC: bias_d_blu_mV " + bias_d_blu_mV); debug_print(" "); debug_print("confSPEC: capa_red " + capa_red); debug_print("confSPEC: nb_rdouts_ramp_red " + nb_rdouts_ramp_red); debug_print("confSPEC: nb_rdouts_subramp_red " + nb_rdouts_subramp_red); debug_print("confSPEC: comp_mode_red " + comp_mode_red); debug_print("confSPEC: glitch_det_red " + glitch_det_red); debug_print("confSPEC: ramp_fit_alg_blu " + ramp_fit_alg_red); debug_print("confSPEC: nb_raw_red " + nb_raw_red); debug_print("confSPEC: bias_r_red_mV " + bias_r_red_mV); debug_print("confSPEC: bias_d_red_mV " + bias_d_red_mV); debug_print(" "); debug_print("confOBCP: P#1 nb_up_dn " + nb_up_dn); debug_print("confOBCP: P#2 grat_step_coarse " + grat_step_coarse); debug_print("confOBCP: P#3 nb_grat_steps " + nb_grat_steps); debug_print("confOBCP: P#4 grat_step_up_fine " + grat_step_up_fine); debug_print("confOBCP: P#6 chop_pos_CS1 " + chop_pos_CS1); debug_print("confOBCP: P#8 chop_pos_CS2 " + chop_pos_CS2); debug_print("confOBCP: P#5 nb_cycles_grat " + nb_cycles_grat); debug_print("confOBCP: P#7 nb_ramps_grat_pos " + nb_ramps_grat_pos); debug_print("confOBCP: detector " + detector); debug_print("confOBCP: chop_def " + chop_def); } // Issue SPEC_aot_prologue if demanded if(doPROLOG) { int filter = 2; //aotprologue: string[] fltPOS = ["N/A","NoFilter","POS B","POS A"]; if(fltPOS == "POS A") { filter = 3; } totalDUREE = SPEC_aot_prologue(nb_rdouts_ramp_red,nb_rdouts_ramp_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,comp_mode_blu,comp_mode_red,nb_rdouts_subramp_blu,nb_rdouts_subramp_red,nb_raw_blu,nb_raw_red,glitch_det_red,ramp_fit_alg_red,filter,verbose); } // NOTE: Grating starts at grat_start_pos determined by SPEC_get_grat. At end of // SlewCal grating should park. Park position is generally grat_def_pos: int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // AOT_prologue is supposed to have left grating at park position int grat_def_pos = grat_park; // NOTE for version 1.0 and later. Upon execution of SpecSlew, grating is // indeed where SPEC_orbit_prologue left it (the default park position); // this fact remains unchanged. What is new is that SpecSlew will leave // the grating not at the default park position but already at the // position needed by the 1st line that will be observed. There are two // advantages: // 1- the new logic in the OBCP incurs in less grating movements when // the OBCP is repeated within a NOD or the next raster point, and // 2- the detector will see the illumination corresponding to the line // wavelength before the actual observation starts. // Observe now each key wavelength int nbWaves = length(waves); for(int loopWaves = 0 .. nbWaves - 1) { // // RSRF PCSS // R1 : 32000 - 1056000 // B2A : 620000 - 1056000 // B2B : 32000 - 1056000 // B3A : 32000 - 670000 // // Get grating start position (CAL is performeed with HI resolution) string waveCalTable = slookup("SPEC_BAND_params",order_str,"CAL_FILE"); double wave_grat_pos = interpolate(waveCalTable,"grat_pos",waves[loopWaves]); int grat_start_pos = iround(wave_grat_pos + double(grat_step_up_fine) * double(nb_grat_steps) / 2.0); // Number of steps to start position for current line int steps_start = grat_def_pos - grat_start_pos; int grat_time = SPEC_grat_time(steps_start); if(verbose) { debug_print("OBCPcal:GratStart from/to: " + grat_def_pos + "/" + grat_start_pos + "; time: " + grat_time); } // // After the OBCP, leave the grating where it is, i.e. end-of-DMC value // But the last line should leave grating at default from CALU grat_def_pos = grat_start_pos; if(loopWaves == nbWaves - 1) { grat_def_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); } // int steps_end = grat_start_pos - grat_def_pos; int grat_def_time = SPEC_grat_time(steps_end); if(verbose) { debug_print(" "); debug_print("OBCPcal:GratEnd from/to: " + grat_start_pos + "/" + grat_def_pos + "; time: " + grat_def_time); debug_print(" "); debug_print("confOBCP: P#4 grat_step_up_fine " + grat_step_up_fine); debug_print("confOBCP: P#9 grat_step_dn_fine " + grat_step_dn_fine); debug_print("confOBCP: wavelength -> grat pos " + waves[loopWaves] + " " + wave_grat_pos); debug_print("confOBCP: grat_start_pos " + grat_start_pos); } int[] dureeOBCP = OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def_pos,chop_def,grat_def_time,nb_rdouts_ramp_red); if(verbose) { debug_print("SlewCal performed wavelength: " + waves[loopWaves] + " [mic] requires " + dureeOBCP[0] + " [sec]"); } // Update dureeCalKey dureeCalKey[loopWaves] = [0,0,0,0,0]; for(int loop1 = 0 .. 4) { dureeCalKey[loopWaves][loop1] = dureeOBCP[loop1]; } } // Add after the KeyWaves in dureeCalKey the duration from AOT_prologue dureeCalKey[nbWaves] = [0,0,0,0,0]; dureeCalKey[nbWaves][4] = totalDUREE[4]; if(verbose) { debug_print("End SlewCal with dureeCalKey: " + dureeCalKey); } // Leave bus scheduler in a known state (SP1707) sync(); return dureeCalKey; } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. Special HKs. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up 5 housekeeping parameter for diagnostic housekeeping // of the chopper for open loop tests. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : // 1.0 29-03-07 MN. Spec. HK for open loop measurements. // block SPEC_Chopper_dhk_4hk_1khz_bb PACS 475 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 5; {int}[] parlist = [{244},{245},{258},{561},{0xffff}]; int[] aux = [244,245,258,561,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 0; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // $Id: Pacs_Background_Adjustment.txt,v 1.1 2008/04/08 13:56:15 vanessad Exp $ // Filename : Pacs_background_Adjustment // Purpose : Near real time adjustment of LHe flow for cryocover mirror // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : Background_Radiance_Adjustment.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP 8 to interactively adjust the LHe flow through the // cryocover mirror for telescope background simulation. Chops between // CS1 - 0 - CS2 for a number of specified loops at a given capacitor and // otherwise default detector settings. // // Dependencies : OBCP_spec_2_3_chop, SPEC_heater, SPEC_cre_setup // // Preconditions : PACS must be on and configured for spectroscopy // nominal detector settings and reset interval = 64, default C=0.1pF // // Comments : Can be run with different capacitors for EQM IMT purposes // // Version : 2.1 // History // 1.0 24-Mar-2005 creation by HF // 1.1 25-apr-2005 DAC Corrected for amended OBCP_spec_2_3_chop // 1.2 23-jun-2005 HF, added SPU setup and reset // 1.3 10-Apr-2006 HF, adapted for FM // 1.4 26-Apr-2006 HF, added move to FW position B // 1.5 03-Apr-2007 HF, adapted to FM ILT results // 2.0 25-mar-2008 VDP adjusted to match PV phase syntax // 2.1 15-Apr-2008 VDP adjusted heater_blu (current) from // 1.5 to 0.78 mA // procedure Pacs_Background_Adjustment { int nb_up_down = 3; // Number of sequences: up down up ... int nb_grat_steps = 5; // Number of grating steps int nb_SRC_OFF = 5; // Nb cycles on/off source/grating position int nb_CS1_CS2 = 0; // Nbr cycles on cal src per grating position int grat_step = 0; // Grating step size int capa_blu = 0; // 0=0.1pf 8=0.2pf 4=0.4pF 12=1pF int capa_red = 0; // 0=0.1pf 8=0.2pf 4=0.4pF 12=1pF }{ // Accumulated duration of this obs mode int duration_msec = 0; // // Condition the CREs and detectors int ramp_len_blu = 64; int ramp_len_red = 64; // Set up the blue and red CRE subsystem // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; // Give ENG values for the bias [v] double bias_r_blu = 0.0050; double bias_r_red = 0.0050; double bias_d_blu = 0.198; double bias_d_red = 0.069; SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Set BLUE heater parameters (mA) double heater_blu = 0.78; SPEC_heater(heater_blu); // // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = ramp_len_blu; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = ramp_len_red; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // No sub ramps or means nb_samp_subramp_blu = ramp_len_blu; nb_samp_subramp_red = ramp_len_red; // Reset SPU SPEC_spu_reset(); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Variables that are hardcoded string filterwheelpos = "POS B"; // Move the filter wheel SPEC_fltw_move(filterwheelpos); // Number of readouts per ramp int nb_rdouts_ramp = 64; // Number of ramps per plateau-1 int nb_ramps_plateau = 5; // grating start position int grat_start = 500000; // Chopper position on CS1 int chop_pos_CS1 = -21350; // Chopper position on CS2 int chop_pos_CS2 = 21200; // Chopper position 1 int chop_pos_REF1 = 0; // Chopper position 2 int chop_pos_REF2 = -21350; // Chopper position 3 int chop_pos_REF3 = 21200; // Synchronize on this detector 1:Blue 2:Red int detector = 1; // Time for grating to move to start position int grat_time = 15000; // SPU compression mode int comp_mode = 16; // Grating default position int grat_def = 500000; // Chopper default position int chop_def = 648; // Grating to move to grat_def position [msec] int grat_def_time = 2000; // Now call OBCP 8 with all its parameters int[] duree3 = OBCP_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,chop_pos_REF3,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step,-grat_step,detector,grat_start,grat_time,comp_mode,comp_mode,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); // Reset SPU SPEC_spu_reset(); // Tally total duration [msec] duration_msec = duration_msec + duree3[0]; sync(); } // Missionphase : EQM IMT // // Purpose : Compute duration of DMC Sequence 13 : grating scan without // chopping // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : // // Description : For all internal details about DMC Seq 13, see PACS-ME-LI-005 // and pseudo code here. Identical to "Grating line scan with // two or three position choping" but with out choping on source. // Meant mostly for ILT to allow for fast execution of // measurements on "absolute" flux sources. // // Dependencies : None // // Preconditions: N/A // // Comments : 1. No single command is executed here, only the duration is // computed here. Hence, not all parameters of the actual DMC // Seq. are relevant here! // 2. In version 1.0 the whole pseudo code is not developped yet // As a consequence, duree_SRC, duree_REF, duree_CAL & // duree_OVR are NOT COMPUTED, ONLY duree_num IS!! // (formula in PACS-ME-LI-005) // 3. All durations are now computed (DAC dixit) // // Version : 2.0 // // History : 1.0 05-Apr-2005 Creation by PR // 2.0 06-Apr-2005 Completed by DAC with pseudo code and // full duration computation. // 2.1 25-apr-2005 DAC Arranged arguments in P#1,#2 order // Renamed DMC_grat_scan_nochop as OBCP // int[] procedure DMC_grat_scan_nochop { int nb_up_dn = 1; // Seq P#1 Nb of sequences: up down up ... int nb_grat_steps_up = 10; // Seq P#2 Nb of grating up steps int nb_ramps_grat_pos = 2; // Seq P#5 Nb of ramps per grating position int nb_CS1_CS2 = 0; // Seq P#6 Nb of cycles on CS, per grat position int nb_ramps_cs = 2; // Seq P#9 Nb of ramps per plateau on the CS int nb_grat_steps_dn = 10; // Seq P#10 Nb of grating down steps }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start of pseudo code // // WAIT 1 ; have a defined start // Accumulated duree_num in number of ramps duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 Start main loop of UP and DOWN cycles for(int outloop = 1 .. nb_up_dn) { // LOOP P#2 ; grating loop going up for(int gratUPloop = 1 .. nb_grat_steps_up) { // WAIT 1 ; sync. for grating duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#3 ; increment grating position // LABEL 3 ; first chopper pos. // WAIT P#5 ; take P#5 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_SRC = duree_SRC + nb_ramps_grat_pos; // LOOP P#6 ; calibration loop for(int csUPloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#7 ; chop to BB1 // LABEL 65 ; BB1 // WAIT P#9 ; take P#9 ramps duree_num = duree_num + nb_ramps_cs; duree_CAL = duree_CAL + nb_ramps_cs; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB2 // LABEL 129 ; BB2 // WAIT P#9 ; take P#9 ramps duree_num = duree_num + nb_ramps_cs; duree_CAL = duree_CAL + nb_ramps_cs; // END_LOOP ; calibration done } // MOVE_CHOPPER_ABSOLUTE P#11 ; chopper to default // END_LOOP ; grating scan up done } // LOOP P#10 ; grating loop going down for(int gratDNloop = 1 .. nb_grat_steps_dn) { // WAIT 1 ; sync. for grating duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#4 ; decrement grating position // LABEL 19 ; first chopper pos. // WAIT P#5 ; take P#5 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_SRC = duree_SRC + nb_ramps_grat_pos; // LOOP P#6 ; calibration loop for(int csDNloop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#7 ; chop to BB1 // LABEL 81 ; BB1 // WAIT P#9 ; take P#9 ramps duree_num = duree_num + nb_ramps_cs; duree_CAL = duree_CAL + nb_ramps_cs; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB2 // LABEL 145 ; BB2 // WAIT P#9 ; take P#9 ramps duree_num = duree_num + nb_ramps_cs; duree_CAL = duree_CAL + nb_ramps_cs; // END_LOOP ; calibration done } // MOVE_CHOPPER_ABSOLUTE P#11 ; chopper to default // END_LOOP ; grating scan up done } // END_LOOP ; main loop done } // WAIT 1 ; complete last plateau duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // Sequence duration, in ramps : 2+P#1*{(P#2+P#10)*[1+P#5+P#6*2*(1 + P#9)]} // Create time_array int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // debug_print("DMC_Gra_scan_nochop duree (TOTAL SRC REF CAL OVR): " + time_array); return time_array; } // Missionphase : CP/PV // // Purpose : Test of Chopper Movement // // Author : Markus Nielbock // CUS author : MN // // Description : Move chopper in open-loop mode. All 3 coils are // operative (nominal setting). The chopper is commanded // between the two internal calibration sources in small // equidistant steps. // // Dependencies : // // Preconditions : PACS switched-on in safe mode // // Comments : // // Version : 1.0 // // History : 1.0 12-Jun-08 creation by MN // Begin Mode description obs PacsEng_ChopperOpenLoop_FullRange { }{ // duration int tPROC = duration(Pacs_ChopperOpenLoop_FullRange()); int tOBSID = duration(WriteOBSID($OBSID)); int tEndID = duration(WriteEndID()); int tp = tPROC + tOBSID + tEndID; // Issue the pointing request int[] fromPntReq = no_pointing(true,0,0,tp); }{ // The state machine int[] stateVar = [0]; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 3) { // Get OBSID from environment int myOBSID = $OBSID; // Send OBSID to DMC WriteOBSID(myOBSID); // Open Loop measurement Pacs_ChopperOpenLoop_FullRange(); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_Healthcheck { /* variables to call PacsEng_Spec_Gra_Healthcheck */ int n_homes = 1; // Number of Homings & "Grating Health Checks" to be performed /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_Healthcheck */ }{ // 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(PACS_Spec_Gra_Healthcheck(n_homes))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_Healthcheck(n_homes); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Move Grat Abs // // CUS author : Pierre Royer // // // Version : 2.0 // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Move_Rel { /* Needed variables to call PacsEng_Spec_Gra_IST_Move_Rel */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Move_Rel */ }{ // 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(PACS_Spec_Gra_IST_Move_Rel())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Move_Rel(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsReadChopSky.txt,v 1.3 2007/04/25 15:14:04 dcesarsk Exp $ // Missionphase : // // Purpose : To read with (linear) interpolation the SKY <-> chopper // U-CAL table // // CUS author : // Script file : PacsReadChopSky.txt from AOT code // // Input arguments // type name description // string uCAL Name of the U-CAL table // double skyOff Desired sky offset following a chopper move [arcsec] // // Return values // Type Description // int chopREF Chopper command operand (ENG units) // // Description : Read the table XXX_chop_sky with "interpole" // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 04-apr-2005 DAC // 0.2 22-mar-2007 CAL-U files amended to list ENG instead // of misleading "REF" int procedure PacsReadChopSky { string uCAL = "PHOT_CHOP_sky"; // Name of the U-CAL table /* Watch out! current uCAL extends only to 360 [arcsec */ double skyOff = 0.0; // Required sky offset }{ // Open and read uCAL table with interpolate double auxRef = interpolate(uCAL,"ENG",skyOff); int ref = iround(auxRef + 0.5); if(auxRef < 0.0) { ref = iround(auxRef - 0.5); } return ref; } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsRangeSpec AOT // // CUS author : DAC // Script file : PacsRangeSpec.def // // Input arguments // type name description // // Return values // // Description : // // Dependencies : // // Preconditions : // // Comments : If the file is called PacsRangeSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsRangeSpec.def // - rename module to PacsRangeSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false // // History: // For history before 24-apr-2007 see v1.42 in CVS // 25-apr-2007 14.4 Suppressed history before today (kept in CVS though) // Use rangeSPOT throughtout (i.e. merged ranges & rangeEXT) // 9-may-2007 14.5 SPR-3186 Use userNODcycles as map repetion for OFF // 22-may-2007 14.6 SPR-3199 Return SRC time without overheads // 29-may-2007 14.7 SPR-3237 // 11-jun-2007 14.8 SPR-3277 Use referenceWave (rangeSPOT{9}) for SED mode // 20-sep-2007 14.9 SPR-3570 RA,DEC offsets may be negative // SCR-3552 Read skewCorrec from PACSyzoffsets; add to pattnod // 24-sep-2007 15.0 SPR-3581 S/N is not computed in SED mode // 28-mar-2008 16.0 remove mapRasterRefXXX replaced by raoff, // decoff and refSelected (refSelected is complement to // chopNod hence not used in our logics) // 29-mar-2008 17.0 Removed section computing ABS or REL offsets: now an HSPOT // functionality // 28-apr-2008 18.0 raoff and decoff had the wrong range: in dgrees now // 23-sep-2008: SCR 4632 // 13-oct-2008 19.0 implement default range values for HSC // but was buggy: implement a test to use only if no Hspot // values are given // {int,int,int,{string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[]} obs PacsRangeSpec { /* "rangeSPOT" is a tuple defined by HSPOT */ /* It contains */ /* {id, bluEdge, redEdge, repeatFactor, lineFlux, contFlux, lineWidth, */ /* fluxUnitSel, widthUnitSel, refWave} */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = []; /* here is Range default setup for default duration calculation */ string[] rangeId = ["Interesting range"]; double[] bluWave = [106.0]; // blue limit in [55.0,220.0] double[] redWave = [209.0]; // red limit in [55.0,220.0] int[] repeatRange = [1]; // repeat Range in [0,10] double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lineWidth = [400.0]; // line width in [0.0,1000.0] string[] widthUnit = ["kms"]; // width unit in ["kms","micron"] double[] lcontFlux = [111.11]; // continuum flux in [0.0,10000.0] double[] refWave = [180.0]; /* end of default setup */ int userNODcycles = 1 in [1,100]; string orderSel = "order3" in ["order2","order3","sed2","sed3","sed4"]; bool chopNod = true; string density = "nyquist" in ["nyquist","high"]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 2 in [2,32]; int n = 1 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; // RA,DEC or SSO double pointStep = 2.0 in [0.0,480.0]; double lineStep = 2.0 in [0.0,480.0]; bool refSelected = false; // true for chopNod = false double raoff = 0.0 in [0.0,360.0]; // units in degrees double decoff = 0.0 in [-90.0,90.0]; // units in degrees int obsOverhead = 180; // Slew overhead bool verbose = false; // verbose Debugging }{ //* ------ Used only when default values in CUS are used --------------------*/ int rangeIdLength = length(rangeId); int rangeLength = length(rangeSPOT); if(rangeLength == 0) { for(int rloop00 = 0 .. rangeIdLength - 1) { rangeSPOT[rloop00] = {rangeId[rloop00],bluWave[rloop00],redWave[rloop00],repeatRange[rloop00],lineFlux[rloop00],lcontFlux[rloop00],lineWidth[rloop00],"",widthUnit[rloop00],refWave[rloop00]}; } } //*----------- End of default CUS setup -----------------*/ // Boolean variables "range" and "sedXXX" are mutually exclusive for HSPOT. For // time being I will use them independently of each other // Specifying bool sed = true is a special case of predefined ranges. // 30-oct-2006 // Variables "sed" or "range" have disappeared from front end. Define as bool range = true; bool sed = false; if(orderSel == "sed2" || orderSel == "sed3" || orderSel == "sed4") { range = false; sed = true; } // Yet to be defined symbol to access CAL-U file info for detector setup // May come from HSPOT front-end in the future // The future has come!!! string confTable = "normal"; // In SED or nyquist sample, we use the option "bright" if(sed || density == "nyquist") { confTable = "bright"; } // mapOff no longer an input variable but still used elsewhere bool mapOff = !chopNod; // to make sure that noone gets funny idea about refSelected refSelected = !chopNod; // New parameter for nodding_pointing bool startAtOFF = false; // Variable "grating" has disapeared from the front end. Since it's used by // several modules, I keep it with its new (default) definition string grating = "nyquist"; // OFF pointing only when in raster mode if(mapOff && source != "large") { error("NOD = false only allowed for large sources"); } // Start of "Pointing" section // // Set messages for HTML format message(""); message(""); // In "sed" mode, rangeSPOT is filled by module PacsRangeSpecSed if(!range) { // Define the RefWave as the mean value of bluWave and redWave // double meanRef = (rangeSPOT[0]{1} + rangeSPOT[0]{2})/2.0; // SPR-3277 Save waveRef first! // Catch case of rangeSPOT not being defined int theLength = length(rangeSPOT); if(theLength == 0) { error("ERROR! Need a reference wavelength for the SED observation (see UM)"); } // caught! Now extract wavelength double waveRef = rangeSPOT[0]{9}; // SPR-3581. Save information to compute S/N double contFlux = rangeSPOT[0]{5}; // Fill rangeSPOT with SED information rangeSPOT = PacsRangeSpecSed(orderSel); // Insure that user given reference is within order range if(waveRef < rangeSPOT[0]{1} || waveRef > rangeSPOT[0]{2}) { error("Reference wave must be comprised between " + rangeSPOT[0]{1} + " and " + rangeSPOT[0]{2} + " for " + orderSel); } // Reference within limits rangeSPOT[0]{9} = waveRef; // SPR-3581. Add information to compute S/N rangeSPOT[0]{5} = contFlux; } // Cannot call with empty "rangeSPOT" int nbRanges = length(rangeSPOT); int nbRanges1 = nbRanges - 1; if(nbRanges == 0) { error("STOP!! There are no spectral ranges defined!"); } // No more than 10 ranges or repetitions int nbRangesRep = 0; for(int loop00 = 0 .. nbRanges - 1) { // Default repetion factor is 1 int repFactor = rangeSPOT[loop00]{3}; if(repFactor == 0) { repFactor = 1; } nbRangesRep = nbRangesRep + repFactor; } if(verbose) { debug_print("Total ranges/repeat: " + nbRangesRep); } if(nbRangesRep > 10) { error("STOP!! The number of ranges/repetitions exceeds 10"); } // Decode "rangeSPOT" (only if verbose mode) if(verbose) { for(int iiii = 0 .. nbRanges1) { debug_print("RANGE or SED: " + orderSel); debug_print("Wave from/to : " + rangeSPOT[iiii]{1} + "/" + rangeSPOT[iiii]{2}); debug_print("RefWave : " + rangeSPOT[iiii]{9}); debug_print("repeat factor: " + rangeSPOT[iiii]{3}); } } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto and PacsLineSpec) // Pointing mode is still undefined int pointCase = 0; // FinePointingMode with setup time if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding"; pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (dithering and no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (dithering and nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(mapOff) { chopNod = false; pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 30; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. // Use special throw value in case of raster w/OFF as we chop between SRC and // CS1 if(mapOff) { throw = "offraster"; } // Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Check that rangeSPOT is commensurate with U-CAL SPEC_BAND_params; get // grating positions on the fly // NOTE: rangeInfo is defined as // {typeOBS,order,blu_grat,red_grat,gratStep,bluWave,redWave} {string,int,int,int,int,double,double}[] rangeInfo = PacsRangeSpecCheckFillRange(rangeSPOT,density,grating,orderSel,verbose); if(verbose) { for(int loopA = 0 .. nbRanges1) { debug_print("++RangeInfo: " + rangeInfo[loopA]); } } // Reject invalid ranges; abort CUS if invalid ranges are present for(int loop000 = 0 .. nbRanges1) { if(rangeInfo[loop00]{1} == 0) { error("Demanded range " + rangeInfo[loop000]{5} + "-" + rangeInfo[loop000]{6} + " [microns] is out of allowed boundaries"); } } // rangeInfo contains all the relevant information. We can sort here, either // by wavelength or by start grating position. Create arrays to be sorted // Define array of wavelengths and start grating positions; create "order" array // in case we want to enforce the no order mixing rule double[] rangeWave = [0.0]; double[] rangeGrat = [0.0]; int[] orders = [0]; // order array as float for sort algorithm double[] dorder = [0.0]; // Populate the arrays for(int loop0 = 0 .. nbRanges1) { rangeWave[loop0] = rangeInfo[loop0]{5}; // SORT algorithm requires float input! rangeGrat[loop0] = double(rangeInfo[loop0]{2}); orders[loop0] = rangeInfo[loop0]{1}; dorder[loop0] = double(rangeInfo[loop0]{1}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbRanges1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("2"); double[] band3 = SPEC_BAND_read("3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 // This case is history: // HSPOT proposes order 1&2 or 1&3, reported as 2 or 3; filter=1 is no // longer possible int filter = 1; // Determine filter based on HSPUT input if(orderSel == "order2" || orderSel == "sed2" || orderSel == "sed4") { filter = 2; } if(orderSel == "order3" || orderSel == "sed3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders + "; FILTER: " + filter); debug_print("The whole OBS will be performed with filter " + filter); } // Sort by order // int [] sortIndex = SortProc(verbose,dorder); // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,rangeGrat); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,rangeWave); // Recast "rangeSPOT" and rangeInfo according to the ordered grating // positions {string,double,double,int,double,double,double,string,string,double}[] sortRanges = clone(rangeSPOT); {string,int,int,int,int,double,double}[] sortRangeInfo = clone(rangeInfo); for(int reSORT = 0 .. nbRanges1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbRanges1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortRanges[reSORT] = rangeSPOT[sortedIndex]; sortRangeInfo[reSORT] = rangeInfo[sortedIndex]; } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 // chop_pos_CS1 chop_pos_CS2 chop_def // detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC{0 -> 8} contains: // capa nb_rdouts_ramp nb_rdouts_subramp comp_mode // glitch_det ramp_fit_alg nb_raw bias_r bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values // NEW. Saturation and capacitor/samples choice // Most SPEC configuration values are obtained from CONF_SPEC_params (read // in PacsSpecDefaults). Have to analyze given fluxes for each reference // wavelength. It may happen that a saturation situation will be found // Review the reference wavelengths, obtain telescope background, and PSF // fraction for(int rangeLOOP0 = 1 .. nbRanges) { int range1 = rangeLOOP0 - 1; waveRef = sortRanges[range1]{9}; contFlux = sortRanges[range1]{5}; // Obtain background and PSF fraction from CALU double telBckg = interpolate("SPEC_BCKG_FRAC","BackG",waveRef); double psfFrac = interpolate("SPEC_BCKG_FRAC","FracPnt",waveRef); debug_print("SATUR. Wave " + waveRef); debug_print("SATUR. Flux " + contFlux); debug_print("SATUR. Backg " + telBckg); debug_print("SATUR. PSF " + psfFrac); debug_print("SATUR. Order " + sortRangeInfo[range1]{1}); } paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module to estimate PACS parameters as a function of the // exposure time given by the user. This is the pilar of the // whole AOT logic. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; double waveMAXnods = 0.0; // Accumulated total OBS time int totalOBS = 0; for(int rangeLOOP = 1 .. nbRanges) { range1 = rangeLOOP - 1; paramsSPECext = PacsRangeSpecEstimatorOBCP27(sortRanges[range1],sortRangeInfo[range1],paramsSPEC,chopNod,verbose); // Copy estimates to respective tuples confSPECblu[rangeLOOP] = paramsSPECext{0}; confSPECred[rangeLOOP] = paramsSPECext{1}; confOBCP[rangeLOOP] = paramsSPECext{2}; // nb_nods below is the quantity used by Estimator to compute its duration int nb_nods = paramsSPECext{3}{0}; // if(verbose) { debug_print("confOBCP[" + rangeLOOP + "]: " + confOBCP[rangeLOOP]); } // Accumulated time totalOBS = totalOBS + paramsSPECext{3}{2}; } if(verbose) { debug_print("Minimum required time: " + totalOBS + " [sec] for " + nb_nods + " nod cycles"); } if(chopNod) { nbNods = userNODcycles; if(verbose) { debug_print("The PointReq will contain " + nbNods + " nod cycles"); } } else { nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

    Estimated total OBStime (SRC+REF) for requested ranges: " + totalOBS + "[sec]

    "; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

    With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

    "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

    Since no NOD was specified the total OBS time is equal" + " to the estimated SRC+REF time. OBS times can be changed" + " by specifying the line(s) repeat factor

    "; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

    Red channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECred[0]{1} + "
    • "; lineCnt = lineCnt + 1; int subRamps = confSPECred[0]{1} / confSPECred[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECred[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECred[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Blue channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECblu[0]{1} + "
    • "; lineCnt = lineCnt + 1; subRamps = confSPECblu[0]{1} / confSPECblu[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECblu[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECblu[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); if(verbose) { debug_print("Duration WriteOBSID: " + timeSetOBSID); } // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double [] keyWAVE = PacsRangeSpecKeyWaves(sortRangeInfo); int nbKeyWAVE = 1; // int nbKeyWAVE = length(keyWAVE); if(verbose) { debug_print("keyWAVES " + keyWAVE); } // With latest versions of CommandOBCP27 the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOTprologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration may be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per nod; nb_nods: " + nb_nods); } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); if(verbose) { debug_print("Duration WriteEndID: " + timeEndID); } // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbRanges per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one needs some time during // slew to perform leading CAL. // Make sure that the Preq is possible (possible reason for failure: too short // dwell time - currently 10 sec int minTdwell = 10; if(timeOBS < minTdwell) { error("Estimated dwell time is too short. Perhaps your range span is too small"); } // // The chopper throws have been read already (PacsSpecDefaults) and angles // have been converted into ENG units (OBCPconf). Here,angles are needed in // [arcsec]; easiest is to read again the relevant CAL-U table. // Read chopper position SRC and REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("MAIN:CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; int thold = 0; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode with nodding, section 3.4 ib = "P02_0"; // Nodding angle is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chop pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode without nodding, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int ncover = 1; // New arguments for pointing request; will be dealt with next iteration int top = 0; raoff = 0.0; decoff = 0.0; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,ncover,thold,nhold,k,top,raoff,decoff); } if(pointCase == 30) { // RasterMode with no nodding and OFF, section 3.5 ib = "P02_0"; // SPR-3237: fix is true, patt is inherited from HSPOT fixed = true; patt = mapRasterAngle; // Raster steps d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; // OFF periodicity (here at beginning and at end of raster) k = m * n; // The number of repetions is given in this case by the NOD count SPR-3186 int nrepeat = userNODcycles; if(nrepeat == 0) { nrepeat = 1; } // Same Tobs during OFF that during "SRC" top = tp; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // RasterMode with nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("=====> Return from " + pointMode + ": " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); } if(verbose) { int tNOW = time(); debug_print("=== Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOFF = nbOFF + 1; // Logic to sum up obsTime if(nbOFF == 1) { int[][] sumUpOffTime = obsTime; } if(nbOFF > 1) { sumUpOffTime = SumFunction(obsTime,sumUpOffTime); } if(verbose) { tNOW = time(); debug_print(" SumUpOffTime: " + sumUpOffTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD started at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL ranges). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // and per wavelength array(s): // [waveSTART,waveEND,order,gratStep,nbGratSteps,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Fill infoArray with data from OBCP27 // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int nbRampPlateau = confOBCP[1]{4} + 1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime (incl. WAIT=1): " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbRanges1) { // Create element [loop3] infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy from/to wavelengths infoArray[1]{1}[loop3]{0} = sortRanges[loop3]{1}; infoArray[1]{1}[loop3]{1} = sortRanges[loop3]{2}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortRangeInfo[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortRangeInfo[loop3]{4}; // copy the number of grating step infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from obsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Add more data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of ranges observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbRanges; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal - 1 - timeSetOBSID; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); } // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Populate the 3rd dimension of infoArray: global timing and AOT information // timeObsEnd is the total duration of the AOT infoArray[2] = {{"RangeSpec",0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Case of SmallSrc with dithering if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // Case of raster/w OFF, repeated map if(source == "large" && mapOff) { infoArray[1]{0}{0} = "RasterOFF"; infoArray[2]{0}{5} = nrepeat; } // Process the information contained in infoArray // NOTE: since implementing waveRef and fluxes, have to pass also // sortRanges and sortRangesExt data to ProcessInfoArray // aotID is no longer needed as only used for Range // but orderSel is needed by PacsSpecRMS // SPR-2927 Return bigTuple with information for plotting // Add nbOBS and nbOFF to ProcessInfoArray {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsProcessInfoArrayRange(infoArray,sortRanges,confOBCP,orderSel,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); //////// Silly code to convert bigTuple into smallTuple //////////////////// // bigTuple is too big for HSPOT. I have to remove the 1st double[] to // please HSPOT. Create smallTupleN {string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[] smallTuple = [{"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}]; // Old returned tuples {int,int,{{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[]} returnTuple = {fromPntReq[0],fromPntReq[1],bigTuple}; // Copy returnTuple onto smallTuple nbRanges = length(bigTuple); // The accumulated SRC+REF time int accumSrceRef = 0; for(int loopR = 0 .. nbRanges - 1) { // Use the nbRanges loop to add up SrceRef times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopR]{6} + infoArray[1]{1}[loopR]{7}; // Define smallTuple smallTuple[loopR] = {"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}; // Extract vectors; retrun CONT noise in mJy // First tuple is always the nominal range. Label it as RangeID + "Nominal" string id = sortRanges[loopR]{0} + "-nominal"; smallTuple[loopR]{0} = id; double[] wave = returnTuple{2}[loopR]{0}{2}; double[] cont = returnTuple{2}[loopR]{0}{3}; double[] line = returnTuple{2}[loopR]{0}{4}; int nbElem = length(wave); for(int loopT1 = 0 .. nbElem - 1) { smallTuple[loopR]{1}[loopT1] = wave[loopT1]; smallTuple[loopR]{2}[loopT1] = 1000.0 * cont[loopT1]; smallTuple[loopR]{3}[loopT1] = line[loopT1]; } wave = returnTuple{2}[loopR]{1}{2}; cont = returnTuple{2}[loopR]{1}{3}; line = returnTuple{2}[loopR]{1}{4}; nbElem = length(wave); // If there is no "free" data id = "undefined"; // Else label second tuple as RangeID + "-free1" if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free1"; } smallTuple[loopR]{4} = id; for(int loopT2 = 0 .. nbElem - 1) { smallTuple[loopR]{5}[loopT2] = wave[loopT2]; smallTuple[loopR]{6}[loopT2] = 1000.0 * cont[loopT2]; smallTuple[loopR]{7}[loopT2] = line[loopT2]; } wave = returnTuple{2}[loopR]{2}{2}; cont = returnTuple{2}[loopR]{2}{3}; line = returnTuple{2}[loopR]{2}{4}; nbElem = length(wave); // If existing, label third tuple as RangeID + "-free2" id = "undefined"; if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free2"; } smallTuple[loopR]{8} = id; for(int loopT3 = 0 .. nbElem - 1) { smallTuple[loopR]{9}[loopT3] = wave[loopT3]; smallTuple[loopR]{10}[loopT3] = 1000.0 * cont[loopT3]; smallTuple[loopR]{11}[loopT3] = line[loopT3]; } // End loop on nbRanges } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; return {accumSrceRef,fromPntReq[1],overPACSandSC,smallTuple}; } // $Id$ // Missionphase : PACS PV Phase // // // // Missionphase : IST Chopper Day // // Purpose : Chopper synchronous operation with detectors in spec // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do OBCP13 with different RIs // // Dependencies : DXS7602. // // Preconditions : PACS switched-on and setup spectroscopy. // // Comments : // // Version : 6.0 // // History : 0.1 26-07-06 creation by HD. script test. // // 0.2 27-07-06 HD. with all three RIs. // 0.3 27-07-06 HD. script works // 0.4 16-08-06 HD. Included setup and reset of burst // mode. // 1.0 24-08-06 HD. DXS&LLC, wo BM. // 2.0 24-08-06 HD. script works // 3.0 06-12-06 HD. Renamed file and mode to xxxx_OBS, sets DetSel table // and resets to default at end of procedure.. // 4.0 20-06-07 HD. Prepare Test for FM-ILT3. // 5.0 05-07-07 HD. IST Chopper Day // 6.0 25-mar-2008 VDP Translated from IST to PV phase syntax obs PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2 { /* Needed variables to call PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2 */ }{ // 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(Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsDureeOBCP27.txt,v 1.2 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : Estimate duration of OBCP27 with input parameters // // CUS author : // Script file : PacsDureeOBCP27.txt // // Input arguments // type name description // // Return values // Type Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 16-Sep-2005 DAC int[] procedure PacsDureeOBCP27 { int nb_up_down = 1; // Number up/down grating cycles int nb_grat_step_up = 43; // Number of grating steps int nb_ramps_plateau = 2; // Number of ramps per chopper plateau int nb_CS1_CS2 = 0; // Number of chopper cycles CS1<=>CS2 int nb_SRC_OFF = 1; // Number of chopper cycles SRC<=>REF int nb_rdouts_ramp = 64; // Number of rdouts per ramp }{ // Call the corresponding DMC sequence int[] duree = DMC_grat_scan_chop2(nb_up_down,nb_grat_step_up,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_OFF); // Convert number of ramps into seconds // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // Convert duration [ramps] into [msec] // Create return time array; convert into [sec] int[] time_array = [0,0,0,0,0]; for(int aux = 0 .. 4) { time_array[aux] = ifloor(double(duree[aux]) * ramp_time); time_array[aux] = Msec2sec(time_array[aux]); } // // Return total duration [sec] to calling program return time_array; } // File : PACS_Spec_SPU_Reset.cus // Missionphase : PACS IST // // Purpose : Reset SPU after spectroscopy data flow // // Author : T. Mueller, H. Feuchtgruber // CUSification : DAC // Arguments : None // // // Description : Resets all settings of both SPU to their default values // and stops the data compression/reduction // // Comments : // // Version : 1.2 // History : 1.0 / 10-Nov-2004 initial version // 1.1 14-apr-2006 Adapted to SPU v12.1 // 1.2 28-mar-2007 DAC Update for SPUV13. // procedure PACS_Spec_SPU_Reset { }{ //------------------------- // Preparation //------------------------- Pacs_SPUS_STOP_REDUCT_COMPR(); delay(1); Pacs_SPUL_STOP_REDUCT_COMPR(); delay(1); // number of raw channels int spus_nraw = 3; int spul_nraw = 3; int spus_startraw = 1; int spul_startraw = 1; Pacs_SPUS_RAW_CHAN_TRAN_MODE("SPEC",spus_nraw,spus_startraw); delay(1); Pacs_SPUL_RAW_CHAN_TRAN_MODE("SPEC",spul_nraw,spul_startraw); delay(1); // default compression mode int comp_mode_blue = 16; int comp_mode_red = 16; {int}[] list_tuple = [{comp_mode_blue},{comp_mode_red}]; int[] list_int = [comp_mode_blue,comp_mode_red]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_SPU_TRAN_MODE(list_tuple,chksum); delay(1); // Spectro "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in spectroscopy int tfs = 1000; // Threshold for chopper position deviation in spectroscopy int tcs = 100; // Threshold for grating deviation int tgd = 100; // Readouts per SubRamp readback int rsrr = 16; // Glitch detection for spectroscopy int gdfs = 1; // Ramp fitting algorithm int rfal = 0; // Sorting algorithm int soal = 4; // lossless compression algorithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand int[] aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; int check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Spectro "Ottensamer" block ("L" SPU) ppf = 0; ppp = 0; tfs = 1000; tcs = 100; tgd = 100; rsrr = 16; gdfs = 1; rfal = 0; soal = 4; lcal = 0; pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); //---------------------------- // End of Procedure //---------------------------- } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Chopper synchronous operation with detectors in spec // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do OBCP13 with different RIs // // Dependencies : DXS7602. // // Preconditions : PACS switched-on and setup spectroscopy. // // Comments : // // Version : 6.0 // // History : 0.1 26-07-06 creation by HD. script test. // // 0.2 27-07-06 HD. with all three RIs. // 0.3 27-07-06 HD. script works // 0.4 16-08-06 HD. Included setup and reset of burst // mode. // 1.0 24-08-06 HD. DXS&LLC, wo BM. // 2.0 24-08-06 HD. script works // 3.0 06-12-06 HD. Renamed file and mode to xxxx_OBS, sets DetSel table // and resets to default at end of procedure.. // 4.0 20-06-07 HD. Prepare Test for FM-ILT3. // 5.0 05-07-07 HD. IST Chopper Day // 6.0 25-mar-2008 VDP Translated from IST to PV phase syntax obs PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1 { /* Needed variables to call PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1 */ }{ // 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(Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS AVM ILT // // Purpose : Select the data mode // // Author TCL : T. Mueller // Author CUS : DAC // CUS script : PHOT_change_data_mode.txt // // Arguments : // type name default Description // string mode "Bolo_HK" Select the data mode for bolometers // // Description : This script will select the data mode for the bolometers // After switch on of the bolometers the default data mode // is "HK only", after executing the sequencer setup the // default mode is "Bolo & HK" // // Comments : Coded based on PhFPU UM, Draft 2, March 31, 2004 // // Version : 1.0 18-apr-2005 DAC Based on TM's V1.0 0f 20-apr-2004 // History : // int[] procedure PHOT_change_data_mode { string data_mode = "Bolo_HK" in ["Bolo_HK","HK_only","Test_Pat_HK"]; //Data mode for the bolometers }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); //------------------------------------------------ // SET BOLC Data Mode data & HK //------------------------------------------------ // PC103420 "DMC_SEND_COMMAND_BOLC" SEND COMMAND TO BOL CONTROLLER // PP071420 "BOLOMETER_COMMAND" Pacs_BOLC_SET_DATA_MODE(data_mode); // Time spent int duree_TCs = time() - time_start; duree_OVR = duree_TCs; duree_num = duree_OVR; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // $Id: PacsEng_Spec_Fltw_Mec_Setup.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 05-Jul-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Fltw_Mec_Setup_u { /* No variables to call PacsEng_Spec_Fltw_Mec_Setup_u */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Fltw_Mec_Setup_u */ }{ // 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_spec_fltw())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsDureeOBCP32.txt,v 1.1 2007/10/25 12:16:47 dcesarsk Exp $ // Purpose : Estimate duration of OBCP32 with input parameters // // CUS author : // // Input arguments // type name description // // Return values // Type Description // // Description : // // Dependencies : // // Preconditions : // // Comments : Based on PacsDureeOBCP22 // Version : 0.1 // History : 0.1 18-oct-2007 DAC int[] procedure PacsDureeOBCP32 { int nb_dither_steps = 7; // Number of dither cycles int nb_switch_cycles = 10; // Number of switch cycles int nb_ramps_grat = 3; // Number of ramps per grating positiom int nb_rdouts_ramp = 64; // Number of rdouts per ramp }{ // Call the corresponding DMC sequence int[] duree = DMC_wave_switch(nb_dither_steps,nb_switch_cycles,nb_ramps_grat); // Convert number of ramps into seconds // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // Convert duration [ramps] into [msec] // Create return time array; convert into [sec] int[] time_array = [0,0,0,0,0]; for(int aux = 0 .. 4) { time_array[aux] = ifloor(double(duree[aux]) * ramp_time); time_array[aux] = Msec2sec(time_array[aux]); } // // Return total duration [sec] to calling program return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : Reduced NEP measurements for the new sequencer test // Search for the optimum bias with 11 values // using the high gain // // Author : Koryo Okumura // // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // int lowFreq_noise_time = 1800; // long noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Instrument is in safe mode // // Description : OBS script of PHOT_redArray_alternatePolarisation_direct_IST // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_newSeq_IST(1) // // Version : 1.0 // History : 0.1 Fri Oct 05 12:21:33 CEST 2007 // : 1.0 translated into PV script VDP // obs PacsEng_Phot_redArray_alternatePolarisation_direct_IST { /* Needed variables to call PacsEng_Phot_redArray_alternatePolarisation_direct_IST */ int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds int lowFreq_noise_time = 1800; // long noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_redArray_alternatePolarisation_direct_IST */ }{ // 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(PHOT_redArray_alternatePolarisation_direct_IST(response_measure_time,noise_measure_time,lowFreq_noise_time,biasFile))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_redArray_alternatePolarisation_direct_IST(response_measure_time,noise_measure_time,lowFreq_noise_time,biasFile); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Phot_SPU_Reset.cus // Missionphase : PACS EQM Test // // Purpose : Reset SPU after photometry data flow // // Author : T. Mueller // CUSification : DAC // Arguments : none // // // Description : // // Comments : // // Version : 1.7 // History : 1.0 / 28-Nov-2003 initial version // 1.1 / 16-Feb-2004 Second transmission mode parameter added // 1.2 / 20-Apr-2004 Default setting for compression mode: "half" // 1.3 / 12-Oct-2006 setting default mode to "0" and update command // 1.4 / 27-mar-2007 Adapted for SPU13.1 // 1.5 4-apr-2007 SCM back to zero // 1.6 10-apr-2007 SCM back to 1 // 1.7 11-apr-2007 SCM back to 0 // 1.8 16-jun-2007 SCM back to 1 // procedure PACS_Phot_SPU_Reset { }{ //-------------------- // Preparation //-------------------- int comp_mode_blue = 0; int comp_mode_red = 0; int spus_nraw = 3; int spul_nraw = 3; int spus_startraw = 1; int spul_startraw = 1; //----------------------------- // Stop reduction/compression //----------------------------- // PC037400 "SPUS_STOP_REDUCT_COMPR" STOP THE APPLICATION PROGRAM IN SPU_SWL // tcsend PC037400 // waittime 0.5 Pacs_SPUS_STOP_REDUCT_COMPR(); delay(1); // PC038390 "SPUL_STOP_REDUCT_COMPR" STOP THE APPLICATION PROGRAM IN SPU_LWL // tcsend PC038390 // waittime 0.5 Pacs_SPUL_STOP_REDUCT_COMPR(); delay(1); //-------------------------------- // Reset SPU compression/reduction //-------------------------------- // PC175420 "DMC_WRT_SPU_TRAN_MODE" WRITE THE SPU TRASMISSION MODE // Fixed GroupSize: 1, repetition: 2 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // set tran_mode [list \ // [list PP067420 $comp_mode_blue] \ // [list PP067420 $comp_mode_red]] // set chksum [getChkSum -d -32 $tran_mode] // eval tcsend PC175420 $tran_mode \{PP066420 $chksum\} // waittime 0.5 {int}[] list_tuple = [{comp_mode_blue},{comp_mode_red}]; int[] list_int = [comp_mode_blue,comp_mode_red]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_SPU_TRAN_MODE(list_tuple,chksum); delay(1); //---------------------------- // Reset Raw channel selection //---------------------------- // PC035400 "SPUS_RAW_CHAN_TRAN_MODE" RAW CHANNEL TRANSMISSION MODE FOR SPUS // PP050400 "SPUS_OBS_MODE" // PP051400 "SPUS_RCXNB" // PP052400 "SPUS_RCX" //if {$spus_nraw != 0} \ //then {set rawblu [list {PP050400 2} \ // [list PP051400 $spus_nraw] \ // [list PP052400 $spus_startraw]]; \ // eval tcsend PC035400 $rawblu; \ // eval waittime 0.5 \ //} Pacs_SPUS_RAW_CHAN_TRAN_MODE("PHOT",spus_nraw,spus_startraw); delay(1); // PC036390 "SPUL_RAW_CHAN_TRAN_MODE" RAW CHANNEL TRANSMISSION MODE FOR SPUL // PP032390 "SPUL_OBS_MODE" // PP033390 "SPUL_RCXNB" // PP034390 "SPUL_RCX" //if {$spul_nraw != 0} \ //then {set rawred [list {PP032390 2} \ // [list PP033390 $spul_nraw] \ // [list PP034390 $spul_startraw]]; \ // eval tcsend PC036390 $rawred; \ // eval waittime 0.5 \ //} Pacs_SPUL_RAW_CHAN_TRAN_MODE("PHOT",spul_nraw,spul_startraw); delay(1); //------------------------------------ // Reset detector constants photometry //------------------------------------ // "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in photometry int tfp = 1000; // Threshold for chopper position deviation in photometry int tcp = 100; // Glitch detection for photometry (1: no glitch detection) int gdfp = 1; // Override samples to average int navg = 0; // resolution reduction parameter 2 int spr1 = 0; // resolution reduction parameter 3 int spr2 = 0; // resolution reduction parameter 4 int scm = 1; // lossless compression algoithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand int[] aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; int check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // "Ottensamer" block ("L" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) ppf = 0; // PPP: Pre-Processing Parameter ppp = 0; // Threshold for glitch detection in photometry tfp = 1000; // Threshold for chopper position deviation in photometry tcp = 100; // Glitch detection for photometry (1: no glitch detection) gdfp = 1; // Override samples to average navg = 0; // resolution reduction parameter 2 spr1 = 0; // resolution reduction parameter 3 spr2 = 0; // resolution reduction parameter 4 scm = 1; // lossless compression algoithm (0,1,2,3,4) lcal = 0; // PACS Codec Order (3,4) pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // End of Procedure } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OBCP 12: Photometry Calibration III, calls DMC sequence 7 // // OBCP author : Helmut Feuchtgruber // CUS script : Thomas G. Mueller // // Arguments: // Type Name Description // int nb_main_loop p01 number of times main loop is repeated // int chop_pos_CS1 p02 Chopper position on CS1 // int nb_rdouts_plateau p03 Number of readouts per chopper plateau // int nb_CS1_CS2_cycles p04 Number of chopper cycles per incremental step // int chop_step_CS1_CS2 p05 Step size to go from CS1 to CS2 // int chop_step_CS2_CS1 p06 Step size to go from CS2 to CS1 // int chop_step_CS1 p07 Step size on CS1 // int nb_steps p08 Number of incremental steps // // Description : This script mimics the OBCP_PHOT_CAL_III // pseudo script, section 3.11.3 in PACS-ME-LI-005, Ver.1.0 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // int[] block OBCP_phot_cal_III PACS 12 { int nb_main_loop = 2; // p01 number of times main loop is repeated int chop_pos_CS1 = -23680; // p02 Chopper position on CS1 int nb_rdouts_plateau = 39; // p03 Number of readouts per chopper plateau int nb_CS1_CS2_cycles = 1; // p04 Number of chopper cycles per incremental step int chop_step_CS1_CS2 = 46270; // p05 Step size to go from CS1 to CS2 int chop_step_CS2_CS1 = -46145; // p06 Step size to go from CS2 to CS1 int chop_step_CS1 = 125; // p07 Step size on CS1 int nb_steps = 6; // p08 Number of incremental steps int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position }{ // Starting time int time_start = time(); // Anounce start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Bolo sampling rate (needed to compute readout duration) double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; debug_print("Bolo frequency: " + bol_freq + " " + bol_unit); debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Accumulated duration of this script [msec] int duration_msec = 0; // OBCP pseudo-code starts here; accumulate duration as it goes) // OBCP_PHOT_CAL_III(seq, seq_time, P#1,&, P#8, cmp_par_blue_cmp_par_red, chop_def) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) // ; (all parameters filled by DPU based on seq parameter) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call CUS version of DECMEC sequence to obtain duration // Returns array with [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR] int[] duree1 = DMC_phot_cal_III(nb_main_loop,nb_rdouts_plateau,nb_CS1_CS2_cycles,nb_steps); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // DMC_SYNCHRONIZE_ON_DET(4) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 1, cmp_par, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(seq_time) // ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8) + event // DMC_MOVE_CHOP_ABS(chop_def) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) // End // Duration: 9 x 200ms + seq_time + 0.5s // This procedure calls the sequence described in sec.4.1.7. // // Now trigger execution of OBCP // This OBCP is number 12, requires 13 parameters, call DEC seq #7 // which lasts seq_time [msec] string obcp_ID = "PHOT_CALIB_III"; int obcp_par_nber = 13; int seq_DMC = 7; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_main_loop},{4,chop_pos_CS1},{5,nb_rdouts_plateau},{6,nb_CS1_CS2_cycles},{7,chop_step_CS1_CS2},{8,chop_step_CS2_CS1},{9,chop_step_CS1},{10,nb_steps},{11,comp_mode_blu},{12,comp_mode_red},{13,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the OBCP "jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return return time_array; } // CVS comments : $Id: PacsSpecRMS.txt,v 1.30 2007/10/26 15:40:39 dcesarsk Exp $ // Purpose : // // CUS author : // Script file : PacsSpecRMS.txt // // Input arguments // type name description // // Return values // tuple bigTuple //{{string,double[],double[],double[],double[]}, // {string,double[],double[],double[],double[]}, // {string,double[],double[],double[],double[]}}[] // // Each bigTuple's line is of the form "noiseArray" // {IDstring, noise array, wave array, CONT noise array, LINE noise array} // // Description : Computes expected RMS fluctuations given observing // parameters, described by infoArray. For LineSpec use wave (in infoArray) // at face value. For RangeSpec create a RMS vs Wave table from waveStart // to waveEnd, sampled every sampRate [mic] and report max and min RMS in // the interval. It is assumed that waveXX in infoArray is compatible with // the wave range of table SPECnoise // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 2-Sep-2005 DAC // 0.2 28-sep-2005 Added one more element to infoArray // 0.3 26-apr-2006 Use new table from AlPog // Get max/min parameters for CONT and LINE // Array noiseWave contains CONT and LINE information // 0.4 11-may-2006 - stepSize may be negative; use abs() // 0.4.1 12-sep-2006 - reduced RMS step size to reduce size of interpolation // table (reduced run time from 8 sec to less than 2 sec) // (SPR-2324) // 0.5 22-nov-2006 Removed debug_print // 1.0 22-jan-2007 Fixed SPR-2521 (too low initial rmsC,rmsL) // 2.0 26-jan-2007 After much discussions, count the WAIT=1 as a // bonafide SKY readout (this is done in PacsLineSpec // and PacsRangeSpec) // Correct handling of FreqSwitch (I hope...) // Dithering count per SPR-2841 (smallSrcDither) // 2.1 14-feb-2007 Logic to deal with waveRef; added rangesEXT containing // refWave; added aotID // Solved SPR-2838 (use min(6800/stepSize,nbSteps) // Use grating width as per order // Generate messages explaining data obtained in order // other than demanded order // 2.2 26-feb-2007 Added orderSel from HSPOT // 2.3 10-mar-2007 OrderSel includes now sed mode // 3.0 13-mar-2007 Use bigTuple to convey plot data to HSPOT // 3.1 16-apr-2007 Modify to access the correspondig SPECcontline table // 4.0 25-apr-2007 Redefine ranges as defined by HSPOT // 4.1 8-may-2007 SPR-3182: bound "free" data to band limits // 4.2 10-may-2007 SPR-3186: Raster/wOFF repeat count // 5.0 30-may-2007 SPR-3251: Simplified "extra" data logic // 5.1 13-jun-2007 SPR-3307 Fewer decimals for "Info for line" // 6.0 21-aug-2007 SPR-3505 Out-of-range interpolation (more on extra data // logic) // 6.1 23-oct-2007 Added obsType in call to PacsSpecAuxRMS // 6.2 24-oct-2007 Get nbOBS and nbOFF from caller // Added above to PacsSpecAuxRMS {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] procedure PacsSpecRMS { /* aotID */ string aotID = "RANGE" in ["RANGE","LINE"]; /* orderSel */ string orderSel = "order2"; /* infoArray tuple (for SLEW,OBS,AOT and per wavelength) */ {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Tuple from Obs module /* rangeSPOT (the sorted version) */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = [{"",0.0,0.0,0,0.0,0.0,0.0,"","",0.0}]; /* confOBCP (per wavelength) */ {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; /* nbOBS and nbOFF */ int nbOBS = 1; int nbOFF = 0; bool verbose = false; }{ // Data used here is to be found in // infoArray[1]{0}{0} : PointReq information (ex. SmSrcDither, RasterOFF) // infoArray[1]{0}{3} : Number of lines to be observed // infoArray[1]{0}{1} : Integration time per plateau // infoArray[1]{0}{4} : Number of nod cycles // infoArray[1]{1}[]{0} : Starting wave for line [] // infoArray[1]{1}[]{1} : Ending wave for line [] // infoArray[1]{1}[]{2} : Grating order for line [] // infoArray[1]{1}[]{3} : Grating step for line [] // infoArray[1]{1}[]{4} : Number of grating steps for line [] // infoArray[2]{0}{0} : OBCP information (ex. FreqSwitch) // infoArray[2]{0}{3} : Raster "m" size // infoArray[2]{0}{4} : Raster "n" size // infoArray[2]{0}{5} : Raster repeat factor in raster/wOFF // confOBCP[]{0} : Number up/down, nb SRC/CS in FreqSwitch for line [] // confOBCP[]{3} : Number SRC/REF for line [] // confOBCP[]{4} : Number readouts-ramps/plateau for line [] // confOBCP[]{7} : Dither count (FreqSwitch) for line [] // Define return array // Array noiseWave[nbLines][8] used to contain: // noiseWave[lineNb][BwlC,BrC,WwlC,WrC,BwlL,BrL,WwlL,WrL] // where B: best, W: worst, wl: wavelength, r: RMS, C: continuum, L: line // Will add three more elements refWave, rmsCont, rmsLine (RANGE) // NOTE: NoiseWave is no longer used; its content is now in 1st // array of tuple noiseArrayx // Define tuples to be used below // Each noiseArray contains // - string arrayID // - double[] "noiseWave" (the "historical" noiseWave) // - double[] wave array // - double[] CONT noise // - double[] LINE noise {string,double[],double[],double[],double[]} noiseArray0 = {"undefined",[0.0],[0.0],[0.0],[0.0]}; {string,double[],double[],double[],double[]} noiseArray1 = {"undefined",[0.0],[0.0],[0.0],[0.0]}; {string,double[],double[],double[],double[]} noiseArray2 = {"undefined",[0.0],[0.0],[0.0],[0.0]}; {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = [{noiseArray0,noiseArray1,noiseArray2}]; // Number of lines observed int nbLines = infoArray[1]{0}{3}; // The logic to estimate the data one gets for free (there are two arrays) // needs to know whether the current observations are performed with filter // "POS A" or "POS B" (fltPos=3 or fltPos=2). Only HSPOT knows this... int fltPos = 0; if(orderSel == "order2" || orderSel == "sed2") { fltPos = 2; } if(orderSel == "order3" || orderSel == "sed3") { fltPos = 3; } ///////////////// Per line loop ////////////////////////////// for(int loop0 = 0 .. nbLines - 1) { // Just for checks during script development if(verbose) { debug_print("RMS:PointReq: " + infoArray[1]{0}{0}); debug_print("RMS:OBCP : " + infoArray[2]{0}{0}); debug_print("RMS:Wave from:to " + infoArray[1]{1}[loop0]{0} + ":" + infoArray[1]{1}[loop0]{1} + " [mic]"); debug_print("RMS:Grat Order/StepSize/NbSteps " + infoArray[1]{1}[loop0]{2} + "/" + infoArray[1]{1}[loop0]{3} + "/" + infoArray[1]{1}[loop0]{4}); } // Next section deals with estimating the "on-sky" time per resolution element // and per (same) sky area // Spectral lines can be seen several times as they move across the // "wavelength" pixels // How many times a line feature has been seen // Get actual grating width (i.e. nbSteps = 16 pixels) string key = "" + infoArray[1]{1}[loop0]{2}; double gratWidth = double(ilookup("SPEC_BAND_params",key,"GRAT_WDTH")); if(verbose) { debug_print("RMS:GratWdth: " + gratWidth + " steps"); } // In FreqSwitch mode the parameters are somehow different // Useful variable for freqSwitch bool freqSwitch = false; if(infoArray[2]{0}{0} == "FreqSwitch") { freqSwitch = true; } if(freqSwitch) { double howMany = 4.0; } else { // Case of step size=0 (PV single grating AOT) howMany = gratWidth / (0.01 + abs(double(infoArray[1]{1}[loop0]{3}))); // SPR-2838: howMany cannot be larger than the number of grating steps if(howMany > double(infoArray[1]{1}[loop0]{4})) { howMany = double(infoArray[1]{1}[loop0]{4}); if(verbose) { debug_print("RMS:Reduced howMany to NbSteps"); } } } // Integration time is then // intTimePlateau x NbSrcRef x howMany x nbNods x 2*up_dn x dithCount x Nbrepeat // Number of nods (OBS) int nbNodCycles = infoArray[1]{0}{4}; // Nb of "pointings" for nbNodCycles int nbNods = 2 * nbNodCycles; if(nbNods == 0) { nbNods = 1; } int nbUpDn = 2 * confOBCP[loop0 + 1]{0}; // In FreqSwtch, below counts the number of SRC-CS cycles int nbSRC_REF = confOBCP[loop0 + 1]{3}; // dithCntFreqSwtch introduced for FreqSwitch, otherwise is unity int dithCntFreqSwtch = 1; // dithCntSmSrc introduced for small source w/dithering, otherwise is unity int dithCntSmSrc = 1; if(infoArray[1]{0}{0} == "SmSrcDither") { // The source is seen at each of the m X n raster points int m = infoArray[2]{0}{3}; int n = infoArray[2]{0}{4}; dithCntSmSrc = m * n; } // In FreqSwitch mode the parameters are somehow different if(freqSwitch) { // confOBCP{0} counts the number of OBS+CS cycles nbUpDn = confOBCP[loop0 + 1]{0}; // Assume the line is always in sight (Line Ref1 Line Ref2) // i.e. we switch by 1/2 array (8 pixels) (the factor 4 comes from // the DMC: the grating performs LINE REF1 LINE REF2, i.e. the line // is seen four times) howMany = 4.0; // The DMC is repeated dithCntFreqSwtch times dithCntFreqSwtch = confOBCP[loop0 + 1]{7}; } // If Raster/w OFF, take into account the number of repeations int nbRepeat = 1; if(infoArray[1]{0}{0} == "RasterOFF") { nbRepeat = infoArray[2]{0}{5}; } // infoArray[1]{0}{1} is the integration time per plateau double singleIntTime = double(nbSRC_REF * nbNods * nbUpDn * nbRepeat) * infoArray[1]{0}{1}; // Special case of ScanChopNoNod if(infoArray[1]{0}{0} == "ScanChopNoNod") { singleIntTime = infoArray[1]{0}{1}; } double intTime = double(dithCntFreqSwtch * dithCntSmSrc) * howMany * singleIntTime; // Another exception for scan mode if(infoArray[1]{0}{0} == "ScanChopNoNod") { intTime = infoArray[1]{0}{1}; } // Wavelength span (needed below, but useful here for message) double span = abs(infoArray[1]{1}[loop0]{0} - infoArray[1]{1}[loop0]{1}); // Logic to show "extra" data, i.e. at different order than demanded // - If observing in order=1 (with 2), the user gets for free order=2 data // - If observing in order=1 (with 3), the user gets for free some order=3 // data if lambda>167 microns AND the short wavelength part of order=2 // (which falls inside POS B bandpass) if lambda < 142. For lambda // 167 < lambda < 142, there is no "free" data // - If observing at order=2 or order=3, user gets for free order=1 // // Try to code all this.. Current logic is as follows: // For each Order/Filter combination see if the expected extra data is // entirely out of filter bandpass. If yes, then there is no extra data; else // place extra data within filter bandpass // Current line is being observed at order int currOrder = infoArray[1]{1}[loop0]{2}; // Code currOrder as orderN string orderCurr = "order" + currOrder; // "sed4" is a special case if(orderSel == "sed4") { orderCurr = "order23"; } // Nominal and extra data will be labeled with arrayID string arrayID = "ToBeFilledBelow"; // Order 1 needs no filter... so we always see data in order 1. What other // order do we see (where is filter?) // // Useful variables: low and high user defined range double loLam = infoArray[1]{1}[loop0]{0}; double hiLam = infoArray[1]{1}[loop0]{1}; // Get boundaries of filters double loLam1 = dlookup("SPEC_BAND_params","1","BLU"); double hiLam1 = dlookup("SPEC_BAND_params","1","RED"); double loLam2 = dlookup("SPEC_BAND_params","2","BLU"); double hiLam2 = dlookup("SPEC_BAND_params","2","RED"); double loLam23 = dlookup("SPEC_BAND_params","23","BLU"); double hiLam23 = dlookup("SPEC_BAND_params","23","RED"); double loLam3 = dlookup("SPEC_BAND_params","3","BLU"); double hiLam3 = dlookup("SPEC_BAND_params","3","RED"); // SPR-3251 Completely new logic // // Define "cross over" wavelengths, i.e. wavelength in order1 such that 2nd // order falls outside filter B into filter A double wave1into2 = 2.0 * loLam2; // and 1st order grating position corresponds to in-band 3rd order double wave1into3 = 3.0 * loLam3; // Following logic creates "extra" data, i.e. data user gets for "free" // Data labeled xSomething is regular order seen with tje corresponding // filter (i.e. 2nd with filter B; 3rd with filter A) // Data labeled xxSomething is short wavelength 2nd order seen with 3rd // order filter; the so called "extended" emission // Null arrays imply there is no "free" data double xWaveLO = 0.0; double xWaveHI = 0.0; double xxWaveLO = 0.0; double xxWaveHI = 0.0; // Order 1 scanning is the most complex since the "free" data depends on filter // position if(currOrder == 1) { // Filter at POS B if(fltPos == 2) { arrayID = "order2"; // When filter is at order 2 (POS B), all order=1 grating steps // map to visible order=2 wavelengths, except // - hiLam shorter than wave1into2 (range is too "blue") // - loLam greater than 2*hiLam2 (range is too "red") if(hiLam <= wave1into2 || loLam >= 2.0 * hiLam2) { // Whole band is outside filter B xWaveLO = 0.0; xWaveHI = 0.0; } else { arrayID = "order2"; // A priori we see 1/2 wavelength xWaveLO = loLam / 2.0; xWaveHI = hiLam / 2.0; // But within bandpass limits if(xWaveHI > hiLam2) { xWaveHI = hiLam2; } if(xWaveLO < loLam2) { xWaveLO = loLam2; } } } // Filter at POS A // This is the most complex case since we may also see order 2 light if(fltPos == 3) { arrayID = "order3"; // Short wave filter (order 3, POS A), some order=1 grating steps // map to "visible" order=2 wavelengths, except // - hiLam shorter than 2*loLam23 (range is too "blue") // - loLam greater than 2*hiLam23 (range is too "red") if(hiLam <= 2.0 * loLam23 || loLam >= 2.0 * hiLam23) { // Whole band is outside filter A bandpass xxWaveLO = 0.0; xxWaveHI = 0.0; } else { // Short wave second order xxWaveLO = loLam / 2.0; xxWaveHI = hiLam / 2.0; // But within "extended" bandpass limits // SPR-3505: corrected band boundaries:xxLam3 should be xxLam23 if(xxWaveHI > hiLam23) { xxWaveHI = hiLam23; } if(xxWaveLO < loLam23) { xxWaveLO = loLam23; } } // Some order=1 grating steps map to "visible" order=3 wavelengths, except // - hiLam shorter than wave1into3 (range is too "blue") // - loLam greater than 3*hiLam3 (range is too "red") if(hiLam <= 3.0 * loLam3 || loLam >= 3.0 * hiLam3) { // Whole band is outside filter A xWaveLO = 0.0; xWaveHI = 0.0; } else { // Short wave 3rd order xWaveLO = loLam / 3.0; xWaveHI = hiLam / 3.0; // But within bandpass limits if(xWaveHI > hiLam3) { xWaveHI = hiLam3; } if(xWaveLO < loLam3) { xWaveLO = loLam3; } } } } // When grating scans within order 2 and 3 ranges, all steps map to visible // lines at order 1 // If we are in order=2 we see order=1 for free if(currOrder == 2) { arrayID = "order1"; xWaveLO = 2.0 * loLam; xWaveHI = 2.0 * hiLam; // It may fall completely outside bandpass if(xWaveLO >= hiLam1) { xWaveLO = 0.0; xWaveHI = 0.0; } else { // Within filter boundaries if(xWaveHI > hiLam1) { xWaveHI = hiLam1; } if(xWaveLO < loLam1) { xWaveLO = loLam1; } } } // If we are in order=3 we alse see order=1 for free if(currOrder == 3) { arrayID = "order1"; xWaveLO = 3.0 * loLam; xWaveHI = 3.0 * hiLam; // It may fall completely outside bandpass if(xWaveLO >= hiLam1) { xWaveLO = 0.0; xWaveHI = 0.0; } else { // Within filter boundaries if(xWaveHI > hiLam1) { xWaveHI = hiLam1; } if(xWaveLO < loLam1) { xWaveLO = loLam1; } } } if(verbose) { debug_print("RMS:current order: " + currOrder); debug_print("RMS:fltPos: " + fltPos); debug_print("RMS:LoLam: " + loLam); debug_print("RMS:HiLam: " + hiLam); debug_print("RMS:ExtraLoLam: " + xWaveLO); debug_print("RMS:ExtraHiLam: " + xWaveHI); debug_print("RMS:ExxtraLoLam: " + xxWaveLO); debug_print("RMS:ExxtraHiLam: " + xxWaveHI); debug_print("RMS:Integration/plateau: " + infoArray[1]{0}{1} + " [sec]"); debug_print("RMS:NbSRC_REF: " + nbSRC_REF + " times"); debug_print("RMS:ditherCount (freqSwitch): " + dithCntFreqSwtch + " times"); debug_print("RMS:ditherCount (small srce): " + dithCntSmSrc + " times"); debug_print("RMS:NbUpDn/NbNods: " + nbUpDn + "/" + nbNods); debug_print("RMS:NbRepeat: " + nbRepeat); debug_print("RMS:intTime (one freq. switch, no dither) " + singleIntTime + " [sec]"); debug_print("RMS:Wavelength span: " + dformat(span,2) + " [mic]"); debug_print("RMS:Feature seen " + howMany + " times"); debug_print("RMS:Time for RMS estimate: " + intTime + " [sec]"); debug_print("RMS:SRC/REF " + infoArray[1]{1}[loop0]{6} + "/" + infoArray[1]{1}[loop0]{7} + " [sec]"); } bool superbla = true; if(superbla) { if(aotID == "RANGE") { message("

    Info for range " + infoArray[1]{1}[loop0]{0} + "/" + infoArray[1]{1}[loop0]{1} + " [µm]

    "); } else { message("

    Info for line " + dformat(infoArray[1]{1}[loop0]{0},2) + " [µm]

    "); } message("
    • PointReq: " + infoArray[1]{0}{0} + "
    • "); message("
    • OBCP : " + infoArray[2]{0}{0} + "
    • "); // Next messages only for RANGE if(aotID == "RANGE") { message("
    • Wave from-to " + infoArray[1]{1}[loop0]{0} + "-" + infoArray[1]{1}[loop0]{1} + " [µm]
    • "); // message("
    • Wavelength span: " + dformat(span,2) + " [µm]
    • "); // Messages for "free" data if(xWaveLO != 0.0) { message("
    • Free! Your data will include wavelengths between " + dformat(xWaveLO,2) + " and " + dformat(xWaveHI,2)); } if(xxWaveLO != 0.0) { message("
    • Free! Your data will include wavelengths between " + dformat(xxWaveLO,2) + " and " + dformat(xxWaveHI,2)); } } if(freqSwitch) { message("
    • FreqSwitch at grating order: " + infoArray[1]{1}[loop0]{2} + "
    • "); } else { message("
    • Grat Order/StepSize/NbSteps " + infoArray[1]{1}[loop0]{2} + "/" + infoArray[1]{1}[loop0]{3} + "/" + infoArray[1]{1}[loop0]{4} + "
    • "); } message("
    • Number ramps/plateau (after synch): " + confOBCP[loop0 + 1]{4} + "
    • "); message("
    • Integration time/plateau: " + dformat(infoArray[1]{0}{1},1) + " [sec]
    • "); message("
    • NbSRC_REF: " + nbSRC_REF + " times
    • "); message("
    • Redundancy (freqSwitch dither): " + dithCntFreqSwtch + " time(s)
    • "); message("
    • Redundancy (SmallSrc dither): " + dithCntSmSrc + " time(s)
    • "); if(freqSwitch) { message("
    • L-R-L-R cycles/NbRasterRepeat: " + nbUpDn + "/" + nbRepeat + "
    • "); } else { message("
    • NbUpDn/NbNods/NbRepeat: " + nbUpDn + "/" + nbNods + "/" + nbRepeat + "
    • "); } message("
    • Per resolution intTime (spectral&spatial) " + dformat(singleIntTime,1) + " [sec]
    • "); message("
    • Feature seen " + dformat(howMany,1) + " times
    • "); message("
    • SKY time used to estimate RMS: " + dformat(intTime,1) + " [sec]
    • "); message("
    • SRC/REF " + infoArray[1]{1}[loop0]{6} + "/" + infoArray[1]{1}[loop0]{7} + " [sec]
    "); } // // We have now up to three wavelength ranges: // - nominal (user defined) [loLam to hiLam] // - one "free" data array [xWaveLO to xWaveHI] // - perhaps a 3rd "free" array [xxWaveLO to xxWaveHI] // // The reference wavelength if(aotID == "RANGE") { double waveRef = rangeSPOT[loop0]{9}; } if(aotID == "LINE") { waveRef = infoArray[1]{1}[loop0]{0}; } // Create a table RMS vs Wave consisting of nbSamples entries // // Create Wave arrays (remember we are inside the nbLines loop!!) // Obs type for AuxRMS string obsType = "any"; if(aotID == "RANGE") { double[] waveArray = PacsSpecWaveArray(loLam,hiLam,verbose); /// if (verbose){debug_print("RMS:WaveArray: " + waveArray);} // Given wavelengths are always "nominal" noiseArray0 = PacsSpecAuxRMS(aotID,orderCurr,waveArray,waveRef,intTime,obsType,nbOBS,nbOFF,verbose); // Null Wave arrays have xWaveLO = 0.0 if(xWaveLO > 10.0) { waveArray = PacsSpecWaveArray(xWaveLO,xWaveHI,verbose); /// if (verbose){debug_print("RMS:xWaveArray: " + waveArray);} // xWave array comes from arrayID source; define waveRefX double waveRefX = (xWaveLO + xWaveHI) / 2.0; noiseArray1 = PacsSpecAuxRMS(aotID,arrayID,waveArray,waveRefX,intTime,obsType,nbOBS,nbOFF,verbose); } // Null Wave arrays have xxWaveLO = 0.0 if(xxWaveLO > 10.0) { // xxWave array is always 2nd order, but special since it // overlaps with 3rd order. Identify as order23 (order 2 overlapping // with order 3) waveArray = PacsSpecWaveArray(xxWaveLO,xxWaveHI,verbose); /// if (verbose){debug_print("RMS:xxWaveArray: " + waveArray);} waveRefX = (xxWaveLO + xxWaveHI) / 2.0; noiseArray2 = PacsSpecAuxRMS(aotID,"order23",waveArray,waveRefX,intTime,obsType,nbOBS,nbOFF,verbose); } } if(aotID == "LINE") { waveArray = [infoArray[1]{1}[loop0]{0}]; // Identify FreqSwitch obsType = infoArray[2]{0}{0}; noiseArray0 = PacsSpecAuxRMS(aotID,orderCurr,waveArray,waveRef,intTime,obsType,nbOBS,nbOFF,verbose); } // For memory: bigTuple is thus defined // {{string,double[],double[],double[],double[]}, // {string,double[],double[],double[],double[]}, // {string,double[],double[],double[],double[]}}[] // bigTuple = [{noiseArray0, noiseArray1,noiseArray2}]; bigTuple[loop0] = {noiseArray0,noiseArray1,noiseArray2}; // End of nbLines loop // Zero the noiseArrays (a null value is used elsewhere to assert there // are no "free" ranges) noiseArray0 = {"",[0.0],[0.0],[0.0],[0.0]}; noiseArray1 = {"",[0.0],[0.0],[0.0],[0.0]}; noiseArray2 = {"",[0.0],[0.0],[0.0],[0.0]}; } return bigTuple; } // $Id: PacsEng_Spec_cre_setup.txt,v 1.6 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // CVS file : SPEC_CRE_setup_OBS.cus // // // // Purpose : TOPE schedule SPEC_cre_setup // // Author : DAC // // Arguments : // Type Name DefVal Description // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' lengthl // double bias_d_red 0.070 BIAS_D for red spectrometer (1V=4095) // double bias_r_red 0.010 BIAS_R for red spectrometer (1V=4095) // double bias_d_blu 0.210 BIAS_D for blue spectrometer (1V=4095) // double bias_r_blu 0.010 BIAS_R for blue spectrometer (1V=4095) // int capa_red 12 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 12 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // // Version : 1.1 // History : 0.1 17-nov-2006 DAC // History : 1.0 04-mar-2008 Converted into PV script by VDP // 1.1 15-Apr-2008 changed blue_heat_current from 1.5 // to 0.78 mAmp (HF) // // obs PacsEng_Spec_cre_setup_l { /* Needed variables to call PacsEng_Spec_cre_setup_l */ int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) double blue_heat_current = 0.78 in [0.0,10.01]; // Current [mAmp] /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_cre_setup_l */ }{ // 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(SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blue_heat_current))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blue_heat_current); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Purpose : Bring PACS from switched off condition to standby // for SPEC observations, however with short set-up // time for CSs. // // CUS author : Composed from various ILT modules // // Input arguments: see after module identification // // Return values // N/A // // Comments : // // History: // 1.0 12-nov-2008 Helmut Dannerbauer did this script based on // PacsEng_SPEC_orbit_prologue only having a // shorter CS set-up time. // 1.1 12-nov-2008 VD : need make variable consistent for setting CS1: given in Ohms not Kelvin // see PHOT procs obs PacsEng_SPEC_orbit_prologue_short { }{ // Settling time for CS int tSET = 900; string fltPOS = "POS A"; double set_CS1 = 48.0; double set_CS2 = 58.0; double blu_heater_curr = 0.78; // Get duration int tp = duration(SPEC_setup(fltPOS,set_CS1,set_CS2,blu_heater_curr)); tp = tp + tSET; bool execute = true; // Add needed time to set/unset OBSID int tset = duration(WriteOBSID($OBSID)); int tunset = duration(WriteEndID()); int tih = tset; int tfh = tunset; // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the SPEC setup script SPEC_setup(fltPOS,set_CS1,set_CS2,blu_heater_curr); // Wait for CS to stabilize delay(tSET); if(state[0] == 5) { // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } } // CVS comments : $Id: PacsSpecSlewCal.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsSpecSlewCal.txt // // Input arguments // Type Name Description // bool verbose Debug_print or not // {int,int,int,int, // int,int,int,int,int} [] confSPECblu BLUE SPU parameters // {int,int,int,int, // int,int,int,int,int} [] confSPECred RED SPU parameters // {int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int}[] confOBCP OBCP parameters // bool doPROLOG Perform/don't AOT prologue // double [] keyWAVE One or several key wavelengths // int filter Where to move FltW (as order) // // Return values // Type Name Description // int[][5] time_array The 5 times (TOT,SRC,REF,CAL,OVR) per key line // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 DAC 10-may-2006 New version losely based on old // PacsSpecSlewCal. Implies recasting OBCP13params as // other OBCP CAL-U files // 0.2 30-may-2006 Adapted to SPEC_get_grat_info modified for freq switch // 0.3 1-jun-2006 ORDER 2 and 3 are nolonger simultaneously allowed // Use grating strategy as in OBCP22 and 27: grating remains // where DMC left it (grat_def_time = 0) // 1.0 15-feb-2007 SlewCal is supposed to leave the grating ready to start // observing the 1st "science" line // 16-feb-2007 Error in call to OBCP: grating should remain at // new_grat_def_pos (was grat_park) // 1.1 14-mar-2007 Add extraConf in call to SPEC_get_grat_info // 1.2 8-may-2007 Add orderSel needd by SPEC_get_grat_info // 1.3 10-oct-2007 SCR3632. SPEC_get_grat_info is called with KHI // 1.4 16-Jul-2008 Add dubugging prints (confSPEC) // int[][] procedure PacsSpecSlewCal { /* verbose debug print */ bool verbose = false; /* SPEC parameters for BLU and RED */ {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,64,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,64,0,0,0,0,0,0,0}]; /* OBCP parameters */ {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; /* Perform/don't AOT prologue */ bool doPROLOG = true; /* One or several key wavelengths */ double[] keyWAVE = [62.5]; /* Where to leave FltW (as order) */ int filter = 2; /* Where to leave grating at end of CAL */ int frstLstGratPos = 535000; /* User defined grating order */ string orderSel = "order2"; }{ // Array to collect OBCP times per line // NOTE: time variables in units of either number of ramps (SPEC) or // number of readouts (BOLO) or plain seconds. The calling program // must convert, if applicable, this information into actual duration // in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), CAL source, // and overheads (wait for something). Total duration is given by duree_num. // If no error, this duration must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); int[] totalDUREE = [0,0,0,0,0]; int[][] dureeCalKey = [[0,0,0,0,0]]; // Long sequence to "unpack" default values from tuples int capa_blu = confSPECblu[0]{0}; int nb_rdouts_ramp_blu = confSPECblu[0]{1}; int nb_rdouts_subramp_blu = confSPECblu[0]{2}; int comp_mode_blu = confSPECblu[0]{3}; int glitch_det_blu = confSPECblu[0]{4}; int ramp_fit_alg_blu = confSPECblu[0]{5}; int nb_raw_blu = confSPECblu[0]{6}; int bias_r_blu_mV = confSPECblu[0]{7}; int bias_d_blu_mV = confSPECblu[0]{8}; int capa_red = confSPECred[0]{0}; int nb_rdouts_ramp_red = confSPECred[0]{1}; int nb_rdouts_subramp_red = confSPECred[0]{2}; int comp_mode_red = confSPECred[0]{3}; int glitch_det_red = confSPECred[0]{4}; int ramp_fit_alg_red = confSPECred[0]{5}; int nb_raw_red = confSPECred[0]{6}; int bias_r_red_mV = confSPECred[0]{7}; int bias_d_red_mV = confSPECred[0]{8}; int nb_up_down = confOBCP[0]{0}; int grat_step_up = confOBCP[0]{1}; int grat_step_dn = confOBCP[0]{2}; int nb_SRC_OFF = confOBCP[0]{3}; int nb_ramps_plateau = confOBCP[0]{4}; int nb_CS1_CS2 = confOBCP[0]{5}; int nb_grat_step_up = confOBCP[0]{6}; int nb_grat_step_dn = confOBCP[0]{7}; // int grat_start_pos = confOBCP[0]{ 8}; // int grat_start_time = confOBCP[0]{ 9}; // int grat_def_pos = confOBCP[0]{10}; // int grat_def_time = confOBCP[0]{11}; int chop_pos_SRC = confOBCP[0]{12}; int chop_pos_REF1 = confOBCP[0]{13}; int chop_pos_REF2 = confOBCP[0]{14}; int chop_pos_CS1 = confOBCP[0]{15}; int chop_pos_CS2 = confOBCP[0]{16}; int chop_def = confOBCP[0]{17}; int detector = confOBCP[0]{18}; int filterPOS = confOBCP[0]{19}; // Bias voltages (needed by SPEC_aot_prologue) are commanded in (double) volts double bias_r_blu = double(bias_r_blu_mV) / 1000.0; double bias_d_blu = double(bias_d_blu_mV) / 1000.0; double bias_r_red = double(bias_r_red_mV) / 1000.0; double bias_d_red = double(bias_d_red_mV) / 1000.0; if(verbose) { debug_print("confSPEC: capa_blu" + capa_blu); debug_print("confSPEC: nb_rdouts_ramp_blu" + nb_rdouts_ramp_blu); debug_print("confSPEC: nb_rdouts_subramp_blu" + nb_rdouts_subramp_blu); debug_print("confSPEC: comp_mode_blu" + comp_mode_blu); debug_print("confSPEC: glitch_det_blu" + glitch_det_blu); debug_print("confSPEC: ramp_fit_alg_blu" + ramp_fit_alg_blu); debug_print("confSPEC: nb_raw_blu" + nb_raw_blu); debug_print("confSPEC: bias_r_blu_mV" + bias_r_blu_mV); debug_print("confSPEC: bias_d_blu_mV" + bias_d_blu_mV); } // Issue SPEC_aot_prologue if demanded if(doPROLOG) { totalDUREE = SPEC_aot_prologue(nb_rdouts_ramp_red,nb_rdouts_ramp_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,comp_mode_blu,comp_mode_red,nb_rdouts_subramp_blu,nb_rdouts_subramp_red,nb_raw_blu,nb_raw_red,glitch_det_red,ramp_fit_alg_red,filter,verbose); } // NOTE: Grating starts at grat_start_pos determined by SPEC_get_grat. At end of // SlewCal grating should park. Park position is generally grat_def_pos: int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // AOT_prologue is supposed to have left grating at park position int grat_def_pos = grat_park; // NOTE for version 1.0 and later. Upon execution of SpecSlew, grating is // indeed where SPEC_orbit_prologue left it (the default park position); // this fact remains unchanged. What is new is that SpecSlew will leave // the grating not at the default park position but already at the // position needed by the 1st line that will be observed. There are two // advantages: // 1- the new logic in the OBCP incurs in less grating movements when // the OBCP is repeated within a NOD or the next raster point, and // 2- the detector will see the illumination corresponding to the line // wavelength before the actual observation starts. // Observe now each key wavelength int nbKEY = length(keyWAVE); {double,int,int,int,int}[] gratTuple = [{0.0,0,0,0,0}]; for(int loopKEY = 0 .. nbKEY - 1) { // We may perform the loop starting with high ORDER int keyWaveLoop1 = nbKEY - 1 - loopKEY; // or not.... keyWaveLoop1 = loopKEY; // // Get grating start position (CAL is performeed with HI resolution) // (frequency switch boolean is set to false) bool switching = false; string extraConf = "normal"; // Seek K rows in CAL-U, i.e. key wavelength parameters gratTuple[keyWaveLoop1] = SPEC_get_grat_info(keyWAVE[keyWaveLoop1],"KHI",switching,extraConf,orderSel,verbose); // Issue now OBCP#13 for each of the given key wavelengths int order = gratTuple[keyWaveLoop1]{1}; int grat_start_pos = gratTuple[keyWaveLoop1]{2}; int nb_grat_steps = gratTuple[keyWaveLoop1]{3}; int grat_step_up_fine = gratTuple[keyWaveLoop1]{4}; int grat_step_dn_fine = -grat_step_up_fine; // Table OBCP13params is indexed by order string key = "" + order; string calU = "OBCP13params"; int nb_up_dn = ilookup(calU,key,"nb_up_down"); int nb_cycles_grat = ilookup(calU,key,"nb_CS1_CS2"); int nb_ramps_grat_pos = ilookup(calU,key,"nb_ramps_plateau"); int grat_step_coarse = 0; // Lookup chopper CS1 and CS2 positions calU = "CHOPPERCSparams"; chop_pos_CS1 = ilookup(calU,"SPEC","pos_CS1"); chop_pos_CS2 = ilookup(calU,"SPEC","pos_CS2"); int nb_rdouts_ramp = nb_rdouts_ramp_red; // Grating logic (OBCP is up/down ==> grating ends where it started) // Leave the grating where it is, i.e. end-of-DMC value int new_grat_def_pos = grat_start_pos; // But the last line should leave grating at frstLstGratPos if(keyWaveLoop1 == nbKEY - 1) { new_grat_def_pos = frstLstGratPos; } // Number of steps to start position for current line int steps_start = grat_def_pos - grat_start_pos; int grat_time = SPEC_grat_time(steps_start); if(verbose) { debug_print("OBCPcal:GratStart from/to: " + grat_def_pos + "/" + grat_start_pos + "; time: " + grat_time); } // int steps_end = grat_start_pos - new_grat_def_pos; int grat_def_time = SPEC_grat_time(steps_end); if(verbose) { debug_print("OBCPcal:GratEnd from/to: " + grat_start_pos + "/" + new_grat_def_pos + "; time: " + grat_def_time); } int[] dureeOBCP = OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_start_pos,grat_time,comp_mode_blu,comp_mode_red,new_grat_def_pos,chop_def,grat_def_time,nb_rdouts_ramp); if(verbose) { debug_print("SlewCal performed KeyWave: " + keyWAVE[keyWaveLoop1] + " [mic] requires " + dureeOBCP[0] + " [sec]"); } // Update dureeCalKey dureeCalKey[keyWaveLoop1] = [0,0,0,0,0]; for(int loop1 = 0 .. 4) { dureeCalKey[keyWaveLoop1][loop1] = dureeOBCP[loop1]; } // Prepare the grating to be ready for the next wavelength grat_def_pos = new_grat_def_pos; } // Add after the KeyWaves in dureeCalKey the duration from AOT_prologue dureeCalKey[nbKEY] = [0,0,0,0,0]; dureeCalKey[nbKEY][4] = totalDUREE[4]; if(verbose) { debug_print("End SlewCal with dureeCalKey: " + dureeCalKey); } // Leave bus scheduler in a known state (SP1707) sync(); return dureeCalKey; } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // detector test PTD 0.7.6 in photometry. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up housekeeping parameter for diagnostic housekeeping // of the detector. // // Dependencies : // // Preconditions : PACS switched-on, setup photometry. // // Comments : // // Version : 3.0 // // History : 1.0 16-08-06 creation by HD. script test. // 2.0 23-08-06 HD. number of HK's modified. // 3.0 23-08-06 HD. script works. block PHOT_chop_det_dhk_fmilt076phot_bb PACS 360 { }{ // Register start of BB WriteBBID($BBID); //----------------------------------------------------- // Setup and start diagnostic HK for PTD 0.7.6 //----------------------------------------------------- int diag_hk_length = 5; {int}[] parlist = [{209},{244},{245},{246},{0xffff}]; int[] aux = [209,244,245,246,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length,parlist,check_sum); int diag_hk_period = 4; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // File : Pacs_Spec_GeGa_Loop_Comm.cus // Missionphase : PACS FM ILT tests // // Purpose : Ge:Ga detector Loop // // Author : Helmut Dannerbauer // CUS script : HD // CVS file : // // Arguments : bias, integration time, capacity, measurement time, resistor bias // // Description : Loop over bias, integration time and capacity. // // Dependencies : - SPEC_CRE_No_Heater_setup // - SPEC_spu_setup // - PACS_Chop_Move_Abs // - SPEC_spu_reset // // Comments : The input arrays for bias, ramp length & capacitance must have the same length for red & blue // // Version : 1.0 // History : 1.0 / 14-Apr-2008 initial version by HD. // 1.1 / 17-Apr-2008 PR // introduced positionning of grating & FW // introduced main loop (global repetition) // introduced internal loop (flexibility) // suppressed unused variables 'cr' & 'br' // modified set of default parameters // procedure Pacs_Spec_GeGa_Loop_Comm { int repeat_global = 15; // Global repetition factor (main loop) int repeat_intern = 2; // Repetition factor inside the bias loop (ramplen+capa loops) double[] bias_blue = [0.06,0.08,0.1,0.12]; //bias blue double[] bias_red = [0.03,0.04,0.05,0.06]; //bias red red int[] ramp_len_blue = [32,64]; //ramp length blue (set integration time) int[] ramp_len_red = [32,64]; //ramp length red (set integration time) int[] capa_blue = [8,12]; //capacity blue int[] capa_red = [8,12]; //capacity red int meas_time = 60; //observing time in seconds per setting double bias_res_blue = 0.01; //resistor bias blue double bias_res_red = 0.01; //resistor bias red int chop_pos = 0; // chopper position int grat_pos = 535000; // grating position string filter_pos = "POS A" in ["POS A","POS B"]; // FW position }{ // Begin of Script // define variables int idle_time = 420; if(repeat_intern > 1) { idle_time = 60; } // // Position the grating // ==================== Pacs_DMC_MOVE_GRAT_ABS(grat_pos); delay(15); // // Position the chopper // ==================== PACS_Chop_Move_Abs(chop_pos); delay(1); // // Position the filter wheel // ========================= SPEC_fltw_move(filter_pos); // delay is contained in the procedure // // Declare the set of CRE variables // ================================ double bias_d_blue = bias_blue[0]; double bias_d_red = bias_red[0]; int ramp_blue = ramp_len_blue[0]; int ramp_red = ramp_len_red[0]; int capacity_blue = capa_blue[0]; int capacity_red = capa_red[0]; // // SetUp SPU // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 8; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 8; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Ramp fit algorithm [0=LstSq;1=mean value] int ramp_fit_alg = 1; // Start SPU or not [true,false] bool startSPU = true; // // determine length of arrays int bb = length(bias_blue); //length of bias blue int rlb = length(ramp_len_blue); //length of ramp length blue int cb = length(capa_blue); //length of capacity blue // // MAIN LOOP // int iteration = 0; while(iteration < repeat_global) { // // BIAS LOOP // int blc = 0; while(blc < bb) { bias_d_blue = bias_blue[blc]; bias_d_red = bias_red[blc]; // // INTERNAL LOOP // // (to be used e.g. to measure all settings once instead of just // waiting a long 'idle_time' after each bias change) int internloop = 0; while(internloop < repeat_intern) { // // RAMP LENGTH LOOP // int rlc = 0; while(rlc < rlb) { ramp_blue = ramp_len_blue[rlc]; ramp_red = ramp_len_red[rlc]; // // CAPACITY LOOP // int clc = 0; while(clc < cb) { capacity_blue = capa_blue[clc]; capacity_red = capa_red[clc]; // // Setup CREs SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // if this is the first measurement with this bias -> delay if(blc == 0 && rlc == 0 && clc == 0 && internloop == 0) { delay(idle_time); } // // OBSERVATION delay(meas_time); // // SPU RESET SPEC_spu_reset(); delay(1); // clc = clc + 1; } rlc = rlc + 1; } internloop = internloop + 1; } blc = blc + 1; } iteration = iteration + 1; } // // // Return Chopper & grating to default // =================================== Pacs_DMC_MOVE_GRAT_ABS(500000); delay(1); PACS_Chop_Move_Abs(0); delay(15); // // SYNC //= = = sync(); // // End of Script } // CVS comments : $Id: PacsSpecCommandOBCP32.txt,v 1.1 2007/10/25 12:16:47 dcesarsk Exp $ // Purpose : Issue FreqSwitch PACS commands at each stable pointing in // order to observe all the HSPOT defined spectral lines // // CUS author : DAC // // Input arguments // Type Description // {int,int,int,int,int,int,int,int,int}[] confSPECblu BLUE SPU parameters // {int,int,int,int,int,int,int,int,int}[] confSPECred RED SPU parameters // {int,int,int,int,int,int,int,int,int,int,int, // int,int,int,int,int,int,int,int,int}[] confOBCP OBCP parameters // bool verbose Print debug information // // Return values // Type Name Description // int[][5] time_array The 5 times (TOT,SRC,REF,CAL,OVR) per spectral line // Description : Loops over all wavelengths at current stable pointing; sends // start OBCP telecommand per spectral line // IMPORTANT NOTE: the duration for the first stable pointing could have been // different than that for the following points, due to the // fact that we start from the default configuration whereas for // any subsequent point, we start from where we ended at // point-1. All OBCPs dealing with the grating will leave the // grating at the position used for the 1st line/range. // // Dependencies : // // Preconditions : // Comments : OBCP tuples have slightly different contents than for // non switched OBCPs. See PacsSpecEstimatorOBCP32 for // more details // Version : 0.1 // History : // 0.1 DAC 18-oct-2007 First version based on PacsSpecCommandOBCP22 // int[][] procedure PacsSpecCommandOBCP32 { {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; bool verbose = true; // Print debug information }{ // Create array of durations; one duration per line int[][] time_array = [[0,0,0,0,0]]; // Grating was left at 1st line by SlewCal int grat_def_pos = confOBCP[1]{8}; // How many lines are we supposed to observe? confOBCP[0] is default tuple; // bonafide lines are described by confOBCP[1,2...]) int nbLines = length(confOBCP) - 1; if(verbose) { debug_print("Comm.OBCP32:Starting SpecCommandOBCP32 with NbLines:" + nbLines); debug_print("Comm.OBCP32:Grating at position:" + grat_def_pos); } // ========================= LOOP on lines =============================== for(int lineNb = 1 .. nbLines) { // Initialise time_array time_array[lineNb - 1] = [0,0,0,0,0]; // Long sequence to "unpack" contents of tuples // Both SPECs int nb_rdouts_ramp_blu = confSPECblu[lineNb]{1}; int comp_mode_blu = confSPECblu[lineNb]{3}; int comp_mode_red = confSPECred[lineNb]{3}; // OBCP // - Switch cycles (includes userREPfactr) int nb_switch_cycles = confOBCP[lineNb]{0}; // - OBCP32 is based on relative moves (to REF1 and to REF2) int jumpREF1 = confOBCP[lineNb]{1}; int jumpREF2 = confOBCP[lineNb]{2}; // - Number of ramps per grating position int nb_ramps_grat = confOBCP[lineNb]{4}; // - Number of dither cycles (better be odd number) int ditherCount = confOBCP[lineNb]{7}; // - Nominal grating position for observed line int grat_pos_LINE = confOBCP[lineNb]{8}; // - Relative displacement of the ensemble LINE-REF1-LINE-REF2 per dither // cycle int ditherSize = confOBCP[lineNb]{9}; int chop_pos_SRC = confOBCP[lineNb]{12}; int detector = confOBCP[lineNb]{18}; // This module is invoked at start of a stable pointing. Herein, OBCP32 // is called once per spectral line. // // Grating performs LINE-REF1-LINE-REF2. The DMC internal loop will // shift the "switching" pattern by ditherSize each time around the loop. // Perform the internal loop such that pattern starts at one extreme // position and then it moves to the end position, going through the // "nominal" grating position for LINE // The offset to the extreme position of oscillating pattern is int halfDither = ditherSize * (ditherCount - 1) / 2; // The DMC sequence is coded in such a way that the LINE is placed at // LINE -> grat_pos + ditherSize(P2) + param4(P#4) // To see the LINE in the first DMC loop: // grat_pos = nominal@line - param4(P4) - ditherSize(P2) int gratPos = grat_pos_LINE - jumpREF1 - ditherSize; // Further move the grating -halfDither step so that 1/2 way into the loop // will go through the nominal position gratPos = gratPos - halfDither; // Before OBCP grating is parked at grat_def_pos (1st line nominal setting) int steps_start = grat_def_pos - gratPos; // Time needed to get there [msec] int grat_time = SPEC_grat_time(steps_start); if(verbose) { debug_print("Comm.OBCP32:GratStart from/to: " + grat_def_pos + "/" + gratPos); debug_print("Comm.OBCP32:GratStartTime: " + grat_time + " [msec]"); } // At the end of the OBCP, the grating finishes at int grat_end = gratPos + ditherSize + 2 * halfDither; // We would like to leave it ready for the next line if(lineNb < nbLines) { grat_def_pos = confOBCP[lineNb + 1]{8}; } else { grat_def_pos = confOBCP[1]{8}; } // Number of steps to go to grat_def_pos int steps_end = grat_end - grat_def_pos; // Time needed to get there [msec] int grat_def_time = SPEC_grat_time(steps_end); if(verbose) { debug_print("Comm.OBCP32:GratEnd from/to: " + grat_end + "/" + grat_def_pos); debug_print("Comm.OBCP32:GratEndTime: " + grat_def_time + " [msec]"); } // Start the OBCP now. Watch out the signs of the params. Here chosen // so that jumpREF1=jumpREF2 indicates REF1 = REF2 int param4 = jumpREF2; int param8 = -jumpREF2; int param6 = -jumpREF1; int param7 = jumpREF1; int[] timeOBCP = OBCP_wave_switch(ditherCount,ditherSize,nb_switch_cycles,param4,nb_ramps_grat,param6,param7,param8,detector,comp_mode_blu,comp_mode_red,gratPos,chop_pos_SRC,grat_time,grat_def_pos,chop_pos_SRC,grat_def_time,nb_rdouts_ramp_blu); // This OBCP is rather confusing; print enough debugging information if(verbose) { debug_print("Comm.OBCP32: NominalLine: " + grat_pos_LINE); debug_print("Comm.OBCP32: halfDither : " + halfDither); debug_print("Comm.OBCP32: ditherCount: " + ditherCount); debug_print("Comm.OBCP32: P#2 : " + ditherSize); debug_print("Comm.OBCP32: P#3 : " + nb_switch_cycles); debug_print("Comm.OBCP32: P#4 : " + param4); debug_print("Comm.OBCP32: P#6 : " + param6); debug_print("Comm.OBCP32: P#7 : " + param7); debug_print("Comm.OBCP32: P#8 : " + param8); debug_print("Comm.OBCP32: gratPos : " + gratPos); debug_print("Comm.OBCP32: gratDefPos : " + grat_def_pos); debug_print("Comm.OBCP32: chopSrc : " + chop_pos_SRC); debug_print("Comm.OBCP32: gratTime : " + grat_time); debug_print("Comm.OBCP32: gratDefTime: " + grat_def_time); // Call PacsDebug with only one inner loop!! PacsDebug_wave_switch(gratPos,ditherCount,1,ditherSize,param4,param6,param7,param8); } // Compute duration for ensemble of dithered cycles for(int loop4 = 0 .. 4) { time_array[lineNb - 1][loop4] = time_array[lineNb - 1][loop4] + timeOBCP[loop4]; } // End of nbLines loop } // time_array indeces are [wavelength][mode] if(verbose) { debug_print("Comm.CmdOBCP32 returns " + time_array); } // Add sync() sync(); return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Condition SPU for SPECtroscopy observations // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : none // // Description : Simply calling procedure "SPEC_spu_setup". See there for details. // // Dependencies : Only low level PACS TCs // // Comments : // // Version : 1.0 // // History : 1.0 25-Apr-2008 PR Creation based on PacsEng_Spec_spu_setup // obs PacsEng_Spec_spu_setup_wait_reset { /* Needed variables to call PacsEng_Spec_spu_setup */ int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] int wait_time = 2400; // Wait time at the end of the SPU setup bool stopSPU = true; // Stop SPU after the wait_time /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_spu_setup */ }{ // 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(SPEC_spu_setup_wait_reset(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU,wait_time,stopSPU))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_spu_setup_wait_reset(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU,wait_time,stopSPU); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filename : Pacs_Spec_Readouts_per_Ramp_Test // // Purpose : Test different reset intervals in spectroscopy // // // // TCL author : HF // TCL file : none // CUS author : HF // Script file : SPEC_Readouts_per_Ramp_test.txt // // Input arguments none // type name description // // Return values none // Type Name Default Description // // Description : Test of different values for readouts per ramp at same flux // level // // // Preconditions : PACS must be switched-on and in Spectroscopy mode // // Comments : // // Version : 2.1 // History : 1.0 29-Mar-2005 creation by HF // 1.1 05-Apr-2005 modify dummy resistor bias and // length of measurement // 1.2 15-Apr-2005 HF, add SPU reset at the end // 1.3 11-Apr-2006 HF, adapted to FM, smallest capacitor // 1.4 03-Apr-2007 HF, adapted bias and chopper position to FM ILT values // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 08-Apr-2008 HF changed to in-flight default biases // int procedure Pacs_Spec_Readouts_per_Ramp_Test { int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length }{ // Tally duration (NOTE: we use [msec] for the return value) int duration_msec = 0; // CRE parameters default at 0.1pF int cre_ctrl_red = 386; // Red CRE register (capa_red=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) double bias_d_red = 0.03; // BIAS_D for red spectro (0-1V) double bias_d_blu = 0.08; // BIAS_D for blue spectro (0-1V) double bias_r_red = 0.01; // BIAS_R for red spectro (0-1V) double bias_r_blu = 0.01; // BIAS_R for blue spectro (0-1V) int capa_red = 0; // Capacitor red (0=100fF,8=200fF,4=400fF,12=1pF) int capa_blu = 0; // Capacitor blue (0=100fF,8=200fF,4=400fF,12=1pF) // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = ramp_len_blu; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = ramp_len_red; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // No sub ramps or means nb_samp_subramp_blu = ramp_len_blu; nb_samp_subramp_red = ramp_len_red; // Reset SPU SPEC_spu_reset(); // Set chopper and grating (to key wavelength) SPEC_MOV_CHOP_and_GRAT(648,535000); // Change readouts per ramp SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(130); duration_msec = duration_msec + 130000; // Reset SPU SPEC_spu_reset(); sync(); return duration_msec; } // CVS file : CONF_phot_fltw_R_Warm.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the PHOT filter wheel for Redundant Warm // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 1.0 04-Jul-2007 PR Initial version // : procedure CONF_phot_fltw_R_Warm { }{ string calUname = "CONFFWPHOT"; // FWPHOT CALIBRATION TABLE string calUrow = "FMILT_WR"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWPHOT_CONF_PAR(parlist,check_sum); } // CVS comments : $Id: DMC_wave_switch.txt,v 1.2 2007/10/26 15:40:39 dcesarsk Exp $ // Description : // 4.2.10 Line Observation with Wavelength Switching (OBCP 32, DMC Seq. 18) // Wavelength switching will be required on extended sources. // No chopping will be done. Instead, the grating will be moved in a 2 or 3 // position pattern around the spectral line to be observed. This version of // the wavelength switching DMC sequence does not contain any internal // calibration block. Internal calibrations are thought to be done outside the // sequence in a dedicated calibration block. This version allows for more // shifts of the grating pattern with at the same time smaller overheads. // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows verbatim paragraph 4.2.10 in PACS-ME-LI-005 // version 1.6 // Actual values of input parameters, except values for the // various loop counters, are completely irrelevant and so // are not used. // Loop counters are used to estimate the duree of the // sequence // // Version : 0.1 15-oct-2007 Creation by DAC // History : // // This "dummy" DEC/MEC sequence needs only the loop parameters from the // complete list above int[] procedure DMC_wave_switch { int nb_dither_steps = 8; // number of dithering steps int nb_switch_cycles = 1; // nb of L-R-L-R cycles per dithering int nb_ramps_grat = 1; // nb of ramps/grating position }{ // Define variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Pseudo code from PACS OBCPs and DMC Sequences (4.1.7) // WAIT 1 ; have a defined start duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P1 main loop for number of shifts for(int outLOOP = 1 .. nb_dither_steps) { // WAIT 1 sync. for chopper duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P2 move grating by P2 = shift // LOOP P3 P3 times core loop for(int inLOOP = 1 .. nb_switch_cycles) { // WAIT 1 sync. for grating duree_ramps = duree_ramps + 1; duree_REF = duree_REF + 1; // MOVE_GRATING_RELATIVE P4 move grating by P4 // LABEL 33 wavelength switching // WAIT P5 take P5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; // WAIT 1 sync. for grating duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_GRATING_RELATIVE P6 move grating by P6 // WAIT P5 take P5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_REF = duree_REF + nb_ramps_grat; // WAIT 1 sync. for grating duree_ramps = duree_ramps + 1; duree_REF = duree_REF + 1; // MOVE_GRATING_RELATIVE P7 move grating by P7 // WAIT P5 take P5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_SRC = duree_SRC + nb_ramps_grat; // WAIT 1 sync. for grating duree_ramps = duree_ramps + 1; duree_SRC = duree_SRC + 1; // MOVE_GRATING_RELATIVE P8 move grating by P8 // WAIT P5 take P5 ramps duree_ramps = duree_ramps + nb_ramps_grat; duree_REF = duree_REF + nb_ramps_grat; // END_LOOP } // END_LOOP } // WAIT 1 complete last plateau duree_ramps = duree_ramps + 1; duree_OVR = duree_OVR + 1; // LABEL 0 no sequence anymore // END_SEQUENCE // 8 Parameters: // P1: number of full sequences // P3: number of grating core loops on the line // P2 P4 P6 P7 P8: grating relative moves // P5: number of readouts per grating position // // Note: In order to establish the desired switching pattern, it is // recommended that: // P4 = -P8 P6 = -P7 // // If P6 = P8 the wavelength will switch only between 2 positions, // otherwise 3. // The parameter P2 holds the number of grating steps the switch pattern will // be advanced within each P1 loop. // // Sequence duration, in ramps : // 2 + P1 * { 1+ (P3 * 4 * (1+ P5)} // Create time_array int[] time_array = [duree_ramps,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // Mission phase : ILT at Garching // // Purpose : PCD req.1.1.11 // Low frequency noise measurement (12 hours each mode) // This is a variant using different bias (VH-VL) values // // Author : Koryo Okumura // // CUS script : procedure Phot_lowFreq_direct_EMT // // Argument : // measureTime : response measure time in seconds [3600s = 1hour] // biasFile : Bias table file containing the initial values ["BOLObias_ILT_standard_high"] // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + SPU is ON in a normal downlink // // Description : // Low frequency measurement on one of the CSs // // Dependencies : None // // Comments : // // Version : Thu Mar 29 2007 // procedure Phot_lowFreq_direct_IST { string cs_num = "cs1" in ["cs1","cs2"]; // CS1 or CS2 int measureTime = 2000; // response measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values string finalBiasTable = "BOLObias_preILT_standard_low"; }{ int[] cs_pos = [-23382,22347]; int i_cs = 0; if(cs_num == "cs2") { i_cs = 1; } // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // //******************** // Let all stabilized //******************** delay(300); // //************************************ // Response measurement during 300 (s) //************************************ TMMarker602(); OBCP_chopped_photometry(0,0,39,0,0,150,1,cs_pos[0],cs_pos[1],0,0,0); TMMarker600(); // //********************************************** // Set the PACS chopper at the central position //********************************************** Pacs_DMC_MOVE_CHOP_ABS(cs_pos[i_cs]); // //******************** // Let all stabilized //******************** delay(300); // //***************************************** // Noise measurement during measureTime (s) //***************************************** TMMarker601(); delay(measureTime); TMMarker600(); // //******************** // Let all stabilized //******************** delay(300); // //************************************ // Response measurement during 300 (s) //************************************ TMMarker602(); OBCP_chopped_photometry(0,0,39,0,0,150,1,cs_pos[0],cs_pos[1],0,0,0); TMMarker600(); // // Stop SPU PHOT_spu_reset(); //*********************************************** //*********************************************** // // Bias resetting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(finalBiasTable,1); PHOT_set_bias_volt(finalBiasTable,2); PHOT_set_bias_volt(finalBiasTable,3); PHOT_set_bias_volt(finalBiasTable,4); PHOT_set_bias_volt(finalBiasTable,5); PHOT_set_bias_volt(finalBiasTable,6); // // Set seq mode Sb-Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb-Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set gain low Pacs_BOLC_SET_GAIN("LOW"); // } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Perform Thermal behaviour photometry test // Check before executing: // o TEMP_EV still below 0.3 K? // (cooler recycling has to be finished) // o detector groups off // o CSs have to off and cold // o chopper and filter wheel controller off // o Check that the temperature sensors are on // // Duration: 53 min // // CUS author : TM // Script file : PHOT_thermal_OBS.cus // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 creation by XXX // 0.3 09-nov-2006 TM: updated for FM-ILT // 0.4 10-nov-2006 TM: new bias table, low gain // 0.5 10-nov-2006 DAC New CONF_xxx scripts // 0.6 14-nov-2006 TM: update of the bias setting // 0.7 05-mar-2007 TM: diagHk for OBCP, new CONF_chopper // 1.0 04-mar-2008 translated into PV script VDP // // obs PacsEng_Phot_thermal { /* Needed variables to call PacsEng_Phot_thermal */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_thermal */ }{ // 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(PHOT_thermal())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_thermal(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS FM ILT tests // // Purpose : FoV scan Spectroscopy (OBCP_spec_2_3_chop) // // Author : P. Royer // // Arguments : // SPU setup arguments // OBCP_spec_2_3_chop // Filter wheel position // // Prerequisite : // // Description : // SPU Setup // Position Filter Wheel // OBCP_spec_2_3_chop // - center to chop throw small // - center to chop throw medium // - center to chop throw large // - center to chop throw medium incl. DMC internal calibration block // // SPU reset // // Dependencies : // SPEC_spu_setup // SPEC_spu_reset // OBCP_spec_2_3_chop (calling DMC_spec_2_3_chop) // // Comments : We are supposed in PACS spectro before to run this procedure // => no CRE setup here // // Version : 1.0 // History : 1.0 / 15-Apr-2008 initial version by PR // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose 3 Pos chopping Spectroscopy (OBCP_spec_2_3_chop) // @comment - // procedure PACS_Spec_GeGa_Chop_2_3 { int nb_samp_subramp_blu = 64; // Red Subramp length (directly connected to ramp_fit_alg) int nb_samp_subramp_red = 64; // Blue Subramp length int ramp_fit_alg = 0 in [0,1]; // Ramp fit algorithm [0=LstSq;1=mean value] string filter_pos = "POS A" in ["POS A","POS B"]; int nb_up_down = 1; // Number of sequences: up down up P#1 int nb_grat_steps = 1; // Number of grating steps P#2 int nb_SRC_OFF = 10; // Nb cycles grating position P#3 int chop_pos_REF1 = 664; // Chopper position 1 P#4 int nb_ramps_plateau = 2; // Nb of ramps per chopper plateau P#5 int chop_pos_CS1 = -21350; // Chopper position on CS1 P#9 int chop_pos_CS2 = 21200; // Chopper position on CS2 P#10 int grat_step_up = 0; // Grating step P#11 int grat_step_dn = 0; // Grating step P#12 int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 461000; // Starting grating position int grat_time = 15000; // Time for grating to move to start position int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 664; // Chopped default position int grat_def_time = 15000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // //int ramp_len_red = 64; // Red ramps length //int ramp_len_blu = 64; // Blue ramps length //double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) //double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) //int capa_red = 8; // Capacitor red (0=100f,4=300f,8=1pf,12=3pF) //int capa_blu = 8; // Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // // CRE SETUP --> SUPPOSED IN PACS-SPECTRO --> CRE SETUP SKIPPED // NOTE: capa_xxx is added to cre_ctrl_xx within SPEC_cre_setup // //double bias_r_red = 0.011; // in [0.0,1.0]; // BIAS_R for red spectro (0-1V) //double bias_r_blu = 0.011; // in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) //int cre_ctrl_red = 386; //int cre_ctrl_blu = 386; //SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // // SPU SETUP // ====== // Register with environment WriteOBSID($OBSID); // Start SPU int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,true); // // Position the filter wheel // ============== SPEC_fltw_move(filter_pos); // // OBCP_spec_2_3_chop // ============= // // A. Center <-> +- Small Throw // int chop_pos_REF2 = -1408; // Chopper position 2 P#6 int chop_pos_REF3 = 2724; // Chopper position 3 P#7 int nb_CS1_CS2 = 0; // Nbr cycles on CS P#8 OBCP_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,chop_pos_REF3,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); // // B. Center <-> +- Medium Throw // chop_pos_REF2 = -5552; // Chopper position 2 P#6 chop_pos_REF3 = 6769; // Chopper position 3 P#7 nb_CS1_CS2 = 0; // Nbr cycles on CS P#8 OBCP_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,chop_pos_REF3,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); // // C. Center <-> +- Large Throw // chop_pos_REF2 = -11580; // Chopper position 2 P#6 chop_pos_REF3 = 12444; // Chopper position 3 P#7 nb_CS1_CS2 = 0; // Nbr cycles on CS P#8 OBCP_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,chop_pos_REF3,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); // // D. Center <-> +- Medium Throw + visit the CSs // chop_pos_REF2 = -5552; // Chopper position 2 P#6 chop_pos_REF3 = 6769; // Chopper position 3 P#7 nb_CS1_CS2 = 10; // Nbr cycles on CS P#8 OBCP_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,chop_pos_REF1,nb_ramps_plateau,chop_pos_REF2,chop_pos_REF3,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,nb_rdouts_ramp); // // Stop SPU // ===== SPEC_spu_reset(); // // SYNC //= = = sync(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Record data in BOL-C test pattern mode // // Author : Bart Vandenbussche // CUS script : PHOT_TestPattern_obs // CVS file : // // Arguments : time_in_testmode : time to stay in test pattern mode // // Description : Switch to BOL-C HK+test pattern data mode // wait seconds // Switch to BOL-C HK + bolometer data mode // // Dependencies : // // Preconditions : PACS is switched on with configured BOLC // // Comments : // // Version : 3.0 // // History : 1.0 13-apr-2005 BV - First version // 2.0 DAC 19-oct-2005 Added SPU start and stop // 2.1 BV 11-04-2007 Changed raw channels to 0 // 3.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Phot_TestPattern { /* Needed variables to call PacsEng_Phot_TestPattern */ int time_in_testmode = 60; /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_TestPattern */ }{ // 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(Pacs_Phot_TestPattern(time_in_testmode))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_TestPattern(time_in_testmode); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsSpecCommandOBCP27.txt,v 1.6 2007/08/13 08:58:03 dcesarsk Exp $ // Purpose : Issue PACS commands at each raster position in order to // observe all the HSPOT defined spectral lines // // CUS author : DAC // Script file : PacsSpecCommand.txt // // Input arguments // Type Description // {int,int,int,int,int,int,int,int,int}[] confSPECblu BLUE SPU parameters // {int,int,int,int,int,int,int,int,int}[] confSPECred RED SPU parameters // {int,int,int,int,int,int,int,int,int,int,int, // int,int,int,int,int,int,int,int,int}[] confOBCP OBCP parameters // bool verbose Print debug information // // Return values // Type Name Description // int[][5] time_array The 5 times (TOT,SRC,REF,CAL,OVR) per spectral line // // Description : Loops over all wavelengths at current raster point. If raster // identifier "rast_pnt" is a negative number, it means that we are in the // "nodding" phase of "rast_pnt". // IMPORTANT NOTE: the duration for the first raster position // may be different than the following raster points, due to the // fact that we start at the default configuration whereas for // any subsequent raster point, we start from where we ended at // raster_point-1. // NO LONGER TRUE (see history for version 2.0) No longer a reference to leg // or raster number is needed: PACS is assumed to start the OBS phase in the // same state it would be at the end of a nod leg; namely, filter wheel at last // commanded position and grating at default position. // NOTE: starting with version 3.0, grating is left at start position used by // first line in OBCP. This minimizes grating movements within a raster // or when nodding // // Dependencies : // // Preconditions : // // Comments : // // Version : 3.0 // History : // 0.1 DAC 6-May-2005 // 1.0 19-May-2005 Use tuples as input arguments // 1.1 31-May-2005 All elements in confSPEC are int // 1.2 1-Jun-2005 Adapted for CAL during slew: moved SPEC_aot_prolog to // PacsLineSpecSlewCal // 1.3 7-Jun-2005 confOBCP is now all {int} // 1.4 14-jun-2005 No confSPEC changes allowed within OBS // 1.5 29-aug-2005 Added "verbose" input argument // 2.0 29-aug-2005 Amended logic assuming that PACS will start all cycles // always in the same state. This means that the previous // non observing phase (SlewCal or AOT_prologue) has left // PACS as it would be left after completing an OBS cycle, viz. // filter wheel at last commanded position and grating at // default position // Renamed to PacsLineSpecCommandOBCP27 since using OBCP#27 // 2.1 19-sep-2005 Renamed to PacsSpecCommandOBCP27 since sme module for // Line and Range // 2.2 23-sep-2005 Added sync() on account of SPR-1707 // 2.3 1-jun-2006 Harmonize with OBCP22: leave grating where it is instead // of moving to next line. There is no longer a FLTW movement // (no order mix; FLTW set by SPEC_aot_prologue) // 3.0 14-feb-2007 Grating starts and ends at position used for 1st line // Requires that SlewCal places grating at this position // Before leaving AOT, grating should be moved to park position // 3.1 2-may-2007 Adopt renamed PacsSpecConfSet int[][] procedure PacsSpecCommandOBCP27 { {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // OBCP parameters bool verbose = true; // Print debug information }{ // Create array of durations; one duration per line int[][] time_array = [[0,0,0,0,0]]; // Start grating position should be the 1st line to observe // later it will be commanded elsewhere int grat_def_pos = confOBCP[1]{8}; // How many lines are we supposed to observe? int nbLines = length(confOBCP) - 1; // ========================= LOOP on lines =============================== for(int loop2 = 1 .. nbLines) { // Long sequence to "unpack" contents of tuples int capa_blu = confSPECblu[loop2]{0}; int nb_rdouts_ramp_blu = confSPECblu[loop2]{1}; int nb_rdouts_subramp_blu = confSPECblu[loop2]{2}; int comp_mode_blu = confSPECblu[loop2]{3}; int glitch_det_blu = confSPECblu[loop2]{4}; int ramp_fit_alg_blu = confSPECblu[loop2]{5}; int nb_raw_blu = confSPECblu[loop2]{6}; int bias_r_blu_mV = confSPECblu[loop2]{7}; int bias_d_blu_mV = confSPECblu[loop2]{8}; int capa_red = confSPECred[loop2]{0}; int nb_rdouts_ramp_red = confSPECred[loop2]{1}; int nb_rdouts_subramp_red = confSPECred[loop2]{2}; int comp_mode_red = confSPECred[loop2]{3}; int glitch_det_red = confSPECred[loop2]{4}; int ramp_fit_alg_red = confSPECred[loop2]{5}; int nb_raw_red = confSPECred[loop2]{6}; int bias_r_red_mV = confSPECred[loop2]{7}; int bias_d_red_mV = confSPECred[loop2]{8}; int nb_up_down = confOBCP[loop2]{0}; int grat_step_up = confOBCP[loop2]{1}; int grat_step_dn = confOBCP[loop2]{2}; int nb_SRC_OFF = confOBCP[loop2]{3}; int nb_ramps_plateau = confOBCP[loop2]{4}; int nb_CS1_CS2 = confOBCP[loop2]{5}; int nb_grat_step_up = confOBCP[loop2]{6}; int nb_grat_step_dn = confOBCP[loop2]{7}; int grat_start_pos = confOBCP[loop2]{8}; // int grat_start_time = confOBCP[loop2]{ 9}; // int grat_def_pos = confOBCP[loop2]{10}; // int grat_def_time = confOBCP[loop2]{11}; int chop_pos_SRC = confOBCP[loop2]{12}; int chop_pos_REF1 = confOBCP[loop2]{13}; int chop_pos_REF2 = confOBCP[loop2]{14}; int chop_pos_CS1 = confOBCP[loop2]{15}; int chop_pos_CS2 = confOBCP[loop2]{16}; int chop_def = confOBCP[loop2]{17}; int detector = confOBCP[loop2]{18}; int filterPOS = confOBCP[loop2]{19}; // Bias voltages (needed by SPEC_aot_prologue) are commanded in // (double) volts double bias_r_blu = double(bias_r_blu_mV) / 1000.0; double bias_d_blu = double(bias_d_blu_mV) / 1000.0; double bias_r_red = double(bias_r_red_mV) / 1000.0; double bias_d_red = double(bias_d_red_mV) / 1000.0; // Is there any changes in the SPEC tuples? // 14-jun-2005 After discussion with TM, no changes allowed during AOT int cmd_SPECblu = 0; int cmd_SPECred = 0; //DAC int cmd_SPECblu = PacsSPECconfChange(confSPECblu,rast_pnt,loop2); //DAC int cmd_SPECred = PacsSPECconfChange(confSPECred,rast_pnt,loop2); if(cmd_SPECblu != 0) { PacsSpecConfSet("BLU",confSPECblu[loop2]); debug_print("Calling PacsSpecConfSet BLU"); } if(cmd_SPECred != 0) { PacsSpecConfSet("RED",confSPECred[loop2]); debug_print("Calling PacsSpecConfSet RED"); } // Call OBCP once per spectral line (local loop) // (this module is invoked once per per raster position) // Grating movement facts and strategy: // 0- OBCP starts with grating already at grat_start_pos (done by SlewCal) // 1- OBCP moves grating from grat_start_pos to grat_start_pos // 1a- above operation takes grat_start_time = 0 seconds // 2- perform all the CHOPPER, CAL, loops // 2a- above operation takes whatever time // 3- at end, OBCP moves grating to grat_start_pos for 1st line // 3a- above operation takes grat_def_time // // This is up-down scan. Hence grating ends at position grat_start_pos // If we set grat_def_pos position to grat_start_pos for the next line, // we reduce grat_start_time to 0 [sec] for all lines but the first. // At end of line "n", place grating at the position expected by line // "n+1" for all lines but last. For last observed wavelength use // grat_def_pos to ensure that next cycle will start exactly as this one, // i.e. with grating parked at grat_def_pos // Leave the grating where it is, i.e. end-of-DMC position int new_grat_def_pos = confOBCP[loop2]{8}; // The last observed line should leave the grating ready to start // all over again if(loop2 == nbLines) { new_grat_def_pos = confOBCP[1]{8}; } // Starting times, viz. grat_time. // NOTE: grat_start_pos is in OBCP tuple {8} int steps_start = grat_def_pos - grat_start_pos; int grat_start_time = SPEC_grat_time(steps_start); if(verbose) { debug_print("OBCP27:Observing line/of:" + loop2 + "/" + nbLines); debug_print("OBCP27:GratStart from/to: " + grat_def_pos + "/" + grat_start_pos + "; time: " + grat_start_time); } // Ending times, viz. grat_def_time // NOTE: DMC of OBCP27 leaves grating at start position int steps_end = grat_start_pos - new_grat_def_pos; int grat_def_time = SPEC_grat_time(steps_end); if(verbose) { debug_print("OBCP27:GratEnd from/to: " + grat_start_pos + "/" + new_grat_def_pos + "; time: " + grat_def_time); } // Call OBCP27 with derived parameters time_array[loop2 - 1] = OBCP_grat_scan_chop2(nb_up_down,nb_grat_step_up,nb_SRC_OFF,chop_pos_SRC,nb_ramps_plateau,chop_pos_REF1,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,grat_step_up,grat_step_dn,detector,grat_start_pos,grat_start_time,comp_mode_blu,comp_mode_red,new_grat_def_pos,chop_def,grat_def_time,nb_rdouts_ramp_red); // Prepare the grating to be ready for the next wavelength grat_def_pos = new_grat_def_pos; // End of nbLines loop } // time_array is indexed [wavelength][durations] if(verbose) { debug_print("CmdOBCP27 returns " + time_array); } //SPR1707 Add sync() sync(); return time_array; } // Script : PACS_Chopper_AutoOpt.cus // Missionphase : Commissioning // // Purpose : Check a series of different chopper controller settings by // chopping between +/- 12000 units (~4 deg) // // Author : Markus Nielbock/Helmut Dannerbauer // CUS author : MN/HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions: PACS switched on and Chopper switched off. // // Comments : This script is based on the commanding script // PACS_Chopper_uk_move_12000_OBS.cus // // Version : 1.0 // // History : 1.0 20-Nov-2007 (MN) Script to do simple chopper cycle // // // Initialise input parameters: // Defines control parameter range, loops run from k(p,i,c,f)min to // k(p,i,c,f)max defining the inverse of the ratio of parameter change w.r.t. // the default value. procedure PACS_Chopper_AutoOpt { int kpmin = 0 in [-3,3]; int kpmax = 0 in [-3,3]; int kimin = 0 in [-3,3]; int kimax = 0 in [-3,3]; int kcmin = 0 in [-3,3]; int kcmax = 0 in [-3,3]; int kfmin = 0 in [-3,3]; int kfmax = 0 in [-3,3]; }{ // PACS instrument code for BBID int instrument = 0x40000000; // chopper position (approx. +/- 4 deg in FPU) int chop_pos = 12000; // number of chop cycles int cycle = 10; // length of plateau time in seconds int plateau_time = 2; // Initialise variables for conversion from int to string and double string sU = "+0"; string sV = "+0"; string sW = "+0"; string sX = "+0"; double dU = 0.0; double dV = 0.0; double dW = 0.0; double dX = 0.0; int bU = 0x4000; int bV = 0x400; int bW = 0x40; int bX = 0x4; // CALU table file to be accessed string fileU = "CONFChopper_auto"; // Start diag. HK SPEC_Chopper_dhk_5hk_1khz_bb(); // Cycle through calibration table columns if(kpmax < kpmin) { kpmax = kpmin; } if(kimax < kimin) { kimax = kimin; } if(kcmax < kcmin) { kcmax = kcmin; } if(kfmax < kfmin) { kfmax = kfmin; } for(int u = kpmin .. kpmax) { for(int v = kimin .. kimax) { for(int w = kcmin .. kcmax) { for(int x = kfmin .. kfmax) { // calculate inverse -> ratio of changes if(u != 0) { dU = 1.0 / double(u); } else { dU = 0.0; } if(v != 0) { dV = 1.0 / double(v); } else { dV = 0.0; } if(w != 0) { dW = 1.0 / double(w); } else { dW = 0.0; } if(x != 0) { dX = 1.0 / double(x); } else { dX = 0.0; } if(abs(dU + dV + dW + dX) < 0.01) { // convert int to string variables // and determine BBID for column recovery // BBID is a 32 bit word with: // 2 bits: Instrument (PACS = 01) // 14 bits: block number (not used here) // 16 bits: a counter, used here as follows: // 4 bits for every PID parameter (P, I, C, F) // of this: 2 bits for the sign (01 = +, 10 = -) // 2 bits for the number (01, 10, 11 = 1, 2, 3) if(u >= 0) { sU = "+" + u; bU = 16384 + 4096 * u; } else { sU = "" + u; bU = 32768 - 4096 * u; } if(v >= 0) { sV = "+" + v; bV = 1024 + 256 * v; } else { sV = "" + v; bV = 2048 - 256 * v; } if(w >= 0) { sW = "+" + w; bW = 64 + 16 * w; } else { sW = "" + w; bW = 128 - 16 * w; } if(x >= 0) { sX = "+" + x; bX = 4 + x; } else { sX = "" + x; bX = 8 - x; } // construct column identifier string calUcol = "P" + sU + "I" + sV + "C" + sW + "F" + sX; debug_print("CALU column is " + calUcol); int bbid = instrument + bU + bV + bW + bX; WriteBBID(bbid); // Upload Chopper Controller Parameter CONF_chopper(fileU,calUcol); delay(2); // Switch on and enable chopper controller PACS_Chopper_SWON_SWOF_only("ON"); delay(2); EnDis_chopper("ON"); delay(5); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // chop cycle int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // Disable and switch off chopper controller EnDis_chopper("OFF"); delay(2); PACS_Chopper_SWON_SWOF_only("OFF"); delay(5); } } } } } // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); sync(); } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OnBoardControlProcedure to perform // chopped SPEC with dithering (OBCP #9) // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : OBCP_spec_2_3_chop_dither.txt // // Arguments needed to call OBCP // Type Name DefCal Description // int nb_up_down 1 Number of sequences: up down up ... // int nb_grat_steps 10 Number of grating steps // int nb_SRC_OFF 1 Nb cycles on/off source/grating position // int chop_pos_REF1 1000 Chopper position REF1 // int nb_ramps_plateau 11 Number of ramps per chopper plateau // int chop_pos_REF2 -2000 Chopper position REF2 // int chop_pos_REF3 3000 Chopper position REF3 // int nb_CS1_CS2 1 Nbr cycles on cal src per grating position // int chop_pos_CS1 -25000 Chopper position on CS1 // int chop_pos_CS2 25000 Chopper position on CS2 // int grat_step_up 50 Grating step // int grat_step_dn -50 Grating step // int detector 1 Synchronize on this detector 1:Blue 2:Red // int grat_pos Starting grating position // int grat_time Time for grating to move to start position // int comp_mode_blu "Blue" compression // int comp_mode_red "Red" compression // int grat_def 50000 Grating default position // int chop_def 0 Chopper default position // int grat_def_time Gratting time to move to grat_def position // int nb_rdouts_ramp Number of readouts per ramp // // Description : This script mimics the OBCP_GRATING_LINE_SCAN_CHOPPED // pseudo script, section 3.9.1 in PACS-ME-LI-005 // This CUS version computes the duree of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : Calls "two_three_position_chopped_spectroscopy" DEC // MEC sequence 4.2.1, DMC_spec_2_3_chop.txt // Comments : // // Version : 0.1 17-Aug-2004 Creation by DAC // History : 0.2 16-Sep-2004 OBCP and corresponding DMC files renamed // Block renamed as well // 0.3 18-Oct-2004 Normalized variable names // 0.4 22-Oct-2004 Added "communication jitter" after // test on PACS QM // 0.5 12-Nov-2004 Added time_array elements; return duree // times in [sec] // 1.0 24-Mar-2005 HF modified debug_print statement // 1.1 11-Apr-2005 DAC Corrected returned time array // 1.2 22-apr-2005 DAC Changed default values to match TM's // 1.3 25-apr-2005 DAC Added grat_step_dn // 1.4 26-apr-2005 DAC Corrected name OBCP: GRAT_LINE_DITHER // int[] block OBCP_spec_2_3_chop_dither PACS 9 { int nb_up_down = 1; // Number of sequences: up down up ... int nb_grat_steps = 16; // Number of grating steps int nb_SRC_OFF = 2; // Nb cycles on/off source/grating position int chop_pos_REF1 = 1000; // Chopper position 1 int nb_ramps_plateau = 3; // Number of ramps per chopper plateau int chop_pos_REF2 = -3000; // Chopper position 2 int chop_pos_REF3 = 5000; // Chopper position 3 int nb_CS1_CS2 = 1; // Nbr cycles on cal src per grating position int chop_pos_CS1 = -25000; // Chopper position on CS1 int chop_pos_CS2 = 25000; // Chopper position on CS2 int grat_step_up = 133; // Grating step int grat_step_dn = -133; // Grating step int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 461000; // Starting grating position int grat_time = 40000; // Time for grating to move to start position int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int max_dither = 100; // Maximum dither int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Register with environment WriteBBID($BBID); // Variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // duree of this OBCP (computed and returned in [msec]) int duree_msec = 0; // OBCP pseudo code // OBCP_GRAT_LINE_SCAN_CHOPPPED_DITH(seq, seq_time, P#1,&,P#12, // detector, grat_pos, grat_time, // comp_mode_blu, comp_mode_red, // grat_def, chop_def, grat_def_time) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_MAX_DITHER(max_dith) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // (all parameters filled by DPU based on seq parameter) // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, comp_mode_blu, comp_mode_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_time) duree_msec = duree_msec + t_cmd + grat_time; duree_OVR = duree_OVR + t_cmd + grat_time; // DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the execution time int[] duree1 = DMC_spec_2_3_chop_dither(nb_up_down,nb_grat_steps,nb_SRC_OFF,nb_ramps_plateau,nb_CS1_CS2); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // WAIT (seq_time) duree_msec = duree_msec + t_cmd; duree_msec = duree_msec + seq_time; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_def_time) duree_msec = duree_msec + t_cmd + grat_def_time; duree_OVR = duree_OVR + t_cmd + grat_def_time; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Now trigger execution of OBCP // This OBCP is number, requires 22 parameters and calls DEC/MEC #8 string obcp_ID = "GRAT_LINE_DITHER"; int obcp_par_nb = 23; int seq_DMC = 9; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_SRC_OFF},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,chop_pos_REF3},{10,nb_CS1_CS2},{11,chop_pos_CS1},{12,chop_pos_CS2},{13,grat_step_up},{14,grat_step_dn},{15,detector},{16,grat_pos},{17,grat_time},{18,comp_mode_blu},{19,comp_mode_red},{20,grat_def},{21,chop_def},{22,grat_def_time},{23,max_dither}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } debug_print("OBCP_spec_2_3_chop_dither [sec]: " + time_array); delay(time_array[0]); // Return the array of times return time_array; } // Missionphase : FMIST // // Purpose : Move Grat Rel // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_Move_Rel { }{ // NEW TARGET POSITION int gratstep = 1000; int delayTime = 2; // Move Pacs_DMC_MOVE_GRAT_REL_RAW(gratstep); delay(delayTime); } // File : PACS_Spec_Flash_Setup.cus // Missionphase : PACS FM ILT tests // // Purpose : Sets Flasher currents (blue & red) // // Author : P. Royer // // Arguments : blue & red Flasher currents // // Description : Sets Flasher currents (blue & red) // : // Comments : // // // Version : 1.1 // History : 1.0 / 07-Jun-2006 initial version by PR // 1.1 / 12-Oct-2006 TM: change command to set the flasher current // (and not the heater current) // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Sets Flasher currents (blue & red) // @comment - // block PACS_Spec_Flash_Setup PACS 166 { int blue_flash_current = 0; int red_flash_current = 0; }{ // Register start of BB WriteBBID($BBID); // // SETUP FLASHERS // Pacs_DMC_SET_B_SPEC_FLASH_C_RAW(blue_flash_current); delay(1); Pacs_DMC_SET_R_SPEC_FLASH_C_RAW(red_flash_current); delay(1); // // End of procedure //------------------ // Mark End of Block WriteEndBB(); } // Missionphase : FM ILT // // Purpose : SFT in Open Loop Mode (warm conditions) // // Author : Markus Nielbock // CUS author : MN // // Description : SFT warm for FM1 chopper in open-loop mode. All 3 coils are // operative. The chopper is commanded between -20 mA and +20mA // in steps of 4 mA. // The first part consists of chopper deflections equivalent to // commanded chopper coil currents between 0 and +/-20 mA, // alternating between positive and negative values. Absolute // position commanding is used. // The second part consists of a ramp of chopper deflections // between -20 and +20 mA, commanded in relative steps of 4 mA. // Finally, the chopper returns to its zero position. // // Dependencies : // // Preconditions : PACS switched-on in spectroscopy mode, chopper is switched // off and disabled, diagnostic HK not running // // Comments : Adapted from PACS_Chopper_SFT_Cold_OpenLoop_OBS.cus // // Version : 1.0 // // History : 1.0 12-03-07 creation by MN // : 2.0 13-02-08 Made into a proc to be called by // "obs" PacsEng_Chpper_SFT_Warm_OpenLoop // Removed declaration of myOBSID procedure PACS_Chopper_SFT_Warm_OpenLoop { }{ // Start diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("ON"); delay(5); // Set default spectroscopy timing parameters SPEC_Chopper_SynchBlue(); // Set Chopper Controller Parameters: CONFChopper -> SFTwarm CONF_chopper("CONFChopper","SFTwarm"); delay(2); // Switch on chopper PACS_Chopper_SWON_SWOF_only("ON"); delay(10); // Set open-loop mode and enable chopper PACS_SPEC_Chopper_SetOpenLoop_BB("ON"); delay(1); EnDis_chopper("ON"); delay(10); // Translate mA into ROU // The conversion factor is in fact 130, but we use 133 in order to be able // to compare the measurement with previous ones, where the same value was // assumed. double chop_max_ma = 20.0; // chopper maximal deflection in mA double chop_step_ma = 4.0; // chopper movement step size in mA int chop_damptime = 15; // chopper timescale in seconds allowing for // initial oscillation damping in open-loop mode double chop_max_rou = chop_max_ma * 32767.0 / 133.0; double chop_step_rou = chop_step_ma * 32767.0 / 133.0; int ichop_max_rou = iround(chop_max_rou); int ichop_step_rou = iround(chop_step_rou); // Create table of chopper positions for absolute movement // Starting position (integer) int ichop_pos = 0; // Array of chopper positions sequence 1 int[] chop_steps = []; // Running variable int i = 0; chop_steps[i] = ichop_pos; i = i + 1; ichop_pos = ichop_pos + ichop_step_rou; while(ichop_pos <= ichop_max_rou) { chop_steps[i] = ichop_pos; i = i + 1; chop_steps[i] = -ichop_pos; i = i + 1; ichop_pos = ichop_pos + ichop_step_rou; } int len = length(chop_steps); //Length of array // First sequence: alternating chopper movement for(int s1 = 0 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(chop_steps[s1]); delay(chop_damptime); } // End of first sequence // Move chopper to zero position PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(0); delay(chop_damptime); // Second sequence: alternating chopper movement, repeated once -> k loop PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(-5 * ichop_step_rou); delay(chop_damptime); for(int s2 = 1 .. 10) { PACS_SPEC_Chopper_OpenLoop_MoveRel_BB(ichop_step_rou); delay(chop_damptime); } // End of second sequence // Move chopper to zero position PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(0); delay(chop_damptime); // Disable chopper and switch off open-loop mode EnDis_chopper("OFF"); PACS_SPEC_Chopper_SetOpenLoop_BB("OFF"); delay(10); // Switch off chopper PACS_Chopper_SWON_SWOF_only("OFF"); delay(5); // Set Chopper Controller Parameters: CONFChopper -> SFTwarm CONF_chopper("CONFChopper","SFTwarm"); delay(2); // Stop diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("OFF"); } // Mission phase : ILT at Garching // // Purpose : // Reduced NEP measurements for the new sequencer test // // Author : Koryo Okumura // // CUS script : procedure PHOT_redArray_alternatePolarisation_DDCS_IST // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // int lowFreq_noise_time = 1800; // long noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // // Description : // + First, all 24 biases are set group by group // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set PACS chopper on CS1 to measure the noise // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_newSeq_IST(0) // // Version : Thu Oct 04 20:26:01 CEST 2007 // procedure PHOT_redArray_alternatePolarisation_DDCS_IST { int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds int lowFreq_noise_time = 1800; // long noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values }{ int operand = 0; int posCS1 = -21500; int posCS2 = 21500; //********************************* // Apply the new sequencer setting //********************************* // PACS_Phot_Sequencer_SetupNew(); // //******************************* // Select Filter A (110 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //************************** // Sequence mode : Sb_Sref //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sb_Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb_Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper at the central position //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(0); // //********************************************************************** // Response Measurement // Expected fluxes : 1.7 and 2.0pW on the blue // and 5.3 and 6.2pW on the red //********************************************************************** // TMMarker600(); //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); // // //************************************************************************ // Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //***************************** // Set the PACS chopper on CS1 //***************************** // Pacs_DMC_MOVE_CHOP_ABS(posCS1); // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); // // //************************************************************************ // Longer Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for lowFreq_noise_time seconds TMMarker603(); delay(lowFreq_noise_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for lowFreq_noise_time seconds TMMarker603(); delay(lowFreq_noise_time); TMMarker600(); // //********************************* // Apply the old sequencer setting //********************************* // PACS_Phot_Sequencer_Setup(); // } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the phot filter wheel for Redundant Warm // // Author : PR // // Arguments : // // Description : // // Comments : // // Version : 0.1 // History : 0.1 04-Jul-2007 Initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // obs PacsEng_CONF_phot_fltw_R_Warm { /* No variables to call PacsEng_CONF_phot_fltw_R_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_phot_fltw_R_Warm */ }{ // 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_R_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_phot_fltw_R_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_CS_SFT_Cold.cus // Missionphase : PACS EQM Test // // Purpose : VERIFY FUNCTION of INTERNAL CALIBRATION SOURCES // // Author : H. Dannerbauer // R. Vavrek // H. Feuchtgruber // CUSification : DAC // // Arguments : BB1 & BB2 temperature [muOhms & Volts] // // // Called : WaitForGo // waittime // tcsend // // Dependences : tm_switchon // tm_spec_det_setup // tm_spec_spu_setup // tm_spec_mec_setup // // // Description : This script assumes an already set-up PACS instrument. // This test is based on functional test 0.7.11 and PTD 0.7.12. // // Comments : None of the detector systems are involved in the BB's // functional check. Nevertheless, in order to generate HK data, // the DPU-SET-HK-LIST command is set and parametrised for // spectroscopy and spectrometer setup needed inorder to // synchronize diagnostic HK on readouts. // Commanding unit conversions: 1 setpoint unit = 100 micro // Ohms, max temperature ~ 100 K, max setpoint = 32767 // In case if temperature set directly: -32767 = -10 Volts, // +32767 = +10 Volts. // // Version : 1.0 // History : This script is based on the commanding during // the CQM ILT Test. 15-11-2004. procedure PACS_CS_SFT_Cold { }{ // Diagnostic HK period (in milliseconds) int diag_hk_period = 300; // PC160420 "DMC_WRT_DIAG_HK_LIST" WRITE THE LIST OF DIAGNOSTIC HK INTO DMC MEMORY // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // Chopper specific measures are: // 214 DMC_CS2_CTRL_STA - CS2 controller status // 445 DMC_CS1_RES_VALUE - CS1 current resistor value // 446 DMC_CS1_OUTPUT - CS1 controller output voltage // 447 DMC_CS2_RES_VALUE - CS2 current resistor value // 448 DMC_CS1_OUTPUT - CS2 controller output voltage // 459 DMC_CS1_TARGET - CS1 target resistor value // 460 DMC_CS2_TARGET - CS2 target resistor value // 526 DMC_CS1_VOLT_SG - CS1 small gain sensor voltage // 527 DMC_CS1_VOLT_BG - CS1 big gain sensor voltage // 528 DMC_CS1_CUR_SG - CS1 small gain sensor current // 529 DMC_CS1_CUR_BG - CS1 big gain sensor current // 542 DMC_CS2_VOLT_SG - CS2 small gain sensor voltage // 543 DMC_CS2_VOLT_BG - CS2 big gain sensor voltage // 544 DMC_CS2_CUR_SG - CS2 small gain sensor current // 545 DMC_CS2_CUR_BG - CS2 big gain sensor current int nb_words = 16; {int}[] list_tuple = [{214},{445},{446},{447},{448},{459},{460},{526},{527},{528},{529},{542},{543},{544},{545},{0xffff}]; int[] list_int = [214,445,446,447,448,459,460,526,527,528,529,542,543,544,545,0xffff]; int chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_DIAG_HK_LIST(nb_words,list_tuple,chksum); delay(1); // // PC161420 "DMC_WRT_DIAG_HK_CONF_TAB" WRITE THE CUSTOM HK CONFIGURATION TABLE // PP065420 "DMC_DATA_LENGTH", GroupSize: 1 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // PC146420 "DMC_START_DIAG_HK" START THE ACQUISITION OF THE DIAGNOSTIC HK // PP076420 "DIAG_HK_PERIOD" Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // // Write calibration source controller parameters // // DMC_WRT_CS1_CONF_PAR list_tuple = [{1000000},{5000},{3277},{1857},{327},{0x7fff},{0}]; list_int = [1000000,5000,3277,1857,327,0x7fff,0]; chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_CS1_CONF_PAR(list_tuple,chksum); delay(1); // DMC_WRT_CS2_CONF_PAR //set params [list {PP067420 1000000} {PP067420 5000} {PP067420 3277} \ // {PP067420 1857} {PP067420 327} \ // [list PP067420 [expr 0x7FFF]] {PP067420 0}] list_tuple = [{1000000},{5000},{3277},{1857},{327},{0x7fff},{0}]; list_int = [1000000,5000,3277,1857,327,0x7fff,0]; chksum = checksum("int",list_int); // Send the TC Pacs_DMC_WRT_CS2_CONF_PAR(list_tuple,chksum); delay(1); // // Calibration source controller parameters are set // // Heat-up the CS sources up to 800000 (70.5K;CS1) // and 920000 (76.0K;CS2) --- big step // Switchon, enable and set CS1 to 800000 (~70.5K) // PC138420 "DMC_SWON_BB_1_CONT" SWITCH ON BLACK BODY 1 CONTROLLER Pacs_DMC_SWON_BB_1_CONT(); delay(1); // PC206420 "DMC_ENABLE_BB_1_CONT" ENABLE BB1 CONTROLLER Pacs_DMC_ENABLE_BB_1_CONT(); // PC140420 "DMC_SET_TEMP_BB_1" SET THE TEMPERATURE OF THE BLACK BODY 1 // PP094420 "DMC_BB_TEMP" double temp = 80.0; Pacs_DMC_SET_TEMP_BB_1(temp); delay(1); // Switchon, enable and set CS2 to 920000 (~76.0K) // PC142420 "DMC_SWON_BB_2_CONT" SWITCH ON BLACK BODY 2 CONTROLLER Pacs_DMC_SWON_BB_2_CONT(); delay(1); // PC208420 "DMC_ENABLE_BB_2_CONT" ENABLE BB2 CONTROLLER Pacs_DMC_ENABLE_BB_2_CONT(); delay(1); // PC144420 "DMC_SET_TEMP_BB_2" SET THE TEMPERATURE OF THE BLACK BODY 2 // PP094420 "DMC_BB_TEMP" temp = 92.0; Pacs_DMC_SET_TEMP_BB_2(temp); // wait a while to allow for HK checking and sufficient diag data collection delay(600); // PC147420 "DMC_STOP_DIAG_HK" STOP THE ACQUISITION OF THE DIAGNOSTIC HK Pacs_DMC_STOP_DIAG_HK(); delay(1); // End of Procedure } // CVS comments : $Id: PacsPhotCommandOBCP7.txt,v 1.5 2007/05/02 08:51:17 dcesarsk Exp $ // Purpose : Execute OBCP#7 with the provided parameters // // CUS author : DAC // Script file : PacsPhotCommandOBCP7.txt // // Input arguments // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int,int} gratWidth,nbStep,gratStep} // // Return values // Type Name Default Description // // Description : Calls OBCP#7 (OBCP_phot_staring) with given // parameters // Dependencies : OBCP_phot_staring // DMC_phot_staring // // Preconditions : // // Comments : Filter must be positioned before calling this procedure // since there is no FLTW move here!! // // History : // 0.1 DAC 7-Dec-2005, based on PacsPhotCommandOBCP4 // 0.2 DAC 29-mar-2007 Removed nb_rdouts in call to OBCP; use OBCP in ilt int[] procedure PacsPhotCommandOBCP7 { {int,int,int,int,int,int,int,int,int} confPHOTblu = {0,0,0,0,0,0,0,0,0}; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int} confPHOTred = {0,0,0,0,0,0,0,0,0}; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // OBCP parameters bool verbose = false; // Print debug information }{ // Create array of durations int[] time_array = [0,0,0,0,0]; if(verbose) { debug_print("+++ Starting PhotCommandOBCP7"); debug_print("OBCP: " + confOBCP); } // Long sequence to "unpack" contents of tuples int gain = confPHOTblu{0}; // int nb_rdouts_ramp_blu = confPHOTblu{1}; // int nb_rdouts_subramp_blu = confPHOTblu{2}; int comp_mode_blu = confPHOTblu{3}; int glitch_det_blu = confPHOTblu{4}; // int ramp_fit_alg_blu = confPHOTblu{5}; int nb_raw_blu = confPHOTblu{6}; // int bias_r_blu_mV = confPHOTblu{7}; // int bias_d_blu_mV = confPHOTblu{8}; gain = confPHOTred{0}; // int nb_rdouts_ramp_red = confPHOTred{1}; // int nb_rdouts_subramp_red = confPHOTred{2}; int comp_mode_red = confPHOTred{3}; int glitch_det_red = confPHOTred{4}; // int ramp_fit_alg_red = confPHOTred{5}; int nb_raw_red = confPHOTred{6}; // int bias_r_red_mV = confPHOTred{7}; // int bias_d_red_mV = confPHOTred{8}; // int nb_cycles_obs_cal = confOBCP{0}; // int grat_step_up = confOBCP{1}; // int grat_step_dn = confOBCP{2}; // Following represent number of DMC internal loops, each loop accumulates // nb_rdouts_plateau BOLO readouts (not yet implemented!) int nb_SRC = confOBCP{3}; int nb_rdouts_plateau = confOBCP{4}; // int nb_CS1_CS2 = confOBCP{5}; // int nb_grat_step_up = confOBCP{6}; // int nb_grat_step_dn = confOBCP{7}; // int grat_start_pos = confOBCP{8}; // int grat_start_time= confOBCP{ 9}; // int grat_def_pos = confOBCP{10}; // int grat_def_time = confOBCP{11}; // int chop_pos_SRC = confOBCP{12}; // int chop_pos_REF1 = confOBCP{13}; // int chop_pos_REF2 = confOBCP{14}; // int chop_pos_CS1 = confOBCP{15}; // int chop_pos_CS2 = confOBCP{16}; // int chop_def = confOBCP{17}; // int detector = confOBCP{18}; int filterPOS = confOBCP{19}; // Call OBCP for the current S/C position time_array = OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red); if(verbose) { debug_print("CmdOBCP7 returns " + time_array); } // Add sync() sync(); return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Preconditions : see associated procedure // // Comments : // // History : 1.0 07-Jun-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Flash_SWON { /* No variables to call PacsEng_Spec_Flash_SWON */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Flash_SWON */ }{ // 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(PACS_Spec_Flash_SWON())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Flash_SWON(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsPhotCommandOBCP3.txt,v 1.6 2007/08/10 10:25:10 dcesarsk Exp $ // Purpose : Execute OBCP#3 with the provided parameters // // CUS author : DAC // // Input arguments // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int,int} gratWidth,nbStep,gratStep} // // Return values // Type Name Default Description // // Description : Calls OBCP#3 (OBCP_fixed_fixed_photo) with given // parameters. // OBCP3 (aka fixed_fixed) performs symmetrical choping of // amplitude around // 3 positions (called P2, P7, and P8 in the documentation). // Here, P7 and P8 are computed as // P7 = P2 + max_dither/2 // P8 = P2 - max_dither/2 // max_dither is stored in a CAL-U file read by // PacsPhotEstimatorOBCPn // // Dependencies : OBCP_fixed_fixed_phot // DMC_fixed_fixed_phot // // Preconditions : // // Comments : // // History : // 0.1 DAC 10-aug-2006. Created from PacsPhotCommandOBCP5 // 0.2 DAC 31-aug-2006 Return actual duration (includes TC) // 0.3 DAC 1-sep-2006 WARNING: the chopper movements must be given as // relative, i.e. a displacement // 0.4 DAC 12-jan-2007 Use max_dither and max_dither/2 // 0.5 DAC 19-jan-2007 Use symmetrical dithering: + - max_dither/2 // int[] procedure PacsPhotCommandOBCP3 { {int,int,int,int,int,int,int,int,int} confPHOTblu = {0,0,0,0,0,0,0,0,0}; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int} confPHOTred = {0,0,0,0,0,0,0,0,0}; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // OBCP parameters bool verbose = true; // Print debug information }{ // Register starting time int start_time = time(); // Create array of durations int[] time_array = [0,0,0,0,0]; if(verbose) { debug_print("+++ Starting PhotCommandOBCP3"); debug_print("OBCP3: " + confOBCP); } // Long sequence to "unpack" contents of tuples // (indices are not sequential since confXXXX tuples are inherited from // SPECTRO) int gain = confPHOTblu{0}; int comp_mode_blu = confPHOTblu{3}; int glitch_det_blu = confPHOTblu{4}; int nb_raw_blu = confPHOTblu{6}; gain = confPHOTred{0}; int comp_mode_red = confPHOTred{3}; int glitch_det_red = confPHOTred{4}; int nb_raw_red = confPHOTred{6}; int nb_main_loops = confOBCP{0}; int max_dither = confOBCP{1}; int nb_chop_cycle = confOBCP{2}; int nb_SRC_REF = confOBCP{3}; int nb_rdouts_plateau = confOBCP{4}; int nb_CS1_CS2 = confOBCP{5}; int chop_pos_SRC = confOBCP{12}; int chop_pos_REF1 = confOBCP{13}; int chop_pos_REF2 = confOBCP{14}; int chop_pos_CS1 = confOBCP{15}; int chop_pos_CS2 = confOBCP{16}; int chop_def = confOBCP{17}; int detector = confOBCP{18}; int filterPOS = confOBCP{19}; // Call OBCP for the current S/C position // Chop between SRC and REF1 // Relative displacement int chop_REL = chop_pos_REF1 - chop_pos_SRC; if(verbose) { debug_print("OBCP3 P#2/P#5: " + chop_pos_SRC + "/" + chop_REL); } time_array = OBCP_fixed_fixed_photo(nb_main_loops,chop_pos_SRC,nb_rdouts_plateau,nb_chop_cycle,chop_REL,-chop_REL,chop_pos_SRC + max_dither / 2,chop_pos_SRC - max_dither / 2,comp_mode_blu,comp_mode_red); // Add sync() sync(); // Return elapsed time time_array[0] = time() - start_time; if(verbose) { debug_print("CmdOBCP3 returns " + time_array); } return time_array; } // CVS comments : $Id: PacsPhotCommandOBCP4.txt,v 1.3 2007/04/25 15:14:04 dcesarsk Exp $ // Purpose : Execute OBCP#4 with the provided parameters // // CUS author : DAC // Script file : PacsPhotCommandOBCP4.txt // // Input arguments // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int,int} gratWidth,nbStep,gratStep} // // Return values // Type Name Default Description // // Description : Calls OBCP#4 (OBCP_chopped_photometry) with given // parameters // Dependencies : OBCP_chopped_photometry // DMC_phot_2_3_chop // // Preconditions : // // Comments : Filter must be positioned before calling this procedure // since there is no FLTW move here!! This insures that (eventual) nods have // same duration. PacsPhotSlewCal moves filter to needed position and leaves // it there. // // History : // 0.1 DAC 24-nov-2005 // 0.2 DAC 31-aug-2006 - Return elapsed time // - Editorial cleanup (remove SPECTRO from confXXX) // int[] procedure PacsPhotCommandOBCP4 { {int,int,int,int,int,int,int,int,int} confPHOTblu = {0,0,0,0,0,0,0,0,0}; // BLUE SPU parameters {int,int,int,int,int,int,int,int,int} confPHOTred = {0,0,0,0,0,0,0,0,0}; // RED SPU parameters {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // OBCP parameters bool verbose = true; // Print debug information }{ // Register start time int start_time = time(); // Create array of durations int[] time_array = [0,0,0,0,0]; if(verbose) { debug_print("+++ Starting PhotCommandOBCP4"); debug_print("OBCP: " + confOBCP); } // Long sequence to "unpack" contents of tuples // (indices are not sequential since confXXX are inherited from SPECTRO) int gain = confPHOTblu{0}; int comp_mode_blu = confPHOTblu{3}; int glitch_det_blu = confPHOTblu{4}; int nb_raw_blu = confPHOTblu{6}; gain = confPHOTred{0}; int comp_mode_red = confPHOTred{3}; int glitch_det_red = confPHOTred{4}; int nb_raw_red = confPHOTred{6}; int nb_cycles_obs_cal = confOBCP{0}; int nb_SRC_REF = confOBCP{3}; int nb_rdouts_plateau = confOBCP{4}; int nb_CS1_CS2 = confOBCP{5}; int chop_pos_SRC = confOBCP{12}; int chop_pos_REF1 = confOBCP{13}; int chop_pos_REF2 = confOBCP{14}; int chop_pos_CS1 = confOBCP{15}; int chop_pos_CS2 = confOBCP{16}; int chop_def = confOBCP{17}; int detector = confOBCP{18}; int filterPOS = confOBCP{19}; // Call OBCP for the current S/C position // Chop SRC-REF1-SRC-REF2 time_array = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); // Add sync() sync(); // Return elapsed time time_array[0] = time() - start_time; if(verbose) { debug_print("CmdOBCP4 returns " + time_array); } return time_array; } // File : PACS_Spec_Dark_CS_SimultaneousWarmUp // Missionphase : PACS FM IST SOVT2 // // Purpose : Dark Current Measurement / Assessment of straylight, PACS Spectro. // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : // // Description : Visit grating positions of Low RSRF for the dark // Estimate Straylight contribution from visiting High RSRF positions & placing the FW outside of any regular filter position. // Do it for both filters // Specific to the SOVT2 version of this test: // Warm up the CSs (both simultaneously) and chop between them every 3 minutes // There should be transients > 3 minutes at the beginning (low flux), but this should at least give an idea, and several samples over the warm up time // // Dependencies : // // Comments : !!! It is supposed that PacsEng_Spec_setup has been run before this script, with current to both CSs == 0. !!! // // Version : 1.0 // History : 1.0 / 22-Oct-2008 // procedure PACS_Spec_Dark_CS_SimultaneousWarmUp { int obs_time = 540; // observing time in seconds per CS/FW/Grat setting int chop_time = 180; // duration of chopper plateau during rise of CS temp (0 = no chopping) }{ // // Declare the set of variables specific to this test // =========================== // string[] chopPos = ["pos_CS1","pos_CS2"]; int choppos = 0; // // Define the combinations of Grating & FW positions to be tested on each CS string[] filterPos = ["POS B","POS B","POS A","POS A"]; int[] gratingPos = [50000,740000,675000,800000]; int n_settings = length(gratingPos); if(length(filterPos) != n_settings) { debug_print("Inconsistent number of grating and filter wheel positions specified"); } // // Declare the CS Temps (48, 58 Ohms, copied from the SPEC_setup block (in // ============= double temp_CS1 = 48.0; // Temperature 55K for the PACS calibration source 1 double temp_CS2 = 58.0; // Temperature 60K for the PACS calibration source 2 // // Declare the set of CRE variables // =================== double bias_d_blue = 0.17; double bias_d_red = 0.07; double bias_res_blue = 0.01; double bias_res_red = 0.01; int ramp_blue = 64; int ramp_red = 64; int capacity_blue = 0; int capacity_red = 0; // // Declare the set of SPU variables // =================== // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 16; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Ramp fit algorithm [0=LstSq;1=mean value] int ramp_fit_alg = 1; // Start SPU or not [true,false] bool startSPU = true; // // SETUP CRE & SPU // ========== // Setup CREs SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // PART 1 : CS OFF, VISIT LOW & HIGH RSRF POSITIONS IN BOTH FILTERS // for(int cs = 0 .. length(chopPos) - 1) { // // Position the chopper // ============ choppos = ilookup("CHOPPERCSparams","SPEC",chopPos[cs]); PACS_Chop_Move_Abs(choppos); // for(int n = 0 .. n_settings - 1) { debug_print("choppos " + choppos + " n " + n + " filterPos[n] " + filterPos[n] + " gratingPos[n] " + gratingPos[n]); // // ==FW POS == SPEC_fltw_move(filterPos[n]); // // ==GRAT POS == Pacs_DMC_MOVE_GRAT_ABS(gratingPos[n]); // // == OBS TIME == delay(obs_time); // // == FW --> 90 DEGREES == SPEC_fltw_move_90degrees(); // // == OBS TIME == delay(obs_time); // } } // // PART 2 : RISING CS TEMPs, CHOP SLOWLY BETWEEN BOTH CS // // ==GRAT POS == Pacs_DMC_MOVE_GRAT_ABS(50000); // // ==FW POS == SPEC_fltw_move("POS B"); // debug_print("Grating reset to 50000, FW set to POS B, CS switched on and warmed up"); // // PACS CALIBRATION SOURCES CONF_cs("Both"); CS_on_off("CS1","ON"); CS_temp("CS1",temp_CS1); CS_on_off("CS2","ON"); CS_temp("CS2",temp_CS2); // delay(chop_time); if(chop_time > 0) { // int nchop = iround(2200.0 / double(chop_time)); debug_print("Chopping every " + chop_time + " seconds"); debug_print("nchop x chop_time = " + nchop + " x " + chop_time + " = " + nchop * chop_time); // if(nchop >= 2) { // for(int i = 0 .. nchop - 2) { choppos = ilookup("CHOPPERCSparams","SPEC",chopPos[i % 2]); PACS_Chop_Move_Abs(choppos); debug_print("choppos " + choppos); delay(chop_time); } } } else { choppos = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); PACS_Chop_Move_Abs(choppos); debug_print("No chopping: chopper position " + choppos); delay(2100); } // // FINALISATION // // Return Chopper & grating to default // =================================== Pacs_DMC_MOVE_GRAT_ABS(500000); delay(1); PACS_Chop_Move_Abs(0); delay(10); // // SYNC //= = = sync(); // // End of Script } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Preconditions : see associated procedure // // Comments : // // History : 1.0 07-Jun-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Flash_SWOF { /* No variables to call PacsEng_Spec_Flash_SWOF */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Flash_SWOF */ }{ // 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(PACS_Spec_Flash_SWOF())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Flash_SWOF(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filename : Pacs_Spec_spu_data_rate // // Purpose : SPU data rate check (spectroscopy) // // Author : Roland Vavrek // CUS script : RV // CVS file : // // Arguments : No interactive parameters // // // // Description : Four junks of test blocks are executed, each contains 2x120 sec measurement, // the first is configured with sub-slope fitting the second uses sub-means for 2 // chopper positions // // // Dependencies : - SPEC_heater // - Chop_mov_abs // - SPEC_Gra_move_abs_raw // - SPEC_SPU_reset // - SPEC_CRE_setup // - SPEC_SPU_setup // // // Preconditions : - PACS is switched on // - Setup spectroscopy (e.g. SPEC_orbit_prologue_eqm_imt block has been executed) // - Mechanics and CS controllers are SWON and ENABLED (e.g. SetupSpectroscopyEQMIMT) // - CS2 temperature is raising but not yet stabilized // // Comments : Blue heater2 is switched on // // Version : 2.1 // // History : 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 1.5 09-Apr-2007 RV: Reduced duration (60 sec delay, only 1 loop on chop zero pos), capa_blu = 0, bias_d_blu = 0.198 // 2.1 07-Apr-2008 Changed bias values to in-flight default, heater to 0.78mA // 1.4 05-Apr-2007 RV: Extended for 2 chopper positions (CS2 and chopper zero) and FM/ILT constants applied // 1.3 10-Apr-2006 HF: adapted to one blue heater only // 1.2 27-Apr-2005 Creation by RV, Nominal SPU setup, SPU reset at the end // 1.1 22-Apr-2005 Creation by RV, 4 junks organized in a loop // 1.0 17-Apr-2005 Creation by RV // // // procedure Pacs_Spec_spu_data_rate { }{ // // 1 Nominal detector parameters // // Red CRE register (capa_red=0) int cre_ctrl_red = 386; // Blue CRE register (capa_blu=0) int cre_ctrl_blu = 386; // Red ramp length int ramp_len_red = 64; // Blue ramp length int ramp_len_blu = 64; // BIAS_R for red spectro (0-1V) double bias_r_red = 0.01; // BIAS_R for blue spectro (0-1V) double bias_r_blu = 0.01; // BIAS_D for red spectro (0-1V) double bias_d_red = 0.03; // BIAS_D for blue spectro (0-1V) double bias_d_blu = 0.08; // Capacitor red (0=100fF,4=300fF,8=1pf,12=3pF) int capa_red = 12; // Capacitor blue (0=100fF,4=300fF,8=1pf,12=3pF) int capa_blu = 0; // Set BLUE heater parameters (uA) double heater_blu = 0.78; // Stimulate blue heater SPEC_heater(heater_blu); // // 2 Mechanics parameters // // chopper in zero position int chop_def_zero = 664; // chopper on CS2 int chop_CS2_pos = 21200; // grating on a key wavelength int grat_key_lambda = 535000; // // 3 SPU parameters // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 64; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 64; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Start SPU or not [true,false] bool startSPU = true; // Ramp fitting algorithm int ramp_fit_alg = 0; // // 4 Start 4 junks of subramp fitting/subramp averaging pairs on CS2 // // Position chopper on CS2 Chop_mov_abs(chop_CS2_pos); // Move grating to a key wavelength SPEC_Gra_move_abs_raw(grat_key_lambda); // Stop SPU SPEC_spu_reset(); // Write detector parameters SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,heater_blu); // Start 4 junks of subramp fitting - subramp averaging pairs for(int junks = 1 .. 4) { // Ramp fit algorithm [0=LstSq;1=mean value] ramp_fit_alg = 0; // Start SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Staring measurement for 2min delay(60); // Stop SPU // SPEC_spu_reset_block(); SPEC_spu_reset(); // Ramp fit algorithm [0=LstSq;1=mean value] ramp_fit_alg = 1; // Start SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Staring measurement for 2min delay(60); // Stop SPU SPEC_spu_reset(); } // // 5 Move chopper to zero position // // Position chopper on zero position Chop_mov_abs(chop_def_zero); // // 6 Start 4 junks of subramp fitting/subramp averaging pairs on zero chopper position // // Position chopper on zero position Chop_mov_abs(chop_def_zero); // Move grating to a key wavelength SPEC_Gra_move_abs_raw(grat_key_lambda); // Stop SPU SPEC_spu_reset(); // Start 4 junks of subramp fitting - subramp averaging pairs for(int junkstwo = 1 .. 1) { // Ramp fit algorithm [0=LstSq;1=mean value] ramp_fit_alg = 0; // Start SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Staring measurement for 2min delay(60); // Stop SPU SPEC_spu_reset(); // Ramp fit algorithm [0=LstSq;1=mean value] ramp_fit_alg = 1; // Start SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Staring measurement for 2min delay(60); // Stop SPU SPEC_spu_reset(); } // // 7 Move chopper to zero position // // Position chopper on zero position Chop_mov_abs(chop_def_zero); } // Missionphase : FMIST // // Purpose : SWOF Grat // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_SWOF { }{ Pacs_DMC_SWOF_GRAT_CONT(); delay(1); } // File : PACS_Phot_Fil_Diaghk_Setup.cus // Missionphase : PACS EQM Test // // Purpose : Switch on diagnostic hk relevant to photometer filterwheel // // Author : P.Royer, B.Vandenbussche, T. Mueller // CUSification : DAC // Arguments : // // Description : Photometer filter wheel diagnostic housekeeping ON // : // Comments : Code of this building block has been taken out of PTP 0.7.7 // by PR. // // // Version : 1.7 // History : 1.0 / 25-Nov-2003 initial version by BV // 1.1 / 06-Jan-2004 syntax checked // 1.2 / 12-Jan-2003 checksum on actual parameters only - BV // 1.3 / 13-Jan-2003 bug fix in list syntax // 1.4 / 31-May-2004 Added hall sensor readouts // 1.5 / 07-Jul-2004 modified for photometer FW by TM // 1.6 / 19-Jul-2004 Added IMOTA and IMOTB [BV] // 1.7 / 17-Nov-2004 modified for EQM test, diag_hk_period set to 5 procedure PACS_Phot_Fil_Diaghk_Setup { }{ // diag_hk_period integer Diagnostic HK period : 4=synch on detect, >4=ms, 0=1KHz (not recommended) int diag_hk_period = 5; // Default time for one 'standard' command execution (sec) // set command_time 0.5 // DMC_WRT_DIAG_HK_LIST // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // DMC_FW_PHOT_CTRL 211 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FWPH_CUR_POS 260 // DMC_FW_PHOT_TEMP 406 // DMC_FWPHOT_POS_A 563 // DMC_FWPHOT_POS_B 569 // DMC_FPU_T_SEN_ST 404 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // //set hk_list [list {PP067420 211} {PP067420 256} {PP067420 257} {PP067420 260} \ // {PP067420 406} {PP067420 563} {PP067420 569} {PP067420 404} \ // {PP067420 560} {PP067420 567} {PP067420 556} {PP067420 564} \ // [list PP067420 [expr 0xFFFF]]] // // set chksum [getChkSum -d -32 $hk_list] int nb_words = 13; {int}[] list_tuple = [{211},{256},{257},{260},{406},{563},{569},{404},{560},{567},{556},{564},{0xffff}]; int[] list_int = [211,256,257,260,406,563,569,404,560,567,556,564,0xffff]; int chksum = checksum("int",list_int); // eval tcsend PC160420 \{PP065420 13\} $hk_list \{PP066420 $chksum\} // waittime $command_time // Send the TC Pacs_DMC_WRT_DIAG_HK_LIST(nb_words,list_tuple,chksum); delay(1); //DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); //------------------ // End of procedure //------------------ } // $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 : 2.0 // 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. // 2.0 26-sep-2008 VDP: implemented PacsSpecSlewCal // added SPEC_aot_epilogue to final_hold // transfered WriteOBSID and WriteEndID from Procedure back // main module and added to Slew and final_hold // Implemented: within WriteOBSID and Prologues/Epilogues data_rate() obs PacsCal_WaveCalNoChop { /* Needed variables to call WaveCalNoChop */ string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" int order = 2; // Order selection 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 comp_mode_blu = 16; // compression mode for blue detector int comp_mode_red = 16; // compression mode for red detector int nb_raw_red = 3; // number of red pixels int nb_raw_blu = 3; // number of blue pixels int naifid = 0; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) double yoffset = 0.0; // yoffset [arcsec] double xoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC bool verbose = true; }{ // compiting time for slw / calibration during slew time and others // Set OBSID int tobsid = duration(WriteOBSID($OBSID)); // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,comp_mode_blu,nb_raw_blu,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,comp_mode_red,nb_raw_red,0,0,0,0,0,0}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // frstLstGratPos is the last position for the grating after the Cals done // during Slew time... must be same as observations start position: grat_pos // Perform/don't AOT prologue bool doPROLOG = true; // "N/A" in string because of indexing 0,1,2,3 string[] choix = ["N/A","order1","order2","order3"]; string order_str = "order" + order; // if(choix[order] != "order1") { // double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); double keyWL = PacsSpecKeyWaves(order_str); double[] keyWAVE = [keyWL]; int tpacsSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_start,choix[order])); int tOBSID = duration(WriteOBSID($OBSID)); int tepilogue = duration(SPEC_aot_epilogue(grat_start,grat_def,verbose)); int tEndID = duration(WriteEndID()); // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = tOBSID + tpacsSlewCal; //Initial hold int tih = 0; //Final hold int tfh = tepilogue + tEndID; //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"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { WriteOBSID($OBSID); PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_start,choix[order]); } else { 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); } else { if(state[0] == 5) { SPEC_aot_epilogue(grat_start,grat_def,verbose); WriteEndID(); } } } } } // SpireBbStopDcuData // // $Id: SpireBbStopDcuData.txt,v 1.3 2007/04/02 09:50:56 kking Exp $ // // Procedure to stop generation of detector data TM packets // // 30 March 2007: Added additional parameter to RESET_FIFOS cmd // 02 April 2007: Added additional parameter to RESET_FIFOS message // block SpireBbStopDcuData SPIRE 8457 { }{ message("4 " + time() + ": SpireBbStopDcuData started"); message("4 $Id: SpireBbStopDcuData.txt,v 1.3 2007/04/02 09:50:56 kking Exp $"); // // stop data collection SpireSendDrcuCmd(0x843e0000,0); // // flush data from FIFOs message("5 " + time() + "Cmd: Spire_FLUSH_FIFO(0x1000)"); Spire_FLUSH_FIFO_RAW(0x1000); delay(3); message("5 " + time() + "Cmd: Spire_RESET_FIFOS(0x1000)"); Spire_RESET_FIFOS(0x1000); // delay(1); message("4 " + time() + ": SpireBbStopDcuData ended"); // } // Script : Pacs_Chopper_AutoOpt.txt // Missionphase : Commissioning // // Purpose : Check a series of different chopper controller settings by // chopping between +/- 12000 units (~4 deg) // // Author : Markus Nielbock/Helmut Dannerbauer // CUS author : MN/HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions: PACS switched on and Chopper switched off. // // Comments : This script is based on the commanding script // PACS_Chopper_uk_move_12000_OBS.cus // // Version : 1.1 // // History : 1.0 20-Nov-2007 (MN) Script to do simple chopper cycle // 1.1 10-Mar-2008 (MN) adopted extended CUS naming conventions // // Initialise input parameters: // Defines control parameter range, loops run from k(p,i,c,f)min to // k(p,i,c,f)max defining the inverse of the ratio of parameter change w.r.t. // the default value. procedure Pacs_Chopper_AutoOpt { int kpmin = 0 in [-3,3]; int kpmax = 0 in [-3,3]; int kimin = 0 in [-3,3]; int kimax = 0 in [-3,3]; int kcmin = 0 in [-3,3]; int kcmax = 0 in [-3,3]; int kfmin = 0 in [-3,3]; int kfmax = 0 in [-3,3]; }{ // PACS instrument code for BBID int instrument = 0x40000000; // chopper position (approx. +/- 4 deg in FPU) int chop_pos = 12000; // number of chop cycles int cycle = 10; // length of plateau time in seconds int plateau_time = 2; // Initialise variables for conversion from int to string and double string sU = "+0"; string sV = "+0"; string sW = "+0"; string sX = "+0"; double dU = 0.0; double dV = 0.0; double dW = 0.0; double dX = 0.0; int bU = 0x4000; int bV = 0x400; int bW = 0x40; int bX = 0x4; // CALU table file to be accessed string fileU = "PacsTable_CONFChopper_auto"; // Start diag. HK SPEC_Chopper_dhk_5hk_1khz_bb(); // Cycle through calibration table columns if(kpmax < kpmin) { kpmax = kpmin; } if(kimax < kimin) { kimax = kimin; } if(kcmax < kcmin) { kcmax = kcmin; } if(kfmax < kfmin) { kfmax = kfmin; } for(int u = kpmin .. kpmax) { for(int v = kimin .. kimax) { for(int w = kcmin .. kcmax) { for(int x = kfmin .. kfmax) { // calculate inverse -> ratio of changes if(u != 0) { dU = 1.0 / double(u); } else { dU = 0.0; } if(v != 0) { dV = 1.0 / double(v); } else { dV = 0.0; } if(w != 0) { dW = 1.0 / double(w); } else { dW = 0.0; } if(x != 0) { dX = 1.0 / double(x); } else { dX = 0.0; } if(abs(dU + dV + dW + dX) < 0.01) { // convert int to string variables // and determine BBID for column recovery // BBID is a 32 bit word with: // 2 bits: Instrument (PACS = 01) // 14 bits: block number (not used here) // 16 bits: a counter, used here as follows: // 4 bits for every PID parameter (P, I, C, F) // of this: 2 bits for the sign (01 = +, 10 = -) // 2 bits for the number (01, 10, 11 = 1, 2, 3) if(u >= 0) { sU = "+" + u; bU = 16384 + 4096 * u; } else { sU = "" + u; bU = 32768 - 4096 * u; } if(v >= 0) { sV = "+" + v; bV = 1024 + 256 * v; } else { sV = "" + v; bV = 2048 - 256 * v; } if(w >= 0) { sW = "+" + w; bW = 64 + 16 * w; } else { sW = "" + w; bW = 128 - 16 * w; } if(x >= 0) { sX = "+" + x; bX = 4 + x; } else { sX = "" + x; bX = 8 - x; } // construct column identifier string calUcol = "P" + sU + "I" + sV + "C" + sW + "F" + sX; debug_print("CALU column is " + calUcol); int bbid = instrument + bU + bV + bW + bX; WriteBBID(bbid); // Upload Chopper Controller Parameter CONF_chopper(fileU,calUcol); delay(2); // Switch on and enable chopper controller PACS_Chopper_SWON_SWOF_only("ON"); delay(2); EnDis_chopper("ON"); delay(5); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // chop cycle int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // Disable and switch off chopper controller EnDis_chopper("OFF"); delay(2); PACS_Chopper_SWON_SWOF_only("OFF"); delay(5); } } } } } // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); sync(); } // CVS comments : $Id: WriteOBSID.txt,v 1.7 2007/11/06 08:39:25 dcesarsk Exp $ // Missionphase : // // Purpose : Set the OBSID via DEC/MEC; show decoded OBSID on // user screen // // CUS script : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // Original TCL : N/A // CVS file : WriteOBSID.txt // // Input arguments // Type Name DefVal Description // int iOBSID N/A OBSID obtained from environment // // Description : Obtain OBSID from run environment and send TC to DMC // Write decoded OBSID to log file // // Dependencies : Pacs_DMC_SET_OBSID // DecodeOBSID // // Comments : // // Version : 2.0 // 0.1 23-Sep-2004 First creation // History : 0.2 28-Sep-2004 Remove set_unset; write // decoded OBSID to output log // 0.3 7-Oct-2004 Renamed to WriteOBSID to match to names of // related procedures // 0.4 12-Oct-2004 Added write to EGSE environment (need // to add write to IST environment ??) // 0.5 21-Oct-2004 Added write to CDMS // 1.0 9-May-2005 DAC Removed write to EGSE and CDMS (not // needed at Astrium) // 1.1 20-oct-2005 Added sync() as I will need the "true" // duration // 1.2 5-nov-2007 Added delay(1) before first TC to wait // for completion of bus_configure // 2.0 23-sep-2008 SCR4431 hk_data_rate // procedure WriteOBSID { int iOBSID = 0x20000000; // Observation ID }{ // Wait 1 second to allow for bus_configure delay(1); // Write OBSID to DEC/MEC and decode to output log Pacs_DMC_SET_OBSID(iOBSID); ess_hk_data_rate(0.31); non_ess_hk_data_rate(4.0); // sync the bus sync(); // Inform CUS debugger // DecodeOBSID(iOBSID); } // Missionphase : FMIST // // Purpose : SWON Grat // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_SWON { }{ Pacs_DMC_SWON_GRAT_CONT(); delay(1); } // File : PACS_Spec_Fil_Testseq.cus // Missionphase : PACS EQM Test // // Purpose : Position sequence test of spectrometer filterwheel // // Author : BV, modifications by TM // CUSification : DAC // Arguments : // // Description : Moves the Spectrometer filter wheel times // to position 2 and back to position 1 using absolute position // commands. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.6 // History : 1.0 / 26-Jan-2006 DAC Adpated from PACS_Phot_Fil_Testseq // Added DMC_SWON_GRAT_CONT as in original Spec tcl // 1.1 / 12-May-2006 procedure -> building block + simplified code & comments // 1.2 17-may-2006 DAC Recast as procedure (already in registry as procedure) // procedure PACS_Spec_Fil_Testseq { }{ debug_print("Start PACS_Spec_Fil_Testseq"); int fw_start = 1; // initial filter wheel position (0=A; 1=B) int num_turns = 3; // number of 360 deg turns int time_on_fw_pos = 20; // time spent on each FW stop position (sec) string[] fltPOS = ["POS A","POS B"]; int slew_time = 15; // Minimum time between two filter wheel movements (sec) // SWON FW CONTROLLER Pacs_DMC_SWON_FW_SPEC(); delay(1); Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[fw_start]); delay(slew_time); // Move num_turns to position 0 and back to position 1 using absolute location commands for(int loop0 = 1 .. num_turns) { int i = (fw_start + 1) % 2; Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[i]); delay(slew_time); delay(time_on_fw_pos); i = (fw_start + 2) % 2; Pacs_DMC_MOVE_SPEC_FW_LOC(fltPOS[i]); delay(slew_time); delay(time_on_fw_pos); } // RE-SWON GRAT CONTROLLER Pacs_DMC_SWON_GRAT_CONT(); delay(1); //------------------ // End of procedure //------------------ } //$Id$ // // Purpose //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //- Test of internal calibration recipes including different chopper // frequencies photometry including time constants for flux changes // (just between the 2 CSs) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // // TCL author : TM // TCL file : TM // CUS author : TM // Script file : PHOT_timeconst_fluxchange_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 27-apr-2005 DAC // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 0.5 4-nov-2005 DAC Added 1 sec to the wait after DMC load (from 2 to 3 sec) // 0.6 11-apr-2007 update by TM (OBCPs, 40Hz, ....) // 1.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Phot_timeconst_fluxchange { }{ // Register with environment // Start SPU int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; int nraw_red = 0; // PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_chopped_photometry (128sec) // OBCP_chopped_photometry(0,0,599,0,0,1,4,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,79,0,0,1,30,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,19,0,0,1,120,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,4,0,0,1,240,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // // Position the filter wheel at POS B // PHOT_fltw_move("POS B"); // OBCP_chopped_photometry(0,0,599,0,0,1,4,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,79,0,0,1,30,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,19,0,0,1,120,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,4,0,0,1,240,648,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // // Position the filter wheel at POS A PHOT_fltw_move("POS A"); // // Stop SPU PHOT_spu_reset(); // // Leave environment } // Missionphase : FM ILT // // Purpose : Grating health check + reproducibility aspects // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : n_homes : nb of times that the homing+Grating_Healthcheck is repeated // // Description : Homes the grating and performs moves to Min->Max->Min positions (= Grating Health Check) // Repeats this a "n_home" times // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON and ENABLED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : The grating health check only makes sense with high frequency diag HK // The first homing is always done with parameter 0 ("POSITIVE"), then it alternates // // Version : 2.0 // // History : 1.0 14-Jun-2006 Creation, based on SPEC_Gra_Healthcheck_obs // 2.0 13-Feb-2008 Major Modifications: name changed to // PACS_Spec_Gra_Healthcheck // Made into a procedure // to be called by PacsEng_Spec_Gra_Healthcheck // Block PACS_Spec_Gra_Healthcheck // name changed to PACS_Spec_Gra_Healthcheck_BB // procedure PACS_Spec_Gra_Healthcheck { int n_homes = 1; // Number of Homings & "Grating Health Checks" to be performed }{ int n = 0; while(n < n_homes) { // double homing_mode = double(n % 2); string home_mode = "NEGATIVE"; if(n % 2 == 1) { home_mode = "POSITIVE"; } PACS_Spec_Gra_Healthcheck_BB(home_mode); n = n + 1; } } // SpireBsmMove // // $Id: SpireBsmMove.txt,v 1.1 2006/08/10 09:38:58 kking Exp $ // // Procedure to move the BSM to a given position // // procedure SpireBsmMove { int chopPosn = 2048 in [0,65535]; int jiggPosn = 2048 in [0,65535]; }{ string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(4," " + tstr + ": SpireBsmMove started"); SpireMsg(4," $Id: SpireBsmMove.txt,v 1.1 2006/08/10 09:38:58 kking Exp $"); // SpireMsg(3," ChopPosn = " + chopPosn); SpireMsg(3," JIggPosn = " + jiggPosn); // int cmd = 0; // set Chop position cmd = 0x90c30000 + chopPosn; SpireSendDrcuCmd(cmd,0); // // set Jiggle Position cmd = 0x91430000 + jiggPosn; SpireSendDrcuCmd(cmd,0); // // move BSM cmd = 0x90c60000; SpireSendDrcuCmd(cmd,0); // tstr = SpireTimeStr(time()); SpireMsg(4," " + tstr + ": SpireBsmMove ended"); // } // CVS comments : $Id: SPEC_get_grat_info.txt,v 1.6 2008/05/28 13:53:57 vanessad Exp $ // Purpose : Estimate grating parameters by referring to the U-CAL SPEC_BAND_params and // grating calibration file mentioned therein // // CUS author : DAC // Script file : SPEC_get_grat_info.txt // // Input arguments // type name description // double waveLen Desired wavelength [microns] // // Return values // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int} nbSteps,stepSize} // // Description : Access the table SPEC_BAND_params. Verify that the given // wavelength is within range; obtain order and the name of the GratCal // grat vs. wavelength table. Get nominal grating position from GratCal table. // Returns the grating position such that nominal grating position will be // acchieved after nbSteps/2 steps // // Dependencies : // // Preconditions : // // Comments : With current version of lookup, first column has to be of // type string // // History : 0.1 25-aug-2005 DAC // 0.2 8-may-2006 Return grating position such that line falls // in the middle of array after n_steps/2 // 0.3 30-may-2006 Access SPEC_BAND_params using module SPEC_BAND_read; // Return central pixel gratPos if switching = true // 0.4 22-nov-2006 "Verbosed" debug_print // 0.5 14-feb-2007 Verbose in calling argument // 0.6 14-mar-2007 extraConf in calling argument // 0.6 7-may-2007 Amended for SCR-3164: introduction of "L" lines in // SPEC_BAND_params // 0.7 8-may-2007 Case of overlapping bands; orderSel defines the order // 1.0 10-oct-2007 SCR3632. Dedicated key wave parameters. K lines will // be recognized because "resol" will be KHI, KMED, or KLOW {double,int,int,int,int} procedure SPEC_get_grat_info_PV_FLEX { double waveLen = 54.0 in [54.0,210.0]; // Sought wavelength string resol = "HI" in ["HI","MED","LOW","KHI","KMED","KLOW"]; // Desired resolution bool switching = true; // Return central pixel if true string extraConf = "normal" in ["normal","bright"]; string orderSel = "order2"; bool verbose = false; }{ bool special = false; // PacsRangeSpec may call with sedN instead of orderSelN; use // "conversion" table for sedN => orderSelN if(orderSel == "sed2") { orderSel = "order2"; } if(orderSel == "sed3") { orderSel = "order3"; } if(orderSel == "sed4") { orderSel = "order2"; special = true; } if(verbose) { debug_print("SPEC_get_grat: order " + orderSel); } // Open and read SPEC_BAND_params table. Table indexed by ORDER // Try two possible ORDERs: order 1 and order indicated by orderSel // Start with order = 1 int order = 1; if(special) { order = 23; } bool found = false; int nbSRCH = 0; while(!found && nbSRCH < 2) { // SCR-3164. Deal with "L" lines string key = "L" + order; // SCR-3632 Deal with key wavelengths if(resol == "KHI" || resol == "KMED" || resol == "KLOW") { key = "K" + order; } // read BLU and RED edges of the SPEC bands double blu = dlookup("SPEC_BAND_params",key,"BLU"); double red = dlookup("SPEC_BAND_params",key,"RED"); found = blu <= waveLen && red >= waveLen; if(verbose) { debug_print("SPEC_get_grat: Switching is " + switching); debug_print("SPEC_get_grat: Wave " + waveLen); debug_print("SPEC_get_grat: FOUND " + found); debug_print("SPEC_get_grat: key " + key); debug_print("SPEC_get_grat: nbSRC " + nbSRCH); } // If not yet found search in order indicated by orderSel if(!found) { if(orderSel == "order2") { order = 2; } else { if(orderSel == "order3") { order = 3; } } nbSRCH = nbSRCH + 1; } } // If given wavelength not found there is a problem if(!found) { error("Wavelength " + waveLen + " is not within " + orderSel); } // Found the ORDER. Get now the name of position vs. wavelength gratPosTab string gratPosTab = slookup("SPEC_BAND_params",key,"CAL_FILE"); // Read the step size and the number of steps for this ORDER and resolution // Recast "resol" as it was before SCR3632 if(resol == "KHI") { resol = "HI"; } if(resol == "KMED") { resol = "MED"; } if(resol == "KLOW") { resol = "LOW"; } // Special case for "bright" source if(extraConf == "normal") { int stepSize = ilookup("SPEC_BAND_params",key,resol); int nbSteps = ilookup("SPEC_BAND_params",key,"NSTEPS"); } if(extraConf == "bright") { stepSize = ilookup("SPEC_BAND_params",key,resol); nbSteps = ilookup("SPEC_BAND_params",key,"FASTSTEP"); } // Get from gratPosTab the grating position corresponding to waveLen double gratPosDble = interpolate(gratPosTab,"grat_pos",waveLen); // gratPos will place waveLen in the middle of the array int gratPos = iround(gratPosDble); if(verbose) { debug_print("SPEC_get_grat Nominal wavelen: " + waveLen); debug_print("SPEC_get_grat Nominal grating: " + gratPos); } // Grating is scanned with a negative step size (increasing wavelength) // The grating start position should then be such that after nbSteps/2 we // are at nominal position: // gratPos = gratStartPos - stepSize*nbSteps/2 // hence: int gratStartPos = iround(gratPosDble + double(stepSize) * double(nbSteps) / 2.0); // and will scan by decreasing grating angle, i.e. negative step size: stepSize = -stepSize; // If frequency switch return return gratPos (central pixel) if(switching) { gratStartPos = gratPos; } if(verbose) { debug_print("SPEC_get_grat: reads SPEC_BANDS"); debug_print("SPEC_get_grat: WAVE/order/gratNOMINAL/gratSTRT: " + waveLen + "/" + order + "/" + gratPos + "/" + gratStartPos); debug_print("SPEC_get_grat: nbSteps/stepSize: " + nbSteps + "/" + stepSize); } return {waveLen,order,gratStartPos,nbSteps,stepSize}; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the spec 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 // // obs PacsEng_CONF_spec_fltw { /* No variables to call PacsEng_CONF_spec_fltw */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_spec_fltw */ }{ // 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_spec_fltw())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filemane : Pacs_Spec_fov_scan_imt409 // Purpose : FOV Scan // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do a FOV scan in spectroscopy mode. // // Dependencies : // // Preconditions : PACS switched-on, and setup spectroscopy. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.1 // // History : 1.0 06-04-07 HD. IST update. // 1.1 09-04-07 BV - corrected bias blue + commented out Diag hk // to stay within allowed datarate // 1.2 09-04-07 HF, added scan on filter B // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 changed biases to in-flight defaults // procedure Pacs_Spec_fov_scan_imt409 { }{ // Start Chopper specific diagnostic Housekeeping // SPEC_Chopper_dhk_imt_bb(); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // Move Filter Wheel to Position A SPEC_fltw_move("POS A"); // CRE setup int ramp_len_red = 64; int ramp_len_blu = 64; double bias_d_red = 0.03; double bias_r_red = 0.01; double bias_d_blu = 0.08; double bias_r_blu = 0.01; int capa_red = 0; int capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Set up Chopper Scan int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 4; // P#2 number of ramps on step int nb_steps_up = 310; // P#3 number of steps up int nb_steps_dn = 310; // P#4 number of steps down int step_up = 150; // P#5 relative move up int step_dn = -150; // P#6 relative move down int detector = 1; // Detector to SYNCH on int grat_pos = 535000; // Grating position int chop_start_pos = -23500; // Chopper start position int grat_time = 20000; // Grating time int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // number of raw channels int nraw_blu = 3; int nraw_red = 3; // "Red" compression int grat_def = 535000; // Grating default int grat_def_time = 40000; // Grating default time int chop_def = 0; // Chopper default position int nb_rdouts_ramp = 64; // Ramp length // // Setup the spu SPEC_spu_setup(comp_mode_blu,comp_mode_red,64,64,nraw_blu,nraw_red,1,0,true); // OBCP_chop_scan_spec(nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp); // Move Filter Wheel to Position B SPEC_fltw_move("POS B"); // OBCP_chop_scan_spec(nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // Move grating to a key wavelength SPEC_Gra_move_abs_raw(496000); delay(40); // reset the SPU SPEC_spu_reset(); // Stop diagnostic Housekeeping // PACS_stop_dhk_fm_bb(); // CRE setup to default values SPEC_CRE_No_Heater_setup(64,64,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,12,12); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Preconditions : see associated procedure // // Comments : // // History : 1.0 07-Jun-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Heat_SWOF { /* No variables to call PacsEng_Spec_Heat_SWOF */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Heat_SWOF */ }{ // 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(PACS_Spec_Heat_SWOF())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Heat_SWOF(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Preconditions : see associated procedure // // Comments : // // History : 1.0 07-Jun-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Heat_SWON { /* No variables to call PacsEng_Spec_Heat_SWON */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Heat_SWON */ }{ // 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(PACS_Spec_Heat_SWON())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Heat_SWON(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : FOV Scan // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do a FOV scan in spectroscopy mode. // // Dependencies : // // Preconditions : PACS switched-on, and setup spectroscopy. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 06-04-07 HD. IST update. // 1.1 09-04-07 BV - corrected bias blue + commented out Diag hk // to stay within allowed datarate // 1.2 09-04-07 HF, added scan on filter B // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Spec_fov_scan_imt409 { /* Needed variables to call PacsEng_Spec_fov_scan_imt409 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_fov_scan_imt409 */ }{ // 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(Pacs_Spec_fov_scan_imt409())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_fov_scan_imt409(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpirePOF5Estimate // // $Id: SpirePOF5Estimate.txt,v 1.7 2007/04/20 16:05:49 kking Exp $ // // This procedure calculates the estimated noise and signal/noise // for the given observing time. // // for input values, a value less than 0 indicates value unknown // // 18/01/07: v1.4: updated to work for different opsMOdes and use Teff to calculate sensitivity // 20/04/07: v1.5: added rate as an input parameter // v1.6: SCR3054 // v1.7: SCR3012 // {string,double,double,double,double,bool,double,double,double}[] procedure SpirePOF5Estimate { string obsMode = "POF5_F_scana"; double tau = 1.0; // integration time factor (number of map repeats) double scanRate = 0.0; double sourceFluxPSW = -1.0; double sourceFluxPMW = -1.0; double sourceFluxPLW = -1.0; double sourceBrightPSW = -1.0; double sourceBrightPMW = -1.0; double sourceBrightPLW = -1.0; }{ SpireMsg(3," Calculating POF5 noise estimates"); SpireMsg(3," $Id: SpirePOF5Estimate.txt,v 1.7 2007/04/20 16:05:49 kking Exp $"); SpireMsg(3," Input:"); SpireMsg(3," ObsMode: " + obsMode); SpireMsg(3," Integration time factor: " + tau); SpireMsg(3," PSW Flux density: " + sourceFluxPSW); SpireMsg(3," PMW Flux density: " + sourceFluxPMW); SpireMsg(3," PLW Flux density: " + sourceFluxPLW); SpireMsg(3," PSW Surface Brightness: " + sourceBrightPSW); SpireMsg(3," PMW Surface Brightness: " + sourceBrightPMW); SpireMsg(3," PLW Surface Brightness: " + sourceBrightPLW); // // calculate effective integration times // double psw_teff = dlookup("Phot_Sensitivities.txt",obsMode,"PSWTeff"); psw_teff = psw_teff / scanRate; double pmw_teff = dlookup("Phot_Sensitivities.txt",obsMode,"PMWTeff"); pmw_teff = pmw_teff / scanRate; double plw_teff = dlookup("Phot_Sensitivities.txt",obsMode,"PLWTeff"); plw_teff = plw_teff / scanRate; // // generate sensitivities // // fetch the flux uncertainty information for the obsMode double psw_func = dlookup("Phot_Sensitivities.txt",obsMode,"PSWFluxUnc") / sqrt(psw_teff); double pmw_func = dlookup("Phot_Sensitivities.txt",obsMode,"PMWFluxUnc") / sqrt(pmw_teff); double plw_func = dlookup("Phot_Sensitivities.txt",obsMode,"PLWFluxUnc") / sqrt(plw_teff); // fetch the surface brightness uncertainty information for the obsMode double psw_bunc = dlookup("Phot_Sensitivities.txt",obsMode,"PSWBrightUnc") / sqrt(psw_teff); double pmw_bunc = dlookup("Phot_Sensitivities.txt",obsMode,"PMWBrightUnc") / sqrt(pmw_teff); double plw_bunc = dlookup("Phot_Sensitivities.txt",obsMode,"PLWBrightUnc") / sqrt(plw_teff); // fetch confusion limits double psw_conf = dlookup("Phot_Sensitivities.txt",obsMode,"PSWConfLim"); double pmw_conf = dlookup("Phot_Sensitivities.txt",obsMode,"PMWConfLim"); double plw_conf = dlookup("Phot_Sensitivities.txt",obsMode,"PLWConfLim"); SpireMsg(3," Input Sensitivity Values:"); SpireMsg(3," Band: PSW PMW PLW"); SpireMsg(3," Flux Uncertainty: " + psw_func + " " + pmw_func + " " + plw_func); SpireMsg(3," Surface Brightness Uncertainty: " + psw_bunc + " " + pmw_bunc + " " + plw_bunc); SpireMsg(3," Conf Limit: " + psw_conf + " " + pmw_conf + " " + plw_conf); // // calculate noise estimates {string,double,double,double,double,bool,double,double,double}[] estimates = [{"250",sourceFluxPSW,-1.0,-1.0,psw_conf,false,sourceBrightPSW,-1.0,-1.0},{"350",sourceFluxPMW,-1.0,-1.0,pmw_conf,false,sourceBrightPMW,-1.0,-1.0},{"500",sourceFluxPLW,-1.0,-1.0,plw_conf,false,sourceBrightPLW,-1.0,-1.0}]; estimates[0]{2} = psw_func / sqrt(tau); if(estimates[0]{2} < psw_conf) { estimates[0]{5} = true; } if(sourceFluxPSW >= 0.0) { estimates[0]{3} = sourceFluxPSW / estimates[0]{2}; if(estimates[0]{3} > 200.0) { estimates[0]{3} = 200.0; } } estimates[0]{7} = psw_bunc / sqrt(tau); if(sourceBrightPSW >= 0.0) { estimates[0]{8} = sourceBrightPSW / estimates[0]{7}; if(estimates[0]{8} > 200.0) { estimates[0]{8} = 200.0; } } estimates[1]{2} = pmw_func / sqrt(tau); if(estimates[1]{2} < pmw_conf) { estimates[1]{5} = true; } if(sourceFluxPMW >= 0.0) { estimates[1]{3} = sourceFluxPMW / estimates[1]{2}; if(estimates[1]{3} > 200.0) { estimates[1]{3} = 200.0; } } estimates[1]{7} = pmw_bunc / sqrt(tau); if(sourceBrightPMW >= 0.0) { estimates[1]{8} = sourceBrightPMW / estimates[1]{7}; if(estimates[1]{8} > 200.0) { estimates[1]{8} = 200.0; } } estimates[2]{2} = plw_func / sqrt(tau); if(estimates[2]{2} < plw_conf) { estimates[2]{5} = true; } if(sourceFluxPLW >= 0.0) { estimates[2]{3} = sourceFluxPLW / estimates[2]{2}; if(estimates[2]{3} > 200.0) { estimates[2]{3} = 200.0; } } estimates[2]{7} = plw_bunc / sqrt(tau); if(sourceBrightPLW >= 0.0) { estimates[2]{8} = sourceBrightPLW / estimates[2]{7}; if(estimates[2]{8} > 200.0) { estimates[2]{8} = 200.0; } } // // return values SpireMsg(3," Output Estimates:"); SpireMsg(3," Band: " + estimates[0]{0} + " " + estimates[1]{0} + " " + estimates[2]{0}); SpireMsg(3," Source Flux " + estimates[0]{1} + " " + estimates[1]{1} + " " + estimates[2]{1}); SpireMsg(3," 1 Sigma Flux Noise: " + estimates[0]{2} + " " + estimates[1]{2} + " " + estimates[2]{2}); SpireMsg(3," Flux Signal/Noise: " + estimates[0]{3} + " " + estimates[1]{3} + " " + estimates[2]{3}); SpireMsg(3," Conf Level: " + estimates[0]{4} + " " + estimates[1]{4} + " " + estimates[2]{4}); SpireMsg(3," Conf Flag: " + estimates[0]{5} + " " + estimates[1]{5} + " " + estimates[2]{5}); SpireMsg(3," 1 Sigma Brightness Noise: " + estimates[0]{7} + " " + estimates[1]{7} + " " + estimates[2]{7}); SpireMsg(3," Brightness Signal/Noise: " + estimates[0]{8} + " " + estimates[1]{8} + " " + estimates[2]{8}); // return estimates; } // CVS comments : $Id: PacsPhotEstimatorOBCPn.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Missionphase : Operations // // Purpose : Estimate OBCP parameters for the PointMode and filter // specified by the HSPOT user // // CUS author : DAC // Script file : PacsPhotEstimatorOBCPn.txt // // Input arguments // type name Description // // Return values // Type Description // tuple {confPHOTblu,confPHOTred,confOBCP,{extension}} // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 7-Dec-2005 DAC Based on PacsRangeSpecEstimatorOBCP27 // 0.2 15-Dec-2005 Added pos_CS1 and pos_CS2 // 0.3 10-aug-2006 Point source now observed with OBCP3; others with OBCP4 // 1.0 30-aug-2006 - editorial clean up // - use repFactor instead of integrationTime // 1.1 12-jan-2007 - Improved messages (w/Roland Vavrek) // - added boolean dither to input list {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsPhotEstimatorOBCPn { int pointCase = 11; // Internal code for the pointing mode (see main) string filter = "blue1" in ["blue1","blue2"]; // filter from HSPOT int repFactor = 1; //Repeat factor, i.e. number of nod cycles {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOTdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; // Default values bool noddingSel = false; // Nodding allowed or not bool dither = true; // With/without dithering bool verbose = true; // Print bla-bla }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confPHOTblu = clone(paramsPHOTdef{0}); {int,int,int,int,int,int,int,int,int} confPHOTred = clone(paramsPHOTdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsPHOTdef{2}); // OBCP tuples use several variables, some of them are dedicated to one or // another OBCP. Here define all the tuple variables. Later, they may be // updated according to used OBCP int nb_main_loops = 0; int nb_cycles_obs_cal = 0; int nb_rdouts_plateau = 0; int nb_chop_cycle = 0; int max_dither = 0; int nhold = 0; int nb_SRC_OFF = 0; int nb_CS1_CS2 = 0; int pos_CS1 = 0; int pos_CS2 = 0; // Update corresponding elements of confOBCP // Get "duration related" parameters from corresponding OBCPnparams U-CAL table if(pointCase == 11 || pointCase == 12) { string calNAME = "OBCP3params"; // The acces key is the chosen filter: blue1 or blue2 // There is a row per filter; it lists main OBCP parameters nb_main_loops = ilookup(calNAME,filter,"nb_main_loops"); // OBCPconf uses nb_cycles_obs_cal as variable name nb_cycles_obs_cal = nb_main_loops; nb_rdouts_plateau = ilookup(calNAME,filter,"nb_rdouts_plateau"); nb_chop_cycle = ilookup(calNAME,filter,"nb_chop_cycle"); max_dither = ilookup(calNAME,filter,"max_dither"); nhold = ilookup(calNAME,filter,"nhold"); } if(pointCase == 22 || pointCase == 31) { calNAME = "OBCP4params"; nb_cycles_obs_cal = ilookup(calNAME,filter,"nb_cycles_obs_cal"); nb_SRC_OFF = ilookup(calNAME,filter,"nb_SRC_REF"); nb_rdouts_plateau = ilookup(calNAME,filter,"nb_rdouts_plateau"); nb_CS1_CS2 = ilookup(calNAME,filter,"nb_CS1_CS2"); nhold = ilookup(calNAME,filter,"nhold"); // CS1 and CS2 from dedicated CAL-U file pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); } if(pointCase == 33) { calNAME = "No CAL file yet"; } if(verbose) { debug_print("++PhotEstimator reads CAL-U: " + calNAME); } // Compute the OBS time for this pointCase and filter // Line Scan is not associated to an OBCP yet if(pointCase == 33) { int[] dureeOBCPn = [1,1,0,0,0]; } // Point source if(pointCase == 11 || pointCase == 12) { dureeOBCPn = PacsDureeOBCP3(nb_main_loops,nb_rdouts_plateau,nb_chop_cycle); } // For small and large source use OBCP4 if(pointCase == 22 || pointCase == 31) { dureeOBCPn = PacsDureeOBCP4(nb_SRC_OFF,nb_rdouts_plateau,nb_cycles_obs_cal,nb_CS1_CS2); } if(verbose) { debug_print("++PhotEstimator: dureeOBCP4: " + dureeOBCPn); } double quantumOBStime = double(dureeOBCPn[1] + dureeOBCPn[2]); // Get the "quantum" OBS time for the current order. U-CAL time doubles if // nodding is allowed double nodFactor = 1.0; if(noddingSel) { nodFactor = 2.0; } else { int nb_nods = 0; } quantumOBStime = nodFactor * quantumOBStime; // Inform user string[] msgLine = [" "]; int lineCnt = 0; if(noddingSel) { msgLine[lineCnt] = "

    Shortest SKY time (no overheads) for filter " + filter + ": " + quantumOBStime + " [sec], includes an A=>B nod cycle

    "; } else { msgLine[lineCnt] = "

    Shortest SKY time (no overheads) for filter " + filter + ": " + quantumOBStime + " [sec], no nodding demanded

    "; } lineCnt = lineCnt + 1; // Deal with repFactor. In case of noddingSel = false, the repFactor // gives the PointReq nrepeat count // // Re-use the previous logic based on userOBStime... // Repeat factor given for current filter. // Observing time can be increased by (integer) factor: int obsFactor = repFactor; double newOBStime = double(obsFactor) * quantumOBStime; if(verbose) { debug_print("++PhotEstimator: obsFactor: " + obsFactor + "; filter: " + filter); } // Common part of nodding/no nodding message if(repFactor == 1) { msgLine[lineCnt] = "

    You may increase the sensitivity for the current filter by setting"; lineCnt = lineCnt + 1; msgLine[lineCnt] = " the RepetitionFactor = 2,3,.. to obtain OBStime = repFactor*" + quantumOBStime + "

    "; lineCnt = lineCnt + 1; } // If no nodding then we repeat the raster pattern if(!noddingSel) { int repeat_factor = 1; nb_nods = 0; if(obsFactor > 1) { msgLine[lineCnt] = "

    You entered repFactor > 1

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "Since no nodding was requested, we shall repeat"; lineCnt = lineCnt + 1; msgLine[lineCnt] = "the raster pattern " + obsFactor + " times, leading to a total dwell time of " + newOBStime + " [sec]

    "; lineCnt = lineCnt + 1; repeat_factor = obsFactor; } } else { // Nodding selected, here we increase newOBStime by increasing the // number of nod cycles repeat_factor = 1; nb_nods = obsFactor; if(obsFactor > 1) { msgLine[lineCnt] = "

    You entered repFactor > 1

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "Since nodding is allowed, we set the number"; lineCnt = lineCnt + 1; msgLine[lineCnt] = " of nods to " + obsFactor + " cycles; leading to an accumulated dwell time of " + newOBStime + " [sec]

    "; lineCnt = lineCnt + 1; } } // Some more Pointing parameters (auxN just in case I need more...) int aux2 = 0; int aux3 = 0; // Pack information into proper tuples confOBCP{0} = nb_cycles_obs_cal; confOBCP{1} = max_dither; if(!dither) { confOBCP{1} = 0; } // Use confOBCP{2} to convey nb_chop_cycle confOBCP{2} = nb_chop_cycle; confOBCP{3} = nb_SRC_OFF; confOBCP{4} = nb_rdouts_plateau; confOBCP{5} = nb_CS1_CS2; confOBCP{15} = pos_CS1; confOBCP{16} = pos_CS2; // All these leftovers from SPECTRO code // confOBCP { 6} = nb_grat_step_up ; // confOBCP { 7} = nb_grat_step_dn ; // confOBCP { 8} = grat_start_pos ; // confOBCP { 9} = grat_start_time ; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {17} = chop_def ; // confOBCP {19} = order ; // confPHOTred{ 0} = capa_red; // confPHOTred{ 1} = nb_rdouts_ramp_red; // confPHOTred{ 2} = nb_rdouts_subramp_red; // confPHOTred{ 3} = comp_mode_red; // confPHOTred{ 4} = glitch_det_red; // confPHOTred{ 5} = ramp_fit_alg_red; // confPHOTred{ 6 = nb_raw_red; // confPHOTred{ 7} = bias_r_red; // confPHOTred{ 8} = bias_d_red; // confPHOTblu{ 0} = capa_blu; // confPHOTblu{ 1} = nb_rdouts_ramp_blu; // confPHOTblu{ 2} = nb_rdouts_subramp_blu; // confPHOTblu{ 3} = comp_mode_blu; // confPHOTblu{ 4} = glitch_det_blu; // confPHOTblu{ 5} = ramp_fit_alg_blu; // confPHOTblu{ 6 = nb_raw_blu; // confPHOTblu{ 7} = bias_r_blu; // confPHOTblu{ 8} = bias_d_blu; if(verbose) { debug_print("++PhotEstimator: OBCP: " + confOBCP); } // Pass messages to user (not in scan mode) if(pointCase != 33) { PacsMessageCenter("Observing time information",lineCnt,msgLine); } return {confPHOTblu,confPHOTred,confOBCP,{nb_nods,repeat_factor,nhold,0}}; } // CVS comments : $Id: PacsSpecDefaults.txt,v 1.12 2007/10/25 12:15:42 dcesarsk Exp $ // Purpose : Fill index=0 of OBCP and SPECxxx tuples with known // sensible default values // Starting with version 2.0, "sensible" values will be read // from CAL-U files // // CUS author : DAC // Script file : PacsSpecDefaults.txt // // Input arguments // type name Description // string throw HSPOT defined chopper amplitude // // Return values // Type Name Description // tuple confSPECx & confOBCP electronics and OBCP default parameters // // Description : Give default values to tuples OBCP and SPEC. May // use more information from yet to be created CAL-U files. So far // only "throw" (HSPOT defined) appears necessary as a call argument // // Dependencies : // // Preconditions : // // Comments : // // Returns : {{confSPECblu},{confSPECred},{confOBCP}} // // confSPEC{0 -> 8} contains: // capa nb_rdouts_ramp nb_rdouts_subramp comp_mode // glitch_det ramp_fit_alg nb_raw bias_r bias_d // // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 // chop_pos_CS1 chop_pos_CS2 chop_def // detector order // // version : 2.0 // History : // 0.1 19-may-2005 First coding // 1.0 31-May-2005 All elements of confSPEC are now "int" // 1.1 7-Jun-2005 Ditto for confOBCP // 1.2 14-jun-2005 Added chopper throw in calling list // 1.3 21-jun-2005 Renamed PacsSpecDefaults from PacsLineSpecDefaults (no // difference whether LineSpec or RangeSpec) // 1.4 24-jan-2006 Read CHOP parameters in [arcsec]; convert to ENG // 1.5 12-apr-2006 No longer FLTW default position; new code for confOBCP{19}: // 1=don't care/don't know; 1, 2, 3 : grating order. NOTE: no filter is // necessary for order = 1 // 1.6 25-apr-2006 Added comp_mode defaults // 2.0 16-feb-2007 Access CAL-U files // Moved verbose into call arguments // Added yetTBD argument for future choice of CAL-U entries // 2.1 4-mar-2007 Use special "throw" for raster w/OFF // 2.2 14-mar-2007 Use extraConf for bright lines // 2.3 26-mar-2007 Read most parameters from CONF_SPEC_params CAL-U file // 2.4 4-oct-2007 SPR-3619 Missing chopper throws for CS1 and CS2 // {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} procedure PacsSpecDefaults { /* Chopper throw; needed for OBCP */ string throw = "large" in ["large","medium","small","offraster"]; /* Spectro configuration scheme; needed for confSPEC tuple */ string extraConf = "normal" in ["normal","bright"]; /* bla bla */ bool verbose = false; }{ // Define variables to be used here {int,int,int,int,int,int,int,int,int} confSPECblu = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int} confSPECred = {0,0,0,0,0,0,0,0,0}; {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // Fill confSPECxxx from CAL-U file string calU = "CONF_SPEC_params"; // Which column of the CAL-U file? string confCOL = "Normal0"; if(extraConf == "bright") { confCOL = "Fast0"; } if(verbose) { debug_print("SpecDef: Table/COL: " + calU + "/" + confCOL); } // Read all red and blu rows int capa_red = ilookup(calU,"capa_red",confCOL); confSPECred{0} = capa_red; int capa_blu = ilookup(calU,"capa_blu",confCOL); confSPECblu{0} = capa_blu; int nb_rdouts_ramp_red = ilookup(calU,"nb_rdouts_red",confCOL); confSPECred{1} = nb_rdouts_ramp_red; int nb_rdouts_ramp_blu = ilookup(calU,"nb_rdouts_blu",confCOL); confSPECblu{1} = nb_rdouts_ramp_blu; int nb_rd_sub_red = ilookup(calU,"nb_rd_sub_red",confCOL); confSPECred{2} = nb_rd_sub_red; int nb_rd_sub_blu = ilookup(calU,"nb_rd_sub_blu",confCOL); confSPECblu{2} = nb_rd_sub_blu; int comp_mode_red = ilookup(calU,"comp_mode_red",confCOL); confSPECred{3} = comp_mode_red; int comp_mode_blu = ilookup(calU,"comp_mode_blu",confCOL); confSPECblu{3} = comp_mode_blu; int glitch_det_red = ilookup(calU,"glitch_det_red",confCOL); confSPECred{4} = glitch_det_red; int glitch_det_blu = ilookup(calU,"glitch_det_blu",confCOL); confSPECblu{4} = glitch_det_red; int ramp_fit_red = ilookup(calU,"ramp_fit_red",confCOL); confSPECred{5} = ramp_fit_red; int ramp_fit_blu = ilookup(calU,"ramp_fit_blu",confCOL); confSPECblu{5} = ramp_fit_red; int nb_raw_red = ilookup(calU,"nb_raw_red",confCOL); confSPECred{6} = nb_raw_red; int nb_raw_blu = ilookup(calU,"nb_raw_blu",confCOL); confSPECblu{6} = nb_raw_blu; int bias_r_red_mV = ilookup(calU,"bias_r_red",confCOL); confSPECred{7} = bias_r_red_mV; int bias_r_blu_mV = ilookup(calU,"bias_r_blu",confCOL); confSPECblu{7} = bias_r_blu_mV; int bias_d_red_mV = ilookup(calU,"bias_d_red",confCOL); confSPECred{8} = bias_d_red_mV; int bias_d_blu_mV = ilookup(calU,"bias_d_blu",confCOL); confSPECblu{8} = bias_d_blu_mV; // Fill now confOBCP tuple int grat_start_pos = 500000; confOBCP{8} = grat_start_pos; // Chopper and grating expected at their default positions int chop_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); int grat_def_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); confOBCP{10} = grat_def_pos; confOBCP{17} = chop_def; // Position filter wheel at default position // int fw_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","FW"); // Initialize to don't care/don't know int fw_pos = 1; confOBCP{19} = fw_pos; int nb_up_down = 1; confOBCP{0} = nb_up_down; int nb_SRC_OFF = 1; confOBCP{3} = nb_SRC_OFF; int nb_ramps_plateau = 2; confOBCP{4} = nb_ramps_plateau; int nb_CS1_CS2 = 0; confOBCP{5} = nb_CS1_CS2; // Read chopper positions [arcsec] and convert to ENG units // Chopper angles calU = "SPEC_CHOP_params"; // Read angles double auxSRC = dlookup(calU,throw,"SRC"); double auxREF1 = dlookup(calU,throw,"REF1"); double auxREF2 = dlookup(calU,throw,"REF2"); // Convert into ENG values string convU = "SPEC_CHOP_sky"; int onSRC = PacsReadChopSky(convU,auxSRC); int onREF1 = PacsReadChopSky(convU,auxREF1); int onREF2 = PacsReadChopSky(convU,auxREF2); // Special logic for raster with OFF: we chop between SRC and CS1 if(throw == "offraster") { // If raster w/OFF, lookup chopper CS1 position (already in ENG) calU = "CHOPPERCSparams"; onREF1 = ilookup(calU,"SPEC","pos_CS1"); onREF2 = onREF1; } if(verbose) { debug_print("SpecDef:chopSRC " + auxSRC + " [arcsec] -> " + onSRC + " [ENG]"); debug_print("SpecDef:chopREF1 " + auxREF1 + " [arcsec] -> " + onREF1 + " [ENG]"); debug_print("SpecDef:chopREF2 " + auxREF2 + " [arcsec] -> " + onREF2 + " [ENG]"); } confOBCP{12} = onSRC; confOBCP{13} = onREF1; confOBCP{14} = onREF2; // SPR-3619. Chopper position for CS1 and CS2 // Read table CHOPPERCSparams calU = "CHOPPERCSparams"; int chop_pos_CS1 = ilookup(calU,"SPEC","pos_CS1"); int chop_pos_CS2 = ilookup(calU,"SPEC","pos_CS2"); confOBCP{15} = chop_pos_CS1; confOBCP{16} = chop_pos_CS2; int detector = 1; confOBCP{18} = detector; return {confSPECblu,confSPECred,confOBCP}; } // Missionphase : // // Purpose : Starts the diagnostic housekeeping // // Author : // CUS author : // // Description : // // Dependencies : // // Preconditions : PACS switched-on // // Comments : // // Version : 3.0 // // History : 0.1 04-05-06 creation by SC // 1.0 24-07-06 SC. test script. // 2.0 24-07-06 SC. name updated. // 3.0 25-07-06 SC. script works. // block SPEC_DiagHK_DynRange_block_start PACS 403 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK // 305: DMC_DECB_VBI_R_4 // 326: DMC_DECB_BR_CM_4 // 327: DMC_DECB_ZB_CM_4 // 338: DMC_DECR_V0BIAS1 // 339: DMC_DECR_VBI_R_1 // 359: DMC_DECR_CR_ST_1 (bit 2-3 is for the capacitor value) // 360: DMC_DECR_BR_CM_1 // 361: DMC_DECR_ZB_CM_1 // 372: DMC_DECR_V0BIAS2 // 373: DMC_DECR_VBI_R_2 // 394: DMC_DECR_BR_CM_2 // 395: DMC_DECR_ZB_CM_2 //-------------------------------------------- int cs_diag_hk_length = 13; {int}[] parlist = [{305},{326},{327},{338},{339},{359},{360},{361},{372},{373},{394},{395},{0xffff}]; int[] aux = [305,326,327,338,339,359,360,361,372,373,394,395,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(cs_diag_hk_length,parlist,check_sum); // Diagnostic HK period int diag_hk_period = 100; // Diagnostic HK period (in milliseconds) Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Ge:Ga detector bias scan // // Author : Helmut Dannerbauer &Roland Vavrek // CUS script : HD // CVS file : // // Arguments : - Bias_d blue parameters from 1 to 8 // - Bias_d red parameters from 1 to 8 // // // Description : Loop over 8 different bias values while chopper stairs on CS2. Each bias setting // is followed by a 120 sec measurement. // // Dependencies : - PACS_Spec_Heat_Setup // - PACS_Chopper_mov_abs_fm_bb // - SPEC_Gra_move_abs_raw // - SPEC_spu_reset // - SPEC_cre_setup // - SPEC_spu_setup // // // Preconditions : - PACS is switched on // - Setup spectroscopy // - Mechanics and CS controllers are SWON and ENABLED (e.g. SetupSpectroscopyEQMIMT) // - CS2 temperature has been staibilized already // // Comments : Blue heater heaters are kept on constant temperature. // // Version : 2.0 // // History : 1.0 HD. IST update. // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_detector_imt509 { /* Needed variables to call PacsEng_Spec_detector_imt509 */ double bias_d_blue1 = 0.08; //Blue bias #1 double bias_d_blue2 = 0.11; //Blue bias #2 double bias_d_blue3 = 0.14; //Blue bias #3 double bias_d_blue4 = 0.17; //Blue bias #4 double bias_d_blue5 = 0.2; //Blue bias #5 double bias_d_blue6 = 0.23; //Blue bias #6 double bias_d_blue7 = 0.26; //Blue bias #7 double bias_d_blue8 = 0.29; //Blue bias #8 double bias_d_red1 = 0.02; //Red bias #1 double bias_d_red2 = 0.03; //Red bias #2 double bias_d_red3 = 0.04; //Red bias #3 double bias_d_red4 = 0.05; //Red bias #4 double bias_d_red5 = 0.06; //Red bias #5 double bias_d_red6 = 0.07; //Red bias #6 double bias_d_red7 = 0.08; //Red bias #7 double bias_d_red8 = 0.09; //Red bias #8 /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_detector_imt509 */ }{ // 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(Pacs_Spec_detector_imt509(bias_d_blue1,bias_d_blue2,bias_d_blue3,bias_d_blue4,bias_d_blue5,bias_d_blue6,bias_d_blue7,bias_d_blue8,bias_d_red1,bias_d_red2,bias_d_red3,bias_d_red4,bias_d_red5,bias_d_red6,bias_d_red7,bias_d_red8))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_detector_imt509(bias_d_blue1,bias_d_blue2,bias_d_blue3,bias_d_blue4,bias_d_blue5,bias_d_blue6,bias_d_blue7,bias_d_blue8,bias_d_red1,bias_d_red2,bias_d_red3,bias_d_red4,bias_d_red5,bias_d_red6,bias_d_red7,bias_d_red8); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id: PacsCal_Spec_Dark_CS_SimultaneousWarmUp.txt,v 1.1 2008/11/12 16:46:30 pierre Exp $ // Missionphase : PACS FM IST SOVT2 & PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Dark Measurement // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 12-Nov-2008 PR // obs PacsCal_Spec_Dark_CS_SimultaneousWarmUp { /* Needed variables to call PacsCal_Spec_CS_SimultaneousWarmUp */ int obs_time = 540; // Observing time per CS/FW/Grating setting int chop_time = 180; // Chopper plateau [sec] during CS temp rise time (0 = no chopping) /* POINTING PARAMETERS */ int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC /* End of needed variables for PacsEng_Spec_CS_SimultaneousWarmUp */ */ }{ debug_print("obs PacsCal_Spec_Dark_CS_SimultaneousWarmUp. Version 1.0. 20081112"); // 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)); int tslewmin = 0; // 3. Final hold // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // 4. Duration of "stable" pointing int tp = imax(1,duration(PACS_Spec_Dark_CS_SimultaneousWarmUp(obs_time,chop_time))); if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); debug_print("ts: " + ts); // }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Dark_CS_SimultaneousWarmUp(obs_time,chop_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script file : OBCP_chop_scan_spec.txt // Missionphase : // // Purpose : Chopper Up-Down Scan Spectroscopy (OBCP 18, DMC Seq. 16) // This procedure is required to execute chopper scans across // the PACS field of view at a given grating position. The // filter wheel is commanded // outside this OBCP. This procedure calls the sequence // described in sec. 4.2.9 // // OBCP author : HF // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Chop increasingly away from start position; then increasingly // closer to start position. Whole operation may be repeated nb_up_dn times // // Dependencies : // // Preconditions : // // Comments : // Version : 0.3 // // History : 0.1 28-jun-2006 DAC // 0.2 08-sep-2006 TM: DMC sequence corrected // 0.3 08-sep-2006 TM: DMC sequence parameters corrected // 0.4 08-sep-2008 DAC: Use OBCP number instead of name // int[] block OBCP_chop_scan_spec PACS 18 { int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 1; // P#2 number of ramps on step int nb_steps_up = 10; // P#3 number of steps up int nb_steps_dn = 10; // P#4 number of steps down int step_up = 300; // P#5 relative move up int step_dn = -300; // P#6 relative move down int detector = 1; // Detector to SYNCH on int grat_pos = 535000; // Grating position int chop_start_pos = 0; // Chopper start position int grat_time = 20000; // Grating time int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 535000; // Grating default int grat_def_time = 40000; // Grating default time int chop_def = 0; // Chopper default position int nb_rdouts_ramp = 64; // Ramp length }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain system parameter from PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) // Here and elsewhere it is assumed that OBCP "internal" TCs take t_cmd // [msec] to be executed duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_start_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) // (all parameters filled by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call DEC/MEC sequence just to know the seq time int[] duree1 = DMC_chop_scan_spec(nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn); debug_print("Duration DMC_chop_scan_spec [ramps] " + duree1); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * ramp_time) + dmc_margin; // Tally durations duree_msec = duree_msec + seq_time; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * ramp_time); duree_REF = ifloor(double(duree1[2]) * ramp_time); duree_CAL = ifloor(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * ramp_time) + dmc_margin; // Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8) + event duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // End // Duration: 10 x 200ms + grat_def_time + grat_time + seq_time + 0.5s // Now trigger execution of OBCP // This OBCP is number 18, requires 17 parameters and lasts seq_time [msec] // It calls DMC sequence 16 string obcp_ID = "CHOP_UPDOWN_SPEC"; int obcp_par_nber = 17; int seq_DMC = 16; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_dn},{4,nb_ramps},{5,nb_steps_up},{6,nb_steps_dn},{7,step_up},{8,step_dn},{9,detector},{10,grat_pos},{11,chop_start_pos},{12,grat_time},{13,comp_mode_blu},{14,comp_mode_red},{15,grat_def},{16,grat_def_time},{17,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return return time_array; } //$Id$ // // Purpose //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //- Test of internal calibration recipes including different chopper // frequencies photometry including time constants for flux changes // (just between the 2 CSs) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // // TCL author : TM // TCL file : TM // CUS author : TM // Script file : PHOT_cal_recipes_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 27-apr-2005 DAC // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 0.5 4-nov-2005 DAC Added 1 sec to the wait after DMC load (from 2 to 3 sec) // 0.6 11-apr-2007 update by TM (OBCPs, 40Hz, ....) // 1.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Phot_cal_recipes { }{ // Register with environment // Start SPU int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; int nraw_red = 0; // PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_chopped_photometry (128sec) // OBCP_chopped_photometry(0,0,599,0,0,1,4,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,159,0,0,1,15,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,79,0,0,1,30,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,39,0,0,1,60,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,19,0,0,1,120,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,9,0,0,1,240,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,4,0,0,1,240,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // // Position the filter wheel at POS B // PHOT_fltw_move("POS B"); // OBCP_chopped_photometry(0,0,599,0,0,1,4,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,159,0,0,1,15,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,79,0,0,1,30,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,39,0,0,1,60,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,19,0,0,1,120,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,9,0,0,1,240,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // OBCP_chopped_photometry(0,0,4,0,0,1,240,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); // // Position the filter wheel at POS A PHOT_fltw_move("POS A"); // // Stop SPU PHOT_spu_reset(); // // Leave environment } // File : PACS_Phot_SFT_Cooler_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Performing a cooler short functional test at room // temperature // // Author : T. Mueller // // Arguments : none // // Description : Question: // How can we check under warm conditions (room // temperature) the functioning of the cooler? // Something like commanding some heater currents // (HSE, SP, HSP) for a very short time period? // Answer: // Compared to Eric's previous proposition, he // recommend now to be on the safe side and to use // values as following: // // Set SP to 1mA // See HK to check if the link is valid // Reset SP // Set HSE to 30uA // See HK to check if the link is valid // Reset HSE // Set HSP to 30uA // See HK to check if the link is valid // Reset HSP // // Comments : Based on Email by Koryo Okumura 14/Sep/2005 // // Duration : 6 min // Version : 1.2 // History : 1.0 / 27-Nov-2005 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 22-apr-2007 AF 21 handling // procedure PACS_Phot_SFT_Cooler_Warm { }{ // disable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","DISABLE"); //------------------------------- // Set HK list to PHOT //------------------------------- // DPU_SET_HK_LIST (PHOT HK_PACKT_ID=2; // SPU_ARRAY: 1 for both channels, 2 for blue chan, 3: for red chan) // PC003380 "DPU_SET_HK_LIST" SET THE PREDIFINED LIST OF HK VALUES // FOR THE HK PACKET // PP005380 "HK_PACKT_ID" // PP025380 "SPU_ARRAY" // tcsend PC003380 {PP005380 2} {PP025380 1} // waittime 0.5 Pacs_DPU_SET_HK_LIST("PHOT","BOTH Array"); //---------------------------------------------------------------- // Short function test of cooler at room temperature //---------------------------------------------------------------- // Set SP heater current to to 0.001 amperes (1mA) // P 07 01 005D // tcsend PC103420 {PP071420 0x0701005D LO}; waittime 0.5 // waittime 60.0 int operand = 0x701005d; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // Set SP heater current to to 0mA // P 07 01 0000 // tcsend PC103420 {PP071420 0x07010000 LO}; waittime 0.5 // waittime 60.0 operand = 0x7010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // Set HSE heater current to to 0.00003 amperes (0.03mA=30uA) // P 07 03 004C // tcsend PC103420 {PP071420 0x0703004C LO}; waittime 0.5 // waittime 60.0 operand = 0x703004c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // Set HSE heater current to to 0mA // P 07 03 0000 // tcsend PC103420 {PP071420 0x07030000 LO}; waittime 0.5 // waittime 60.0 operand = 0x7030000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // Set HSP heater current to to 0.00003 amperes (0.03mA=30uA) // P 07 02 004C // tcsend PC103420 {PP071420 0x0702004C LO}; waittime 0.5 // waittime 60.0 operand = 0x702004c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // Set HSP heater current to to 0mA // P 07 02 0000 // tcsend PC103420 {PP071420 0x07020000 LO}; waittime 0.5 // waittime 60.0 operand = 0x7020000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(60); // enable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","ENABLE"); //----------------------- // end of procedure //----------------------- } // copy of SPEC_CRE_setup but without heater setup // History : 27-02-2007 BV & PR First and final version procedure SPEC_CRE_No_Heater_setup { int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) }{ // Red CRE register (capa_red=0) int cre_ctrl_red = 386; // Blue CRE register (capa_blu=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) // Write the blue spectrometer parameters int blu_cre_ctrl = capa_blu + cre_ctrl_blu; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums int i_blu_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_blu); int i_blu_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_blu); int clks_rdout = 32; int simul_reg = 60000; int[] aux = [clks_rdout,ramp_len_blu,blu_cre_ctrl,i_blu_bias_r,i_blu_bias_d,simul_reg]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(clks_rdout,ramp_len_blu,blu_cre_ctrl,bias_r_blu,bias_d_blu,simul_reg,check_sum); // Same for RED parameters int red_cre_ctrl = capa_red + cre_ctrl_red; int i_bias_r_red = convert_to_raw("pacs_DMC_BIAS_R",bias_r_red); int i_bias_d_red = convert_to_raw("pacs_DMC_BIAS_D",bias_d_red); aux = [clks_rdout,ramp_len_red,red_cre_ctrl,i_bias_r_red,i_bias_d_red,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(clks_rdout,ramp_len_red,red_cre_ctrl,bias_r_red,bias_d_red,simul_reg,check_sum); // Send complete parameters table to both DECS Pacs_DMC_SET_PAR_BOTH_SPEC(); // Switchon and set blue detector heater // Pacs_DMC_SWON_BD_HEATER(); // delay(1); // Pacs_DMC_SET_B_SPEC_HEAT_C(blue_heat_current); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); delay(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS {int}[] argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); delay(1); } // Mission phase : Space // // Purpose : OBCP for chopped photometry // using one blue filter after the other // // CUS author : TM/KO // Script file : Pacs_OBCP_chopped_photometry2.txt // // Description : Execute OBCP for chopped photometry for 2 filters // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : Modified Pacs_OBCP_chopped_photometry // // Version 0.1 // History 0.1 10-Jul-2008 KO : First version // procedure Pacs_OBCP_chopped_photometry2 { int nb_SRC_REF = 30; // p01 Number of observations in OBS loop int chop_pos_SRC = 664; // p02 Chopper position for SRCE int nb_rdouts_plateau = 15; // p03 Number of readouts per chopper position int chop_pos_REF1 = -21350; // p04 Chopper position for BKG1 int chop_pos_REF2 = 21200; // p05 Chopper position for BB2 int nb_cycles_obs_cal = 1; // p06 Number of obs/cal cycles int nb_CS1_CS2 = 0; // p07 Number of observations in CAL loop int chop_pos_CS1 = 0; // p08 Chopper position for CS1 int chop_pos_CS2 = 0; // p09 Chopper position for CS2 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 664; // Chopper default position string leaveFilterAt = "blue70um" in ["blue70um","green100um"]; // Leave with this filter bool initSPU = false; // Start SPU first string gain = "LOW" in ["LOW","HIGH"]; // Gain int nraw_blu = 3; // Number of raw channels transmitted in the blue SPU int nraw_red = 3; // Number of raw channels transmitted in the red SPU bool stopSPU = false; // Stop SPU at the end }{ if(initSPU) { // Register with environment // Start SPU PHOT_spu_gain_setup(gain,comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); } // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry with filter A"); int[] duree = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); // // Position the filter wheel at POS B and repeat everything // PHOT_fltw_move("POS B"); // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry with filter B"); duree = OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rdouts_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); if(leaveFilterAt == "green100um") { // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); } if(stopSPU) { // // Stop SPU // PACS_spu_reset(); } sync(); } // CVS comments : $Id: PacsLineSpecEstimatorOBCP32.txt,v 1.1 2007/10/25 12:16:47 dcesarsk Exp $ // Purpose : Estimate several PACS parameters for each spectral // line specified by the HSPOT user // // CUS author : DAC // // Input arguments // type name Description // tuple lines spectral line info from HSPOT // tuple waveTuple grating info associated to "lines" // tuple paramsSPECdef confSPECblu & confSPECred & confOBCP // // Return values // Type Description // tuple Derived values for paramsSPECdef // // Description : Fill the PACS state descriptors confSPECx & confOBCP, per // HSPOT defined wavelength, with values obtained from // OBCP32params (a CAL-U file). This procedure is called once // per spectral line. The repFactor is implemented as the // number of nb_obs_cal parameter in OBCP freq switch. // // Dependencies : // // Preconditions : // // Comments : Several confOBCP elements differ from non switched OBCPs // Code keeps old confOBCP commented out for reference. // NOTE.Several confOBCP elements are redefined here!! // // History : 0.1 18-oct-2007 DAC Based on PacsLineSpecEstimatorOBCP22 {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsLineSpecEstimatorOBCP32 { {string,double,int,double,double,double,string,string} lines = {"NONE",60.2,1,0.0,0.0,0.0,"bla","bla"}; // linesTuple HSPOT {double,int,int,int,int} waveTuple = {100.0,1,500000,0,0}; // waveTuple {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; // Default values bool verbose = true; // print debug information }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confSPECblu = clone(paramsSPECdef{0}); {int,int,int,int,int,int,int,int,int} confSPECred = clone(paramsSPECdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsSPECdef{2}); // ORDER of the current line int order = waveTuple{1}; double waveLEN = waveTuple{0}; // User desired repetition factor for current line int userREPfactor = lines{2}; // Get the "quantum" OBS time for the current order. // Grating info pertaining to the current wavelength is in waveTuple int grat_pos_LINE = waveTuple{2}; // Get "duration" and switch parameters from OBCP22params U-CAL table // There is a row per order; it lists main OBCP parameters string calNAME = "OBCP32params"; // The acces key is the grating order // Use 1st alternate method string key = "" + order; int nb_ramps_grat = ilookup(calNAME,key,"nb_ramps"); int nb_switch_cycles = ilookup(calNAME,key,"nb_cycles"); int offLine = ilookup(calNAME,key,"offLine"); int ditherCount = ilookup(calNAME,key,"ditherCount"); int ditherSize = ilookup(calNAME,key,"ditherSize"); int jumpREF1 = ilookup(calNAME,key,"jumpREF1"); int jumpREF2 = ilookup(calNAME,key,"jumpREF2"); // NOTE: nb_switch_cycles above is multiplied by userREPfactor nb_switch_cycles = nb_switch_cycles * userREPfactor; // Apply offset to central line. With current parameters place line in pixel 4 // corresponds to an Offset = -1600 grating units // OBCP32 requires that DMC be started with grating displaced of P#2; and // a further ditherSize*(ditherCount-1)/2. These two offsets are applied in // CommandOBCP32 int grat_pos_LINEoff = grat_pos_LINE + offLine; if(verbose) { debug_print("Estim.OBCP32:gratLINE/graLINE+offset: " + grat_pos_LINE + "/" + grat_pos_LINEoff); } // Estimate the OBS time for this rangeInfo; estimation is for ONE nod only. // Get nb_rdouts_ramp from confSPECred int nbRdOutsRamp = confSPECred{1}; int[] dureeOBCP32 = PacsDureeOBCP32(ditherCount,nb_switch_cycles,nb_ramps_grat,nbRdOutsRamp); // Use SRC/REF duration to compute quantumOBStime (was total time) int quantumOBStime = dureeOBCP32[1] + dureeOBCP32[2]; // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

    Estimated SRC+REF time: " + quantumOBStime + " [sec] for " + waveLEN + " [µm] with line repeated " + userREPfactor + " time(s)

    "; lineCnt = lineCnt + 1; if(verbose) { debug_print("Estim.OBCP32:jumpREF1/gratLINE/jumpREF2/ditherSize: " + jumpREF1 + "/" + grat_pos_LINEoff + "/" + jumpREF2 + "/" + ditherSize); } // This is complete fantasy; just to check the code //============== React on LINE/CONT fluxes ======================== // Line and continuum flux from HSPOT double lineFLUX = lines{3}; double contFLUX = lines{4}; // Low flux use large integrating capacitor int capa_red = 0; int capa_blu = 0; if(lineFLUX <= 400.0) { capa_red = 4; capa_blu = 8; } if(lineFLUX <= 100.0) { capa_red = 12; capa_blu = 4; } // Pack information into proper tuples // confOBCP { 0} = nb_up_down ; // confOBCP { 0} = nb_obs_cal ; confOBCP{0} = nb_switch_cycles; // confOBCP { 1} = grat_step_up ; confOBCP{1} = jumpREF1; // confOBCP { 2} = grat_step_dn ; confOBCP{2} = jumpREF2; // confOBCP { 3} = nb_SRC_OFF ; // confOBCP { 3} = nb_SRC ; confOBCP{4} = nb_ramps_grat; // confOBCP { 5} = nb_CS1 ; // confOBCP { 6} = nb_grat_step_up ; // confOBCP { 6} = nb_CS2 ; // confOBCP { 7} = nb_grat_step_dn ; confOBCP{7} = ditherCount; // confOBCP { 8} = grat_start_pos ; confOBCP{8} = grat_pos_LINEoff; // confOBCP { 9} = grat_start_time ; confOBCP{9} = ditherSize; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {15} = chop_pos_CS1 ; // confOBCP {16} = chop_pos_CS2 ; // confOBCP {17} = chop_def ; confOBCP{19} = order; confSPECred{0} = capa_red; // confSPECred{ 1} = nb_rdouts_ramp_red; // confSPECred{ 2} = nb_rdouts_subramp_red; int comp_mode_red = 16; confSPECred{3} = comp_mode_red; // confSPECred{ 4} = glitch_det_red; // confSPECred{ 5} = ramp_fit_alg_red; // confSPECred{ 6 = nb_raw_red; // confSPECred{ 7} = bias_r_red; // confSPECred{ 8} = bias_d_red; confSPECblu{0} = capa_blu; // confSPECblu{ 1} = nb_rdouts_ramp_blu; // confSPECblu{ 2} = nb_rdouts_subramp_blu; int comp_mode_blu = 16; confSPECblu{3} = comp_mode_blu; // confSPECblu{ 4} = glitch_det_blu; // confSPECblu{ 5} = ramp_fit_alg_blu; // confSPECblu{ 6 = nb_raw_blu; // confSPECblu{ 7} = bias_r_blu; // confSPECblu{ 8} = bias_d_blu; // Pass messages to user string msgLabel = "Observing time for " + lines{0}; PacsMessageCenter(msgLabel,lineCnt,msgLine); int nb_nods = 0; int aux3 = 0; return {confSPECblu,confSPECred,confOBCP,{nb_nods,ditherCount,quantumOBStime,aux3}}; } // $Id: PacsEng_PHOT_orbit_prologue.txt,v 1.8 2008/11/12 11:40:20 vanessad Exp $ // Purpose : Bring PACS from switched off condition to standby // for PHOT observations // // CUS author : Composed from various ILT modules // // Input arguments: see after module identification // // Return values // N/A // // Comments : // // History: // 0.1 25-jun-2007 Created from ILT modules // 0.2 9-aug-2007 Conformed to JonBr's mail (07/26/07) // 1.0 21-aug-2007 Renamed from PACS_PHOT_orbit_prologue // Use new "no_pointing" pointing request and // StateMachine logic // 1.1 20-may-2008 KO, Debugged for the pointing timing logic // 1.2 24-jun-2008 KO, calUfile, temp_CS1 and temp_CS2 put in the argument // 1.3 25-jun-2008 KO, CSs stabilisation time tSET put in the argument and the default calUfile changed to ILT // 1.4 11-nov-2008 VD&KO&TM tSet chnaged to 2100s to allow for stabilisation // 1.5 12-nov-2008 KO gotoDirect option added // obs PacsEng_PHOT_orbit_prologue { string calUfile = "BOLObias_ILT_standard_low"; // Bias table double set_CS1 = 48.0; // CS1 settings (ohms) double set_CS2 = 58.0; // CS2 settings (ohms) int tSET = 2100; // CSs stabilisation time in seconds bool gotoDirect = true in [true,false]; // DDCS setting to Direct setting }{ // Settling time for CS string fltPOS = "POS A"; bool execute = true; // Initial hold int tih = imax(1,duration(WriteOBSID($OBSID))); // Final hold int tfh = imax(1,duration(WriteEndID())) + tSET; // Duration of "stable" pointing int tp = duration(PHOT_setup(calUfile,fltPOS,set_CS1,set_CS2,gotoDirect)); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the PHOT setup script PHOT_setup(calUfile,fltPOS,set_CS1,set_CS2,gotoDirect); } if(state[0] == 5) { // Wait for CS to stabilize delay(tSET); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // Missionphase : CP/PV // // Purpose : Test of Chopper Movement // // Author : Markus Nielbock // CUS author : MN // // Description : Move chopper in open-loop mode. All 3 coils are // operative (nominal setting). The chopper is commanded // between the two internal calibration sources in small // equidistant steps. // // Dependencies : // // Preconditions : PACS switched-on in safe mode // // Comments : // // Version : 1.0 // // History : 1.0 12-Jun-08 creation by MN procedure Pacs_ChopperOpenLoop_FullRange { }{ // Set fixed parameters for chopper movement double chop_max_ma = 42.0; // chopper maximal drive current in mA double chop_step_ma = 3.0; // chopper movement step size in mA int chop_damptime = 15; // chopper timescale in seconds allowing for initial oscillation damping in open-loop mode // Start diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("ON"); delay(10); // Set Chopper Controller Parameters: CONFChopper -> OLoop_cold_nom (low rate param) CONF_chopper("CONFChopper","OLoop_cold_nom"); delay(2); // SWON chopper PACS_Chopper_SWON_SWOF_only("ON"); delay(30); // Set open-loop mode PACS_SPEC_Chopper_SetOpenLoop_BB("ON"); delay(2); // Enable chopper controller EnDis_chopper("ON"); delay(30); // Translate mA into ROU double chop_max_rou = chop_max_ma * 32767.0 / 133.0; double chop_step_rou = chop_step_ma * 32767.0 / 133.0; // Create tables of chopper positions double chop_pos = 0.0; //Starting position int ichop_pos = 0; //Starting position (integer) int[] chop_steps = []; //Array of chopper positions int i = 0; //Running variable while(chop_pos < chop_max_rou + chop_step_rou) { chop_steps[i] = ichop_pos; i = i + 1; chop_pos = chop_pos + chop_step_rou; ichop_pos = iround(chop_pos); } int len = length(chop_steps); //Length of array // Loop from 0 to max value for(int k1 = 0 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(chop_steps[k1]); delay(chop_damptime); } // Loop from max-1 value to 0 for(int k2 = 1 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(chop_steps[len - 1 - k2]); delay(chop_damptime); } // Loop from step -1 to min value for(int k3 = 1 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(-chop_steps[k3]); delay(chop_damptime); } // Loop from min+1 value to 0 for(int k4 = 1 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(-chop_steps[len - 1 - k4]); delay(chop_damptime); } // Switch off open-loop mode EnDis_chopper("OFF"); delay(30); PACS_Chopper_SWON_SWOF_only("OFF"); delay(30); CONF_chopper("CONFChopper","nom_sky"); delay(2); PACS_SPEC_Chopper_SetOpenLoop_BB("OFF"); delay(2); // Final ZP check PACS_Chopper_SWON_SWOF_only("ON"); delay(30); EnDis_chopper("ON"); delay(30); EnDis_chopper("OFF"); delay(30); PACS_Chopper_SWON_SWOF_only("OFF"); delay(30); // Stop diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("OFF"); sync(); } // Missionphase : EQM IMT // // Purpose : Setup SPU for photometry data flow // // Author : Bart Vandenbussche // // Arguments : // // Description : Configures photometry compression /reduction mode and (optionally) starts // reduction/compression // // Dependencies : // // Comments : // // Version : 1.4.4 // // History : 1.0 18-Apr-2005 BV - first version after Thomas' tcl script\ // and Diego's SPEC_spu_setup // 1.1 19-apr-2005 DAC Use Array2grp_1 to generate TC operands // 1.2 09-aug-2006 TM update of WRT_DET_CST_PHOT parameters // 1.3 23-aug-2006 TM update for SPU HLSW UM, issue 12.8 // 1.4 28-mar-2007 DAC Update for SPUv13.x // 1.4.1 29-mar-2007 Set scm = 1 (new compression scheme) // 1.4.2 4-apr-2007 SCM back to zero // 1.4.3 10-apr-2007 SCM back to 1 // 1.4.4 11-apr-2007 SCM back to 0 // 1.4.5 16-jun-2007 SCM back to 1 // int procedure PHOT_spu_setup { int comp_mode_blu = 0; // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int comp_mode_red = 0; // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int nraw_blu = 3; // Number of raw channels transmitted in the blue SPU int nraw_red = 3; // Number of raw channels transmitted in the red SPU bool startSPU = true; // Start SPU or not [true,false] }{ // Duration accumulator (accumulated time expressed in milliseconds) // (no longer used) int duration_msec = 0; // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // Set the SPU compression modes int[] aux = [comp_mode_blu,comp_mode_red]; int check_sum = checksum("int",aux); // Issue the TC {int}[] comp_par = Array2grp_1(aux); Pacs_DMC_WRT_SPU_TRAN_MODE(comp_par,check_sum); // Setting of start index of raw channels for SPUS and SPUL string spus_obs_mode = "PHOT"; string spul_obs_mode = "PHOT"; int spus_startraw = 1; int spul_startraw = 1; Pacs_SPUS_RAW_CHAN_TRAN_MODE(spus_obs_mode,nraw_blu,spus_startraw); Pacs_SPUL_RAW_CHAN_TRAN_MODE(spul_obs_mode,nraw_red,spul_startraw); // Photo "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in photometry int tfp = 1000; // Threshold for chopper position deviation in photometry int tcp = 100; // Glitch detection for photometry (1: no glitch detection) int gdfp = 1; // Override samples to average int navg = 0; // resolution reduction parameter 2 int spr1 = 0; // resolution reduction parameter 3 int spr2 = 0; // Lossless scheme int scm = 1; // lossless compression algoithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // Photo "Ottensamer" block ("L" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) ppf = 0; // PPP: Pre-Processing Parameter ppp = 0; // Threshold for glitch detection in photometry tfp = 1000; // Threshold for chopper position deviation in photometry tcp = 100; // Glitch detection for photometry (1: no glitch detection) gdfp = 1; // Override samples to average navg = 0; // resolution reduction parameter 2 spr1 = 0; // resolution reduction parameter 3 spr2 = 0; // Lossless compression scheme scm = 1; // lossless compression algoithm (0,1,2,3,4) lcal = 0; // PACS Codec Order (3,4) pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // Send time stamps // DMC_WRT_TIME: Write the time sent by the DPU into the DMC buffer // (No action on this one?) // DPU sends the time to DEC/MEC Pacs_DPU_SEND_TIME(); // DMC_SET_TIME: Set the time previously written by the write time command Pacs_DMC_SET_TIME(); // Start reduction/compression if commanded to do so if(startSPU) { Pacs_SPUS_START_REDUCT_COMPR(); Pacs_SPUL_START_REDUCT_COMPR(); } sync(); return duration_msec; } // $Id$ // Missionphase : PV phase // // Purpose : Wavelength calibration and instrumental profile // // TCL author : HF // TCL file : // CUS author : HF // Script file : WaveCalNoChop.txt // // // Description : Uses OBCP28 for executing a parameterized scan of any length, stepsize etc. // Represents a generic non-chopped grating scan // // Dependencies : SPEC_heater, SPEC_cre_setup // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : Can be run for wavelength calibration, instrumental profile and ghost search // Version : 0.2 // History // 0.1 21-sep-2007 DAC adapted from IST's Wave_Cal (converted from "mode" to // "procedure") // 0.2 14-jan-2008 DAC Added bias_r... input variables; read CS positions as // for AOTs, viz. from CHOPPERCSparams; removed "duree" code // 0.3 15-jan-2008 Renamed to WaveCalNoChop (in preparation for WaveCalChop) // procedure 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 }{ // // Condition the CREs and detectors int ramp_len_blu = nb_rdout_ramp; int ramp_len_red = nb_rdout_ramp; // Set up the blue and red CRE subsystem // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Set BLUE heater parameters (mA) double heater_blu = 0.78; SPEC_heater_setup(heater_blu); // // SPU parameters int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] // Reset SPU SPEC_spu_reset(); // Re-start SPU in default mode SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // Move the filter wheel SPEC_fltw_move(fltPOS); // Get CSn positions from dedicated CAL-U file int chop_pos_CS1 = ilookup("CHOPPERCSparams","SPEC","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); // Synchronize on this detector 1:Blue 2:Red int detector = 1; int nb_CS1_CS2 = 0; // number of cycles on calsources, 0=don't use them int nb_ramps_CS = 3; // number of ramps on CSs int grat_start_time = 31000; // time for grating to start [ms] int grat_def_time = 11000; // time for grating to go to default [ms] // Now call OBCP 28 with all its parameters int[] duree3 = OBCP_grat_scan_nochop(num_updown,grat_numsteps,grat_stepsize,-grat_stepsize,grat_numramps,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,nb_ramps_CS,grat_numsteps,chop_def,detector,grat_start,grat_start_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,nb_rdout_ramp); // Reset SPU SPEC_spu_reset(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Perform Check for saturation according to TM's input: //- Bolometers: Check for saturation for low-high gain settings at // PACS calibration sources and background level for // both filters // -----> Assume PHOT_setup_OBS has been run before. // (check list should be correct...) // Check before executing: // o is the gain still "high"? // o is the filter position still at "1"? // o is the sequence mode "Sbolo-Sref"? // o is the data mode "Bolo & HK"? // o are the photometry science packets still generated? // // Description: // o move the chopper to various positions, with 2 sec per plateau: // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch to gain "low" (PACS_Phot_Gain_low.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch filter to position "0" (tm_phot_fil_switch.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch to gain "high" (PACS_Phot_Gain_high.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch filter back to position "1" (tm_phot_fil_switch.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // Scripts: // o PACS_Phot_Gain_low.tcl // o PACS_Phot_Gain_high.tcl // o tm_phot_fil_switch.tcl // o CUS script "Chop_scan_both_ways" // // Expected Results: // o check signal patterns in QLA // o in case of saturation: note the gain-filter-chopper // combinations and avoid these settings later on // // CUS author : DAC // Script file : PHOT_saturation_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 22-apr-2005 DAC // 0.2 25-apr-2005 DAC // 0.3 26-apr-2005 DAC Start/stop SPU // 0.4 20-oct-2005 DAC Added SPEC_Chop_move_abs_raw // 0.5 10-apr-2007 TM updated // 1.0 25-mar-2008 VDP Tanslated from IST to PV phase syntax obs PacsEng_Phot_saturation { /* Needed variables to call PacsEng_Phot_saturation */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_saturation */ }{ // 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(Pacs_Phot_saturation())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_saturation(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Short performance test of Chopper in IMT // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do rectangular chopping for four frequencies with OBCP27 and its // corresponding DMC-sequence 12. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // // Version : 3.0 // // History : 1.0 04-04-07 HD. IST tuned. // 2.0 05-07-07 HD. IST Chopper Day. // 3.0 25-mar-2008 VDP Translated from IST to PV phase syntax obs PacsEng_Spec_Chopper_imt504_ast { /* Needed variables to call PacsEng_Spec_Chopper_imt504_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Chopper_imt504_ast */ }{ // 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(Pacs_Spec_Chopper_imt504_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Chopper_imt504_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Filename : Pacs_Phot_all_aots // Purpose : Exercise all available OBCPs for photometry // // // // TCL author : N/A // TCL file : tN/A // CUS author : DAC // Script file : PHOT_all_aots_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version 2.0 // History 0.1 20-apr-2005 DAC // 0.2 25-apr-2005 DAC Added moe to POS A at the end // 0.3 25-apr-2005 DAC Start and stop SPU with user given // compression parameters // 0.4 26-apr-2005 DAC Use PACS_spu_reset at end // 0.5 30-sep-2005 Correct typo phot_cal_III (-46145) // 0.6 9-nov-2005 comp_mode_xx were hardcoded in OBCP calls // 0.7 16-jun-2006 DAC Added 2 sec delay between OBCPs // 0.8 3-aug-2006 DAC Corrected OBCP freeze frame // 0.9 9-aug-2006 TM 2 new OBCPs have been added + some cosmetics // 0.95 9-aug-2006 TM, new parameters for chop_scan OBCP // 0.96 9-aug-2006 TM, compression mode hard-coded // 1.0 14-nov-2006 TM: update of chopper positions // 1.1 17-nov-2006 Remove freeze frame // 1.2 11-apr-2007 TM: take out the raw channels // 2.0 VDP adusted to match PV phase syntax // procedure Pacs_Phot_all_aots { }{ // Register with environment // Start SPU int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 0; int nraw_red = 0; PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,true); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Perform OBCP_fixed_fixed_photo with default parameters debug_print("Start OBCP_fixed_fixed_photo"); int[] duree = OBCP_fixed_fixed_photo(2,-1700,79,3,3000,-3000,-1500,-1300,comp_mode_blu,comp_mode_red); delay(2); debug_print("Duration from OBCP_fixed_fixed_photo" + duree); // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); duree = OBCP_chopped_photometry(8,1000,39,-2000,5000,2,2,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); // Perform OBCP_chopped_photometry_dither with default parameters debug_print("Start OBCP_chopped_photometry_dither"); duree = OBCP_chopped_photometry_dither(8,1000,39,-2000,5000,2,2,-21350,+21200,comp_mode_blu,comp_mode_red,0,200); delay(2); debug_print("Duration from OBCP_chopped_photometry_dither: " + duree); // Perform OBCP_phot_freezeframe with default parameters /// debug_print("Start OBCP_phot_freezeframe"); /// duree = OBCP_phot_freezeframe(2,-1997,210,33,comp_mode_blu,comp_mode_red,0); /// delay(2); /// debug_print("Duration from OBCP_phot_freezeframe: " + duree); // Perform OBCP_phot_staring with default parameters debug_print("Start OBCP_phot_starting"); duree = OBCP_phot_staring(60,comp_mode_blu,comp_mode_red); delay(2); debug_print("Duration from OBCP_phot_staring: " + duree); // Perform OBCP_phot_cal_I with default parameters debug_print("Start OBCP_phot_cal_I"); duree = OBCP_phot_cal_I(2,-22000,39,8,42000,-41750,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_I: " + duree); // Perform OBCP_phot_cal_II with default parameters debug_print("Start OBCP_phot_cal_II"); duree = OBCP_phot_cal_II(2,-22500,79,65,129,44000,44250,44500,44750,45000,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_II: " + duree); // Perform OBCP_phot_cal_III with default parameters debug_print("Start OBCP_phot_cal_III"); duree = OBCP_phot_cal_III(2,-22500,39,1,44000,-43950,100,6,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_III: " + duree); // Perform OBCP_chop_scan_phot with default parameters debug_print("Start OBCP_chop_scan_phot"); duree = OBCP_chop_scan_phot(1,19,100,100,200,-200,4,comp_mode_blu,comp_mode_red,-10000,0); delay(2); debug_print("Duration from OBCP_chop_scan_phot:" + duree); // // Position the filter wheel at POS B and repeat everything // PHOT_fltw_move("POS B"); // // Perform OBCP_fixed_fixed_photo with default parameters debug_print("Start OBCP_fixed_fixed_photo"); duree = OBCP_fixed_fixed_photo(2,-1700,79,3,3000,-3000,-1500,-1300,comp_mode_blu,comp_mode_red); delay(2); debug_print("Duration from OBCP_fixed_fixed_photo" + duree); // Perform OBCP_chopped_photometry with default parameters debug_print("Start OBCP_chopped_photometry"); duree = OBCP_chopped_photometry(8,1000,39,-2000,5000,2,2,-21350,+21200,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_chopped_photometry: " + duree); // Perform OBCP_chopped_photometry_dither with default parameters debug_print("Start OBCP_chopped_photometry_dither"); duree = OBCP_chopped_photometry_dither(8,1000,39,-2000,5000,2,2,-21350,+21200,comp_mode_blu,comp_mode_red,0,200); delay(2); debug_print("Duration from OBCP_chopped_photometry_dither: " + duree); // Perform OBCP_phot_freezeframe with default parameters /// debug_print("Start OBCP_phot_freezeframe"); /// duree = OBCP_phot_freezeframe(2,-1997,210,33,comp_mode_blu,comp_mode_red,0); /// delay(2); /// debug_print("Duration from OBCP_phot_freezeframe: " + duree); // Perform OBCP_phot_staring with default parameters debug_print("Start OBCP_phot_starting"); duree = OBCP_phot_staring(60,comp_mode_blu,comp_mode_red); delay(2); debug_print("Duration from OBCP_phot_staring: " + duree); // Perform OBCP_phot_cal_I with default parameters debug_print("Start OBCP_phot_cal_I"); duree = OBCP_phot_cal_I(2,-22000,39,8,42000,-41750,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_I: " + duree); // Perform OBCP_phot_cal_II with default parameters debug_print("Start OBCP_phot_cal_II"); duree = OBCP_phot_cal_II(2,-22500,79,65,129,44000,44250,44500,44750,45000,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_II: " + duree); // Perform OBCP_phot_cal_III with default parameters debug_print("Start OBCP_phot_cal_III"); duree = OBCP_phot_cal_III(2,-22500,39,1,44000,-43950,100,6,comp_mode_blu,comp_mode_red,0); delay(2); debug_print("Duration from OBCP_phot_cal_III: " + duree); // Perform OBCP_chop_scan_phot with default parameters debug_print("Start OBCP_chop_scan_phot"); duree = OBCP_chop_scan_phot(1,19,100,100,200,-200,4,comp_mode_blu,comp_mode_red,-10000,0); delay(2); debug_print("Duration from OBCP_chop_scan_phot:" + duree); // // Position the filter wheel at POS A // PHOT_fltw_move("POS A"); // // Stop SPU // PACS_spu_reset(); // Leave environment } // CVS file : TMMarker600.txt // Missionphase : // // Purpose : Mark the telemetry with BuildBlock identification. // The 600- series of BBIDs are "did nothing" BBs. Call // this block whenever you want to define subsequent TM as // belonging to block 600. Each call to this BB will, of // course, increment the BB=600 activation counter // // Author : DAC // Comments : Block name meant to suggest TeleMetryMarker with BBID=600 // Version : 0.1 28-jun-2006 // History : 0.2 17-jul-2008 DAC Removed spurious WriteEndBB // block TMMarker600 PACS 600 { }{ // Set BBID WriteBBID($BBID); sync(); } // CVS file : TMMarker602.txt // Missionphase : // // Purpose : Mark the telemetry with BuildBlock identification. // The 600- series of BBIDs are "did nothing" BBs. Call // this block whenever you want to define subsequent TM as // belonging to block 602. Each call to this BB will, of // course, increment the BB=602 activation counter // // Author : DAC // Comments : Block name suggests TeleMetryMarker with BBID=602 // Version : 0.1 28-jun-2006 // History : 0.2 17-jul-2008 DAC Removed spurious WriteEndBB // block TMMarker602 PACS 602 { }{ // Set BBID WriteBBID($BBID); sync(); } // CVS file : TMMarker601.txt // Missionphase : // // Purpose : Mark the telemetry with BuildBlock identification. // The 600- series of BBIDs are "did nothing" BBs. Call // this block whenever you want to define subsequent TM as // belonging to block 601. Each call to this BB will, of // course, increment the BB=601 activation counter // // Author : DAC // Comments : Block name meant to suggest TeleMetryMarker with BBID=601 // Version : 0.1 28-jun-2006 // History : 0.2 17-jul-2008 DAC Removed spurious WriteEndBB // History : // block TMMarker601 PACS 601 { }{ // Set BBID WriteBBID($BBID); sync(); } // CVS file : TMMarker603.txt // Missionphase : // // Purpose : Mark the telemetry with BuildBlock identification. // The 600- series of BBIDs are "did nothing" BBs. Call // this block whenever you want to define subsequent TM as // belonging to block 603. Each call to this BB will, of // course, increment the BB=603 activation counter // // Author : DAC // Comments : Block name suggests TeleMetryMarker with BBID=603 // Version : 0.1 28-jun-2006 // History : 0.2 17-jul-2008 DAC Removed spurious WriteEndBB // block TMMarker603 PACS 603 { }{ // Set BBID WriteBBID($BBID); sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 1.0 6-nov-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_GeGa_SFT_Init_Cold_He2 { /* No variables to call PacsEng_GeGa_SFT_Init_Cold_He2 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_GeGa_SFT_Init_Cold_He2 */ }{ // 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(PACS_GeGa_SFT_Init_Cold_He2())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_GeGa_SFT_Init_Cold_He2(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : PHOT_spu_reset.cus // Missionphase : FM IMT // // Purpose : Reset SPU after photometry data flow // // Author : Bart Vandenbussche // // Arguments : none // Description : Stops SPU // // Dependencies : // Comments : // Version : 1.0 // History : 1.0 18-Apr-2005 BV - copied from SPEC_spu_reset - // procedure PHOT_spu_reset { }{ // Stop both "blue" (Long) and "red" (Short) SPU Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); } // Mission phase : Performance Verification Phase // // Purpose : PCD req.1.1.1 for the Performance Verification Phase // Check the bias/signal relationship using CSs and the central FOV // // Author : Koryo Okumura // // CUS script : procedure Phot_lowGainBias_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // + Set the biases group by group // + Set the blue filter 100um // + Loop on CSs // + Set the chopper on a CS // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the chopper on the central FOV // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the blue filter 70um // + Loop on CSs // + Set the chopper on a CS // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + Set the chopper on the central FOV // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Acquisition // + At the end, the biases are set following a given bias table // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_lowGainBias(1, "LOW") // New version // // Version : Mon Jun 30 21:38:09 CEST 2008 // procedure Phot_lowGainBias_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_lowCSs"; // Bias table containing the final values }{ // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(startBiasTable,1); PHOT_set_bias_volt(startBiasTable,2); PHOT_set_bias_volt(startBiasTable,3); PHOT_set_bias_volt(startBiasTable,4); PHOT_set_bias_volt(startBiasTable,5); PHOT_set_bias_volt(startBiasTable,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain low Pacs_BOLC_SET_GAIN("LOW"); // //********************************************** // Set the PACS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS1 at 48.0 K // corresponding to 1.20pW on the green and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.2387937986138855 Volts Pacs_BOLC_SET_VH_G1(1.2387937986138855); // Set group 1 bol bias 02 (VL) to -0.01120620138611441 Volts Pacs_BOLC_SET_VL_G1(-0.01120620138611441); // Set group 1 bol bias 03 (VRL) to 0.39273766758961587 Volts Pacs_BOLC_SET_VRL_G1(0.39273766758961587); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512820863099917 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512820863099917); // Set group 2 bol bias 01 (VH) to 1.2273390654384582 Volts Pacs_BOLC_SET_VH_G2(1.2273390654384582); // Set group 2 bol bias 02 (VL) to -0.022660934561541744 Volts Pacs_BOLC_SET_VL_G2(-0.022660934561541744); // Set group 2 bol bias 03 (VRL) to 0.38921788688528014 Volts Pacs_BOLC_SET_VRL_G2(0.38921788688528014); // Set group 2 bol bias 20 (VH_BLIND) to 2.147146340755748 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.147146340755748); // Set group 3 bol bias 01 (VH) to 1.2296951151089281 Volts Pacs_BOLC_SET_VH_G3(1.2296951151089281); // Set group 3 bol bias 02 (VL) to -0.020304884891071927 Volts Pacs_BOLC_SET_VL_G3(-0.020304884891071927); // Set group 3 bol bias 03 (VRL) to 0.3894736881379893 Volts Pacs_BOLC_SET_VRL_G3(0.3894736881379893); // Set group 3 bol bias 20 (VH_BLIND) to 2.143754288741119 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.143754288741119); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.38519980225961764 Volts Pacs_BOLC_SET_VRL_G4(0.38519980225961764); // Set group 4 bol bias 20 (VH_BLIND) to 2.141162817635055 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.141162817635055); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3228584222642352 Volts Pacs_BOLC_SET_VRL_G5(0.3228584222642352); // Set group 5 bol bias 20 (VH_BLIND) to 2.067428073283575 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.067428073283575); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3146600782399116 Volts Pacs_BOLC_SET_VRL_G6(0.3146600782399116); // Set group 6 bol bias 20 (VH_BLIND) to 2.057234963490994 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.057234963490994); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.457556831416261 Volts Pacs_BOLC_SET_VH_G1(1.457556831416261); // Set group 1 bol bias 02 (VL) to -0.14244316858373907 Volts Pacs_BOLC_SET_VL_G1(-0.14244316858373907); // Set group 1 bol bias 03 (VRL) to 0.39289728144635716 Volts Pacs_BOLC_SET_VRL_G1(0.39289728144635716); // Set group 1 bol bias 20 (VH_BLIND) to 2.151471417543995 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151471417543995); // Set group 2 bol bias 01 (VH) to 1.444087138537561 Volts Pacs_BOLC_SET_VH_G2(1.444087138537561); // Set group 2 bol bias 02 (VL) to -0.1559128614624391 Volts Pacs_BOLC_SET_VL_G2(-0.1559128614624391); // Set group 2 bol bias 03 (VRL) to 0.3888592125442133 Volts Pacs_BOLC_SET_VRL_G2(0.3888592125442133); // Set group 2 bol bias 20 (VH_BLIND) to 2.1467299681244416 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1467299681244416); // Set group 3 bol bias 01 (VH) to 1.4461276964721905 Volts Pacs_BOLC_SET_VH_G3(1.4461276964721905); // Set group 3 bol bias 02 (VL) to -0.15387230352780956 Volts Pacs_BOLC_SET_VL_G3(-0.15387230352780956); // Set group 3 bol bias 03 (VRL) to 0.389702653261631 Volts Pacs_BOLC_SET_VRL_G3(0.389702653261631); // Set group 3 bol bias 20 (VH_BLIND) to 2.1440068212666743 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1440068212666743); // Set group 4 bol bias 01 (VH) to 1.461535092163816 Volts Pacs_BOLC_SET_VH_G4(1.461535092163816); // Set group 4 bol bias 02 (VL) to -0.13846490783618415 Volts Pacs_BOLC_SET_VL_G4(-0.13846490783618415); // Set group 4 bol bias 03 (VRL) to 0.38666891513104484 Volts Pacs_BOLC_SET_VRL_G4(0.38666891513104484); // Set group 4 bol bias 20 (VH_BLIND) to 2.1428402830030913 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1428402830030913); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.393205233420548 Volts Pacs_BOLC_SET_VRL_G5(0.393205233420548); // Set group 5 bol bias 20 (VH_BLIND) to 2.144845482323282 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.144845482323282); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3832953489422562 Volts Pacs_BOLC_SET_VRL_G6(0.3832953489422562); // Set group 6 bol bias 20 (VH_BLIND) to 2.130607584787264 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.130607584787264); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.585769661368119 Volts Pacs_BOLC_SET_VH_G1(1.585769661368119); // Set group 1 bol bias 02 (VL) to -0.214230338631881 Volts Pacs_BOLC_SET_VL_G1(-0.214230338631881); // Set group 1 bol bias 03 (VRL) to 0.39304515064751266 Volts Pacs_BOLC_SET_VRL_G1(0.39304515064751266); // Set group 1 bol bias 20 (VH_BLIND) to 2.151646819089764 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151646819089764); // Set group 2 bol bias 01 (VH) to 1.571162518585341 Volts Pacs_BOLC_SET_VH_G2(1.571162518585341); // Set group 2 bol bias 02 (VL) to -0.22883748141465898 Volts Pacs_BOLC_SET_VL_G2(-0.22883748141465898); // Set group 2 bol bias 03 (VRL) to 0.3888194923923588 Volts Pacs_BOLC_SET_VRL_G2(0.3888194923923588); // Set group 2 bol bias 20 (VH_BLIND) to 2.1466838588402206 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1466838588402206); // Set group 3 bol bias 01 (VH) to 1.5728976206374763 Volts Pacs_BOLC_SET_VH_G3(1.5728976206374763); // Set group 3 bol bias 02 (VL) to -0.22710237936252387 Volts Pacs_BOLC_SET_VL_G3(-0.22710237936252387); // Set group 3 bol bias 03 (VRL) to 0.39016220909623334 Volts Pacs_BOLC_SET_VRL_G3(0.39016220909623334); // Set group 3 bol bias 20 (VH_BLIND) to 2.144513683272569 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144513683272569); // Set group 4 bol bias 01 (VH) to 1.5905884509492139 Volts Pacs_BOLC_SET_VH_G4(1.5905884509492139); // Set group 4 bol bias 02 (VL) to -0.2094115490507863 Volts Pacs_BOLC_SET_VL_G4(-0.2094115490507863); // Set group 4 bol bias 03 (VRL) to 0.38773283476462383 Volts Pacs_BOLC_SET_VRL_G4(0.38773283476462383); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440552130411823 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440552130411823); // Set group 5 bol bias 01 (VH) to 1.3241923646302258 Volts Pacs_BOLC_SET_VH_G5(1.3241923646302258); // Set group 5 bol bias 02 (VL) to -0.07580763536977406 Volts Pacs_BOLC_SET_VL_G5(-0.07580763536977406); // Set group 5 bol bias 03 (VRL) to 0.40046001102514184 Volts Pacs_BOLC_SET_VRL_G5(0.40046001102514184); // Set group 5 bol bias 20 (VH_BLIND) to 2.153546375049013 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.153546375049013); // Set group 6 bol bias 01 (VH) to 1.37098688511416 Volts Pacs_BOLC_SET_VH_G6(1.37098688511416); // Set group 6 bol bias 02 (VL) to -0.02901311488583999 Volts Pacs_BOLC_SET_VL_G6(-0.02901311488583999); // Set group 6 bol bias 03 (VRL) to 0.43611847195239406 Volts Pacs_BOLC_SET_VRL_G6(0.43611847195239406); // Set group 6 bol bias 20 (VH_BLIND) to 2.1943115490461103 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1943115490461103); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7183370767248043 Volts Pacs_BOLC_SET_VH_G1(1.7183370767248043); // Set group 1 bol bias 02 (VL) to -0.2816629232751957 Volts Pacs_BOLC_SET_VL_G1(-0.2816629232751957); // Set group 1 bol bias 03 (VRL) to 0.39272615099525776 Volts Pacs_BOLC_SET_VRL_G1(0.39272615099525776); // Set group 1 bol bias 20 (VH_BLIND) to 2.151268425592528 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151268425592528); // Set group 2 bol bias 01 (VH) to 1.7019559750109217 Volts Pacs_BOLC_SET_VH_G2(1.7019559750109217); // Set group 2 bol bias 02 (VL) to -0.29804402498907834 Volts Pacs_BOLC_SET_VL_G2(-0.29804402498907834); // Set group 2 bol bias 03 (VRL) to 0.388357028089395 Volts Pacs_BOLC_SET_VRL_G2(0.388357028089395); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461470122884805 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461470122884805); // Set group 3 bol bias 01 (VH) to 1.714454188425701 Volts Pacs_BOLC_SET_VH_G3(1.714454188425701); // Set group 3 bol bias 02 (VL) to -0.2855458115742991 Volts Pacs_BOLC_SET_VL_G3(-0.2855458115742991); // Set group 3 bol bias 03 (VRL) to 0.401550404399907 Volts Pacs_BOLC_SET_VRL_G3(0.401550404399907); // Set group 3 bol bias 20 (VH_BLIND) to 2.15707892246005 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.15707892246005); // Set group 4 bol bias 01 (VH) to 1.7242793470756728 Volts Pacs_BOLC_SET_VH_G4(1.7242793470756728); // Set group 4 bol bias 02 (VL) to -0.27572065292432724 Volts Pacs_BOLC_SET_VL_G4(-0.27572065292432724); // Set group 4 bol bias 03 (VRL) to 0.3889940535267571 Volts Pacs_BOLC_SET_VRL_G4(0.3889940535267571); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454955805079967 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454955805079967); // Set group 5 bol bias 01 (VH) to 1.4496153041151667 Volts Pacs_BOLC_SET_VH_G5(1.4496153041151667); // Set group 5 bol bias 02 (VL) to -0.15038469588483347 Volts Pacs_BOLC_SET_VL_G5(-0.15038469588483347); // Set group 5 bol bias 03 (VRL) to 0.39905723488551603 Volts Pacs_BOLC_SET_VRL_G5(0.39905723488551603); // Set group 5 bol bias 20 (VH_BLIND) to 2.15186471364944 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.15186471364944); // Set group 6 bol bias 01 (VH) to 1.4970241024935167 Volts Pacs_BOLC_SET_VH_G6(1.4970241024935167); // Set group 6 bol bias 02 (VL) to -0.10297589750648331 Volts Pacs_BOLC_SET_VL_G6(-0.10297589750648331); // Set group 6 bol bias 03 (VRL) to 0.43401661473441144 Volts Pacs_BOLC_SET_VRL_G6(0.43401661473441144); // Set group 6 bol bias 20 (VH_BLIND) to 2.1918048548715423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1918048548715423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8585362347937342 Volts Pacs_BOLC_SET_VH_G1(1.8585362347937342); // Set group 1 bol bias 02 (VL) to -0.34146376520626587 Volts Pacs_BOLC_SET_VL_G1(-0.34146376520626587); // Set group 1 bol bias 03 (VRL) to 0.3925990888065586 Volts Pacs_BOLC_SET_VRL_G1(0.3925990888065586); // Set group 1 bol bias 20 (VH_BLIND) to 2.1511177079955788 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1511177079955788); // Set group 2 bol bias 01 (VH) to 1.838716500789082 Volts Pacs_BOLC_SET_VH_G2(1.838716500789082); // Set group 2 bol bias 02 (VL) to -0.3612834992109183 Volts Pacs_BOLC_SET_VL_G2(-0.3612834992109183); // Set group 2 bol bias 03 (VRL) to 0.38744902130448367 Volts Pacs_BOLC_SET_VRL_G2(0.38744902130448367); // Set group 2 bol bias 20 (VH_BLIND) to 2.1450929993071512 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1450929993071512); // Set group 3 bol bias 01 (VH) to 1.85163190367321 Volts Pacs_BOLC_SET_VH_G3(1.85163190367321); // Set group 3 bol bias 02 (VL) to -0.34836809632679006 Volts Pacs_BOLC_SET_VL_G3(-0.34836809632679006); // Set group 3 bol bias 03 (VRL) to 0.4020826639883897 Volts Pacs_BOLC_SET_VRL_G3(0.4020826639883897); // Set group 3 bol bias 20 (VH_BLIND) to 2.157667831933953 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157667831933953); // Set group 4 bol bias 01 (VH) to 1.8658389594227858 Volts Pacs_BOLC_SET_VH_G4(1.8658389594227858); // Set group 4 bol bias 02 (VL) to -0.3341610405772144 Volts Pacs_BOLC_SET_VL_G4(-0.3341610405772144); // Set group 4 bol bias 03 (VRL) to 0.39087822103495706 Volts Pacs_BOLC_SET_VRL_G4(0.39087822103495706); // Set group 4 bol bias 20 (VH_BLIND) to 2.1476476539739764 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1476476539739764); // Set group 5 bol bias 01 (VH) to 1.5144117466818523 Volts Pacs_BOLC_SET_VH_G5(1.5144117466818523); // Set group 5 bol bias 02 (VL) to -0.18558825331814774 Volts Pacs_BOLC_SET_VL_G5(-0.18558825331814774); // Set group 5 bol bias 03 (VRL) to 0.39841417525779244 Volts Pacs_BOLC_SET_VRL_G5(0.39841417525779244); // Set group 5 bol bias 20 (VH_BLIND) to 2.151093482383656 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151093482383656); // Set group 6 bol bias 01 (VH) to 1.5622243148794812 Volts Pacs_BOLC_SET_VH_G6(1.5622243148794812); // Set group 6 bol bias 02 (VL) to -0.13777568512051877 Volts Pacs_BOLC_SET_VL_G6(-0.13777568512051877); // Set group 6 bol bias 03 (VRL) to 0.43327546525989336 Volts Pacs_BOLC_SET_VRL_G6(0.43327546525989336); // Set group 6 bol bias 20 (VH_BLIND) to 2.1909210235812204 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1909210235812204); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0202028596068895 Volts Pacs_BOLC_SET_VH_G1(2.0202028596068895); // Set group 1 bol bias 02 (VL) to -0.3797971403931106 Volts Pacs_BOLC_SET_VL_G1(-0.3797971403931106); // Set group 1 bol bias 03 (VRL) to 0.4031554178502121 Volts Pacs_BOLC_SET_VRL_G1(0.4031554178502121); // Set group 1 bol bias 20 (VH_BLIND) to 2.163634915975391 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163634915975391); // Set group 2 bol bias 01 (VH) to 1.9845954458032045 Volts Pacs_BOLC_SET_VH_G2(1.9845954458032045); // Set group 2 bol bias 02 (VL) to -0.41540455419679545 Volts Pacs_BOLC_SET_VL_G2(-0.41540455419679545); // Set group 2 bol bias 03 (VRL) to 0.38611513204716796 Volts Pacs_BOLC_SET_VRL_G2(0.38611513204716796); // Set group 2 bol bias 20 (VH_BLIND) to 2.1435447105412555 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1435447105412555); // Set group 3 bol bias 01 (VH) to 2.0091673911193446 Volts Pacs_BOLC_SET_VH_G3(2.0091673911193446); // Set group 3 bol bias 02 (VL) to -0.39083260888065513 Volts Pacs_BOLC_SET_VL_G3(-0.39083260888065513); // Set group 3 bol bias 03 (VRL) to 0.4135751200095534 Volts Pacs_BOLC_SET_VRL_G3(0.4135751200095534); // Set group 3 bol bias 20 (VH_BLIND) to 2.170378532407885 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170378532407885); // Set group 4 bol bias 01 (VH) to 2.0158037297874873 Volts Pacs_BOLC_SET_VH_G4(2.0158037297874873); // Set group 4 bol bias 02 (VL) to -0.3841962702125128 Volts Pacs_BOLC_SET_VL_G4(-0.3841962702125128); // Set group 4 bol bias 03 (VRL) to 0.3915724280149063 Volts Pacs_BOLC_SET_VRL_G4(0.3915724280149063); // Set group 4 bol bias 20 (VH_BLIND) to 2.1484406507127387 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1484406507127387); // Set group 5 bol bias 01 (VH) to 1.5900913542685013 Volts Pacs_BOLC_SET_VH_G5(1.5900913542685013); // Set group 5 bol bias 02 (VL) to -0.20990864573149876 Volts Pacs_BOLC_SET_VL_G5(-0.20990864573149876); // Set group 5 bol bias 03 (VRL) to 0.40844955554354584 Volts Pacs_BOLC_SET_VRL_G5(0.40844955554354584); // Set group 5 bol bias 20 (VH_BLIND) to 2.163093126853995 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.163093126853995); // Set group 6 bol bias 01 (VH) to 1.6276124853923464 Volts Pacs_BOLC_SET_VH_G6(1.6276124853923464); // Set group 6 bol bias 02 (VL) to -0.17238751460765359 Volts Pacs_BOLC_SET_VL_G6(-0.17238751460765359); // Set group 6 bol bias 03 (VRL) to 0.43216415132235575 Volts Pacs_BOLC_SET_VRL_G6(0.43216415132235575); // Set group 6 bol bias 20 (VH_BLIND) to 2.1895819441738285 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1895819441738285); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1116098904579044 Volts Pacs_BOLC_SET_VH_G1(2.1116098904579044); // Set group 1 bol bias 02 (VL) to -0.3883901095420957 Volts Pacs_BOLC_SET_VL_G1(-0.3883901095420957); // Set group 1 bol bias 03 (VRL) to 0.4140062165204889 Volts Pacs_BOLC_SET_VRL_G1(0.4140062165204889); // Set group 1 bol bias 20 (VH_BLIND) to 2.1764790937594767 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1764790937594767); // Set group 2 bol bias 01 (VH) to 2.0619437696054 Volts Pacs_BOLC_SET_VH_G2(2.0619437696054); // Set group 2 bol bias 02 (VL) to -0.43805623039459973 Volts Pacs_BOLC_SET_VL_G2(-0.43805623039459973); // Set group 2 bol bias 03 (VRL) to 0.38550512685952865 Volts Pacs_BOLC_SET_VRL_G2(0.38550512685952865); // Set group 2 bol bias 20 (VH_BLIND) to 2.1428366925092326 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1428366925092326); // Set group 3 bol bias 01 (VH) to 2.0871836925661524 Volts Pacs_BOLC_SET_VH_G3(2.0871836925661524); // Set group 3 bol bias 02 (VL) to -0.4128163074338474 Volts Pacs_BOLC_SET_VL_G3(-0.4128163074338474); // Set group 3 bol bias 03 (VRL) to 0.41367957243777737 Volts Pacs_BOLC_SET_VRL_G3(0.41367957243777737); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704940139980216 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704940139980216); // Set group 4 bol bias 01 (VH) to 2.095481525504912 Volts Pacs_BOLC_SET_VH_G4(2.095481525504912); // Set group 4 bol bias 02 (VL) to -0.40451847449508793 Volts Pacs_BOLC_SET_VL_G4(-0.40451847449508793); // Set group 4 bol bias 03 (VRL) to 0.3918611768543646 Volts Pacs_BOLC_SET_VRL_G4(0.3918611768543646); // Set group 4 bol bias 20 (VH_BLIND) to 2.148770503204217 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.148770503204217); // Set group 5 bol bias 01 (VH) to 1.6549108970361488 Volts Pacs_BOLC_SET_VH_G5(1.6549108970361488); // Set group 5 bol bias 02 (VL) to -0.24508910296385117 Volts Pacs_BOLC_SET_VL_G5(-0.24508910296385117); // Set group 5 bol bias 03 (VRL) to 0.4072430925044988 Volts Pacs_BOLC_SET_VRL_G5(0.4072430925044988); // Set group 5 bol bias 20 (VH_BLIND) to 2.161651131887083 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161651131887083); // Set group 6 bol bias 01 (VH) to 1.6931168196610022 Volts Pacs_BOLC_SET_VH_G6(1.6931168196610022); // Set group 6 bol bias 02 (VL) to -0.20688318033899758 Volts Pacs_BOLC_SET_VL_G6(-0.20688318033899758); // Set group 6 bol bias 03 (VRL) to 0.4307551048853343 Volts Pacs_BOLC_SET_VRL_G6(0.4307551048853343); // Set group 6 bol bias 20 (VH_BLIND) to 2.187881524411063 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187881524411063); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.196006753214598 Volts Pacs_BOLC_SET_VH_G1(2.196006753214598); // Set group 1 bol bias 02 (VL) to -0.4039932467854021 Volts Pacs_BOLC_SET_VL_G1(-0.4039932467854021); // Set group 1 bol bias 03 (VRL) to 0.41357184702417576 Volts Pacs_BOLC_SET_VRL_G1(0.41357184702417576); // Set group 1 bol bias 20 (VH_BLIND) to 2.1759648938728384 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1759648938728384); // Set group 2 bol bias 01 (VH) to 2.1433243650504217 Volts Pacs_BOLC_SET_VH_G2(2.1433243650504217); // Set group 2 bol bias 02 (VL) to -0.45667563494957836 Volts Pacs_BOLC_SET_VL_G2(-0.45667563494957836); // Set group 2 bol bias 03 (VRL) to 0.3850880425693594 Volts Pacs_BOLC_SET_VRL_G2(0.3850880425693594); // Set group 2 bol bias 20 (VH_BLIND) to 2.14235260562423 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14235260562423); // Set group 3 bol bias 01 (VH) to 2.1686669393324536 Volts Pacs_BOLC_SET_VH_G3(2.1686669393324536); // Set group 3 bol bias 02 (VL) to -0.43133306066754634 Volts Pacs_BOLC_SET_VL_G3(-0.43133306066754634); // Set group 3 bol bias 03 (VRL) to 0.41346974712361556 Volts Pacs_BOLC_SET_VRL_G3(0.41346974712361556); // Set group 3 bol bias 20 (VH_BLIND) to 2.17026203238048 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.17026203238048); // Set group 4 bol bias 01 (VH) to 2.1793962970285237 Volts Pacs_BOLC_SET_VH_G4(2.1793962970285237); // Set group 4 bol bias 02 (VL) to -0.42060370297147653 Volts Pacs_BOLC_SET_VL_G4(-0.42060370297147653); // Set group 4 bol bias 03 (VRL) to 0.39239244557899233 Volts Pacs_BOLC_SET_VRL_G4(0.39239244557899233); // Set group 4 bol bias 20 (VH_BLIND) to 2.149377418431709 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.149377418431709); // Set group 5 bol bias 01 (VH) to 1.7225616727109463 Volts Pacs_BOLC_SET_VH_G5(1.7225616727109463); // Set group 5 bol bias 02 (VL) to -0.27743832728905365 Volts Pacs_BOLC_SET_VL_G5(-0.27743832728905365); // Set group 5 bol bias 03 (VRL) to 0.40580736393386424 Volts Pacs_BOLC_SET_VRL_G5(0.40580736393386424); // Set group 5 bol bias 20 (VH_BLIND) to 2.159935285624683 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.159935285624683); // Set group 6 bol bias 01 (VH) to 1.7622827443723812 Volts Pacs_BOLC_SET_VH_G6(1.7622827443723812); // Set group 6 bol bias 02 (VL) to -0.23771725562761872 Volts Pacs_BOLC_SET_VL_G6(-0.23771725562761872); // Set group 6 bol bias 03 (VRL) to 0.4298269773716583 Volts Pacs_BOLC_SET_VRL_G6(0.4298269773716583); // Set group 6 bol bias 20 (VH_BLIND) to 2.1867614355291423 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1867614355291423); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2848572542958143 Volts Pacs_BOLC_SET_VH_G1(2.2848572542958143); // Set group 1 bol bias 02 (VL) to -0.4151427457041857 Volts Pacs_BOLC_SET_VL_G1(-0.4151427457041857); // Set group 1 bol bias 03 (VRL) to 0.4131612503913013 Volts Pacs_BOLC_SET_VRL_G1(0.4131612503913013); // Set group 1 bol bias 20 (VH_BLIND) to 2.175478838481054 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175478838481054); // Set group 2 bol bias 01 (VH) to 2.227445675456437 Volts Pacs_BOLC_SET_VH_G2(2.227445675456437); // Set group 2 bol bias 02 (VL) to -0.47255432454356333 Volts Pacs_BOLC_SET_VL_G2(-0.47255432454356333); // Set group 2 bol bias 03 (VRL) to 0.38358395077791313 Volts Pacs_BOLC_SET_VRL_G2(0.38358395077791313); // Set group 2 bol bias 20 (VH_BLIND) to 2.1406069736852453 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1406069736852453); // Set group 3 bol bias 01 (VH) to 2.2541010275551834 Volts Pacs_BOLC_SET_VH_G3(2.2541010275551834); // Set group 3 bol bias 02 (VL) to -0.4458989724448167 Volts Pacs_BOLC_SET_VL_G3(-0.4458989724448167); // Set group 3 bol bias 03 (VRL) to 0.4127976284436742 Volts Pacs_BOLC_SET_VRL_G3(0.4127976284436742); // Set group 3 bol bias 20 (VH_BLIND) to 2.1695189208400576 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1695189208400576); // Set group 4 bol bias 01 (VH) to 2.2792127013060117 Volts Pacs_BOLC_SET_VH_G4(2.2792127013060117); // Set group 4 bol bias 02 (VL) to -0.4207872986939883 Volts Pacs_BOLC_SET_VL_G4(-0.4207872986939883); // Set group 4 bol bias 03 (VRL) to 0.4047407291500576 Volts Pacs_BOLC_SET_VRL_G4(0.4047407291500576); // Set group 4 bol bias 20 (VH_BLIND) to 2.1634937911711 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1634937911711); // Set group 5 bol bias 01 (VH) to 1.8021521044604545 Volts Pacs_BOLC_SET_VH_G5(1.8021521044604545); // Set group 5 bol bias 02 (VL) to -0.2978478955395457 Volts Pacs_BOLC_SET_VL_G5(-0.2978478955395457); // Set group 5 bol bias 03 (VRL) to 0.4159065601971136 Volts Pacs_BOLC_SET_VRL_G5(0.4159065601971136); // Set group 5 bol bias 20 (VH_BLIND) to 2.17200886747967 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.17200886747967); // Set group 6 bol bias 01 (VH) to 1.8316635864270032 Volts Pacs_BOLC_SET_VH_G6(1.8316635864270032); // Set group 6 bol bias 02 (VL) to -0.26833641357299687 Volts Pacs_BOLC_SET_VL_G6(-0.26833641357299687); // Set group 6 bol bias 03 (VRL) to 0.4288145963722081 Volts Pacs_BOLC_SET_VRL_G6(0.4288145963722081); // Set group 6 bol bias 20 (VH_BLIND) to 2.185539634602432 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.185539634602432); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3796037366573897 Volts Pacs_BOLC_SET_VH_G1(2.3796037366573897); // Set group 1 bol bias 02 (VL) to -0.4203962633426101 Volts Pacs_BOLC_SET_VL_G1(-0.4203962633426101); // Set group 1 bol bias 03 (VRL) to 0.4129099400989898 Volts Pacs_BOLC_SET_VRL_G1(0.4129099400989898); // Set group 1 bol bias 20 (VH_BLIND) to 2.175181344026924 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175181344026924); // Set group 2 bol bias 01 (VH) to 2.315754480139234 Volts Pacs_BOLC_SET_VH_G2(2.315754480139234); // Set group 2 bol bias 02 (VL) to -0.4842455198607661 Volts Pacs_BOLC_SET_VL_G2(-0.4842455198607661); // Set group 2 bol bias 03 (VRL) to 0.38156757008948644 Volts Pacs_BOLC_SET_VRL_G2(0.38156757008948644); // Set group 2 bol bias 20 (VH_BLIND) to 2.138266993828065 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.138266993828065); // Set group 3 bol bias 01 (VH) to 2.3449665772192874 Volts Pacs_BOLC_SET_VH_G3(2.3449665772192874); // Set group 3 bol bias 02 (VL) to -0.45503342278071257 Volts Pacs_BOLC_SET_VL_G3(-0.45503342278071257); // Set group 3 bol bias 03 (VRL) to 0.4122322683327103 Volts Pacs_BOLC_SET_VRL_G3(0.4122322683327103); // Set group 3 bol bias 20 (VH_BLIND) to 2.1688938193526224 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1688938193526224); // Set group 4 bol bias 01 (VH) to 2.360152158437928 Volts Pacs_BOLC_SET_VH_G4(2.360152158437928); // Set group 4 bol bias 02 (VL) to -0.4398478415620719 Volts Pacs_BOLC_SET_VL_G4(-0.4398478415620719); // Set group 4 bol bias 03 (VRL) to 0.39354738531821554 Volts Pacs_BOLC_SET_VRL_G4(0.39354738531821554); // Set group 4 bol bias 20 (VH_BLIND) to 2.150696897295742 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150696897295742); // Set group 5 bol bias 01 (VH) to 1.8624422796333608 Volts Pacs_BOLC_SET_VH_G5(1.8624422796333608); // Set group 5 bol bias 02 (VL) to -0.3375577203666393 Volts Pacs_BOLC_SET_VL_G5(-0.3375577203666393); // Set group 5 bol bias 03 (VRL) to 0.4028017551941114 Volts Pacs_BOLC_SET_VRL_G5(0.4028017551941114); // Set group 5 bol bias 20 (VH_BLIND) to 2.156343875220547 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156343875220547); // Set group 6 bol bias 01 (VH) to 1.9050654119965236 Volts Pacs_BOLC_SET_VH_G6(1.9050654119965236); // Set group 6 bol bias 02 (VL) to -0.2949345880034766 Volts Pacs_BOLC_SET_VL_G6(-0.2949345880034766); // Set group 6 bol bias 03 (VRL) to 0.42788441761189455 Volts Pacs_BOLC_SET_VRL_G6(0.42788441761189455); // Set group 6 bol bias 20 (VH_BLIND) to 2.1844170100895375 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1844170100895375); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6080079699591967 Volts Pacs_BOLC_SET_VH_G1(2.6080079699591967); // Set group 1 bol bias 02 (VL) to -0.39199203004080335 Volts Pacs_BOLC_SET_VL_G1(-0.39199203004080335); // Set group 1 bol bias 03 (VRL) to 0.4353039674693117 Volts Pacs_BOLC_SET_VRL_G1(0.4353039674693117); // Set group 1 bol bias 20 (VH_BLIND) to 2.2016826896367014 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2016826896367014); // Set group 2 bol bias 01 (VH) to 2.5212704911688184 Volts Pacs_BOLC_SET_VH_G2(2.5212704911688184); // Set group 2 bol bias 02 (VL) to -0.4787295088311815 Volts Pacs_BOLC_SET_VL_G2(-0.4787295088311815); // Set group 2 bol bias 03 (VRL) to 0.39184175711517744 Volts Pacs_BOLC_SET_VRL_G2(0.39184175711517744); // Set group 2 bol bias 20 (VH_BLIND) to 2.150192531202592 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150192531202592); // Set group 3 bol bias 01 (VH) to 2.5446946302676037 Volts Pacs_BOLC_SET_VH_G3(2.5446946302676037); // Set group 3 bol bias 02 (VL) to -0.4553053697323962 Volts Pacs_BOLC_SET_VL_G3(-0.4553053697323962); // Set group 3 bol bias 03 (VRL) to 0.41118382754245053 Volts Pacs_BOLC_SET_VRL_G3(0.41118382754245053); // Set group 3 bol bias 20 (VH_BLIND) to 2.1677345299207764 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1677345299207764); // Set group 4 bol bias 01 (VH) to 2.582263974911207 Volts Pacs_BOLC_SET_VH_G4(2.582263974911207); // Set group 4 bol bias 02 (VL) to -0.4177360250887929 Volts Pacs_BOLC_SET_VL_G4(-0.4177360250887929); // Set group 4 bol bias 03 (VRL) to 0.4155747259799741 Volts Pacs_BOLC_SET_VRL_G4(0.4155747259799741); // Set group 4 bol bias 20 (VH_BLIND) to 2.1758807093660604 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1758807093660604); // Set group 5 bol bias 01 (VH) to 2.0139550919820626 Volts Pacs_BOLC_SET_VH_G5(2.0139550919820626); // Set group 5 bol bias 02 (VL) to -0.38604490801793717 Volts Pacs_BOLC_SET_VL_G5(-0.38604490801793717); // Set group 5 bol bias 03 (VRL) to 0.39874967908065667 Volts Pacs_BOLC_SET_VRL_G5(0.39874967908065667); // Set group 5 bol bias 20 (VH_BLIND) to 2.151495860090233 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151495860090233); // Set group 6 bol bias 01 (VH) to 2.0603593375586526 Volts Pacs_BOLC_SET_VH_G6(2.0603593375586526); // Set group 6 bol bias 02 (VL) to -0.3396406624413473 Volts Pacs_BOLC_SET_VL_G6(-0.3396406624413473); // Set group 6 bol bias 03 (VRL) to 0.4254561262075288 Volts Pacs_BOLC_SET_VRL_G6(0.4254561262075288); // Set group 6 bol bias 20 (VH_BLIND) to 2.1814861909041072 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1814861909041072); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.958669888952511 Volts Pacs_BOLC_SET_VH_G1(2.958669888952511); // Set group 1 bol bias 02 (VL) to -0.3413301110474886 Volts Pacs_BOLC_SET_VL_G1(-0.3413301110474886); // Set group 1 bol bias 03 (VRL) to 0.43496400697889964 Volts Pacs_BOLC_SET_VRL_G1(0.43496400697889964); // Set group 1 bol bias 20 (VH_BLIND) to 2.201282516353445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201282516353445); // Set group 2 bol bias 01 (VH) to 2.877259199990068 Volts Pacs_BOLC_SET_VH_G2(2.877259199990068); // Set group 2 bol bias 02 (VL) to -0.4227408000099317 Volts Pacs_BOLC_SET_VL_G2(-0.4227408000099317); // Set group 2 bol bias 03 (VRL) to 0.41471523343174815 Volts Pacs_BOLC_SET_VRL_G2(0.41471523343174815); // Set group 2 bol bias 20 (VH_BLIND) to 2.1767077990321737 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1767077990321737); // Set group 3 bol bias 01 (VH) to 2.917604872367548 Volts Pacs_BOLC_SET_VH_G3(2.917604872367548); // Set group 3 bol bias 02 (VL) to -0.38239512763245215 Volts Pacs_BOLC_SET_VL_G3(-0.38239512763245215); // Set group 3 bol bias 03 (VRL) to 0.43322793583509106 Volts Pacs_BOLC_SET_VRL_G3(0.43322793583509106); // Set group 3 bol bias 20 (VH_BLIND) to 2.1920928084003948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1920928084003948); // Set group 4 bol bias 01 (VH) to 2.9326607124177055 Volts Pacs_BOLC_SET_VH_G4(2.9326607124177055); // Set group 4 bol bias 02 (VL) to -0.36733928758229417 Volts Pacs_BOLC_SET_VL_G4(-0.36733928758229417); // Set group 4 bol bias 03 (VRL) to 0.4248388375312061 Volts Pacs_BOLC_SET_VRL_G4(0.4248388375312061); // Set group 4 bol bias 20 (VH_BLIND) to 2.186464990521523 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.186464990521523); // Set group 5 bol bias 01 (VH) to 2.2123399887514554 Volts Pacs_BOLC_SET_VH_G5(2.2123399887514554); // Set group 5 bol bias 02 (VL) to -0.38766001124854466 Volts Pacs_BOLC_SET_VL_G5(-0.38766001124854466); // Set group 5 bol bias 03 (VRL) to 0.4257278403385899 Volts Pacs_BOLC_SET_VRL_G5(0.4257278403385899); // Set group 5 bol bias 20 (VH_BLIND) to 2.1837591130416554 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1837591130416554); // Set group 6 bol bias 01 (VH) to 2.2318001783201304 Volts Pacs_BOLC_SET_VH_G6(2.2318001783201304); // Set group 6 bol bias 02 (VL) to -0.36819982167986975 Volts Pacs_BOLC_SET_VL_G6(-0.36819982167986975); // Set group 6 bol bias 03 (VRL) to 0.423759377774352 Volts Pacs_BOLC_SET_VRL_G6(0.423759377774352); // Set group 6 bol bias 20 (VH_BLIND) to 2.1794381888209813 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1794381888209813); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS2 at 58.0 K // corresponding to 1.55pW on the green and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38123347242944194 Volts Pacs_BOLC_SET_VRL_G1(0.38123347242944194); // Set group 1 bol bias 20 (VH_BLIND) to 2.1376407910122737 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1376407910122737); // Set group 2 bol bias 01 (VH) to 1.2387003199108486 Volts Pacs_BOLC_SET_VH_G2(1.2387003199108486); // Set group 2 bol bias 02 (VL) to -0.011299680089151297 Volts Pacs_BOLC_SET_VL_G2(-0.011299680089151297); // Set group 2 bol bias 03 (VRL) to 0.3885454558920056 Volts Pacs_BOLC_SET_VRL_G2(0.3885454558920056); // Set group 2 bol bias 20 (VH_BLIND) to 2.146365745091845 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146365745091845); // Set group 3 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G3(1.24); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.38773615773066705 Volts Pacs_BOLC_SET_VRL_G3(0.38773615773066705); // Set group 3 bol bias 20 (VH_BLIND) to 2.141837957849939 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.141837957849939); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3746747870084728 Volts Pacs_BOLC_SET_VRL_G4(0.3746747870084728); // Set group 4 bol bias 20 (VH_BLIND) to 2.1291508925975227 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1291508925975227); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.30644740182478597 Volts Pacs_BOLC_SET_VRL_G5(0.30644740182478597); // Set group 5 bol bias 20 (VH_BLIND) to 2.051135159732571 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051135159732571); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.29823090263814045 Volts Pacs_BOLC_SET_VRL_G6(0.29823090263814045); // Set group 6 bol bias 20 (VH_BLIND) to 2.0409569182979173 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0409569182979173); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4721285832931112 Volts Pacs_BOLC_SET_VH_G1(1.4721285832931112); // Set group 1 bol bias 02 (VL) to -0.12787141670688873 Volts Pacs_BOLC_SET_VL_G1(-0.12787141670688873); // Set group 1 bol bias 03 (VRL) to 0.3926297476827718 Volts Pacs_BOLC_SET_VRL_G1(0.3926297476827718); // Set group 1 bol bias 20 (VH_BLIND) to 2.151154074587398 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151154074587398); // Set group 2 bol bias 01 (VH) to 1.4563242224495716 Volts Pacs_BOLC_SET_VH_G2(1.4563242224495716); // Set group 2 bol bias 02 (VL) to -0.14367577755042849 Volts Pacs_BOLC_SET_VL_G2(-0.14367577755042849); // Set group 2 bol bias 03 (VRL) to 0.3881765529411487 Volts Pacs_BOLC_SET_VRL_G2(0.3881765529411487); // Set group 2 bol bias 20 (VH_BLIND) to 2.145937513130471 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.145937513130471); // Set group 3 bol bias 01 (VH) to 1.45972772124239 Volts Pacs_BOLC_SET_VH_G3(1.45972772124239); // Set group 3 bol bias 02 (VL) to -0.14027227875761006 Volts Pacs_BOLC_SET_VL_G3(-0.14027227875761006); // Set group 3 bol bias 03 (VRL) to 0.38988919840997094 Volts Pacs_BOLC_SET_VRL_G3(0.38988919840997094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1442125685158864 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1442125685158864); // Set group 4 bol bias 01 (VH) to 1.4747276174033868 Volts Pacs_BOLC_SET_VH_G4(1.4747276174033868); // Set group 4 bol bias 02 (VL) to -0.12527238259661322 Volts Pacs_BOLC_SET_VL_G4(-0.12527238259661322); // Set group 4 bol bias 03 (VRL) to 0.38624222870786595 Volts Pacs_BOLC_SET_VRL_G4(0.38624222870786595); // Set group 4 bol bias 20 (VH_BLIND) to 2.1423530627314813 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1423530627314813); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3734713392363535 Volts Pacs_BOLC_SET_VRL_G5(0.3734713392363535); // Set group 5 bol bias 20 (VH_BLIND) to 2.1211616404276756 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1211616404276756); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3640870527167945 Volts Pacs_BOLC_SET_VRL_G6(0.3640870527167945); // Set group 6 bol bias 20 (VH_BLIND) to 2.1074512769294307 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1074512769294307); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6005646067625168 Volts Pacs_BOLC_SET_VH_G1(1.6005646067625168); // Set group 1 bol bias 02 (VL) to -0.19943539323748327 Volts Pacs_BOLC_SET_VL_G1(-0.19943539323748327); // Set group 1 bol bias 03 (VRL) to 0.3927137250656313 Volts Pacs_BOLC_SET_VRL_G1(0.3927137250656313); // Set group 1 bol bias 20 (VH_BLIND) to 2.1512536862532445 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1512536862532445); // Set group 2 bol bias 01 (VH) to 1.5835245401299414 Volts Pacs_BOLC_SET_VH_G2(1.5835245401299414); // Set group 2 bol bias 02 (VL) to -0.21647545987005867 Volts Pacs_BOLC_SET_VL_G2(-0.21647545987005867); // Set group 2 bol bias 03 (VRL) to 0.3880497715778095 Volts Pacs_BOLC_SET_VRL_G2(0.3880497715778095); // Set group 2 bol bias 20 (VH_BLIND) to 2.1457903439369534 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1457903439369534); // Set group 3 bol bias 01 (VH) to 1.5867464604266623 Volts Pacs_BOLC_SET_VH_G3(1.5867464604266623); // Set group 3 bol bias 02 (VL) to -0.2132535395733377 Volts Pacs_BOLC_SET_VL_G3(-0.2132535395733377); // Set group 3 bol bias 03 (VRL) to 0.3903025295231384 Volts Pacs_BOLC_SET_VRL_G3(0.3903025295231384); // Set group 3 bol bias 20 (VH_BLIND) to 2.144668449205875 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144668449205875); // Set group 4 bol bias 01 (VH) to 1.6044364991789073 Volts Pacs_BOLC_SET_VH_G4(1.6044364991789073); // Set group 4 bol bias 02 (VL) to -0.19556350082109264 Volts Pacs_BOLC_SET_VL_G4(-0.19556350082109264); // Set group 4 bol bias 03 (VRL) to 0.387662053519384 Volts Pacs_BOLC_SET_VRL_G4(0.387662053519384); // Set group 4 bol bias 20 (VH_BLIND) to 2.1439743820479262 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1439743820479262); // Set group 5 bol bias 01 (VH) to 1.3451907640885556 Volts Pacs_BOLC_SET_VH_G5(1.3451907640885556); // Set group 5 bol bias 02 (VL) to -0.054809235911444244 Volts Pacs_BOLC_SET_VL_G5(-0.054809235911444244); // Set group 5 bol bias 03 (VRL) to 0.40021084689056974 Volts Pacs_BOLC_SET_VRL_G5(0.40021084689056974); // Set group 5 bol bias 20 (VH_BLIND) to 2.1532482013507512 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1532482013507512); // Set group 6 bol bias 01 (VH) to 1.39 Volts Pacs_BOLC_SET_VH_G6(1.39); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.4344512926668127 Volts Pacs_BOLC_SET_VRL_G6(0.4344512926668127); // Set group 6 bol bias 20 (VH_BLIND) to 2.192323231555507 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.192323231555507); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7330644465100378 Volts Pacs_BOLC_SET_VH_G1(1.7330644465100378); // Set group 1 bol bias 02 (VL) to -0.26693555348996223 Volts Pacs_BOLC_SET_VL_G1(-0.26693555348996223); // Set group 1 bol bias 03 (VRL) to 0.3923254235050375 Volts Pacs_BOLC_SET_VRL_G1(0.3923254235050375); // Set group 1 bol bias 20 (VH_BLIND) to 2.1507930978184753 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1507930978184753); // Set group 2 bol bias 01 (VH) to 1.714453661934205 Volts Pacs_BOLC_SET_VH_G2(1.714453661934205); // Set group 2 bol bias 02 (VL) to -0.2855463380657951 Volts Pacs_BOLC_SET_VL_G2(-0.2855463380657951); // Set group 2 bol bias 03 (VRL) to 0.38771628761093724 Volts Pacs_BOLC_SET_VRL_G2(0.38771628761093724); // Set group 2 bol bias 20 (VH_BLIND) to 2.1454032366160996 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1454032366160996); // Set group 3 bol bias 01 (VH) to 1.7283831876482196 Volts Pacs_BOLC_SET_VH_G3(1.7283831876482196); // Set group 3 bol bias 02 (VL) to -0.2716168123517804 Volts Pacs_BOLC_SET_VL_G3(-0.2716168123517804); // Set group 3 bol bias 03 (VRL) to 0.40171045250948384 Volts Pacs_BOLC_SET_VRL_G3(0.40171045250948384); // Set group 3 bol bias 20 (VH_BLIND) to 2.157256007066197 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157256007066197); // Set group 4 bol bias 01 (VH) to 1.7381239240265867 Volts Pacs_BOLC_SET_VH_G4(1.7381239240265867); // Set group 4 bol bias 02 (VL) to -0.26187607597341334 Volts Pacs_BOLC_SET_VL_G4(-0.26187607597341334); // Set group 4 bol bias 03 (VRL) to 0.38896138623469356 Volts Pacs_BOLC_SET_VRL_G4(0.38896138623469356); // Set group 4 bol bias 20 (VH_BLIND) to 2.1454582711839105 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1454582711839105); // Set group 5 bol bias 01 (VH) to 1.4703496551390403 Volts Pacs_BOLC_SET_VH_G5(1.4703496551390403); // Set group 5 bol bias 02 (VL) to -0.12965034486095992 Volts Pacs_BOLC_SET_VL_G5(-0.12965034486095992); // Set group 5 bol bias 03 (VRL) to 0.39904033450461596 Volts Pacs_BOLC_SET_VRL_G5(0.39904033450461596); // Set group 5 bol bias 20 (VH_BLIND) to 2.151844445053932 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.151844445053932); // Set group 6 bol bias 01 (VH) to 1.5181165758982518 Volts Pacs_BOLC_SET_VH_G6(1.5181165758982518); // Set group 6 bol bias 02 (VL) to -0.08188342410174834 Volts Pacs_BOLC_SET_VL_G6(-0.08188342410174834); // Set group 6 bol bias 03 (VRL) to 0.4343226272779045 Volts Pacs_BOLC_SET_VRL_G6(0.4343226272779045); // Set group 6 bol bias 20 (VH_BLIND) to 2.1921697898825356 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1921697898825356); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8730534488812565 Volts Pacs_BOLC_SET_VH_G1(1.8730534488812565); // Set group 1 bol bias 02 (VL) to -0.3269465511187437 Volts Pacs_BOLC_SET_VL_G1(-0.3269465511187437); // Set group 1 bol bias 03 (VRL) to 0.3922166883004623 Volts Pacs_BOLC_SET_VRL_G1(0.3922166883004623); // Set group 1 bol bias 20 (VH_BLIND) to 2.1506641222123926 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1506641222123926); // Set group 2 bol bias 01 (VH) to 1.8512060220322217 Volts Pacs_BOLC_SET_VH_G2(1.8512060220322217); // Set group 2 bol bias 02 (VL) to -0.34879397796777845 Volts Pacs_BOLC_SET_VL_G2(-0.34879397796777845); // Set group 2 bol bias 03 (VRL) to 0.3869592141320811 Volts Pacs_BOLC_SET_VRL_G2(0.3869592141320811); // Set group 2 bol bias 20 (VH_BLIND) to 2.1445244519836626 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1445244519836626); // Set group 3 bol bias 01 (VH) to 1.8654619469621685 Volts Pacs_BOLC_SET_VH_G3(1.8654619469621685); // Set group 3 bol bias 02 (VL) to -0.33453805303783174 Volts Pacs_BOLC_SET_VL_G3(-0.33453805303783174); // Set group 3 bol bias 03 (VRL) to 0.40224166318840543 Volts Pacs_BOLC_SET_VRL_G3(0.40224166318840543); // Set group 3 bol bias 20 (VH_BLIND) to 2.1578437499437477 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1578437499437477); // Set group 4 bol bias 01 (VH) to 1.8790483325189686 Volts Pacs_BOLC_SET_VH_G4(1.8790483325189686); // Set group 4 bol bias 02 (VL) to -0.32095166748103154 Volts Pacs_BOLC_SET_VL_G4(-0.32095166748103154); // Set group 4 bol bias 03 (VRL) to 0.39052544771082365 Volts Pacs_BOLC_SET_VRL_G4(0.39052544771082365); // Set group 4 bol bias 20 (VH_BLIND) to 2.1472446958154223 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1472446958154223); // Set group 5 bol bias 01 (VH) to 1.5346700184984832 Volts Pacs_BOLC_SET_VH_G5(1.5346700184984832); // Set group 5 bol bias 02 (VL) to -0.16532998150151687 Volts Pacs_BOLC_SET_VL_G5(-0.16532998150151687); // Set group 5 bol bias 03 (VRL) to 0.39828926215052507 Volts Pacs_BOLC_SET_VRL_G5(0.39828926215052507); // Set group 5 bol bias 20 (VH_BLIND) to 2.1509436695484125 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1509436695484125); // Set group 6 bol bias 01 (VH) to 1.5825303056022821 Volts Pacs_BOLC_SET_VH_G6(1.5825303056022821); // Set group 6 bol bias 02 (VL) to -0.11746969439771773 Volts Pacs_BOLC_SET_VL_G6(-0.11746969439771773); // Set group 6 bol bias 03 (VRL) to 0.43350337388623417 Volts Pacs_BOLC_SET_VRL_G6(0.43350337388623417); // Set group 6 bol bias 20 (VH_BLIND) to 2.191192803954044 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191192803954044); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.034145377320728 Volts Pacs_BOLC_SET_VH_G1(2.034145377320728); // Set group 1 bol bias 02 (VL) to -0.36585462267927166 Volts Pacs_BOLC_SET_VL_G1(-0.36585462267927166); // Set group 1 bol bias 03 (VRL) to 0.4026842358176688 Volts Pacs_BOLC_SET_VRL_G1(0.4026842358176688); // Set group 1 bol bias 20 (VH_BLIND) to 2.163077213168135 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163077213168135); // Set group 2 bol bias 01 (VH) to 1.9964246373780308 Volts Pacs_BOLC_SET_VH_G2(1.9964246373780308); // Set group 2 bol bias 02 (VL) to -0.40357536262196914 Volts Pacs_BOLC_SET_VL_G2(-0.40357536262196914); // Set group 2 bol bias 03 (VRL) to 0.38543545754038677 Volts Pacs_BOLC_SET_VRL_G2(0.38543545754038677); // Set group 2 bol bias 20 (VH_BLIND) to 2.1427558304354366 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1427558304354366); // Set group 3 bol bias 01 (VH) to 2.0225756539924595 Volts Pacs_BOLC_SET_VH_G3(2.0225756539924595); // Set group 3 bol bias 02 (VL) to -0.37742434600754043 Volts Pacs_BOLC_SET_VL_G3(-0.37742434600754043); // Set group 3 bol bias 03 (VRL) to 0.41362905220735763 Volts Pacs_BOLC_SET_VRL_G3(0.41362905220735763); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704381594190805 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704381594190805); // Set group 4 bol bias 01 (VH) to 2.0286801589025623 Volts Pacs_BOLC_SET_VH_G4(2.0286801589025623); // Set group 4 bol bias 02 (VL) to -0.37131984109743765 Volts Pacs_BOLC_SET_VL_G4(-0.37131984109743765); // Set group 4 bol bias 03 (VRL) to 0.39131683434261844 Volts Pacs_BOLC_SET_VRL_G4(0.39131683434261844); // Set group 4 bol bias 20 (VH_BLIND) to 2.14814867942076 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.14814867942076); // Set group 5 bol bias 01 (VH) to 1.5997463742933684 Volts Pacs_BOLC_SET_VH_G5(1.5997463742933684); // Set group 5 bol bias 02 (VL) to -0.2002536257066316 Volts Pacs_BOLC_SET_VL_G5(-0.2002536257066316); // Set group 5 bol bias 03 (VRL) to 0.3972802806465645 Volts Pacs_BOLC_SET_VRL_G5(0.3972802806465645); // Set group 5 bol bias 20 (VH_BLIND) to 2.1497335299275955 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1497335299275955); // Set group 6 bol bias 01 (VH) to 1.64826517003746 Volts Pacs_BOLC_SET_VH_G6(1.64826517003746); // Set group 6 bol bias 02 (VL) to -0.1517348299625401 Volts Pacs_BOLC_SET_VL_G6(-0.1517348299625401); // Set group 6 bol bias 03 (VRL) to 0.43238698345346915 Volts Pacs_BOLC_SET_VRL_G6(0.43238698345346915); // Set group 6 bol bias 20 (VH_BLIND) to 2.189850849172478 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.189850849172478); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1252730205231707 Volts Pacs_BOLC_SET_VH_G1(2.1252730205231707); // Set group 1 bol bias 02 (VL) to -0.3747269794768295 Volts Pacs_BOLC_SET_VL_G1(-0.3747269794768295); // Set group 1 bol bias 03 (VRL) to 0.4136487083795371 Volts Pacs_BOLC_SET_VRL_G1(0.4136487083795371); // Set group 1 bol bias 20 (VH_BLIND) to 2.176055880953933 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.176055880953933); // Set group 2 bol bias 01 (VH) to 2.0735703522054516 Volts Pacs_BOLC_SET_VH_G2(2.0735703522054516); // Set group 2 bol bias 02 (VL) to -0.4264296477945484 Volts Pacs_BOLC_SET_VL_G2(-0.4264296477945484); // Set group 2 bol bias 03 (VRL) to 0.38501518126647505 Volts Pacs_BOLC_SET_VRL_G2(0.38501518126647505); // Set group 2 bol bias 20 (VH_BLIND) to 2.1422680405518997 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1422680405518997); // Set group 3 bol bias 01 (VH) to 2.1002048058798914 Volts Pacs_BOLC_SET_VH_G3(2.1002048058798914); // Set group 3 bol bias 02 (VL) to -0.3997951941201084 Volts Pacs_BOLC_SET_VL_G3(-0.3997951941201084); // Set group 3 bol bias 03 (VRL) to 0.41374892649754597 Volts Pacs_BOLC_SET_VRL_G3(0.41374892649754597); // Set group 3 bol bias 20 (VH_BLIND) to 2.170570690743195 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170570690743195); // Set group 4 bol bias 01 (VH) to 2.1080881836667413 Volts Pacs_BOLC_SET_VH_G4(2.1080881836667413); // Set group 4 bol bias 02 (VL) to -0.39191181633325867 Volts Pacs_BOLC_SET_VL_G4(-0.39191181633325867); // Set group 4 bol bias 03 (VRL) to 0.39179349399255325 Volts Pacs_BOLC_SET_VRL_G4(0.39179349399255325); // Set group 4 bol bias 20 (VH_BLIND) to 2.1486931849427977 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1486931849427977); // Set group 5 bol bias 01 (VH) to 1.6757782637240437 Volts Pacs_BOLC_SET_VH_G5(1.6757782637240437); // Set group 5 bol bias 02 (VL) to -0.22422173627595626 Volts Pacs_BOLC_SET_VL_G5(-0.22422173627595626); // Set group 5 bol bias 03 (VRL) to 0.40729645571050493 Volts Pacs_BOLC_SET_VRL_G5(0.40729645571050493); // Set group 5 bol bias 20 (VH_BLIND) to 2.1617149101325723 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1617149101325723); // Set group 6 bol bias 01 (VH) to 1.7136503402053438 Volts Pacs_BOLC_SET_VH_G6(1.7136503402053438); // Set group 6 bol bias 02 (VL) to -0.18634965979465615 Volts Pacs_BOLC_SET_VL_G6(-0.18634965979465615); // Set group 6 bol bias 03 (VRL) to 0.43098263818668947 Volts Pacs_BOLC_SET_VRL_G6(0.43098263818668947); // Set group 6 bol bias 20 (VH_BLIND) to 2.1881561132520857 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1881561132520857); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.209416047586087 Volts Pacs_BOLC_SET_VH_G1(2.209416047586087); // Set group 1 bol bias 02 (VL) to -0.3905839524139128 Volts Pacs_BOLC_SET_VL_G1(-0.3905839524139128); // Set group 1 bol bias 03 (VRL) to 0.4134679213904496 Volts Pacs_BOLC_SET_VRL_G1(0.4134679213904496); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758418687268812 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758418687268812); // Set group 2 bol bias 01 (VH) to 2.1541915675147214 Volts Pacs_BOLC_SET_VH_G2(2.1541915675147214); // Set group 2 bol bias 02 (VL) to -0.44580843248527846 Volts Pacs_BOLC_SET_VL_G2(-0.44580843248527846); // Set group 2 bol bias 03 (VRL) to 0.38424319746039115 Volts Pacs_BOLC_SET_VRL_G2(0.38424319746039115); // Set group 2 bol bias 20 (VH_BLIND) to 2.1413720715536493 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1413720715536493); // Set group 3 bol bias 01 (VH) to 2.1813068162319285 Volts Pacs_BOLC_SET_VH_G3(2.1813068162319285); // Set group 3 bol bias 02 (VL) to -0.4186931837680716 Volts Pacs_BOLC_SET_VL_G3(-0.4186931837680716); // Set group 3 bol bias 03 (VRL) to 0.41360319513591143 Volts Pacs_BOLC_SET_VRL_G3(0.41360319513591143); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704095720713417 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704095720713417); // Set group 4 bol bias 01 (VH) to 2.202944386753124 Volts Pacs_BOLC_SET_VH_G4(2.202944386753124); // Set group 4 bol bias 02 (VL) to -0.3970556132468757 Volts Pacs_BOLC_SET_VL_G4(-0.3970556132468757); // Set group 4 bol bias 03 (VRL) to 0.40381007074137704 Volts Pacs_BOLC_SET_VRL_G4(0.40381007074137704); // Set group 4 bol bias 20 (VH_BLIND) to 2.1624292794462514 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1624292794462514); // Set group 5 bol bias 01 (VH) to 1.7436864671540049 Volts Pacs_BOLC_SET_VH_G5(1.7436864671540049); // Set group 5 bol bias 02 (VL) to -0.2563135328459952 Volts Pacs_BOLC_SET_VL_G5(-0.2563135328459952); // Set group 5 bol bias 03 (VRL) to 0.4060804936984878 Volts Pacs_BOLC_SET_VRL_G5(0.4060804936984878); // Set group 5 bol bias 20 (VH_BLIND) to 2.1602616898977316 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1602616898977316); // Set group 6 bol bias 01 (VH) to 1.7834132365202005 Volts Pacs_BOLC_SET_VH_G6(1.7834132365202005); // Set group 6 bol bias 02 (VL) to -0.21658676347979958 Volts Pacs_BOLC_SET_VL_G6(-0.21658676347979958); // Set group 6 bol bias 03 (VRL) to 0.43021242094743417 Volts Pacs_BOLC_SET_VRL_G6(0.43021242094743417); // Set group 6 bol bias 20 (VH_BLIND) to 2.1872266025341247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1872266025341247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.297951276717203 Volts Pacs_BOLC_SET_VH_G1(2.297951276717203); // Set group 1 bol bias 02 (VL) to -0.4020487232827972 Volts Pacs_BOLC_SET_VL_G1(-0.4020487232827972); // Set group 1 bol bias 03 (VRL) to 0.41346783054780994 Volts Pacs_BOLC_SET_VRL_G1(0.41346783054780994); // Set group 1 bol bias 20 (VH_BLIND) to 2.175841761189199 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.175841761189199); // Set group 2 bol bias 01 (VH) to 2.237764444765691 Volts Pacs_BOLC_SET_VH_G2(2.237764444765691); // Set group 2 bol bias 02 (VL) to -0.46223555523430954 Volts Pacs_BOLC_SET_VL_G2(-0.46223555523430954); // Set group 2 bol bias 03 (VRL) to 0.3829355076340157 Volts Pacs_BOLC_SET_VRL_G2(0.3829355076340157); // Set group 2 bol bias 20 (VH_BLIND) to 2.13985443895415 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.13985443895415); // Set group 3 bol bias 01 (VH) to 2.2663898962449944 Volts Pacs_BOLC_SET_VH_G3(2.2663898962449944); // Set group 3 bol bias 02 (VL) to -0.43361010375500575 Volts Pacs_BOLC_SET_VL_G3(-0.43361010375500575); // Set group 3 bol bias 03 (VRL) to 0.4131238530516411 Volts Pacs_BOLC_SET_VRL_G3(0.4131238530516411); // Set group 3 bol bias 20 (VH_BLIND) to 2.1698796071025357 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1698796071025357); // Set group 4 bol bias 01 (VH) to 2.279673221041111 Volts Pacs_BOLC_SET_VH_G4(2.279673221041111); // Set group 4 bol bias 02 (VL) to -0.42032677895888915 Volts Pacs_BOLC_SET_VL_G4(-0.42032677895888915); // Set group 4 bol bias 03 (VRL) to 0.39361613583982535 Volts Pacs_BOLC_SET_VRL_G4(0.39361613583982535); // Set group 4 bol bias 20 (VH_BLIND) to 2.15077544624775 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.15077544624775); // Set group 5 bol bias 01 (VH) to 1.809656711096493 Volts Pacs_BOLC_SET_VH_G5(1.809656711096493); // Set group 5 bol bias 02 (VL) to -0.2903432889035071 Volts Pacs_BOLC_SET_VL_G5(-0.2903432889035071); // Set group 5 bol bias 03 (VRL) to 0.4049518544441218 Volts Pacs_BOLC_SET_VRL_G5(0.4049518544441218); // Set group 5 bol bias 20 (VH_BLIND) to 2.1589129512261658 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1589129512261658); // Set group 6 bol bias 01 (VH) to 1.852468907894238 Volts Pacs_BOLC_SET_VH_G6(1.852468907894238); // Set group 6 bol bias 02 (VL) to -0.247531092105762 Volts Pacs_BOLC_SET_VL_G6(-0.247531092105762); // Set group 6 bol bias 03 (VRL) to 0.4292993417752352 Volts Pacs_BOLC_SET_VRL_G6(0.4292993417752352); // Set group 6 bol bias 20 (VH_BLIND) to 2.1861246581200136 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1861246581200136); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3806926938420414 Volts Pacs_BOLC_SET_VH_G1(2.3806926938420414); // Set group 1 bol bias 02 (VL) to -0.41930730615795847 Volts Pacs_BOLC_SET_VL_G1(-0.41930730615795847); // Set group 1 bol bias 03 (VRL) to 0.4020155079485436 Volts Pacs_BOLC_SET_VRL_G1(0.4020155079485436); // Set group 1 bol bias 20 (VH_BLIND) to 2.162285695776181 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162285695776181); // Set group 2 bol bias 01 (VH) to 2.3371282046100963 Volts Pacs_BOLC_SET_VH_G2(2.3371282046100963); // Set group 2 bol bias 02 (VL) to -0.46287179538990364 Volts Pacs_BOLC_SET_VL_G2(-0.46287179538990364); // Set group 2 bol bias 03 (VRL) to 0.3923402298587034 Volts Pacs_BOLC_SET_VRL_G2(0.3923402298587034); // Set group 2 bol bias 20 (VH_BLIND) to 2.1507712805161225 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1507712805161225); // Set group 3 bol bias 01 (VH) to 2.356604953923699 Volts Pacs_BOLC_SET_VH_G3(2.356604953923699); // Set group 3 bol bias 02 (VL) to -0.44339504607630065 Volts Pacs_BOLC_SET_VL_G3(-0.44339504607630065); // Set group 3 bol bias 03 (VRL) to 0.4124662568673877 Volts Pacs_BOLC_SET_VRL_G3(0.4124662568673877); // Set group 3 bol bias 20 (VH_BLIND) to 2.169152536126319 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169152536126319); // Set group 4 bol bias 01 (VH) to 2.3825039100730487 Volts Pacs_BOLC_SET_VH_G4(2.3825039100730487); // Set group 4 bol bias 02 (VL) to -0.4174960899269509 Volts Pacs_BOLC_SET_VL_G4(-0.4174960899269509); // Set group 4 bol bias 03 (VRL) to 0.40493410269973024 Volts Pacs_BOLC_SET_VRL_G4(0.40493410269973024); // Set group 4 bol bias 20 (VH_BLIND) to 2.1637149679245193 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1637149679245193); // Set group 5 bol bias 01 (VH) to 1.883738472848583 Volts Pacs_BOLC_SET_VH_G5(1.883738472848583); // Set group 5 bol bias 02 (VL) to -0.31626152715141714 Volts Pacs_BOLC_SET_VL_G5(-0.31626152715141714); // Set group 5 bol bias 03 (VRL) to 0.4028494691164935 Volts Pacs_BOLC_SET_VRL_G5(0.4028494691164935); // Set group 5 bol bias 20 (VH_BLIND) to 2.156400882301432 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.156400882301432); // Set group 6 bol bias 01 (VH) to 1.9235912310846244 Volts Pacs_BOLC_SET_VH_G6(1.9235912310846244); // Set group 6 bol bias 02 (VL) to -0.2764087689153759 Volts Pacs_BOLC_SET_VL_G6(-0.2764087689153759); // Set group 6 bol bias 03 (VRL) to 0.4280070912945936 Volts Pacs_BOLC_SET_VRL_G6(0.4280070912945936); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845650655206446 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845650655206446); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6181566702818313 Volts Pacs_BOLC_SET_VH_G1(2.6181566702818313); // Set group 1 bol bias 02 (VL) to -0.38184332971816887 Volts Pacs_BOLC_SET_VL_G1(-0.38184332971816887); // Set group 1 bol bias 03 (VRL) to 0.43545225816479755 Volts Pacs_BOLC_SET_VRL_G1(0.43545225816479755); // Set group 1 bol bias 20 (VH_BLIND) to 2.2018572484354544 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2018572484354544); // Set group 2 bol bias 01 (VH) to 2.5300933623498008 Volts Pacs_BOLC_SET_VH_G2(2.5300933623498008); // Set group 2 bol bias 02 (VL) to -0.469906637650199 Volts Pacs_BOLC_SET_VL_G2(-0.469906637650199); // Set group 2 bol bias 03 (VRL) to 0.3917176926734228 Volts Pacs_BOLC_SET_VRL_G2(0.3917176926734228); // Set group 2 bol bias 20 (VH_BLIND) to 2.1500484890692286 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1500484890692286); // Set group 3 bol bias 01 (VH) to 2.5545115967606167 Volts Pacs_BOLC_SET_VH_G3(2.5545115967606167); // Set group 3 bol bias 02 (VL) to -0.4454884032393832 Volts Pacs_BOLC_SET_VL_G3(-0.4454884032393832); // Set group 3 bol bias 03 (VRL) to 0.41136249367186684 Volts Pacs_BOLC_SET_VRL_G3(0.41136249367186684); // Set group 3 bol bias 20 (VH_BLIND) to 2.1679320914489204 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1679320914489204); // Set group 4 bol bias 01 (VH) to 2.591852678092942 Volts Pacs_BOLC_SET_VH_G4(2.591852678092942); // Set group 4 bol bias 02 (VL) to -0.408147321907058 Volts Pacs_BOLC_SET_VL_G4(-0.408147321907058); // Set group 4 bol bias 03 (VRL) to 0.4158848845694993 Volts Pacs_BOLC_SET_VRL_G4(0.4158848845694993); // Set group 4 bol bias 20 (VH_BLIND) to 2.176235181901646 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176235181901646); // Set group 5 bol bias 01 (VH) to 2.0340896725156363 Volts Pacs_BOLC_SET_VH_G5(2.0340896725156363); // Set group 5 bol bias 02 (VL) to -0.3659103274843634 Volts Pacs_BOLC_SET_VL_G5(-0.3659103274843634); // Set group 5 bol bias 03 (VRL) to 0.3987896988621052 Volts Pacs_BOLC_SET_VRL_G5(0.3987896988621052); // Set group 5 bol bias 20 (VH_BLIND) to 2.1515438563527702 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1515438563527702); // Set group 6 bol bias 01 (VH) to 2.080247845760918 Volts Pacs_BOLC_SET_VH_G6(2.080247845760918); // Set group 6 bol bias 02 (VL) to -0.31975215423908154 Volts Pacs_BOLC_SET_VL_G6(-0.31975215423908154); // Set group 6 bol bias 03 (VRL) to 0.42577779561759777 Volts Pacs_BOLC_SET_VRL_G6(0.42577779561759777); // Set group 6 bol bias 20 (VH_BLIND) to 2.1818744401374954 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1818744401374954); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.9648806825465286 Volts Pacs_BOLC_SET_VH_G1(2.9648806825465286); // Set group 1 bol bias 02 (VL) to -0.3351193174534714 Volts Pacs_BOLC_SET_VL_G1(-0.3351193174534714); // Set group 1 bol bias 03 (VRL) to 0.4345971818834749 Volts Pacs_BOLC_SET_VRL_G1(0.4345971818834749); // Set group 1 bol bias 20 (VH_BLIND) to 2.2008507320864905 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2008507320864905); // Set group 2 bol bias 01 (VH) to 2.8835722707263107 Volts Pacs_BOLC_SET_VH_G2(2.8835722707263107); // Set group 2 bol bias 02 (VL) to -0.4164277292736889 Volts Pacs_BOLC_SET_VL_G2(-0.4164277292736889); // Set group 2 bol bias 03 (VRL) to 0.4147637133976726 Volts Pacs_BOLC_SET_VRL_G2(0.4147637133976726); // Set group 2 bol bias 20 (VH_BLIND) to 2.176763943185141 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176763943185141); // Set group 3 bol bias 01 (VH) to 2.924290179534832 Volts Pacs_BOLC_SET_VH_G3(2.924290179534832); // Set group 3 bol bias 02 (VL) to -0.37570982046516804 Volts Pacs_BOLC_SET_VL_G3(-0.37570982046516804); // Set group 3 bol bias 03 (VRL) to 0.4333518026225201 Volts Pacs_BOLC_SET_VRL_G3(0.4333518026225201); // Set group 3 bol bias 20 (VH_BLIND) to 2.19222958084261 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.19222958084261); // Set group 4 bol bias 01 (VH) to 2.938948180111503 Volts Pacs_BOLC_SET_VH_G4(2.938948180111503); // Set group 4 bol bias 02 (VL) to -0.3610518198884969 Volts Pacs_BOLC_SET_VL_G4(-0.3610518198884969); // Set group 4 bol bias 03 (VRL) to 0.4248831336064878 Volts Pacs_BOLC_SET_VRL_G4(0.4248831336064878); // Set group 4 bol bias 20 (VH_BLIND) to 2.1865155818476714 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1865155818476714); // Set group 5 bol bias 01 (VH) to 2.231303538712061 Volts Pacs_BOLC_SET_VH_G5(2.231303538712061); // Set group 5 bol bias 02 (VL) to -0.36869646128793887 Volts Pacs_BOLC_SET_VL_G5(-0.36869646128793887); // Set group 5 bol bias 03 (VRL) to 0.4261159129370585 Volts Pacs_BOLC_SET_VRL_G5(0.4261159129370585); // Set group 5 bol bias 20 (VH_BLIND) to 2.1842235863263286 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1842235863263286); // Set group 6 bol bias 01 (VH) to 2.2493043049150576 Volts Pacs_BOLC_SET_VH_G6(2.2493043049150576); // Set group 6 bol bias 02 (VL) to -0.3506956950849426 Volts Pacs_BOLC_SET_VL_G6(-0.3506956950849426); // Set group 6 bol bias 03 (VRL) to 0.4237159708307814 Volts Pacs_BOLC_SET_VRL_G6(0.4237159708307814); // Set group 6 bol bias 20 (VH_BLIND) to 2.179385794698645 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.179385794698645); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // // //********************************************************************** // Measurement // PACS photometer central field-of-view // corresponding to 1.42pW on the green and 2.30pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // //********************************************** // Set the PACS chopper at the position -21350 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(-21350); // // //********************************************************************** // Measurement // Temperature of the CS1 at 48.0 K // corresponding to 0.90pW on the blue and 5.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 21200 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(21200); // // //********************************************************************** // Measurement // Temperature of the CS2 at 58.0 K // corresponding to 1.25pW on the blue and 6.90pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // // //********************************************************************** // Measurement // PACS photometer central field-of-view // corresponding to 2.53pW on the blue and 2.30pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.38595447686092044 Volts Pacs_BOLC_SET_VRL_G1(0.38595447686092044); // Set group 1 bol bias 20 (VH_BLIND) to 2.14323766073377 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.14323766073377); // Set group 2 bol bias 01 (VH) to 1.2344804253925323 Volts Pacs_BOLC_SET_VH_G2(1.2344804253925323); // Set group 2 bol bias 02 (VL) to -0.015519574607467744 Volts Pacs_BOLC_SET_VL_G2(-0.015519574607467744); // Set group 2 bol bias 03 (VRL) to 0.3887952159752219 Volts Pacs_BOLC_SET_VRL_G2(0.3887952159752219); // Set group 2 bol bias 20 (VH_BLIND) to 2.146655677517905 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146655677517905); // Set group 3 bol bias 01 (VH) to 1.2373594133510515 Volts Pacs_BOLC_SET_VH_G3(1.2373594133510515); // Set group 3 bol bias 02 (VL) to -0.01264058664894848 Volts Pacs_BOLC_SET_VL_G3(-0.01264058664894848); // Set group 3 bol bias 03 (VRL) to 0.3895684681925507 Volts Pacs_BOLC_SET_VRL_G3(0.3895684681925507); // Set group 3 bol bias 20 (VH_BLIND) to 2.1438588243530847 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1438588243530847); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3785840783874695 Volts Pacs_BOLC_SET_VRL_G4(0.3785840783874695); // Set group 4 bol bias 20 (VH_BLIND) to 2.1336112832841145 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1336112832841145); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4069787801604593 Volts Pacs_BOLC_SET_VRL_G5(0.4069787801604593); // Set group 5 bol bias 20 (VH_BLIND) to 2.161335236817835 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.161335236817835); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.3975388237702142 Volts Pacs_BOLC_SET_VRL_G6(0.3975388237702142); // Set group 6 bol bias 20 (VH_BLIND) to 2.147783429778294 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.147783429778294); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4667162183102813 Volts Pacs_BOLC_SET_VH_G1(1.4667162183102813); // Set group 1 bol bias 02 (VL) to -0.13328378168971888 Volts Pacs_BOLC_SET_VL_G1(-0.13328378168971888); // Set group 1 bol bias 03 (VRL) to 0.39272911736638916 Volts Pacs_BOLC_SET_VRL_G1(0.39272911736638916); // Set group 1 bol bias 20 (VH_BLIND) to 2.151271944232348 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151271944232348); // Set group 2 bol bias 01 (VH) to 1.451779019853682 Volts Pacs_BOLC_SET_VH_G2(1.451779019853682); // Set group 2 bol bias 02 (VL) to -0.14822098014631813 Volts Pacs_BOLC_SET_VL_G2(-0.14822098014631813); // Set group 2 bol bias 03 (VRL) to 0.38843011222228696 Volts Pacs_BOLC_SET_VRL_G2(0.38843011222228696); // Set group 2 bol bias 20 (VH_BLIND) to 2.146231850355425 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.146231850355425); // Set group 3 bol bias 01 (VH) to 1.4546762834706017 Volts Pacs_BOLC_SET_VH_G3(1.4546762834706017); // Set group 3 bol bias 02 (VL) to -0.14532371652939846 Volts Pacs_BOLC_SET_VL_G3(-0.14532371652939846); // Set group 3 bol bias 03 (VRL) to 0.38981991021201623 Volts Pacs_BOLC_SET_VRL_G3(0.38981991021201623); // Set group 3 bol bias 20 (VH_BLIND) to 2.1441361480051575 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1441361480051575); // Set group 4 bol bias 01 (VH) to 1.4698275366001177 Volts Pacs_BOLC_SET_VH_G4(1.4698275366001177); // Set group 4 bol bias 02 (VL) to -0.13017246339988242 Volts Pacs_BOLC_SET_VL_G4(-0.13017246339988242); // Set group 4 bol bias 03 (VRL) to 0.3864007122364753 Volts Pacs_BOLC_SET_VRL_G4(0.3864007122364753); // Set group 4 bol bias 20 (VH_BLIND) to 2.1425340283175576 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1425340283175576); // Set group 5 bol bias 01 (VH) to 1.1496335124630621 Volts Pacs_BOLC_SET_VH_G5(1.1496335124630621); // Set group 5 bol bias 02 (VL) to -0.05036648753693776 Volts Pacs_BOLC_SET_VL_G5(-0.05036648753693776); // Set group 5 bol bias 03 (VRL) to 0.4461257136718766 Volts Pacs_BOLC_SET_VRL_G5(0.4461257136718766); // Set group 5 bol bias 20 (VH_BLIND) to 2.208158207140394 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.208158207140394); // Set group 6 bol bias 01 (VH) to 1.1511962364500339 Volts Pacs_BOLC_SET_VH_G6(1.1511962364500339); // Set group 6 bol bias 02 (VL) to -0.048803763549966156 Volts Pacs_BOLC_SET_VL_G6(-0.048803763549966156); // Set group 6 bol bias 03 (VRL) to 0.43621063055258624 Volts Pacs_BOLC_SET_VRL_G6(0.43621063055258624); // Set group 6 bol bias 20 (VH_BLIND) to 2.1944214649896465 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1944214649896465); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5950693413303119 Volts Pacs_BOLC_SET_VH_G1(1.5950693413303119); // Set group 1 bol bias 02 (VL) to -0.20493065866968818 Volts Pacs_BOLC_SET_VL_G1(-0.20493065866968818); // Set group 1 bol bias 03 (VRL) to 0.3928368259960443 Volts Pacs_BOLC_SET_VRL_G1(0.3928368259960443); // Set group 1 bol bias 20 (VH_BLIND) to 2.151399706106312 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.151399706106312); // Set group 2 bol bias 01 (VH) to 1.5789329321276613 Volts Pacs_BOLC_SET_VH_G2(1.5789329321276613); // Set group 2 bol bias 02 (VL) to -0.22106706787233876 Volts Pacs_BOLC_SET_VL_G2(-0.22106706787233876); // Set group 2 bol bias 03 (VRL) to 0.38833566788035645 Volts Pacs_BOLC_SET_VRL_G2(0.38833566788035645); // Set group 2 bol bias 20 (VH_BLIND) to 2.1461222168310456 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1461222168310456); // Set group 3 bol bias 01 (VH) to 1.5816026056478218 Volts Pacs_BOLC_SET_VH_G3(1.5816026056478218); // Set group 3 bol bias 02 (VL) to -0.2183973943521783 Volts Pacs_BOLC_SET_VL_G3(-0.2183973943521783); // Set group 3 bol bias 03 (VRL) to 0.3902504105074307 Volts Pacs_BOLC_SET_VRL_G3(0.3902504105074307); // Set group 3 bol bias 20 (VH_BLIND) to 2.144610964657584 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144610964657584); // Set group 4 bol bias 01 (VH) to 1.5992929384078782 Volts Pacs_BOLC_SET_VH_G4(1.5992929384078782); // Set group 4 bol bias 02 (VL) to -0.2007070615921217 Volts Pacs_BOLC_SET_VL_G4(-0.2007070615921217); // Set group 4 bol bias 03 (VRL) to 0.38768834369618743 Volts Pacs_BOLC_SET_VRL_G4(0.38768834369618743); // Set group 4 bol bias 20 (VH_BLIND) to 2.1440044049347926 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1440044049347926); // Set group 5 bol bias 01 (VH) to 1.2705558944311914 Volts Pacs_BOLC_SET_VH_G5(1.2705558944311914); // Set group 5 bol bias 02 (VL) to -0.1294441055688085 Volts Pacs_BOLC_SET_VL_G5(-0.1294441055688085); // Set group 5 bol bias 03 (VRL) to 0.4447953841197819 Volts Pacs_BOLC_SET_VRL_G5(0.4447953841197819); // Set group 5 bol bias 20 (VH_BLIND) to 2.2065679073017006 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2065679073017006); // Set group 6 bol bias 01 (VH) to 1.2715954484835785 Volts Pacs_BOLC_SET_VH_G6(1.2715954484835785); // Set group 6 bol bias 02 (VL) to -0.1284045515164213 Volts Pacs_BOLC_SET_VL_G6(-0.1284045515164213); // Set group 6 bol bias 03 (VRL) to 0.43379109580051334 Volts Pacs_BOLC_SET_VRL_G6(0.43379109580051334); // Set group 6 bol bias 20 (VH_BLIND) to 2.191535916452247 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.191535916452247); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.7275942805898081 Volts Pacs_BOLC_SET_VH_G1(1.7275942805898081); // Set group 1 bol bias 02 (VL) to -0.27240571941019187 Volts Pacs_BOLC_SET_VL_G1(-0.27240571941019187); // Set group 1 bol bias 03 (VRL) to 0.3924742651442621 Volts Pacs_BOLC_SET_VRL_G1(0.3924742651442621); // Set group 1 bol bias 20 (VH_BLIND) to 2.150969646797248 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150969646797248); // Set group 2 bol bias 01 (VH) to 1.7098116639341283 Volts Pacs_BOLC_SET_VH_G2(1.7098116639341283); // Set group 2 bol bias 02 (VL) to -0.2901883360658717 Volts Pacs_BOLC_SET_VL_G2(-0.2901883360658717); // Set group 2 bol bias 03 (VRL) to 0.3879542769315073 Volts Pacs_BOLC_SET_VRL_G2(0.3879542769315073); // Set group 2 bol bias 20 (VH_BLIND) to 2.1456794933313743 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1456794933313743); // Set group 3 bol bias 01 (VH) to 1.7232095593655699 Volts Pacs_BOLC_SET_VH_G3(1.7232095593655699); // Set group 3 bol bias 02 (VL) to -0.2767904406344302 Volts Pacs_BOLC_SET_VL_G3(-0.2767904406344302); // Set group 3 bol bias 03 (VRL) to 0.40165100606878396 Volts Pacs_BOLC_SET_VRL_G3(0.40165100606878396); // Set group 3 bol bias 20 (VH_BLIND) to 2.157190232997346 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.157190232997346); // Set group 4 bol bias 01 (VH) to 1.7329816525876758 Volts Pacs_BOLC_SET_VH_G4(1.7329816525876758); // Set group 4 bol bias 02 (VL) to -0.2670183474123242 Volts Pacs_BOLC_SET_VL_G4(-0.2670183474123242); // Set group 4 bol bias 03 (VRL) to 0.38897351980031714 Volts Pacs_BOLC_SET_VRL_G4(0.38897351980031714); // Set group 4 bol bias 20 (VH_BLIND) to 2.145472128921462 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.145472128921462); // Set group 5 bol bias 01 (VH) to 1.396627362417312 Volts Pacs_BOLC_SET_VH_G5(1.396627362417312); // Set group 5 bol bias 02 (VL) to -0.203372637582688 Volts Pacs_BOLC_SET_VL_G5(-0.203372637582688); // Set group 5 bol bias 03 (VRL) to 0.44313690044797827 Volts Pacs_BOLC_SET_VRL_G5(0.44313690044797827); // Set group 5 bol bias 20 (VH_BLIND) to 2.204585287551011 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.204585287551011); // Set group 6 bol bias 01 (VH) to 1.3996511062189962 Volts Pacs_BOLC_SET_VH_G6(1.3996511062189962); // Set group 6 bol bias 02 (VL) to -0.20034889378100387 Volts Pacs_BOLC_SET_VL_G6(-0.20034889378100387); // Set group 6 bol bias 03 (VRL) to 0.4318754462891581 Volts Pacs_BOLC_SET_VRL_G6(0.4318754462891581); // Set group 6 bol bias 20 (VH_BLIND) to 2.1892335439050843 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1892335439050843); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.8676613407916054 Volts Pacs_BOLC_SET_VH_G1(1.8676613407916054); // Set group 1 bol bias 02 (VL) to -0.3323386592083948 Volts Pacs_BOLC_SET_VL_G1(-0.3323386592083948); // Set group 1 bol bias 03 (VRL) to 0.3923587227741554 Volts Pacs_BOLC_SET_VRL_G1(0.3923587227741554); // Set group 1 bol bias 20 (VH_BLIND) to 2.1508325957140952 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1508325957140952); // Set group 2 bol bias 01 (VH) to 1.8465670569990555 Volts Pacs_BOLC_SET_VH_G2(1.8465670569990555); // Set group 2 bol bias 02 (VL) to -0.35343294300094463 Volts Pacs_BOLC_SET_VL_G2(-0.35343294300094463); // Set group 2 bol bias 03 (VRL) to 0.387141142510402 Volts Pacs_BOLC_SET_VRL_G2(0.387141142510402); // Set group 2 bol bias 20 (VH_BLIND) to 2.144735625055897 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.144735625055897); // Set group 3 bol bias 01 (VH) to 1.8603250737405554 Volts Pacs_BOLC_SET_VH_G3(1.8603250737405554); // Set group 3 bol bias 02 (VL) to -0.3396749262594447 Volts Pacs_BOLC_SET_VL_G3(-0.3396749262594447); // Set group 3 bol bias 03 (VRL) to 0.4021826063426856 Volts Pacs_BOLC_SET_VRL_G3(0.4021826063426856); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577784091793144 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577784091793144); // Set group 4 bol bias 01 (VH) to 1.8741419939403863 Volts Pacs_BOLC_SET_VH_G4(1.8741419939403863); // Set group 4 bol bias 02 (VL) to -0.3258580060596139 Volts Pacs_BOLC_SET_VL_G4(-0.3258580060596139); // Set group 4 bol bias 03 (VRL) to 0.39065647780264456 Volts Pacs_BOLC_SET_VRL_G4(0.39065647780264456); // Set group 4 bol bias 20 (VH_BLIND) to 2.1473943646595135 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1473943646595135); // Set group 5 bol bias 01 (VH) to 1.4601021275466064 Volts Pacs_BOLC_SET_VH_G5(1.4601021275466064); // Set group 5 bol bias 02 (VL) to -0.23989787245339347 Volts Pacs_BOLC_SET_VL_G5(-0.23989787245339347); // Set group 5 bol bias 03 (VRL) to 0.4422158972297393 Volts Pacs_BOLC_SET_VRL_G5(0.4422158972297393); // Set group 5 bol bias 20 (VH_BLIND) to 2.2034842638437366 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.2034842638437366); // Set group 6 bol bias 01 (VH) to 1.4634348828715236 Volts Pacs_BOLC_SET_VH_G6(1.4634348828715236); // Set group 6 bol bias 02 (VL) to -0.23656511712847642 Volts Pacs_BOLC_SET_VL_G6(-0.23656511712847642); // Set group 6 bol bias 03 (VRL) to 0.4305103617042648 Volts Pacs_BOLC_SET_VRL_G6(0.4305103617042648); // Set group 6 bol bias 20 (VH_BLIND) to 2.187586164637993 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.187586164637993); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0289667278841597 Volts Pacs_BOLC_SET_VH_G1(2.0289667278841597); // Set group 1 bol bias 02 (VL) to -0.3710332721158404 Volts Pacs_BOLC_SET_VL_G1(-0.3710332721158404); // Set group 1 bol bias 03 (VRL) to 0.4028592462868991 Volts Pacs_BOLC_SET_VRL_G1(0.4028592462868991); // Set group 1 bol bias 20 (VH_BLIND) to 2.1632843595446576 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1632843595446576); // Set group 2 bol bias 01 (VH) to 1.9920309376502383 Volts Pacs_BOLC_SET_VH_G2(1.9920309376502383); // Set group 2 bol bias 02 (VL) to -0.4079690623497616 Volts Pacs_BOLC_SET_VL_G2(-0.4079690623497616); // Set group 2 bol bias 03 (VRL) to 0.385687908071477 Volts Pacs_BOLC_SET_VRL_G2(0.385687908071477); // Set group 2 bol bias 20 (VH_BLIND) to 2.14304883987339 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14304883987339); // Set group 3 bol bias 01 (VH) to 2.01759544206816 Volts Pacs_BOLC_SET_VH_G3(2.01759544206816); // Set group 3 bol bias 02 (VL) to -0.3824045579318402 Volts Pacs_BOLC_SET_VL_G3(-0.3824045579318402); // Set group 3 bol bias 03 (VRL) to 0.4136090202481733 Volts Pacs_BOLC_SET_VRL_G3(0.4136090202481733); // Set group 3 bol bias 20 (VH_BLIND) to 2.1704160122677014 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1704160122677014); // Set group 4 bol bias 01 (VH) to 2.023897485231249 Volts Pacs_BOLC_SET_VH_G4(2.023897485231249); // Set group 4 bol bias 02 (VL) to -0.37610251476875123 Volts Pacs_BOLC_SET_VL_G4(-0.37610251476875123); // Set group 4 bol bias 03 (VRL) to 0.3914117691351826 Volts Pacs_BOLC_SET_VRL_G4(0.3914117691351826); // Set group 4 bol bias 20 (VH_BLIND) to 2.1482571252028864 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1482571252028864); // Set group 5 bol bias 01 (VH) to 1.5134052163163956 Volts Pacs_BOLC_SET_VH_G5(1.5134052163163956); // Set group 5 bol bias 02 (VL) to -0.2865947836836044 Volts Pacs_BOLC_SET_VL_G5(-0.2865947836836044); // Set group 5 bol bias 03 (VRL) to 0.43009652443311003 Volts Pacs_BOLC_SET_VRL_G5(0.43009652443311003); // Set group 5 bol bias 20 (VH_BLIND) to 2.1889886625725254 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1889886625725254); // Set group 6 bol bias 01 (VH) to 1.5291293141365392 Volts Pacs_BOLC_SET_VH_G6(1.5291293141365392); // Set group 6 bol bias 02 (VL) to -0.27087068586346075 Volts Pacs_BOLC_SET_VL_G6(-0.27087068586346075); // Set group 6 bol bias 03 (VRL) to 0.4294139806416023 Volts Pacs_BOLC_SET_VRL_G6(0.4294139806416023); // Set group 6 bol bias 20 (VH_BLIND) to 2.186263010908741 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.186263010908741); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.120198143641786 Volts Pacs_BOLC_SET_VH_G1(2.120198143641786); // Set group 1 bol bias 02 (VL) to -0.3798018563582141 Volts Pacs_BOLC_SET_VL_G1(-0.3798018563582141); // Set group 1 bol bias 03 (VRL) to 0.413781497117605 Volts Pacs_BOLC_SET_VRL_G1(0.413781497117605); // Set group 1 bol bias 20 (VH_BLIND) to 2.1762130740626335 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1762130740626335); // Set group 2 bol bias 01 (VH) to 2.0692519072397184 Volts Pacs_BOLC_SET_VH_G2(2.0692519072397184); // Set group 2 bol bias 02 (VL) to -0.4307480927602818 Volts Pacs_BOLC_SET_VL_G2(-0.4307480927602818); // Set group 2 bol bias 03 (VRL) to 0.3851971610581806 Volts Pacs_BOLC_SET_VRL_G2(0.3851971610581806); // Set group 2 bol bias 20 (VH_BLIND) to 2.1424792524874454 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1424792524874454); // Set group 3 bol bias 01 (VH) to 2.0953683923633597 Volts Pacs_BOLC_SET_VH_G3(2.0953683923633597); // Set group 3 bol bias 02 (VL) to -0.40463160763664013 Volts Pacs_BOLC_SET_VL_G3(-0.40463160763664013); // Set group 3 bol bias 03 (VRL) to 0.4137231664182032 Volts Pacs_BOLC_SET_VRL_G3(0.4137231664182032); // Set group 3 bol bias 20 (VH_BLIND) to 2.1705422108493044 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1705422108493044); // Set group 4 bol bias 01 (VH) to 2.103405710635205 Volts Pacs_BOLC_SET_VH_G4(2.103405710635205); // Set group 4 bol bias 02 (VL) to -0.39659428936479524 Volts Pacs_BOLC_SET_VL_G4(-0.39659428936479524); // Set group 4 bol bias 03 (VRL) to 0.391818633341226 Volts Pacs_BOLC_SET_VRL_G4(0.391818633341226); // Set group 4 bol bias 20 (VH_BLIND) to 2.1487219031052516 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1487219031052516); // Set group 5 bol bias 01 (VH) to 1.5788283910749448 Volts Pacs_BOLC_SET_VH_G5(1.5788283910749448); // Set group 5 bol bias 02 (VL) to -0.3211716089250552 Volts Pacs_BOLC_SET_VL_G5(-0.3211716089250552); // Set group 5 bol bias 03 (VRL) to 0.4289629359876455 Volts Pacs_BOLC_SET_VRL_G5(0.4289629359876455); // Set group 5 bol bias 20 (VH_BLIND) to 2.1876315290176143 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1876315290176143); // Set group 6 bol bias 01 (VH) to 1.5951809874920229 Volts Pacs_BOLC_SET_VH_G6(1.5951809874920229); // Set group 6 bol bias 02 (VL) to -0.30481901250797716 Volts Pacs_BOLC_SET_VL_G6(-0.30481901250797716); // Set group 6 bol bias 03 (VRL) to 0.4281733490721523 Volts Pacs_BOLC_SET_VRL_G6(0.4281733490721523); // Set group 6 bol bias 20 (VH_BLIND) to 2.184765721996255 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.184765721996255); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.20443545253382 Volts Pacs_BOLC_SET_VH_G1(2.20443545253382); // Set group 1 bol bias 02 (VL) to -0.39556454746618036 Volts Pacs_BOLC_SET_VL_G1(-0.39556454746618036); // Set group 1 bol bias 03 (VRL) to 0.41350652234011925 Volts Pacs_BOLC_SET_VRL_G1(0.41350652234011925); // Set group 1 bol bias 20 (VH_BLIND) to 2.1758875637625814 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1758875637625814); // Set group 2 bol bias 01 (VH) to 2.1501551780279815 Volts Pacs_BOLC_SET_VH_G2(2.1501551780279815); // Set group 2 bol bias 02 (VL) to -0.44984482197201847 Volts Pacs_BOLC_SET_VL_G2(-0.44984482197201847); // Set group 2 bol bias 03 (VRL) to 0.3845569970722936 Volts Pacs_BOLC_SET_VRL_G2(0.3845569970722936); // Set group 2 bol bias 20 (VH_BLIND) to 2.141736265020926 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141736265020926); // Set group 3 bol bias 01 (VH) to 2.1766120048121236 Volts Pacs_BOLC_SET_VH_G3(2.1766120048121236); // Set group 3 bol bias 02 (VL) to -0.42338799518787656 Volts Pacs_BOLC_SET_VL_G3(-0.42338799518787656); // Set group 3 bol bias 03 (VRL) to 0.4135536287313443 Volts Pacs_BOLC_SET_VRL_G3(0.4135536287313443); // Set group 3 bol bias 20 (VH_BLIND) to 2.170354771762948 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.170354771762948); // Set group 4 bol bias 01 (VH) to 2.1983249375538283 Volts Pacs_BOLC_SET_VH_G4(2.1983249375538283); // Set group 4 bol bias 02 (VL) to -0.40167506244617174 Volts Pacs_BOLC_SET_VL_G4(-0.40167506244617174); // Set group 4 bol bias 03 (VRL) to 0.40369622266518995 Volts Pacs_BOLC_SET_VRL_G4(0.40369622266518995); // Set group 4 bol bias 20 (VH_BLIND) to 2.1622990520613876 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1622990520613876); // Set group 5 bol bias 01 (VH) to 1.646164041300917 Volts Pacs_BOLC_SET_VH_G5(1.646164041300917); // Set group 5 bol bias 02 (VL) to -0.35383595869908285 Volts Pacs_BOLC_SET_VL_G5(-0.35383595869908285); // Set group 5 bol bias 03 (VRL) to 0.42769455060298694 Volts Pacs_BOLC_SET_VRL_G5(0.42769455060298694); // Set group 5 bol bias 20 (VH_BLIND) to 2.186113155384117 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.186113155384117); // Set group 6 bol bias 01 (VH) to 1.66375611253317 Volts Pacs_BOLC_SET_VH_G6(1.66375611253317); // Set group 6 bol bias 02 (VL) to -0.3362438874668301 Volts Pacs_BOLC_SET_VL_G6(-0.3362438874668301); // Set group 6 bol bias 03 (VRL) to 0.42698080716071063 Volts Pacs_BOLC_SET_VRL_G6(0.42698080716071063); // Set group 6 bol bias 20 (VH_BLIND) to 2.183326423045683 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.183326423045683); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.293087782674973 Volts Pacs_BOLC_SET_VH_G1(2.293087782674973); // Set group 1 bol bias 02 (VL) to -0.4069122173250272 Volts Pacs_BOLC_SET_VL_G1(-0.4069122173250272); // Set group 1 bol bias 03 (VRL) to 0.4133539579182495 Volts Pacs_BOLC_SET_VRL_G1(0.4133539579182495); // Set group 1 bol bias 20 (VH_BLIND) to 2.1757069611650715 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1757069611650715); // Set group 2 bol bias 01 (VH) to 2.2339317590222536 Volts Pacs_BOLC_SET_VH_G2(2.2339317590222536); // Set group 2 bol bias 02 (VL) to -0.46606824097774663 Volts Pacs_BOLC_SET_VL_G2(-0.46606824097774663); // Set group 2 bol bias 03 (VRL) to 0.3831763579446064 Volts Pacs_BOLC_SET_VRL_G2(0.3831763579446064); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401339489669264 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401339489669264); // Set group 3 bol bias 01 (VH) to 2.261825459303065 Volts Pacs_BOLC_SET_VH_G3(2.261825459303065); // Set group 3 bol bias 02 (VL) to -0.4381745406969354 Volts Pacs_BOLC_SET_VL_G3(-0.4381745406969354); // Set group 3 bol bias 03 (VRL) to 0.41300268391153927 Volts Pacs_BOLC_SET_VRL_G3(0.41300268391153927); // Set group 3 bol bias 20 (VH_BLIND) to 2.16974563880509 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.16974563880509); // Set group 4 bol bias 01 (VH) to 2.275375186726804 Volts Pacs_BOLC_SET_VH_G4(2.275375186726804); // Set group 4 bol bias 02 (VL) to -0.4246248132731959 Volts Pacs_BOLC_SET_VL_G4(-0.4246248132731959); // Set group 4 bol bias 03 (VRL) to 0.3936211435137845 Volts Pacs_BOLC_SET_VRL_G4(0.3936211435137845); // Set group 4 bol bias 20 (VH_BLIND) to 2.150781167640029 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150781167640029); // Set group 5 bol bias 01 (VH) to 1.7150330107912974 Volts Pacs_BOLC_SET_VH_G5(1.7150330107912974); // Set group 5 bol bias 02 (VL) to -0.3849669892087026 Volts Pacs_BOLC_SET_VL_G5(-0.3849669892087026); // Set group 5 bol bias 03 (VRL) to 0.4262539713331918 Volts Pacs_BOLC_SET_VRL_G5(0.4262539713331918); // Set group 5 bol bias 20 (VH_BLIND) to 2.184388827888219 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.184388827888219); // Set group 6 bol bias 01 (VH) to 1.7344239048768655 Volts Pacs_BOLC_SET_VH_G6(1.7344239048768655); // Set group 6 bol bias 02 (VL) to -0.3655760951231346 Volts Pacs_BOLC_SET_VL_G6(-0.3655760951231346); // Set group 6 bol bias 03 (VRL) to 0.4259440956195557 Volts Pacs_BOLC_SET_VRL_G6(0.4259440956195557); // Set group 6 bol bias 20 (VH_BLIND) to 2.182075159918788 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.182075159918788); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.376161239903615 Volts Pacs_BOLC_SET_VH_G1(2.376161239903615); // Set group 1 bol bias 02 (VL) to -0.4238387600963847 Volts Pacs_BOLC_SET_VL_G1(-0.4238387600963847); // Set group 1 bol bias 03 (VRL) to 0.4019350271917251 Volts Pacs_BOLC_SET_VRL_G1(0.4019350271917251); // Set group 1 bol bias 20 (VH_BLIND) to 2.162190437860791 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162190437860791); // Set group 2 bol bias 01 (VH) to 2.33331637679076 Volts Pacs_BOLC_SET_VH_G2(2.33331637679076); // Set group 2 bol bias 02 (VL) to -0.46668362320923984 Volts Pacs_BOLC_SET_VL_G2(-0.46668362320923984); // Set group 2 bol bias 03 (VRL) to 0.39246594035712123 Volts Pacs_BOLC_SET_VRL_G2(0.39246594035712123); // Set group 2 bol bias 20 (VH_BLIND) to 2.150917238378006 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.150917238378006); // Set group 3 bol bias 01 (VH) to 2.352282128290632 Volts Pacs_BOLC_SET_VH_G3(2.352282128290632); // Set group 3 bol bias 02 (VL) to -0.44771787170936794 Volts Pacs_BOLC_SET_VL_G3(-0.44771787170936794); // Set group 3 bol bias 03 (VRL) to 0.4123793468402218 Volts Pacs_BOLC_SET_VRL_G3(0.4123793468402218); // Set group 3 bol bias 20 (VH_BLIND) to 2.1690564417803797 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1690564417803797); // Set group 4 bol bias 01 (VH) to 2.3672177039101623 Volts Pacs_BOLC_SET_VH_G4(2.3672177039101623); // Set group 4 bol bias 02 (VL) to -0.4327822960898373 Volts Pacs_BOLC_SET_VL_G4(-0.4327822960898373); // Set group 4 bol bias 03 (VRL) to 0.3937206235453262 Volts Pacs_BOLC_SET_VRL_G4(0.3937206235453262); // Set group 4 bol bias 20 (VH_BLIND) to 2.1508948265305405 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1508948265305405); // Set group 5 bol bias 01 (VH) to 1.7869405382956105 Volts Pacs_BOLC_SET_VH_G5(1.7869405382956105); // Set group 5 bol bias 02 (VL) to -0.4130594617043897 Volts Pacs_BOLC_SET_VL_G5(-0.4130594617043897); // Set group 5 bol bias 03 (VRL) to 0.42444963237426925 Volts Pacs_BOLC_SET_VRL_G5(0.42444963237426925); // Set group 5 bol bias 20 (VH_BLIND) to 2.182229358657508 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182229358657508); // Set group 6 bol bias 01 (VH) to 1.8079220843886952 Volts Pacs_BOLC_SET_VH_G6(1.8079220843886952); // Set group 6 bol bias 02 (VL) to -0.3920779156113049 Volts Pacs_BOLC_SET_VL_G6(-0.3920779156113049); // Set group 6 bol bias 03 (VRL) to 0.4246642692362136 Volts Pacs_BOLC_SET_VRL_G6(0.4246642692362136); // Set group 6 bol bias 20 (VH_BLIND) to 2.180530418999196 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.180530418999196); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.6143871530191385 Volts Pacs_BOLC_SET_VH_G1(2.6143871530191385); // Set group 1 bol bias 02 (VL) to -0.3856128469808617 Volts Pacs_BOLC_SET_VL_G1(-0.3856128469808617); // Set group 1 bol bias 03 (VRL) to 0.4353971787636171 Volts Pacs_BOLC_SET_VRL_G1(0.4353971787636171); // Set group 1 bol bias 20 (VH_BLIND) to 2.2017924120765193 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.2017924120765193); // Set group 2 bol bias 01 (VH) to 2.5268162959111504 Volts Pacs_BOLC_SET_VH_G2(2.5268162959111504); // Set group 2 bol bias 02 (VL) to -0.4731837040888497 Volts Pacs_BOLC_SET_VL_G2(-0.4731837040888497); // Set group 2 bol bias 03 (VRL) to 0.39176377375178884 Volts Pacs_BOLC_SET_VRL_G2(0.39176377375178884); // Set group 2 bol bias 20 (VH_BLIND) to 2.1501019903272867 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1501019903272867); // Set group 3 bol bias 01 (VH) to 2.5508652949203547 Volts Pacs_BOLC_SET_VH_G3(2.5508652949203547); // Set group 3 bol bias 02 (VL) to -0.44913470507964515 Volts Pacs_BOLC_SET_VL_G3(-0.44913470507964515); // Set group 3 bol bias 03 (VRL) to 0.41129613196665515 Volts Pacs_BOLC_SET_VRL_G3(0.41129613196665515); // Set group 3 bol bias 20 (VH_BLIND) to 2.1678587117184813 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1678587117184813); // Set group 4 bol bias 01 (VH) to 2.5882911597682976 Volts Pacs_BOLC_SET_VH_G4(2.5882911597682976); // Set group 4 bol bias 02 (VL) to -0.41170884023170246 Volts Pacs_BOLC_SET_VL_G4(-0.41170884023170246); // Set group 4 bol bias 03 (VRL) to 0.4157696828076755 Volts Pacs_BOLC_SET_VRL_G4(0.4157696828076755); // Set group 4 bol bias 20 (VH_BLIND) to 2.176103521606246 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176103521606246); // Set group 5 bol bias 01 (VH) to 1.943787827895409 Volts Pacs_BOLC_SET_VH_G5(1.943787827895409); // Set group 5 bol bias 02 (VL) to -0.456212172104591 Volts Pacs_BOLC_SET_VL_G5(-0.456212172104591); // Set group 5 bol bias 03 (VRL) to 0.4197436307675042 Volts Pacs_BOLC_SET_VRL_G5(0.4197436307675042); // Set group 5 bol bias 20 (VH_BLIND) to 2.1765985179562617 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1765985179562617); // Set group 6 bol bias 01 (VH) to 1.9668712183445327 Volts Pacs_BOLC_SET_VH_G6(1.9668712183445327); // Set group 6 bol bias 02 (VL) to -0.4331287816554672 Volts Pacs_BOLC_SET_VL_G6(-0.4331287816554672); // Set group 6 bol bias 03 (VRL) to 0.4215254429444202 Volts Pacs_BOLC_SET_VRL_G6(0.4215254429444202); // Set group 6 bol bias 20 (VH_BLIND) to 2.176741648076014 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176741648076014); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.962573816354465 Volts Pacs_BOLC_SET_VH_G1(2.962573816354465); // Set group 1 bol bias 02 (VL) to -0.33742618364553495 Volts Pacs_BOLC_SET_VL_G1(-0.33742618364553495); // Set group 1 bol bias 03 (VRL) to 0.43473343120463254 Volts Pacs_BOLC_SET_VRL_G1(0.43473343120463254); // Set group 1 bol bias 20 (VH_BLIND) to 2.201011107670087 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.201011107670087); // Set group 2 bol bias 01 (VH) to 2.881227415881421 Volts Pacs_BOLC_SET_VH_G2(2.881227415881421); // Set group 2 bol bias 02 (VL) to -0.41877258411857887 Volts Pacs_BOLC_SET_VL_G2(-0.41877258411857887); // Set group 2 bol bias 03 (VRL) to 0.41474570655318654 Volts Pacs_BOLC_SET_VRL_G2(0.41474570655318654); // Set group 2 bol bias 20 (VH_BLIND) to 2.176743089640317 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.176743089640317); // Set group 3 bol bias 01 (VH) to 2.9218070654441264 Volts Pacs_BOLC_SET_VH_G3(2.9218070654441264); // Set group 3 bol bias 02 (VL) to -0.3781929345558735 Volts Pacs_BOLC_SET_VL_G3(-0.3781929345558735); // Set group 3 bol bias 03 (VRL) to 0.43330579495861793 Volts Pacs_BOLC_SET_VRL_G3(0.43330579495861793); // Set group 3 bol bias 20 (VH_BLIND) to 2.192178779777237 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.192178779777237); // Set group 4 bol bias 01 (VH) to 2.9366128349680927 Volts Pacs_BOLC_SET_VH_G4(2.9366128349680927); // Set group 4 bol bias 02 (VL) to -0.36338716503190727 Volts Pacs_BOLC_SET_VL_G4(-0.36338716503190727); // Set group 4 bol bias 03 (VRL) to 0.4248666807785261 Volts Pacs_BOLC_SET_VRL_G4(0.4248666807785261); // Set group 4 bol bias 20 (VH_BLIND) to 2.1864967908026665 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1864967908026665); // Set group 5 bol bias 01 (VH) to 2.128392507736531 Volts Pacs_BOLC_SET_VH_G5(2.128392507736531); // Set group 5 bol bias 02 (VL) to -0.47160749226346943 Volts Pacs_BOLC_SET_VL_G5(-0.47160749226346943); // Set group 5 bol bias 03 (VRL) to 0.4241232938294539 Volts Pacs_BOLC_SET_VRL_G5(0.4241232938294539); // Set group 5 bol bias 20 (VH_BLIND) to 2.1818388218172275 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1818388218172275); // Set group 6 bol bias 01 (VH) to 2.1480917942872066 Volts Pacs_BOLC_SET_VH_G6(2.1480917942872066); // Set group 6 bol bias 02 (VL) to -0.45190820571279333 Volts Pacs_BOLC_SET_VL_G6(-0.45190820571279333); // Set group 6 bol bias 03 (VRL) to 0.42139379769185026 Volts Pacs_BOLC_SET_VRL_G6(0.42139379769185026); // Set group 6 bol bias 20 (VH_BLIND) to 2.176582736379955 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.176582736379955); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************** // Epilogue : Set the safe biases //******************************** PHOT_set_bias_volt(endBiasTable,1); PHOT_set_bias_volt(endBiasTable,2); PHOT_set_bias_volt(endBiasTable,3); PHOT_set_bias_volt(endBiasTable,4); PHOT_set_bias_volt(endBiasTable,5); PHOT_set_bias_volt(endBiasTable,6); // // sync the bus sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Open_Launch_Lock { /* No variables to call PacsEng_Open_Launch_Lock */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Open_Launch_Lock */ }{ // 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(PACS_Open_Launch_Lock())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Open_Launch_Lock(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : IST level // // Purpose : EMC preparation in DDCS mode // // Author : Koryo Okumura / Thomas Mueller // // CUS script : procedure Phot_prepareEMC_DDCS // // Argument : None // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + CSs are cold // // Description : // // Dependencies : None // // Comments : // // Version : Mon Jun 18 2007 // procedure Phot_prepareEMC_DDCS { }{ string biasFile = "BOLObias_ILT_dark_high"; // Bias table file containing the initial values // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //************************** // Sequence mode : Sb_Sref //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sb_Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb_Sref"); //# P 09 01 00 00 int operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper to CS1 //********************************************** Pacs_DMC_MOVE_CHOP_ABS(-21350); // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Spectrometer FoV Scan on the cryo cover // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 11-Mar-2008 Converted into PV script by PR // obs PacsCal_Spec_Fov_Scan { /* Needed variables to call PacsCal_Spec_FoV_Scan */ int grat_pos = 535000; // Grating position (grating is fixed) string filter_pos = "POS A" in ["POS A","POS B"]; int chop_start_pos = -23500; // Chopper start position int nb_steps_up = 310; // P#3 number of steps up int step_up = 150; // P#5 step_up: relative move up int nb_up_dn = 1; // P#1 number of up-down seqs. int nb_ramps = 2; // P#2 number of ramps on step int nb_rdouts_ramp = 64; // Ramp length used in computation of OBCP duration only int nb_samp_subramp_blu = 64; // Red Subramp length (directly connected to ramp_fit_alg) int nb_samp_subramp_red = 64; // Blue Subramp length int ramp_fit_alg = 0 in [0,1]; // Ramp fit algorithm [0=LstSq;1=mean value] /* POINTING PARAMETERS */ int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC /* End of needed variables for PacsEng_Spec_FoV_Scan */ }{ // Fixed Parameters int nb_steps_dn = -nb_steps_up; // P#4 number of steps down int step_dn = -step_up; // P#6 relative move down int grat_time = 15000; // Grating time int grat_def_time = 15000; // Grating default time int chop_def = 650; // Chopper default position int detector = 1; // Detector to SYNCH on int grat_def = 500000; // Grating default int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression // bool verbose = true; // // int chop_limit_dn = ilookup("SPEC_MEC_Limits","Nominal","chop_min"); int chop_limit_up = ilookup("SPEC_MEC_Limits","Nominal","chop_max"); int chop_max_pos = chop_start_pos + nb_steps_up * step_up; if(chop_start_pos < chop_limit_dn) { error("ERROR! chop_start_pos " + chop_start_pos + " is beyond the max allowed negative chopper throw " + chop_limit_dn); } if(chop_max_pos > chop_limit_up) { error("ERROR! chop_max_pos " + chop_max_pos + " is beyond the max allowed positive chopper throw " + chop_limit_up); } // // 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)); int tslewmin = 0; // 3. Final hold // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // 4. Duration of "stable" pointing int tp = imax(1,duration(PACS_Spec_Fov_Scan(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp))); if(verbose) { debug_print("Duration of PacsSpecSlewCal_Flex" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); debug_print("ts: " + ts); // }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Fov_Scan(nb_samp_subramp_blu,nb_samp_subramp_red,ramp_fit_alg,filter_pos,nb_up_dn,nb_ramps,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,grat_pos,chop_start_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,chop_def,nb_rdouts_ramp); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsRangeSpecSed.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Missionphase : Operations // // Purpose : // // CUS author : DAC // Script file : PacsRangeSpecSed.txt // // Input arguments // type name description // bool sedRED perform RED SED, i.e. from 75 to 205 microns // bool sedBLU perform BLU SED, i.e. from 55 to 75 microns // Return values // Type Description // {string,double,double,double,double,double} [] // {"SED",blue,red,dummy,dummy,dunmmy}] // // Description : Creates RED or BLU "range" variable for the SED case // // Preconditions : // // Comments : This version assumes sedRED and sedBLU to be mutually // exclusive, i.e. either one or the other, not both // // History : 0.1 21-Jun-2005 DAC // 1.0 15-sep-2005 Modified for "OBS" version of CUS // 1.1 11-may-2006 Element {3} of range tuple is now int (the // repetition count) // 1.2 7-jun-2006 Introduce sedRED and sedBLU arguments to // generate one or the other range // 1.3 22-jun-2006 Use new ranges (with lineWidth) // 2.0 12-apr-2007 Changes for SCR-3050. Input argument // is now selected sed mode. Add "order"=6 for short // wavelengths at order 2. // 3.0 25-apr-2007 Defined returned range similar to rangeSPOT {string,double,double,int,double,double,double,string,string,double}[] procedure PacsRangeSpecSed { string orderSel = "sed2" in ["sed2","sed3","sed4"]; }{ // Return variable {string,double,double,int,double,double,double,string,string,double}[] range = [{"SED",0.0,0.0,0,0.0,0.0,0.0,"","",0.0}]; // Create ranges defined by ORDER= 4, 5, and 6 (see CAL-U SPEC_BAND_params) if(orderSel == "sed2") { string key = "4"; } if(orderSel == "sed3") { key = "5"; } if(orderSel == "sed4") { key = "6"; } int loop0 = 0; double bluWave = dlookup("SPEC_BAND_params",key,"BLU"); double redWave = dlookup("SPEC_BAND_params",key,"RED"); range[loop0] = {orderSel,0.0,0.0,0,0.0,0.0,0.0,"","",0.0}; range[loop0]{1} = bluWave; range[loop0]{2} = redWave; // That's it... return range; } // SpirePOF5Observing_PV // // $Id: SpirePOF5Observing.txt,v 1.8 2007/04/20 12:29:27 kking Exp $ // // This is the procedure to calculate // instrument observing parameters for the Scan Map observing mode // // Note: // This procedure assumes that 2 seconds are required at the start of the scan to allow // setting of the BB and STEP. // It also assumes that 2 seconds are required at the end of the scan to // reset the STEP parameter // // 13/04/07: SCR3010 - changed default obsMode // 17/07/08: DAC. Accept patt as input to override CAL-U value // {double,double,int,int,int,int} procedure SpirePOF5Observing_PV { string obsMode = "POF5_S_N"; int nRepeats = 1; // requested number of map repeats double mapWidth = 0.0; // requested map width (arcmins) double mapHeight = 0.0; // requested map height (arcmin) double patt = 0.0; // scan pattern rotation }{ SpireMsg(2," Observing mode POF5 Observing Parameters "); SpireMsg(2," $Id: SpirePOF5Observing.txt,v 1.8 2007/04/20 12:29:27 kking Exp $"); // // fetch operating parameters double flashTime = double(ilookup("SpireParms.txt",obsMode,"FlashTime")); // Optimum time between flashes double calTime = double(ilookup("SpireParms.txt",obsMode,"CalTime")); // Minimum time between gyro calibrations string ib = slookup("OpsParms.txt",obsMode,"Boresight"); // instrument boresight // No longer obtained from ObsParams.txt // double patt = dlookup("OpsParms.txt",obsMode,"Patt"); // direction of nod double d2 = dlookup("OpsParms.txt",obsMode,"D2"); // line separation double hLoss = dlookup("OpsParms.txt",obsMode,"HLoss"); // map height loss double lLoss = dlookup("OpsParms.txt",obsMode,"LLoss"); // map length loss double scanRate = dlookup("OpsParms.txt",obsMode,"ScanRate"); // line scan rate bool initFlash = blookup("SpireParms.txt",obsMode,"InitFlash"); // initial flash flag bool endFlash = blookup("SpireParms.txt",obsMode,"EndFlash"); // final flash flag // // ***************************************** // Display input parameters // ***************************************** SpireMsg(3," POF5 Observing Input values:"); SpireMsg(3," ..nRepeats: " + nRepeats); SpireMsg(3," ..mapWidth: " + mapWidth); SpireMsg(3," ..mapHeight: " + mapHeight); SpireMsg(3," POF5 Fixed values:"); SpireMsg(3," ..ib: " + ib); SpireMsg(3," ..patt: " + patt); SpireMsg(3," ..d2: " + d2); SpireMsg(3," ..hLoss: " + hLoss); SpireMsg(3," ..lLoss: " + lLoss); SpireMsg(3," ..scanRate: " + scanRate); SpireMsg(3," ..flashTime: " + flashTime); SpireMsg(3," ..calTime: " + calTime); SpireMsg(3," ..initFlash: " + initFlash); SpireMsg(3," ..endFlash: " + endFlash); // // calculate observing parameters SpireMsg(2," Calculated Parameters:"); // // number of lines in a map int nLines = iceil((mapHeight * 60.0 - hLoss) / d2) + 1; SpireMsg(3," Required number of scan lines in map: " + nLines); // // observing scanLength double scanLength = mapWidth * 60.0 + lLoss; // // integration time per line (covering user requested length) double lineOsit = scanLength / scanRate; SpireMsg(3," Integration time per scan line: " + lineOsit); // // increase scan length to allow time to start the scan int tStart = 2; int tEnd = 2; scanLength = scanLength + double(tStart + tEnd) * scanRate; SpireMsg(3," Required scan length: " + scanLength); // // time per line double lineTime = scanLength / scanRate; // // total observing time int d = duration(SpireBbScanLine(iceil(lineTime),0)); double totalTime = double(nRepeats) * double(nLines) * double(d); SpireMsg(3," Total observing time: " + totalTime); // // number of lines per Gyro calibration // Note: this only takes into account on source observing time, not movement between lines, // which is assumed to be a small fraction of the observing time, and so the value obtained is approximate int nCals = ifloor(totalTime / calTime); // SpireMsg(3," Number of Gyro Calibrations: " + nCals); int nCal = iceil(totalTime / lineTime); // default is no gyro calibrations during observation if(nCals > 0) { nCal = iceil(double(nLines) * double(nRepeats) / double(nCals + 1)); } if(nLines % nCal == 0) { nCal = nCal + 1; } // SpireMsg(3," Number of Gyro Calibrations(adjusted): " + nCals); // SpireMsg(3," Number of nod lines per Gyro calibration: " + nCal); // // number of lines per PCAL calibration // Note: this only takes into account on source observing time, not movement between lines, // which is assumed to be a small fraction of the observing time, and so the value obtained is approximate int nFlashes = ifloor(totalTime / flashTime); SpireMsg(3," Number of Flashes: " + nFlashes); int nFlash = iceil(totalTime / lineTime); // default is no flashes during observation if(nFlashes > 0) { nFlash = iceil(double(nLines) * double(nRepeats) / double(nFlashes + 1)); } if(nLines % nFlash == 0) { nFlash = nFlash + 1; } SpireMsg(3," Number of Flashes(adjusted): " + nFlashes); SpireMsg(3," Number of nod lines per PCAL calibration: " + nFlash); return {lineOsit * double(nLines),scanLength,nRepeats,nLines,nCal,nFlash}; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Fil_Testseq { /* No variables to call PacsEng_Spec_Fil_Testseq */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Fil_Testseq */ }{ // 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(PACS_Spec_Fil_Testseq())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Fil_Testseq(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Gra_SFT_Warm { /* No variables to call PacsEng_Spec_Gra_SFT_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_SFT_Warm */ }{ // 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(PACS_Spec_Gra_SFT_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_SFT_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filename : Pacs_Spec_detector_imt509 // // Purpose : Ge:Ga detector bias scan // // Author : Helmut Dannerbauer &Roland Vavrek // CUS script : HD // CVS file : // // Arguments : - Bias_d blue parameters from 1 to 8 // - Bias_d red parameters from 1 to 8 // // // Description : Loop over 8 different bias values while chopper stairs on CS2. Each bias setting // is followed by a 120 sec measurement. // // Dependencies : - PACS_Spec_Heat_Setup // - PACS_Chopper_mov_abs_fm_bb // - SPEC_Gra_move_abs_raw // - SPEC_spu_reset // - SPEC_cre_setup // - SPEC_spu_setup // // // Preconditions : - PACS is switched on // - Setup spectroscopy // - Mechanics and CS controllers are SWON and ENABLED (e.g. SetupSpectroscopyEQMIMT) // - CS2 temperature has been staibilized already // // Comments : Blue heater heaters are kept on constant temperature. // // Version : 2.1 // // History : 1.0 HD. IST update. // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 8-Apr-2008 HF changed default biases for in-flight // procedure Pacs_Spec_detector_imt509 { double bias_d_blue1 = 0.08; //Blue bias #1 double bias_d_blue2 = 0.11; //Blue bias #2 double bias_d_blue3 = 0.14; //Blue bias #3 double bias_d_blue4 = 0.17; //Blue bias #4 double bias_d_blue5 = 0.2; //Blue bias #5 double bias_d_blue6 = 0.23; //Blue bias #6 double bias_d_blue7 = 0.26; //Blue bias #7 double bias_d_blue8 = 0.29; //Blue bias #8 double bias_d_red1 = 0.02; //Red bias #1 double bias_d_red2 = 0.03; //Red bias #2 double bias_d_red3 = 0.04; //Red bias #3 double bias_d_red4 = 0.05; //Red bias #4 double bias_d_red5 = 0.06; //Red bias #5 double bias_d_red6 = 0.07; //Red bias #6 double bias_d_red7 = 0.08; //Red bias #7 double bias_d_red8 = 0.09; //Red bias #8 }{ // // 1 Parameter definitions // // 1.1 Mechanics // // chopper in zero position int chop_def_zero = 0; // chopper on CS2 int chop_CS2_pos = 21200; // grating on a key wavelength int grat_key_lambda = 535000; // // 1.2 Ge:Ga detectors // // Add values to the bias lists double[] bias_d_blue_list = [bias_d_blue1,bias_d_blue2,bias_d_blue3,bias_d_blue4,bias_d_blue5,bias_d_blue6,bias_d_blue7,bias_d_blue8]; double[] bias_d_red_list = [bias_d_red1,bias_d_red2,bias_d_red3,bias_d_red4,bias_d_red5,bias_d_red6,bias_d_red7,bias_d_red8]; // Red ramp length int ramp_len_red = 128; // Blue ramp length int ramp_len_blu = 128; // BIAS_R for red spectro (0-1V) double bias_r_red = 0.01; // BIAS_R for blue spectro (0-1V) double bias_r_blu = 0.01; // BIAS_D nominal for red spectro (0-1V) double bias_d_red = 0.069; // BIAS_D nominal for blue spectro (0-1V) double bias_d_blu = 0.168; // Capacitor red (0=100fF,8=300fF,4=1pf,12=3pF) int capa_red = 0; // Capacitor blue (0=100fF,8=300fF,4=1pf,12=3pF) int capa_blu = 0; // // 1.3 SPU // // Compression mode blue channel : Nominal int comp_mode_blu = 16; // Compression mode red channel : Nominal int comp_mode_red = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_blu = 32; // Nb of red samples per sub-ramp int nb_samp_subramp_red = 32; // Nb of raw channels transmitted by SPUS int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUL int nb_raw_spu_red = 3; // Glitch detection; 0=on; 1=off int glitch_det = 1; // Ramp fit algorithm [0=LstSq;1=mean value] int ramp_fit_alg = 1; // Start SPU or not [true,false] bool startSPU = true; // // 2 Prepare to start the test // // Position chopper on CS2 PACS_Chopper_mov_abs_fm_bb(chop_CS2_pos); // Move grating to a key wavelength SPEC_Gra_move_abs_raw(grat_key_lambda); delay(40); int n = 0; // // 3 Bias loop start // while(n < length(bias_d_blue_list)) { // BIAS_D for red spectro (0-1V) bias_d_red = bias_d_red_list[n]; // BIAS_D for blue spectro (0-1V) bias_d_blu = bias_d_blue_list[n]; // Setup CREs SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup SPU SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); //observing time 120 seconds delay(120); // Stop SPU, rewrite bias_d values SPEC_spu_reset(); n = n + 1; } // // 4 Reset the detectors with nominal settings // // Position chopper on zero position PACS_Chopper_mov_abs_fm_bb(chop_def_zero); //CRE default // Red ramp length ramp_len_red = 64; // Blue ramp length ramp_len_blu = 64; // BIAS_R for red spectro (0-1V) bias_r_red = 0.01; // BIAS_R for blue spectro (0-1V) bias_r_blu = 0.01; // BIAS_D nominal for red spectro (0-1V) bias_d_red = 0.03; // BIAS_D nominal for blue spectro (0-1V) bias_d_blu = 0.08; // Capacitor red (0=100fF,8=300fF,4=1pf,12=3pF) capa_red = 0; // Capacitor blue (0=100fF,8=300fF,4=1pf,12=3pF) capa_blu = 0; // Setup CREs in nominal configuration SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,12,12); // Default Grating Position SPEC_Gra_move_abs_raw(496000); delay(40); } // CVS comments : $Id: SortProc.txt,v 1.2 2007/04/25 15:14:05 dcesarsk Exp $ // Purpose : Sort (from smallest to largest) an input "double" array // Returns array of sorted indices (and not the sorted array). This feature // allows sorting sets of data, f.i. a tuple [wavelength,range,flux]. The // sorted index array (sorted = SortProc(wavelength)) can be used to sort // the tuple: [wavelength[sort], range[sort], flux[sort]] // // TCL author : N/A // TCL file : N/A // CUS author : DAC // Script file : SortProc.txt // // Input arguments // type name Description // double inArray Any double array to be sorted from smallest to largest // // Return values // Type Name Description // int sorted The indexes to sort inArray (inArray[sort] is sorted) // // Description :"Bubble" sort algorithm. Returns array of "sorted" indices. // The algorithm finds and places the largest element at the end of the // input array and proceeds to do the same with the [size-1] remaining elements, // until all elements are moved to the (shrinking) last place. // As an example: the default inArray: // double[] inArray = [0.0, 3.0, 2.0, 4.0, -1.0] // will return: // sorted = [4,0,2,1,3] // // Dependencies : // // Preconditions : // // Comments : Wikipedia C code: // // void bubbleSort(int *array, int length) // { // int i, j; // int dblSwap; // for(i = length - 1; i > 0; i--) // for(j = 0; j < i; j++) // if(array[j] > array[j+1]) /* compare neighboring elements */ // { // dblSwap = array[j]; /* swap array[j] and array[j+1] */ // array[j] = array[j+1]; // array[j+1] = dblSwap; // } // } // // History : 0.1 2-may-2005 DAC // 1.0 26-aug-2005 DAC Introduced "verbose" int[] procedure SortProc { bool verbose = false; // Print debugging info double[] inArray = [0.0]; // Input array }{ double dblSwap = 0.0; int intSwap = 0; int sizeArray = length(inArray); int[] sorted = [0]; // Initialize sorted array for(int aux = 0 .. sizeArray - 1) { sorted[aux] = aux; } // Sort if more than one element if(sizeArray > 1) { // CUS loops do not have negative increment (loop increasing and compute // decreasing index) for(int loop = 0 .. sizeArray - 1) { int i = sizeArray - 1 - loop; for(int j = 0 .. i - 1) { if(inArray[j] > inArray[j + 1]) { // swap inArray[j] and inArray[j+1] dblSwap = inArray[j]; inArray[j] = inArray[j + 1]; inArray[j + 1] = dblSwap; intSwap = sorted[j]; sorted[j] = sorted[j + 1]; sorted[j + 1] = intSwap; } } } } if(verbose) { debug_print("Sorted indices: " + sorted); } return sorted; } // Missionphase : // // Purpose : Compute execution time of DMC #12: // Grating Line Scan with Two position chopping // // TCL author : N/A Pseudo code by HF // TCL file : N/A // CUS author : DAC // Script file : DMC_12_grat_line_scan_with_2_chop.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Similar to 4.2.1 but with only two chopping positions. // It is meant to allow for faster execution once only two // chopping positions are used on bright targets. // Of the 11 Parameters: // # of "up-down" sequences (P#1); // 2 chopper positions (P#4, P#6); // # of readouts per chopper position (P#5); // # of cycles per grating position (P#3); // size of relative grating move up (P#10); // size of relative grating move down (P#11); // # of cycles on the internal calibration sources (P#7); // position of BB1 (P#8); // position of BB2 (P#9); // # of grating steps (P#2) // only those involved in time estimation are used here. // // Dependencies : // // Preconditions : None. // // Comments : No TC are generated; only times are computed // // History : 0.1 14-apr-2005 DAC // 0.2 23-mar-2007 chopper WAIT=1 is a good readout // int[] procedure DMC_12_grat_line_scan { int nb_up_down = 1; // Seq P#1 : Nb of sequences: up down up ... int nb_grat_steps = 1; // Seq P#2 : Nb of grating steps (up/down scans) int nb_ramps_plateau = 1; // Seq P#5 : Nb of ramps per chopper position int nb_CS1_CS2 = 1; // Seq P#7 Nb of cycles on CS, per grating position int nb_cycles_grat_pos = 1; // Seq P#3 : Nb of cycles per grating position }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // WAIT 1 ; have a defined start duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop measurement for(int up_down = 1 .. nb_up_down) { //LOOP P#2 ; grating loop up for(int up = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // MOVE_GRATING_RELATIVE P#10 ; increment grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_1 = 1 .. nb_cycles_grat_pos) { // WAIT 1 ; sync. for chopper duree_SRC = duree_SRC + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 3 ; first chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#4 is the SRC position... duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper // *Assume* P#5 is the REF position... duree_REF = duree_REF + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 5 ; next chopper pos. // WAIT P#5 ; take P#5 ramps // *Assume* P#6 is the REF position... duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_1 = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 65 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 129 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan up done } // LOOP P#2 ; grating loop down for(int down = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // MOVE_GRATING_RELATIVE P#11 ; decrement grating position // LOOP P#3 ; chop readout cycle for(int chop_cycle_2 = 1 .. nb_cycles_grat_pos) { // WAIT 1 ; sync. for chopper duree_SRC = duree_SRC + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#4 ; chopper to P#4 // LABEL 19 ; first chopper pos. // WAIT P#5 ; take P#5 ramps duree_SRC = duree_SRC + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_REF = duree_REF + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to P#6 // LABEL 21 ; next chopper pos. // WAIT P#5 ; take P#5 ramps duree_REF = duree_REF + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; chop readout cycle done } // LOOP P#7 ; calibration loop for(int cal_loop_2 = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chop to BB1 // LABEL 81 ; BB1 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // WAIT 1 ; sync. for chopper duree_CAL = duree_CAL + 1; duree_num = duree_num + 1; // MOVE_CHOPPER_ABSOLUTE P#9 ; chop to BB2 // LABEL 145 ; BB2 // WAIT P#5 ; take P#5 ramps duree_CAL = duree_CAL + nb_ramps_plateau; duree_num = duree_num + nb_ramps_plateau; // END_LOOP ; calibration done } // END_LOOP ; grating scan down done } // END_LOOP ; main loop done } // WAIT 1 ; complete last plateau duree_OVR = duree_OVR + 1; duree_num = duree_num + 1; // LABEL 0 ; reset LABEL to 0 // END_SEQUENCE // duration, in ramps : 2 + P#1 * 2 * P#2 * {1 + (P#3 + P#7) * (1 + P#5)} int duree = 2 + nb_up_down * 2 * nb_grat_steps * (1 + (nb_cycles_grat_pos + nb_CS1_CS2) * 2 * (1 + nb_ramps_plateau)); debug_print("Formula duration DMC: " + duree + " [ramps]"); debug_print("Computed duration DMC: " + duree_num + " [ramps]"); // Time spent int duree_TCs = time() - time_start; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : SPU data rate check (spectroscopy) // // Author : Roland Vavrek // CUS script : RV // CVS file : // // Arguments : No interactive parameters // // // // Description : Four junks of test blocks are executed, each contains 2x120 sec measurement, // the first is configured with sub-slope fitting the second uses sub-means for 2 // chopper positions // // // Dependencies : - SPEC_heater // - Chop_mov_abs // - SPEC_Gra_move_abs_raw // - SPEC_SPU_reset // - SPEC_CRE_setup // - SPEC_SPU_setup // // // Preconditions : - PACS is switched on // - Setup spectroscopy (e.g. SPEC_orbit_prologue_eqm_imt block has been executed) // - Mechanics and CS controllers are SWON and ENABLED (e.g. SetupSpectroscopyEQMIMT) // - CS2 temperature is raising but not yet stabilized // // Comments : Blue heater2 is switched on // // Version : 2.0 // // History : 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // 1.5 09-Apr-2007 RV: Reduced duration (60 sec delay, only 1 loop on chop zero pos), capa_blu = 0, bias_d_blu = 0.198 // 1.4 05-Apr-2007 RV: Extended for 2 chopper positions (CS2 and chopper zero) and FM/ILT constants applied // 1.3 10-Apr-2006 HF: adapted to one blue heater only // 1.2 27-Apr-2005 Creation by RV, Nominal SPU setup, SPU reset at the end // 1.1 22-Apr-2005 Creation by RV, 4 junks organized in a loop // 1.0 17-Apr-2005 Creation by RV // // obs PacsEng_Spec_spu_data_rate { /* Needed variables to call PacsEng_Spec_spu_data_rate */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_spu_data_rate */ }{ // 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(Pacs_Spec_spu_data_rate())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_spu_data_rate(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : CONF_phot_fltw.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the PHOT filter wheel servo loop // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 4-jul-2006 DAC // 1.0 11-Jun-2007 PR New scheme due to new format of configuration command // (DMC UM v.4.3) // : procedure CONF_phot_fltw { }{ string calUname = "CONFFWPHOT"; // FWPHOT CALIBRATION TABLE string calUrow = "FMILT"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWPHOT_CONF_PAR(parlist,check_sum); } // File : PHOT_switchoff_groups.cus // Missionphase : PACS FM Test // // Purpose : switch-off groups // // Author : T. Mueller // // Arguments : none // // // Description : Once we are satisfied with the tests, it is time to switch // off the instrument by setting all biases to zero and switch // off of the groups // // Comments : Coded based on PhFPU UM, draft 5, chapter 4.2.6 // // Version : 1.7 // History : 1.0 / 02-Jul-2004 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 11-aug-2006 TM: updated for PhFPU UM, draft 5, chapter 4.2.6 // 1.3 08-nov-2006 TM: groups off in the end // 1.4 08-nov-2006 TM: autonomy function disabled // 1.4.1 14-nov-2006 Autonomy function temporarily removed // 1.5 17-nov-2006 AF back again // 1.6 05-mar-2007 time delay of 2min between protections off and // group switch off // 1.7 09-apr-2007 new AFs procedure PHOT_switchoff_groups { }{ //*********************************** // disable AFs //*********************************** // disable AF 12 (to check for the protection biases) Pacs_DPU_SET_FUNCT("EVENT_BOL_BIAS","DISABLE"); // disable AF 15 (to check for the VSS currents of groups and BUs) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_RO","DISABLE"); // autonomy function 17 "generate_event_pwr" checks the // HK entries: PC_PWR_ANA_P_#, PC_PWR_ANA_N_# and PC_PWR_DIG_#, // with # = [1,2,3,4,5,6,7] Pacs_DPU_SET_FUNCT("EVENT_BOL_V_PWR","DISABLE"); delay(2); // // //*********************************** //* //* Switch-off procedure for BOLC //* Part 1: switching off the detectors //* //* creation date : 15/09/05 //* //* //*********************************** // Switch off of all biases in the correct order // // Set all groups bol bias 02 (VL) to 0.00000000 Volt (0) //# P 00 02 0000 int operand = 0x20000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 05 (VCH) to 0.00000000 Volt (0) //# P 00 05 0000 operand = 0x50000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 01 (VH) to 0.00000000 Volt (0) //# P 00 01 0000 operand = 0x10000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 03 (VRL) to 0.00000000 Volt (0) //# P 00 03 0000 operand = 0x30000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 04 (VINJ) to 0.00000000 Volt (0) //# P 00 04 0000 operand = 0x40000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 06 (VDL) to 0.00000000 Volt (0) //# P 00 06 0000 operand = 0x60000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 08 (VGL) to 0.00000000 Volt (0) //# P 00 08 0000 operand = 0x80000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 07 (VSS) to 0.00000000 Volt (0) //# P 00 07 0000 operand = 0x70000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 0.00000000 Volt (0) //# P 00 10 0000 operand = 0x100000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 15 (VGG) to 0.00000000 Volt (0) //# P 00 0F 0000 operand = 0xf0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 0.00000000 Volt (0) //# P 00 09 0000 operand = 0x90000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 0.00000000 Volt (0) //# P 00 0A 0000 operand = 0xa0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 11 (VDECX-H) to 0.00000000 Volt (0) //# P 00 0B 0000 operand = 0xb0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 13 (VSMS-H) to 0.00000000 Volt (0) //# P 00 0D 0000 operand = 0xd0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 14 (VSMS-L) to 0.00000000 Volt (0) //# P 00 0E 0000 operand = 0xe0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 18 (VDL-BU) to 0.00000000 Volt (0) //# P 00 12 0000 operand = 0x120000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 0.00000000 Volt (0) //# P 00 14 0000 operand = 0x140000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 19 (VGL-BU) to 0.00000000 Volt (0) //# P 00 13 0000 operand = 0x130000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 17 (VSS-BU) to 0.00000000 Volt (0) //# P 00 11 0000 operand = 0x110000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(5); // // // Wait 100 ms //# S 01 000064 // // Switch-off of the protection biases // // Set all groups bol bias 21 (VDD-PROT-CL) OFF (0) //# P 00 15 0000 operand = 0x150000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 22 (VDD-PROT-BU) OFF (0) //# P 00 16 0000 operand = 0x160000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 23 (GND-BU) OFF (0) //# P 00 17 0000 operand = 0x170000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(5); // //*********************************** //* //* Switch-off procedure for BOLC //* Part 2: switching off BOLC groups //* //* creation date : 15/09/05 //* //* //*********************************** // Switch off all groups // Set group on/off 00 hexa //# P 0A 00 00 00 operand = 0xa000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //----------------- // End of Procedure //----------------- } // Mission phase : Commissioning Phase // // Purpose : PCD req.1.1.1 for the Commissioning Phase // Check the bias/signal relationship using telescope background // // Author : Koryo Okumura // // CUS script : procedure Phot_lowGainBias2_direct // // Argument : // int measure_time = 300; // measure time in seconds // string startBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : // + Set the blue filter 100um // + Set the biases group by group // + Set the chopper on the optical center // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set the blue filter 70um // + Loop over 12 sets of 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group // + At the end, the biases are set following a given bias table // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_CommPh_lowGainBias2(1, "LOW") // New version // // Version : Fri Jul 04 20:42:17 CEST 2008 // procedure Phot_lowGainBias2_direct { int measure_time = 300; // measure time in seconds string startBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values }{ // //******************************* // Select Filter A (100 microns) //******************************* // PHOT_fltw_move("POS A"); // //************************************************* // Set the biases and start SPU, then set the gain //************************************************* // PHOT_set_biases(startBiasTable,"DIRECT","LOW"); // //********************************************** // Set the PACS chopper at the position 664 //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(664); // // //********************************************************************** // Measurement // Fluxes 3.03pW on the green and 4.24pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3326204781717645 Volts Pacs_BOLC_SET_VRL_G1(0.3326204781717645); // Set group 1 bol bias 20 (VH_BLIND) to 2.083696785169174 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.083696785169174); // Set group 2 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G2(1.24); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.3451084849519235 Volts Pacs_BOLC_SET_VRL_G2(0.3451084849519235); // Set group 2 bol bias 20 (VH_BLIND) to 2.096916986932991 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.096916986932991); // Set group 3 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G3(1.24); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.34202618896678166 Volts Pacs_BOLC_SET_VRL_G3(0.34202618896678166); // Set group 3 bol bias 20 (VH_BLIND) to 2.0924644878909016 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0924644878909016); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.32960164545203896 Volts Pacs_BOLC_SET_VRL_G4(0.32960164545203896); // Set group 4 bol bias 20 (VH_BLIND) to 2.080938017873756 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.080938017873756); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.35685598835089916 Volts Pacs_BOLC_SET_VRL_G5(0.35685598835089916); // Set group 5 bol bias 20 (VH_BLIND) to 2.1013252749533495 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1013252749533495); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.34827016903071195 Volts Pacs_BOLC_SET_VRL_G6(0.34827016903071195); // Set group 6 bol bias 20 (VH_BLIND) to 2.0906645120184524 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0906645120184524); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5308558286143665 Volts Pacs_BOLC_SET_VH_G1(1.5308558286143665); // Set group 1 bol bias 02 (VL) to -0.06914417138563347 Volts Pacs_BOLC_SET_VL_G1(-0.06914417138563347); // Set group 1 bol bias 03 (VRL) to 0.3926130487129541 Volts Pacs_BOLC_SET_VRL_G1(0.3926130487129541); // Set group 1 bol bias 20 (VH_BLIND) to 2.1511342667878597 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1511342667878597); // Set group 2 bol bias 01 (VH) to 1.5054862989732616 Volts Pacs_BOLC_SET_VH_G2(1.5054862989732616); // Set group 2 bol bias 02 (VL) to -0.0945137010267384 Volts Pacs_BOLC_SET_VL_G2(-0.0945137010267384); // Set group 2 bol bias 03 (VRL) to 0.38618638539249817 Volts Pacs_BOLC_SET_VRL_G2(0.38618638539249817); // Set group 2 bol bias 20 (VH_BLIND) to 2.143627413976328 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.143627413976328); // Set group 3 bol bias 01 (VH) to 1.513042434172956 Volts Pacs_BOLC_SET_VH_G3(1.513042434172956); // Set group 3 bol bias 02 (VL) to -0.08695756582704411 Volts Pacs_BOLC_SET_VL_G3(-0.08695756582704411); // Set group 3 bol bias 03 (VRL) to 0.38978335519256396 Volts Pacs_BOLC_SET_VRL_G3(0.38978335519256396); // Set group 3 bol bias 20 (VH_BLIND) to 2.144095830174545 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144095830174545); // Set group 4 bol bias 01 (VH) to 1.5281594929875082 Volts Pacs_BOLC_SET_VH_G4(1.5281594929875082); // Set group 4 bol bias 02 (VL) to -0.07184050701249181 Volts Pacs_BOLC_SET_VL_G4(-0.07184050701249181); // Set group 4 bol bias 03 (VRL) to 0.38592657928156704 Volts Pacs_BOLC_SET_VRL_G4(0.38592657928156704); // Set group 4 bol bias 20 (VH_BLIND) to 2.141992642948214 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.141992642948214); // Set group 5 bol bias 01 (VH) to 1.182574586651844 Volts Pacs_BOLC_SET_VH_G5(1.182574586651844); // Set group 5 bol bias 02 (VL) to -0.01742541334815602 Volts Pacs_BOLC_SET_VL_G5(-0.01742541334815602); // Set group 5 bol bias 03 (VRL) to 0.4236538693654987 Volts Pacs_BOLC_SET_VRL_G5(0.4236538693654987); // Set group 5 bol bias 20 (VH_BLIND) to 2.181277067799937 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.181277067799937); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.42110918641784717 Volts Pacs_BOLC_SET_VRL_G6(0.42110918641784717); // Set group 6 bol bias 20 (VH_BLIND) to 2.1762391742755924 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1762391742755924); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6594892906502094 Volts Pacs_BOLC_SET_VH_G1(1.6594892906502094); // Set group 1 bol bias 02 (VL) to -0.1405107093497907 Volts Pacs_BOLC_SET_VL_G1(-0.1405107093497907); // Set group 1 bol bias 03 (VRL) to 0.3917606704884038 Volts Pacs_BOLC_SET_VRL_G1(0.3917606704884038); // Set group 1 bol bias 20 (VH_BLIND) to 2.150123228625228 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150123228625228); // Set group 2 bol bias 01 (VH) to 1.6335911838047528 Volts Pacs_BOLC_SET_VH_G2(1.6335911838047528); // Set group 2 bol bias 02 (VL) to -0.16640881619524728 Volts Pacs_BOLC_SET_VL_G2(-0.16640881619524728); // Set group 2 bol bias 03 (VRL) to 0.3857333939634705 Volts Pacs_BOLC_SET_VRL_G2(0.3857333939634705); // Set group 2 bol bias 20 (VH_BLIND) to 2.143101633964305 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.143101633964305); // Set group 3 bol bias 01 (VH) to 1.6416241428293152 Volts Pacs_BOLC_SET_VH_G3(1.6416241428293152); // Set group 3 bol bias 02 (VL) to -0.15837585717068492 Volts Pacs_BOLC_SET_VL_G3(-0.15837585717068492); // Set group 3 bol bias 03 (VRL) to 0.39049968926841494 Volts Pacs_BOLC_SET_VRL_G3(0.39049968926841494); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448859067210706 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1448859067210706); // Set group 4 bol bias 01 (VH) to 1.6582526409235996 Volts Pacs_BOLC_SET_VH_G4(1.6582526409235996); // Set group 4 bol bias 02 (VL) to -0.14174735907640035 Volts Pacs_BOLC_SET_VL_G4(-0.14174735907640035); // Set group 4 bol bias 03 (VRL) to 0.38676201425895873 Volts Pacs_BOLC_SET_VRL_G4(0.38676201425895873); // Set group 4 bol bias 20 (VH_BLIND) to 2.142946592283102 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.142946592283102); // Set group 5 bol bias 01 (VH) to 1.3051237073642374 Volts Pacs_BOLC_SET_VH_G5(1.3051237073642374); // Set group 5 bol bias 02 (VL) to -0.09487629263576247 Volts Pacs_BOLC_SET_VL_G5(-0.09487629263576247); // Set group 5 bol bias 03 (VRL) to 0.42258627721165687 Volts Pacs_BOLC_SET_VRL_G5(0.42258627721165687); // Set group 5 bol bias 20 (VH_BLIND) to 2.1799995692716956 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1799995692716956); // Set group 6 bol bias 01 (VH) to 1.3296396366669403 Volts Pacs_BOLC_SET_VH_G6(1.3296396366669403); // Set group 6 bol bias 02 (VL) to -0.07036036333305953 Volts Pacs_BOLC_SET_VL_G6(-0.07036036333305953); // Set group 6 bol bias 03 (VRL) to 0.43567153207160403 Volts Pacs_BOLC_SET_VRL_G6(0.43567153207160403); // Set group 6 bol bias 20 (VH_BLIND) to 2.1937784997485115 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1937784997485115); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.793070681021138 Volts Pacs_BOLC_SET_VH_G1(1.793070681021138); // Set group 1 bol bias 02 (VL) to -0.2069293189788619 Volts Pacs_BOLC_SET_VL_G1(-0.2069293189788619); // Set group 1 bol bias 03 (VRL) to 0.3923248248050296 Volts Pacs_BOLC_SET_VRL_G1(0.3923248248050296); // Set group 1 bol bias 20 (VH_BLIND) to 2.150792387671768 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150792387671768); // Set group 2 bol bias 01 (VH) to 1.7645184869728006 Volts Pacs_BOLC_SET_VH_G2(1.7645184869728006); // Set group 2 bol bias 02 (VL) to -0.23548151302719933 Volts Pacs_BOLC_SET_VL_G2(-0.23548151302719933); // Set group 2 bol bias 03 (VRL) to 0.3852928933342721 Volts Pacs_BOLC_SET_VRL_G2(0.3852928933342721); // Set group 2 bol bias 20 (VH_BLIND) to 2.14259036340508 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14259036340508); // Set group 3 bol bias 01 (VH) to 1.7726539738165386 Volts Pacs_BOLC_SET_VH_G3(1.7726539738165386); // Set group 3 bol bias 02 (VL) to -0.22734602618346156 Volts Pacs_BOLC_SET_VL_G3(-0.22734602618346156); // Set group 3 bol bias 03 (VRL) to 0.3907613242029496 Volts Pacs_BOLC_SET_VRL_G3(0.3907613242029496); // Set group 3 bol bias 20 (VH_BLIND) to 2.145174478738013 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.145174478738013); // Set group 4 bol bias 01 (VH) to 1.791651947287071 Volts Pacs_BOLC_SET_VH_G4(1.791651947287071); // Set group 4 bol bias 02 (VL) to -0.2083480527129291 Volts Pacs_BOLC_SET_VL_G4(-0.2083480527129291); // Set group 4 bol bias 03 (VRL) to 0.3874603984200736 Volts Pacs_BOLC_SET_VRL_G4(0.3874603984200736); // Set group 4 bol bias 20 (VH_BLIND) to 2.143744097823567 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.143744097823567); // Set group 5 bol bias 01 (VH) to 1.4201148979959355 Volts Pacs_BOLC_SET_VH_G5(1.4201148979959355); // Set group 5 bol bias 02 (VL) to -0.17988510200406455 Volts Pacs_BOLC_SET_VL_G5(-0.17988510200406455); // Set group 5 bol bias 03 (VRL) to 0.4100187602625653 Volts Pacs_BOLC_SET_VRL_G5(0.4100187602625653); // Set group 5 bol bias 20 (VH_BLIND) to 2.1649688780465945 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1649688780465945); // Set group 6 bol bias 01 (VH) to 1.4567456981427345 Volts Pacs_BOLC_SET_VH_G6(1.4567456981427345); // Set group 6 bol bias 02 (VL) to -0.14325430185726565 Volts Pacs_BOLC_SET_VL_G6(-0.14325430185726565); // Set group 6 bol bias 03 (VRL) to 0.4336065698933277 Volts Pacs_BOLC_SET_VRL_G6(0.4336065698933277); // Set group 6 bol bias 20 (VH_BLIND) to 2.1913158660327205 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1913158660327205); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9437221467173063 Volts Pacs_BOLC_SET_VH_G1(1.9437221467173063); // Set group 1 bol bias 02 (VL) to -0.25627785328269387 Volts Pacs_BOLC_SET_VL_G1(-0.25627785328269387); // Set group 1 bol bias 03 (VRL) to 0.40340952218905873 Volts Pacs_BOLC_SET_VRL_G1(0.40340952218905873); // Set group 1 bol bias 20 (VH_BLIND) to 2.1639356815621955 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1639356815621955); // Set group 2 bol bias 01 (VH) to 1.9002040998447727 Volts Pacs_BOLC_SET_VH_G2(1.9002040998447727); // Set group 2 bol bias 02 (VL) to -0.2997959001552275 Volts Pacs_BOLC_SET_VL_G2(-0.2997959001552275); // Set group 2 bol bias 03 (VRL) to 0.38398050136354855 Volts Pacs_BOLC_SET_VRL_G2(0.38398050136354855); // Set group 2 bol bias 20 (VH_BLIND) to 2.141067192895841 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141067192895841); // Set group 3 bol bias 01 (VH) to 1.9199744284995528 Volts Pacs_BOLC_SET_VH_G3(1.9199744284995528); // Set group 3 bol bias 02 (VL) to -0.28002557150044743 Volts Pacs_BOLC_SET_VL_G3(-0.28002557150044743); // Set group 3 bol bias 03 (VRL) to 0.4019815318341527 Volts Pacs_BOLC_SET_VRL_G3(0.4019815318341527); // Set group 3 bol bias 20 (VH_BLIND) to 2.1575559375560394 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1575559375560394); // Set group 4 bol bias 01 (VH) to 1.9323382898895396 Volts Pacs_BOLC_SET_VH_G4(1.9323382898895396); // Set group 4 bol bias 02 (VL) to -0.26766171011046047 Volts Pacs_BOLC_SET_VL_G4(-0.26766171011046047); // Set group 4 bol bias 03 (VRL) to 0.3894805880981992 Volts Pacs_BOLC_SET_VRL_G4(0.3894805880981992); // Set group 4 bol bias 20 (VH_BLIND) to 2.1460512633414695 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1460512633414695); // Set group 5 bol bias 01 (VH) to 1.483672289866713 Volts Pacs_BOLC_SET_VH_G5(1.483672289866713); // Set group 5 bol bias 02 (VL) to -0.21632771013328694 Volts Pacs_BOLC_SET_VL_G5(-0.21632771013328694); // Set group 5 bol bias 03 (VRL) to 0.40913467919793883 Volts Pacs_BOLC_SET_VRL_G5(0.40913467919793883); // Set group 5 bol bias 20 (VH_BLIND) to 2.1639120628613844 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1639120628613844); // Set group 6 bol bias 01 (VH) to 1.5212001828441373 Volts Pacs_BOLC_SET_VH_G6(1.5212001828441373); // Set group 6 bol bias 02 (VL) to -0.1787998171558626 Volts Pacs_BOLC_SET_VL_G6(-0.1787998171558626); // Set group 6 bol bias 03 (VRL) to 0.4326426606725773 Volts Pacs_BOLC_SET_VRL_G6(0.4326426606725773); // Set group 6 bol bias 20 (VH_BLIND) to 2.190159388287144 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.190159388287144); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0919023109012276 Volts Pacs_BOLC_SET_VH_G1(2.0919023109012276); // Set group 1 bol bias 02 (VL) to -0.3080976890987723 Volts Pacs_BOLC_SET_VL_G1(-0.3080976890987723); // Set group 1 bol bias 03 (VRL) to 0.40322996621981017 Volts Pacs_BOLC_SET_VRL_G1(0.40322996621981017); // Set group 1 bol bias 20 (VH_BLIND) to 2.1637231535838595 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1637231535838595); // Set group 2 bol bias 01 (VH) to 2.0444321248641284 Volts Pacs_BOLC_SET_VH_G2(2.0444321248641284); // Set group 2 bol bias 02 (VL) to -0.3555678751358716 Volts Pacs_BOLC_SET_VL_G2(-0.3555678751358716); // Set group 2 bol bias 03 (VRL) to 0.38317319418812057 Volts Pacs_BOLC_SET_VRL_G2(0.38317319418812057); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401302773630135 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401302773630135); // Set group 3 bol bias 01 (VH) to 2.0642557086825586 Volts Pacs_BOLC_SET_VH_G3(2.0642557086825586); // Set group 3 bol bias 02 (VL) to -0.3357442913174415 Volts Pacs_BOLC_SET_VL_G3(-0.3357442913174415); // Set group 3 bol bias 03 (VRL) to 0.4021226802862781 Volts Pacs_BOLC_SET_VRL_G3(0.4021226802862781); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577121064617453 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577121064617453); // Set group 4 bol bias 01 (VH) to 2.0809027350110876 Volts Pacs_BOLC_SET_VH_G4(2.0809027350110876); // Set group 4 bol bias 02 (VL) to -0.31909726498891233 Volts Pacs_BOLC_SET_VL_G4(-0.31909726498891233); // Set group 4 bol bias 03 (VRL) to 0.3912828045828408 Volts Pacs_BOLC_SET_VRL_G4(0.3912828045828408); // Set group 4 bol bias 20 (VH_BLIND) to 2.1481098067929794 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1481098067929794); // Set group 5 bol bias 01 (VH) to 1.5481735096096976 Volts Pacs_BOLC_SET_VH_G5(1.5481735096096976); // Set group 5 bol bias 02 (VL) to -0.2518264903903025 Volts Pacs_BOLC_SET_VL_G5(-0.2518264903903025); // Set group 5 bol bias 03 (VRL) to 0.4080429467973195 Volts Pacs_BOLC_SET_VRL_G5(0.4080429467973195); // Set group 5 bol bias 20 (VH_BLIND) to 2.1626071230524797 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1626071230524797); // Set group 6 bol bias 01 (VH) to 1.586169859184044 Volts Pacs_BOLC_SET_VH_G6(1.586169859184044); // Set group 6 bol bias 02 (VL) to -0.213830140815956 Volts Pacs_BOLC_SET_VL_G6(-0.213830140815956); // Set group 6 bol bias 03 (VRL) to 0.4312985997911736 Volts Pacs_BOLC_SET_VRL_G6(0.4312985997911736); // Set group 6 bol bias 20 (VH_BLIND) to 2.1885374151530494 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1885374151530494); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1698039045350335 Volts Pacs_BOLC_SET_VH_G1(2.1698039045350335); // Set group 1 bol bias 02 (VL) to -0.3301960954649666 Volts Pacs_BOLC_SET_VL_G1(-0.3301960954649666); // Set group 1 bol bias 03 (VRL) to 0.4024892452489562 Volts Pacs_BOLC_SET_VRL_G1(0.4024892452489562); // Set group 1 bol bias 20 (VH_BLIND) to 2.1628464184204597 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1628464184204597); // Set group 2 bol bias 01 (VH) to 2.1203457962246044 Volts Pacs_BOLC_SET_VH_G2(2.1203457962246044); // Set group 2 bol bias 02 (VL) to -0.3796542037753957 Volts Pacs_BOLC_SET_VL_G2(-0.3796542037753957); // Set group 2 bol bias 03 (VRL) to 0.38288236545604015 Volts Pacs_BOLC_SET_VRL_G2(0.38288236545604015); // Set group 2 bol bias 20 (VH_BLIND) to 2.139792767204025 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.139792767204025); // Set group 3 bol bias 01 (VH) to 2.1411105696409876 Volts Pacs_BOLC_SET_VH_G3(2.1411105696409876); // Set group 3 bol bias 02 (VL) to -0.3588894303590124 Volts Pacs_BOLC_SET_VL_G3(-0.3588894303590124); // Set group 3 bol bias 03 (VRL) to 0.402620366669094 Volts Pacs_BOLC_SET_VRL_G3(0.402620366669094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1582627432921795 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1582627432921795); // Set group 4 bol bias 01 (VH) to 2.170229482511176 Volts Pacs_BOLC_SET_VH_G4(2.170229482511176); // Set group 4 bol bias 02 (VL) to -0.3297705174888242 Volts Pacs_BOLC_SET_VL_G4(-0.3297705174888242); // Set group 4 bol bias 03 (VRL) to 0.403185246929378 Volts Pacs_BOLC_SET_VRL_G4(0.403185246929378); // Set group 4 bol bias 20 (VH_BLIND) to 2.1617145490416374 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1617145490416374); // Set group 5 bol bias 01 (VH) to 1.6140561510847284 Volts Pacs_BOLC_SET_VH_G5(1.6140561510847284); // Set group 5 bol bias 02 (VL) to -0.2859438489152714 Volts Pacs_BOLC_SET_VL_G5(-0.2859438489152714); // Set group 5 bol bias 03 (VRL) to 0.4070324680808826 Volts Pacs_BOLC_SET_VRL_G5(0.4070324680808826); // Set group 5 bol bias 20 (VH_BLIND) to 2.1613994018623623 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1613994018623623); // Set group 6 bol bias 01 (VH) to 1.6525072441320585 Volts Pacs_BOLC_SET_VH_G6(1.6525072441320585); // Set group 6 bol bias 02 (VL) to -0.2474927558679413 Volts Pacs_BOLC_SET_VL_G6(-0.2474927558679413); // Set group 6 bol bias 03 (VRL) to 0.4299667902432768 Volts Pacs_BOLC_SET_VRL_G6(0.4299667902432768); // Set group 6 bol bias 20 (VH_BLIND) to 2.1869301672429438 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1869301672429438); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2518523262023282 Volts Pacs_BOLC_SET_VH_G1(2.2518523262023282); // Set group 1 bol bias 02 (VL) to -0.3481476737976718 Volts Pacs_BOLC_SET_VL_G1(-0.3481476737976718); // Set group 1 bol bias 03 (VRL) to 0.4023613622332442 Volts Pacs_BOLC_SET_VRL_G1(0.4023613622332442); // Set group 1 bol bias 20 (VH_BLIND) to 2.162695053821431 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162695053821431); // Set group 2 bol bias 01 (VH) to 2.1992842661124183 Volts Pacs_BOLC_SET_VH_G2(2.1992842661124183); // Set group 2 bol bias 02 (VL) to -0.40071573388758164 Volts Pacs_BOLC_SET_VL_G2(-0.40071573388758164); // Set group 2 bol bias 03 (VRL) to 0.3822475972576408 Volts Pacs_BOLC_SET_VRL_G2(0.3822475972576408); // Set group 2 bol bias 20 (VH_BLIND) to 2.139056128535365 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.139056128535365); // Set group 3 bol bias 01 (VH) to 2.231250440727587 Volts Pacs_BOLC_SET_VH_G3(2.231250440727587); // Set group 3 bol bias 02 (VL) to -0.3687495592724129 Volts Pacs_BOLC_SET_VL_G3(-0.3687495592724129); // Set group 3 bol bias 03 (VRL) to 0.41305945421125706 Volts Pacs_BOLC_SET_VRL_G3(0.41305945421125706); // Set group 3 bol bias 20 (VH_BLIND) to 2.169808405910513 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169808405910513); // Set group 4 bol bias 01 (VH) to 2.240632472213959 Volts Pacs_BOLC_SET_VH_G4(2.240632472213959); // Set group 4 bol bias 02 (VL) to -0.3593675277860413 Volts Pacs_BOLC_SET_VL_G4(-0.3593675277860413); // Set group 4 bol bias 03 (VRL) to 0.39262936297695383 Volts Pacs_BOLC_SET_VRL_G4(0.39262936297695383); // Set group 4 bol bias 20 (VH_BLIND) to 2.149648078445354 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.149648078445354); // Set group 5 bol bias 01 (VH) to 1.692548563463328 Volts Pacs_BOLC_SET_VH_G5(1.692548563463328); // Set group 5 bol bias 02 (VL) to -0.3074514365366722 Volts Pacs_BOLC_SET_VL_G5(-0.3074514365366722); // Set group 5 bol bias 03 (VRL) to 0.4169253102521001 Volts Pacs_BOLC_SET_VRL_G5(0.4169253102521001); // Set group 5 bol bias 20 (VH_BLIND) to 2.173227298217052 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.173227298217052); // Set group 6 bol bias 01 (VH) to 1.7212522609269438 Volts Pacs_BOLC_SET_VH_G6(1.7212522609269438); // Set group 6 bol bias 02 (VL) to -0.2787477390730563 Volts Pacs_BOLC_SET_VL_G6(-0.2787477390730563); // Set group 6 bol bias 03 (VRL) to 0.4290916443141529 Volts Pacs_BOLC_SET_VRL_G6(0.4290916443141529); // Set group 6 bol bias 20 (VH_BLIND) to 2.1858739957431443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1858739957431443); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3385082558846553 Volts Pacs_BOLC_SET_VH_G1(2.3385082558846553); // Set group 1 bol bias 02 (VL) to -0.36149174411534485 Volts Pacs_BOLC_SET_VL_G1(-0.36149174411534485); // Set group 1 bol bias 03 (VRL) to 0.40251970328333736 Volts Pacs_BOLC_SET_VRL_G1(0.40251970328333736); // Set group 1 bol bias 20 (VH_BLIND) to 2.162882469124008 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162882469124008); // Set group 2 bol bias 01 (VH) to 2.292262398850223 Volts Pacs_BOLC_SET_VH_G2(2.292262398850223); // Set group 2 bol bias 02 (VL) to -0.4077376011497769 Volts Pacs_BOLC_SET_VL_G2(-0.4077376011497769); // Set group 2 bol bias 03 (VRL) to 0.39205611198609897 Volts Pacs_BOLC_SET_VRL_G2(0.39205611198609897); // Set group 2 bol bias 20 (VH_BLIND) to 2.1504414050728635 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1504414050728635); // Set group 3 bol bias 01 (VH) to 2.3149077738332404 Volts Pacs_BOLC_SET_VH_G3(2.3149077738332404); // Set group 3 bol bias 02 (VL) to -0.3850922261667596 Volts Pacs_BOLC_SET_VL_G3(-0.3850922261667596); // Set group 3 bol bias 03 (VRL) to 0.4131267838220292 Volts Pacs_BOLC_SET_VRL_G3(0.4131267838220292); // Set group 3 bol bias 20 (VH_BLIND) to 2.169882847438711 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169882847438711); // Set group 4 bol bias 01 (VH) to 2.3257100082218063 Volts Pacs_BOLC_SET_VH_G4(2.3257100082218063); // Set group 4 bol bias 02 (VL) to -0.3742899917781938 Volts Pacs_BOLC_SET_VL_G4(-0.3742899917781938); // Set group 4 bol bias 03 (VRL) to 0.3931233279870876 Volts Pacs_BOLC_SET_VRL_G4(0.3931233279870876); // Set group 4 bol bias 20 (VH_BLIND) to 2.150212412222225 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150212412222225); // Set group 5 bol bias 01 (VH) to 1.7618822990962277 Volts Pacs_BOLC_SET_VH_G5(1.7618822990962277); // Set group 5 bol bias 02 (VL) to -0.33811770090377224 Volts Pacs_BOLC_SET_VL_G5(-0.33811770090377224); // Set group 5 bol bias 03 (VRL) to 0.41561061486476825 Volts Pacs_BOLC_SET_VRL_G5(0.41561061486476825); // Set group 5 bol bias 20 (VH_BLIND) to 2.1716549329389947 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1716549329389947); // Set group 6 bol bias 01 (VH) to 1.7915839352782075 Volts Pacs_BOLC_SET_VH_G6(1.7915839352782075); // Set group 6 bol bias 02 (VL) to -0.3084160647217925 Volts Pacs_BOLC_SET_VL_G6(-0.3084160647217925); // Set group 6 bol bias 03 (VRL) to 0.42801630660969103 Volts Pacs_BOLC_SET_VRL_G6(0.42801630660969103); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845761875065275 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845761875065275); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.4300054455708517 Volts Pacs_BOLC_SET_VH_G1(2.4300054455708517); // Set group 1 bol bias 02 (VL) to -0.36999455442914814 Volts Pacs_BOLC_SET_VL_G1(-0.36999455442914814); // Set group 1 bol bias 03 (VRL) to 0.4031781933140353 Volts Pacs_BOLC_SET_VRL_G1(0.4031781933140353); // Set group 1 bol bias 20 (VH_BLIND) to 2.163661873665078 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163661873665078); // Set group 2 bol bias 01 (VH) to 2.3789890619535976 Volts Pacs_BOLC_SET_VH_G2(2.3789890619535976); // Set group 2 bol bias 02 (VL) to -0.42101093804640216 Volts Pacs_BOLC_SET_VL_G2(-0.42101093804640216); // Set group 2 bol bias 03 (VRL) to 0.39166242885069175 Volts Pacs_BOLC_SET_VRL_G2(0.39166242885069175); // Set group 2 bol bias 20 (VH_BLIND) to 2.1499843265853995 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1499843265853995); // Set group 3 bol bias 01 (VH) to 2.392292520470703 Volts Pacs_BOLC_SET_VH_G3(2.392292520470703); // Set group 3 bol bias 02 (VL) to -0.40770747952929703 Volts Pacs_BOLC_SET_VL_G3(-0.40770747952929703); // Set group 3 bol bias 03 (VRL) to 0.4021697329624589 Volts Pacs_BOLC_SET_VRL_G3(0.4021697329624589); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577641659794593 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577641659794593); // Set group 4 bol bias 01 (VH) to 2.4154768618102183 Volts Pacs_BOLC_SET_VH_G4(2.4154768618102183); // Set group 4 bol bias 02 (VL) to -0.3845231381897817 Volts Pacs_BOLC_SET_VL_G4(-0.3845231381897817); // Set group 4 bol bias 03 (VRL) to 0.3940057360077043 Volts Pacs_BOLC_SET_VRL_G4(0.3940057360077043); // Set group 4 bol bias 20 (VH_BLIND) to 2.1512205810041753 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1512205810041753); // Set group 5 bol bias 01 (VH) to 1.8335692925476144 Volts Pacs_BOLC_SET_VH_G5(1.8335692925476144); // Set group 5 bol bias 02 (VL) to -0.3664307074523857 Volts Pacs_BOLC_SET_VL_G5(-0.3664307074523857); // Set group 5 bol bias 03 (VRL) to 0.4137546426946729 Volts Pacs_BOLC_SET_VRL_G5(0.4137546426946729); // Set group 5 bol bias 20 (VH_BLIND) to 2.1694354729663026 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1694354729663026); // Set group 6 bol bias 01 (VH) to 1.8650655799281326 Volts Pacs_BOLC_SET_VH_G6(1.8650655799281326); // Set group 6 bol bias 02 (VL) to -0.3349344200718677 Volts Pacs_BOLC_SET_VL_G6(-0.3349344200718677); // Set group 6 bol bias 03 (VRL) to 0.42680279805702126 Volts Pacs_BOLC_SET_VRL_G6(0.42680279805702126); // Set group 6 bol bias 20 (VH_BLIND) to 2.1831115767935163 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1831115767935163); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.659233455112943 Volts Pacs_BOLC_SET_VH_G1(2.659233455112943); // Set group 1 bol bias 02 (VL) to -0.3407665448870573 Volts Pacs_BOLC_SET_VL_G1(-0.3407665448870573); // Set group 1 bol bias 03 (VRL) to 0.4357667359040321 Volts Pacs_BOLC_SET_VRL_G1(0.4357667359040321); // Set group 1 bol bias 20 (VH_BLIND) to 2.202227439151187 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.202227439151187); // Set group 2 bol bias 01 (VH) to 2.5775120822428073 Volts Pacs_BOLC_SET_VH_G2(2.5775120822428073); // Set group 2 bol bias 02 (VL) to -0.4224879177571926 Volts Pacs_BOLC_SET_VL_G2(-0.4224879177571926); // Set group 2 bol bias 03 (VRL) to 0.4022726943042781 Volts Pacs_BOLC_SET_VRL_G2(0.4022726943042781); // Set group 2 bol bias 20 (VH_BLIND) to 2.1622988712184354 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1622988712184354); // Set group 3 bol bias 01 (VH) to 2.607019842418633 Volts Pacs_BOLC_SET_VH_G3(2.607019842418633); // Set group 3 bol bias 02 (VL) to -0.3929801575813674 Volts Pacs_BOLC_SET_VL_G3(-0.3929801575813674); // Set group 3 bol bias 03 (VRL) to 0.42413749621724284 Volts Pacs_BOLC_SET_VRL_G3(0.42413749621724284); // Set group 3 bol bias 20 (VH_BLIND) to 2.182052256680688 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.182052256680688); // Set group 4 bol bias 01 (VH) to 2.629606099011634 Volts Pacs_BOLC_SET_VH_G4(2.629606099011634); // Set group 4 bol bias 02 (VL) to -0.37039390098836616 Volts Pacs_BOLC_SET_VL_G4(-0.37039390098836616); // Set group 4 bol bias 03 (VRL) to 0.41622739514224655 Volts Pacs_BOLC_SET_VRL_G4(0.41622739514224655); // Set group 4 bol bias 20 (VH_BLIND) to 2.176626619436571 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176626619436571); // Set group 5 bol bias 01 (VH) to 1.985885288691232 Volts Pacs_BOLC_SET_VH_G5(1.985885288691232); // Set group 5 bol bias 02 (VL) to -0.41411471130876787 Volts Pacs_BOLC_SET_VL_G5(-0.41411471130876787); // Set group 5 bol bias 03 (VRL) to 0.4096080690310894 Volts Pacs_BOLC_SET_VRL_G5(0.4096080690310894); // Set group 5 bol bias 20 (VH_BLIND) to 2.1644779360149737 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1644779360149737); // Set group 6 bol bias 01 (VH) to 2.0210209551931566 Volts Pacs_BOLC_SET_VH_G6(2.0210209551931566); // Set group 6 bol bias 02 (VL) to -0.3789790448068432 Volts Pacs_BOLC_SET_VL_G6(-0.3789790448068432); // Set group 6 bol bias 03 (VRL) to 0.4239332746292668 Volts Pacs_BOLC_SET_VRL_G6(0.4239332746292668); // Set group 6 bol bias 20 (VH_BLIND) to 2.1796480894734325 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1796480894734325); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.981170520690957 Volts Pacs_BOLC_SET_VH_G1(2.981170520690957); // Set group 1 bol bias 02 (VL) to -0.3188294793090427 Volts Pacs_BOLC_SET_VL_G1(-0.3188294793090427); // Set group 1 bol bias 03 (VRL) to 0.4234907185268778 Volts Pacs_BOLC_SET_VRL_G1(0.4234907185268778); // Set group 1 bol bias 20 (VH_BLIND) to 2.187707391136623 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.187707391136623); // Set group 2 bol bias 01 (VH) to 2.90972510268461 Volts Pacs_BOLC_SET_VH_G2(2.90972510268461); // Set group 2 bol bias 02 (VL) to -0.3902748973153899 Volts Pacs_BOLC_SET_VL_G2(-0.3902748973153899); // Set group 2 bol bias 03 (VRL) to 0.41507556952678404 Volts Pacs_BOLC_SET_VRL_G2(0.41507556952678404); // Set group 2 bol bias 20 (VH_BLIND) to 2.1771251010500934 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1771251010500934); // Set group 3 bol bias 01 (VH) to 2.9629000628153523 Volts Pacs_BOLC_SET_VH_G3(2.9629000628153523); // Set group 3 bol bias 02 (VL) to -0.33709993718464726 Volts Pacs_BOLC_SET_VL_G3(-0.33709993718464726); // Set group 3 bol bias 03 (VRL) to 0.44476673788957455 Volts Pacs_BOLC_SET_VRL_G3(0.44476673788957455); // Set group 3 bol bias 20 (VH_BLIND) to 2.204708823890883 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.204708823890883); // Set group 4 bol bias 01 (VH) to 2.954512570832443 Volts Pacs_BOLC_SET_VH_G4(2.954512570832443); // Set group 4 bol bias 02 (VL) to -0.34548742916755676 Volts Pacs_BOLC_SET_VL_G4(-0.34548742916755676); // Set group 4 bol bias 03 (VRL) to 0.41467669035170157 Volts Pacs_BOLC_SET_VRL_G4(0.41467669035170157); // Set group 4 bol bias 20 (VH_BLIND) to 2.174854321757311 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.174854321757311); // Set group 5 bol bias 01 (VH) to 2.177408017162427 Volts Pacs_BOLC_SET_VH_G5(2.177408017162427); // Set group 5 bol bias 02 (VL) to -0.42259198283757327 Volts Pacs_BOLC_SET_VL_G5(-0.42259198283757327); // Set group 5 bol bias 03 (VRL) to 0.42489482807292744 Volts Pacs_BOLC_SET_VRL_G5(0.42489482807292744); // Set group 5 bol bias 20 (VH_BLIND) to 2.182762150249038 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182762150249038); // Set group 6 bol bias 01 (VH) to 2.1974322167664 Volts Pacs_BOLC_SET_VH_G6(2.1974322167664); // Set group 6 bol bias 02 (VL) to -0.4025677832336002 Volts Pacs_BOLC_SET_VL_G6(-0.4025677832336002); // Set group 6 bol bias 03 (VRL) to 0.42316906139092536 Volts Pacs_BOLC_SET_VRL_G6(0.42316906139092536); // Set group 6 bol bias 20 (VH_BLIND) to 2.1787256451671984 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1787256451671984); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************* // Select Filter B (70 microns) //******************************* // PHOT_fltw_move("POS B"); // // //********************************************************************** // Measurement // Fluxes 6.49pW on the blue and 4.24pW on the red //********************************************************************** // //*********************************************************** // Bias 1 (Vh-Vl)bleu = 1.25 Volts, (Vh-Vl)rouge = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G1(1.24); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3326204781717645 Volts Pacs_BOLC_SET_VRL_G1(0.3326204781717645); // Set group 1 bol bias 20 (VH_BLIND) to 2.083696785169174 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.083696785169174); // Set group 2 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G2(1.24); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.3451084849519235 Volts Pacs_BOLC_SET_VRL_G2(0.3451084849519235); // Set group 2 bol bias 20 (VH_BLIND) to 2.096916986932991 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.096916986932991); // Set group 3 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G3(1.24); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.34202618896678166 Volts Pacs_BOLC_SET_VRL_G3(0.34202618896678166); // Set group 3 bol bias 20 (VH_BLIND) to 2.0924644878909016 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0924644878909016); // Set group 4 bol bias 01 (VH) to 1.24 Volts Pacs_BOLC_SET_VH_G4(1.24); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.32960164545203896 Volts Pacs_BOLC_SET_VRL_G4(0.32960164545203896); // Set group 4 bol bias 20 (VH_BLIND) to 2.080938017873756 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.080938017873756); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.35685598835089916 Volts Pacs_BOLC_SET_VRL_G5(0.35685598835089916); // Set group 5 bol bias 20 (VH_BLIND) to 2.1013252749533495 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1013252749533495); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.34827016903071195 Volts Pacs_BOLC_SET_VRL_G6(0.34827016903071195); // Set group 6 bol bias 20 (VH_BLIND) to 2.0906645120184524 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0906645120184524); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)bleu = 1.6 Volts, (Vh-Vl)rouge = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.5308558286143665 Volts Pacs_BOLC_SET_VH_G1(1.5308558286143665); // Set group 1 bol bias 02 (VL) to -0.06914417138563347 Volts Pacs_BOLC_SET_VL_G1(-0.06914417138563347); // Set group 1 bol bias 03 (VRL) to 0.3926130487129541 Volts Pacs_BOLC_SET_VRL_G1(0.3926130487129541); // Set group 1 bol bias 20 (VH_BLIND) to 2.1511342667878597 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1511342667878597); // Set group 2 bol bias 01 (VH) to 1.5054862989732616 Volts Pacs_BOLC_SET_VH_G2(1.5054862989732616); // Set group 2 bol bias 02 (VL) to -0.0945137010267384 Volts Pacs_BOLC_SET_VL_G2(-0.0945137010267384); // Set group 2 bol bias 03 (VRL) to 0.38618638539249817 Volts Pacs_BOLC_SET_VRL_G2(0.38618638539249817); // Set group 2 bol bias 20 (VH_BLIND) to 2.143627413976328 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.143627413976328); // Set group 3 bol bias 01 (VH) to 1.513042434172956 Volts Pacs_BOLC_SET_VH_G3(1.513042434172956); // Set group 3 bol bias 02 (VL) to -0.08695756582704411 Volts Pacs_BOLC_SET_VL_G3(-0.08695756582704411); // Set group 3 bol bias 03 (VRL) to 0.38978335519256396 Volts Pacs_BOLC_SET_VRL_G3(0.38978335519256396); // Set group 3 bol bias 20 (VH_BLIND) to 2.144095830174545 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.144095830174545); // Set group 4 bol bias 01 (VH) to 1.5281594929875082 Volts Pacs_BOLC_SET_VH_G4(1.5281594929875082); // Set group 4 bol bias 02 (VL) to -0.07184050701249181 Volts Pacs_BOLC_SET_VL_G4(-0.07184050701249181); // Set group 4 bol bias 03 (VRL) to 0.38592657928156704 Volts Pacs_BOLC_SET_VRL_G4(0.38592657928156704); // Set group 4 bol bias 20 (VH_BLIND) to 2.141992642948214 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.141992642948214); // Set group 5 bol bias 01 (VH) to 1.182574586651844 Volts Pacs_BOLC_SET_VH_G5(1.182574586651844); // Set group 5 bol bias 02 (VL) to -0.01742541334815602 Volts Pacs_BOLC_SET_VL_G5(-0.01742541334815602); // Set group 5 bol bias 03 (VRL) to 0.4236538693654987 Volts Pacs_BOLC_SET_VRL_G5(0.4236538693654987); // Set group 5 bol bias 20 (VH_BLIND) to 2.181277067799937 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.181277067799937); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.42110918641784717 Volts Pacs_BOLC_SET_VRL_G6(0.42110918641784717); // Set group 6 bol bias 20 (VH_BLIND) to 2.1762391742755924 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1762391742755924); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)bleu = 1.8 Volts, (Vh-Vl)rouge = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.6594892906502094 Volts Pacs_BOLC_SET_VH_G1(1.6594892906502094); // Set group 1 bol bias 02 (VL) to -0.1405107093497907 Volts Pacs_BOLC_SET_VL_G1(-0.1405107093497907); // Set group 1 bol bias 03 (VRL) to 0.3917606704884038 Volts Pacs_BOLC_SET_VRL_G1(0.3917606704884038); // Set group 1 bol bias 20 (VH_BLIND) to 2.150123228625228 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150123228625228); // Set group 2 bol bias 01 (VH) to 1.6335911838047528 Volts Pacs_BOLC_SET_VH_G2(1.6335911838047528); // Set group 2 bol bias 02 (VL) to -0.16640881619524728 Volts Pacs_BOLC_SET_VL_G2(-0.16640881619524728); // Set group 2 bol bias 03 (VRL) to 0.3857333939634705 Volts Pacs_BOLC_SET_VRL_G2(0.3857333939634705); // Set group 2 bol bias 20 (VH_BLIND) to 2.143101633964305 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.143101633964305); // Set group 3 bol bias 01 (VH) to 1.6416241428293152 Volts Pacs_BOLC_SET_VH_G3(1.6416241428293152); // Set group 3 bol bias 02 (VL) to -0.15837585717068492 Volts Pacs_BOLC_SET_VL_G3(-0.15837585717068492); // Set group 3 bol bias 03 (VRL) to 0.39049968926841494 Volts Pacs_BOLC_SET_VRL_G3(0.39049968926841494); // Set group 3 bol bias 20 (VH_BLIND) to 2.1448859067210706 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1448859067210706); // Set group 4 bol bias 01 (VH) to 1.6582526409235996 Volts Pacs_BOLC_SET_VH_G4(1.6582526409235996); // Set group 4 bol bias 02 (VL) to -0.14174735907640035 Volts Pacs_BOLC_SET_VL_G4(-0.14174735907640035); // Set group 4 bol bias 03 (VRL) to 0.38676201425895873 Volts Pacs_BOLC_SET_VRL_G4(0.38676201425895873); // Set group 4 bol bias 20 (VH_BLIND) to 2.142946592283102 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.142946592283102); // Set group 5 bol bias 01 (VH) to 1.3051237073642374 Volts Pacs_BOLC_SET_VH_G5(1.3051237073642374); // Set group 5 bol bias 02 (VL) to -0.09487629263576247 Volts Pacs_BOLC_SET_VL_G5(-0.09487629263576247); // Set group 5 bol bias 03 (VRL) to 0.42258627721165687 Volts Pacs_BOLC_SET_VRL_G5(0.42258627721165687); // Set group 5 bol bias 20 (VH_BLIND) to 2.1799995692716956 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1799995692716956); // Set group 6 bol bias 01 (VH) to 1.3296396366669403 Volts Pacs_BOLC_SET_VH_G6(1.3296396366669403); // Set group 6 bol bias 02 (VL) to -0.07036036333305953 Volts Pacs_BOLC_SET_VL_G6(-0.07036036333305953); // Set group 6 bol bias 03 (VRL) to 0.43567153207160403 Volts Pacs_BOLC_SET_VRL_G6(0.43567153207160403); // Set group 6 bol bias 20 (VH_BLIND) to 2.1937784997485115 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1937784997485115); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)bleu = 2.0 Volts, (Vh-Vl)rouge = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.793070681021138 Volts Pacs_BOLC_SET_VH_G1(1.793070681021138); // Set group 1 bol bias 02 (VL) to -0.2069293189788619 Volts Pacs_BOLC_SET_VL_G1(-0.2069293189788619); // Set group 1 bol bias 03 (VRL) to 0.3923248248050296 Volts Pacs_BOLC_SET_VRL_G1(0.3923248248050296); // Set group 1 bol bias 20 (VH_BLIND) to 2.150792387671768 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.150792387671768); // Set group 2 bol bias 01 (VH) to 1.7645184869728006 Volts Pacs_BOLC_SET_VH_G2(1.7645184869728006); // Set group 2 bol bias 02 (VL) to -0.23548151302719933 Volts Pacs_BOLC_SET_VL_G2(-0.23548151302719933); // Set group 2 bol bias 03 (VRL) to 0.3852928933342721 Volts Pacs_BOLC_SET_VRL_G2(0.3852928933342721); // Set group 2 bol bias 20 (VH_BLIND) to 2.14259036340508 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.14259036340508); // Set group 3 bol bias 01 (VH) to 1.7726539738165386 Volts Pacs_BOLC_SET_VH_G3(1.7726539738165386); // Set group 3 bol bias 02 (VL) to -0.22734602618346156 Volts Pacs_BOLC_SET_VL_G3(-0.22734602618346156); // Set group 3 bol bias 03 (VRL) to 0.3907613242029496 Volts Pacs_BOLC_SET_VRL_G3(0.3907613242029496); // Set group 3 bol bias 20 (VH_BLIND) to 2.145174478738013 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.145174478738013); // Set group 4 bol bias 01 (VH) to 1.791651947287071 Volts Pacs_BOLC_SET_VH_G4(1.791651947287071); // Set group 4 bol bias 02 (VL) to -0.2083480527129291 Volts Pacs_BOLC_SET_VL_G4(-0.2083480527129291); // Set group 4 bol bias 03 (VRL) to 0.3874603984200736 Volts Pacs_BOLC_SET_VRL_G4(0.3874603984200736); // Set group 4 bol bias 20 (VH_BLIND) to 2.143744097823567 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.143744097823567); // Set group 5 bol bias 01 (VH) to 1.4201148979959355 Volts Pacs_BOLC_SET_VH_G5(1.4201148979959355); // Set group 5 bol bias 02 (VL) to -0.17988510200406455 Volts Pacs_BOLC_SET_VL_G5(-0.17988510200406455); // Set group 5 bol bias 03 (VRL) to 0.4100187602625653 Volts Pacs_BOLC_SET_VRL_G5(0.4100187602625653); // Set group 5 bol bias 20 (VH_BLIND) to 2.1649688780465945 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1649688780465945); // Set group 6 bol bias 01 (VH) to 1.4567456981427345 Volts Pacs_BOLC_SET_VH_G6(1.4567456981427345); // Set group 6 bol bias 02 (VL) to -0.14325430185726565 Volts Pacs_BOLC_SET_VL_G6(-0.14325430185726565); // Set group 6 bol bias 03 (VRL) to 0.4336065698933277 Volts Pacs_BOLC_SET_VRL_G6(0.4336065698933277); // Set group 6 bol bias 20 (VH_BLIND) to 2.1913158660327205 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1913158660327205); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)bleu = 2.2 Volts, (Vh-Vl)rouge = 1.7 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9437221467173063 Volts Pacs_BOLC_SET_VH_G1(1.9437221467173063); // Set group 1 bol bias 02 (VL) to -0.25627785328269387 Volts Pacs_BOLC_SET_VL_G1(-0.25627785328269387); // Set group 1 bol bias 03 (VRL) to 0.40340952218905873 Volts Pacs_BOLC_SET_VRL_G1(0.40340952218905873); // Set group 1 bol bias 20 (VH_BLIND) to 2.1639356815621955 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1639356815621955); // Set group 2 bol bias 01 (VH) to 1.9002040998447727 Volts Pacs_BOLC_SET_VH_G2(1.9002040998447727); // Set group 2 bol bias 02 (VL) to -0.2997959001552275 Volts Pacs_BOLC_SET_VL_G2(-0.2997959001552275); // Set group 2 bol bias 03 (VRL) to 0.38398050136354855 Volts Pacs_BOLC_SET_VRL_G2(0.38398050136354855); // Set group 2 bol bias 20 (VH_BLIND) to 2.141067192895841 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.141067192895841); // Set group 3 bol bias 01 (VH) to 1.9199744284995528 Volts Pacs_BOLC_SET_VH_G3(1.9199744284995528); // Set group 3 bol bias 02 (VL) to -0.28002557150044743 Volts Pacs_BOLC_SET_VL_G3(-0.28002557150044743); // Set group 3 bol bias 03 (VRL) to 0.4019815318341527 Volts Pacs_BOLC_SET_VRL_G3(0.4019815318341527); // Set group 3 bol bias 20 (VH_BLIND) to 2.1575559375560394 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1575559375560394); // Set group 4 bol bias 01 (VH) to 1.9323382898895396 Volts Pacs_BOLC_SET_VH_G4(1.9323382898895396); // Set group 4 bol bias 02 (VL) to -0.26766171011046047 Volts Pacs_BOLC_SET_VL_G4(-0.26766171011046047); // Set group 4 bol bias 03 (VRL) to 0.3894805880981992 Volts Pacs_BOLC_SET_VRL_G4(0.3894805880981992); // Set group 4 bol bias 20 (VH_BLIND) to 2.1460512633414695 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1460512633414695); // Set group 5 bol bias 01 (VH) to 1.483672289866713 Volts Pacs_BOLC_SET_VH_G5(1.483672289866713); // Set group 5 bol bias 02 (VL) to -0.21632771013328694 Volts Pacs_BOLC_SET_VL_G5(-0.21632771013328694); // Set group 5 bol bias 03 (VRL) to 0.40913467919793883 Volts Pacs_BOLC_SET_VRL_G5(0.40913467919793883); // Set group 5 bol bias 20 (VH_BLIND) to 2.1639120628613844 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1639120628613844); // Set group 6 bol bias 01 (VH) to 1.5212001828441373 Volts Pacs_BOLC_SET_VH_G6(1.5212001828441373); // Set group 6 bol bias 02 (VL) to -0.1787998171558626 Volts Pacs_BOLC_SET_VL_G6(-0.1787998171558626); // Set group 6 bol bias 03 (VRL) to 0.4326426606725773 Volts Pacs_BOLC_SET_VRL_G6(0.4326426606725773); // Set group 6 bol bias 20 (VH_BLIND) to 2.190159388287144 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.190159388287144); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)bleu = 2.4 Volts, (Vh-Vl)rouge = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.0919023109012276 Volts Pacs_BOLC_SET_VH_G1(2.0919023109012276); // Set group 1 bol bias 02 (VL) to -0.3080976890987723 Volts Pacs_BOLC_SET_VL_G1(-0.3080976890987723); // Set group 1 bol bias 03 (VRL) to 0.40322996621981017 Volts Pacs_BOLC_SET_VRL_G1(0.40322996621981017); // Set group 1 bol bias 20 (VH_BLIND) to 2.1637231535838595 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1637231535838595); // Set group 2 bol bias 01 (VH) to 2.0444321248641284 Volts Pacs_BOLC_SET_VH_G2(2.0444321248641284); // Set group 2 bol bias 02 (VL) to -0.3555678751358716 Volts Pacs_BOLC_SET_VL_G2(-0.3555678751358716); // Set group 2 bol bias 03 (VRL) to 0.38317319418812057 Volts Pacs_BOLC_SET_VRL_G2(0.38317319418812057); // Set group 2 bol bias 20 (VH_BLIND) to 2.1401302773630135 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1401302773630135); // Set group 3 bol bias 01 (VH) to 2.0642557086825586 Volts Pacs_BOLC_SET_VH_G3(2.0642557086825586); // Set group 3 bol bias 02 (VL) to -0.3357442913174415 Volts Pacs_BOLC_SET_VL_G3(-0.3357442913174415); // Set group 3 bol bias 03 (VRL) to 0.4021226802862781 Volts Pacs_BOLC_SET_VRL_G3(0.4021226802862781); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577121064617453 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577121064617453); // Set group 4 bol bias 01 (VH) to 2.0809027350110876 Volts Pacs_BOLC_SET_VH_G4(2.0809027350110876); // Set group 4 bol bias 02 (VL) to -0.31909726498891233 Volts Pacs_BOLC_SET_VL_G4(-0.31909726498891233); // Set group 4 bol bias 03 (VRL) to 0.3912828045828408 Volts Pacs_BOLC_SET_VRL_G4(0.3912828045828408); // Set group 4 bol bias 20 (VH_BLIND) to 2.1481098067929794 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1481098067929794); // Set group 5 bol bias 01 (VH) to 1.5481735096096976 Volts Pacs_BOLC_SET_VH_G5(1.5481735096096976); // Set group 5 bol bias 02 (VL) to -0.2518264903903025 Volts Pacs_BOLC_SET_VL_G5(-0.2518264903903025); // Set group 5 bol bias 03 (VRL) to 0.4080429467973195 Volts Pacs_BOLC_SET_VRL_G5(0.4080429467973195); // Set group 5 bol bias 20 (VH_BLIND) to 2.1626071230524797 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1626071230524797); // Set group 6 bol bias 01 (VH) to 1.586169859184044 Volts Pacs_BOLC_SET_VH_G6(1.586169859184044); // Set group 6 bol bias 02 (VL) to -0.213830140815956 Volts Pacs_BOLC_SET_VL_G6(-0.213830140815956); // Set group 6 bol bias 03 (VRL) to 0.4312985997911736 Volts Pacs_BOLC_SET_VRL_G6(0.4312985997911736); // Set group 6 bol bias 20 (VH_BLIND) to 2.1885374151530494 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1885374151530494); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)bleu = 2.5 Volts, (Vh-Vl)rouge = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.1698039045350335 Volts Pacs_BOLC_SET_VH_G1(2.1698039045350335); // Set group 1 bol bias 02 (VL) to -0.3301960954649666 Volts Pacs_BOLC_SET_VL_G1(-0.3301960954649666); // Set group 1 bol bias 03 (VRL) to 0.4024892452489562 Volts Pacs_BOLC_SET_VRL_G1(0.4024892452489562); // Set group 1 bol bias 20 (VH_BLIND) to 2.1628464184204597 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.1628464184204597); // Set group 2 bol bias 01 (VH) to 2.1203457962246044 Volts Pacs_BOLC_SET_VH_G2(2.1203457962246044); // Set group 2 bol bias 02 (VL) to -0.3796542037753957 Volts Pacs_BOLC_SET_VL_G2(-0.3796542037753957); // Set group 2 bol bias 03 (VRL) to 0.38288236545604015 Volts Pacs_BOLC_SET_VRL_G2(0.38288236545604015); // Set group 2 bol bias 20 (VH_BLIND) to 2.139792767204025 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.139792767204025); // Set group 3 bol bias 01 (VH) to 2.1411105696409876 Volts Pacs_BOLC_SET_VH_G3(2.1411105696409876); // Set group 3 bol bias 02 (VL) to -0.3588894303590124 Volts Pacs_BOLC_SET_VL_G3(-0.3588894303590124); // Set group 3 bol bias 03 (VRL) to 0.402620366669094 Volts Pacs_BOLC_SET_VRL_G3(0.402620366669094); // Set group 3 bol bias 20 (VH_BLIND) to 2.1582627432921795 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1582627432921795); // Set group 4 bol bias 01 (VH) to 2.170229482511176 Volts Pacs_BOLC_SET_VH_G4(2.170229482511176); // Set group 4 bol bias 02 (VL) to -0.3297705174888242 Volts Pacs_BOLC_SET_VL_G4(-0.3297705174888242); // Set group 4 bol bias 03 (VRL) to 0.403185246929378 Volts Pacs_BOLC_SET_VRL_G4(0.403185246929378); // Set group 4 bol bias 20 (VH_BLIND) to 2.1617145490416374 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1617145490416374); // Set group 5 bol bias 01 (VH) to 1.6140561510847284 Volts Pacs_BOLC_SET_VH_G5(1.6140561510847284); // Set group 5 bol bias 02 (VL) to -0.2859438489152714 Volts Pacs_BOLC_SET_VL_G5(-0.2859438489152714); // Set group 5 bol bias 03 (VRL) to 0.4070324680808826 Volts Pacs_BOLC_SET_VRL_G5(0.4070324680808826); // Set group 5 bol bias 20 (VH_BLIND) to 2.1613994018623623 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1613994018623623); // Set group 6 bol bias 01 (VH) to 1.6525072441320585 Volts Pacs_BOLC_SET_VH_G6(1.6525072441320585); // Set group 6 bol bias 02 (VL) to -0.2474927558679413 Volts Pacs_BOLC_SET_VL_G6(-0.2474927558679413); // Set group 6 bol bias 03 (VRL) to 0.4299667902432768 Volts Pacs_BOLC_SET_VRL_G6(0.4299667902432768); // Set group 6 bol bias 20 (VH_BLIND) to 2.1869301672429438 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1869301672429438); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)bleu = 2.6 Volts, (Vh-Vl)rouge = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2518523262023282 Volts Pacs_BOLC_SET_VH_G1(2.2518523262023282); // Set group 1 bol bias 02 (VL) to -0.3481476737976718 Volts Pacs_BOLC_SET_VL_G1(-0.3481476737976718); // Set group 1 bol bias 03 (VRL) to 0.4023613622332442 Volts Pacs_BOLC_SET_VRL_G1(0.4023613622332442); // Set group 1 bol bias 20 (VH_BLIND) to 2.162695053821431 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162695053821431); // Set group 2 bol bias 01 (VH) to 2.1992842661124183 Volts Pacs_BOLC_SET_VH_G2(2.1992842661124183); // Set group 2 bol bias 02 (VL) to -0.40071573388758164 Volts Pacs_BOLC_SET_VL_G2(-0.40071573388758164); // Set group 2 bol bias 03 (VRL) to 0.3822475972576408 Volts Pacs_BOLC_SET_VRL_G2(0.3822475972576408); // Set group 2 bol bias 20 (VH_BLIND) to 2.139056128535365 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.139056128535365); // Set group 3 bol bias 01 (VH) to 2.231250440727587 Volts Pacs_BOLC_SET_VH_G3(2.231250440727587); // Set group 3 bol bias 02 (VL) to -0.3687495592724129 Volts Pacs_BOLC_SET_VL_G3(-0.3687495592724129); // Set group 3 bol bias 03 (VRL) to 0.41305945421125706 Volts Pacs_BOLC_SET_VRL_G3(0.41305945421125706); // Set group 3 bol bias 20 (VH_BLIND) to 2.169808405910513 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169808405910513); // Set group 4 bol bias 01 (VH) to 2.240632472213959 Volts Pacs_BOLC_SET_VH_G4(2.240632472213959); // Set group 4 bol bias 02 (VL) to -0.3593675277860413 Volts Pacs_BOLC_SET_VL_G4(-0.3593675277860413); // Set group 4 bol bias 03 (VRL) to 0.39262936297695383 Volts Pacs_BOLC_SET_VRL_G4(0.39262936297695383); // Set group 4 bol bias 20 (VH_BLIND) to 2.149648078445354 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.149648078445354); // Set group 5 bol bias 01 (VH) to 1.692548563463328 Volts Pacs_BOLC_SET_VH_G5(1.692548563463328); // Set group 5 bol bias 02 (VL) to -0.3074514365366722 Volts Pacs_BOLC_SET_VL_G5(-0.3074514365366722); // Set group 5 bol bias 03 (VRL) to 0.4169253102521001 Volts Pacs_BOLC_SET_VRL_G5(0.4169253102521001); // Set group 5 bol bias 20 (VH_BLIND) to 2.173227298217052 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.173227298217052); // Set group 6 bol bias 01 (VH) to 1.7212522609269438 Volts Pacs_BOLC_SET_VH_G6(1.7212522609269438); // Set group 6 bol bias 02 (VL) to -0.2787477390730563 Volts Pacs_BOLC_SET_VL_G6(-0.2787477390730563); // Set group 6 bol bias 03 (VRL) to 0.4290916443141529 Volts Pacs_BOLC_SET_VRL_G6(0.4290916443141529); // Set group 6 bol bias 20 (VH_BLIND) to 2.1858739957431443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1858739957431443); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)bleu = 2.7 Volts, (Vh-Vl)rouge = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.3385082558846553 Volts Pacs_BOLC_SET_VH_G1(2.3385082558846553); // Set group 1 bol bias 02 (VL) to -0.36149174411534485 Volts Pacs_BOLC_SET_VL_G1(-0.36149174411534485); // Set group 1 bol bias 03 (VRL) to 0.40251970328333736 Volts Pacs_BOLC_SET_VRL_G1(0.40251970328333736); // Set group 1 bol bias 20 (VH_BLIND) to 2.162882469124008 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.162882469124008); // Set group 2 bol bias 01 (VH) to 2.292262398850223 Volts Pacs_BOLC_SET_VH_G2(2.292262398850223); // Set group 2 bol bias 02 (VL) to -0.4077376011497769 Volts Pacs_BOLC_SET_VL_G2(-0.4077376011497769); // Set group 2 bol bias 03 (VRL) to 0.39205611198609897 Volts Pacs_BOLC_SET_VRL_G2(0.39205611198609897); // Set group 2 bol bias 20 (VH_BLIND) to 2.1504414050728635 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1504414050728635); // Set group 3 bol bias 01 (VH) to 2.3149077738332404 Volts Pacs_BOLC_SET_VH_G3(2.3149077738332404); // Set group 3 bol bias 02 (VL) to -0.3850922261667596 Volts Pacs_BOLC_SET_VL_G3(-0.3850922261667596); // Set group 3 bol bias 03 (VRL) to 0.4131267838220292 Volts Pacs_BOLC_SET_VRL_G3(0.4131267838220292); // Set group 3 bol bias 20 (VH_BLIND) to 2.169882847438711 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.169882847438711); // Set group 4 bol bias 01 (VH) to 2.3257100082218063 Volts Pacs_BOLC_SET_VH_G4(2.3257100082218063); // Set group 4 bol bias 02 (VL) to -0.3742899917781938 Volts Pacs_BOLC_SET_VL_G4(-0.3742899917781938); // Set group 4 bol bias 03 (VRL) to 0.3931233279870876 Volts Pacs_BOLC_SET_VRL_G4(0.3931233279870876); // Set group 4 bol bias 20 (VH_BLIND) to 2.150212412222225 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.150212412222225); // Set group 5 bol bias 01 (VH) to 1.7618822990962277 Volts Pacs_BOLC_SET_VH_G5(1.7618822990962277); // Set group 5 bol bias 02 (VL) to -0.33811770090377224 Volts Pacs_BOLC_SET_VL_G5(-0.33811770090377224); // Set group 5 bol bias 03 (VRL) to 0.41561061486476825 Volts Pacs_BOLC_SET_VRL_G5(0.41561061486476825); // Set group 5 bol bias 20 (VH_BLIND) to 2.1716549329389947 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1716549329389947); // Set group 6 bol bias 01 (VH) to 1.7915839352782075 Volts Pacs_BOLC_SET_VH_G6(1.7915839352782075); // Set group 6 bol bias 02 (VL) to -0.3084160647217925 Volts Pacs_BOLC_SET_VL_G6(-0.3084160647217925); // Set group 6 bol bias 03 (VRL) to 0.42801630660969103 Volts Pacs_BOLC_SET_VRL_G6(0.42801630660969103); // Set group 6 bol bias 20 (VH_BLIND) to 2.1845761875065275 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1845761875065275); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)bleu = 2.8 Volts, (Vh-Vl)rouge = 2.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.4300054455708517 Volts Pacs_BOLC_SET_VH_G1(2.4300054455708517); // Set group 1 bol bias 02 (VL) to -0.36999455442914814 Volts Pacs_BOLC_SET_VL_G1(-0.36999455442914814); // Set group 1 bol bias 03 (VRL) to 0.4031781933140353 Volts Pacs_BOLC_SET_VRL_G1(0.4031781933140353); // Set group 1 bol bias 20 (VH_BLIND) to 2.163661873665078 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.163661873665078); // Set group 2 bol bias 01 (VH) to 2.3789890619535976 Volts Pacs_BOLC_SET_VH_G2(2.3789890619535976); // Set group 2 bol bias 02 (VL) to -0.42101093804640216 Volts Pacs_BOLC_SET_VL_G2(-0.42101093804640216); // Set group 2 bol bias 03 (VRL) to 0.39166242885069175 Volts Pacs_BOLC_SET_VRL_G2(0.39166242885069175); // Set group 2 bol bias 20 (VH_BLIND) to 2.1499843265853995 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1499843265853995); // Set group 3 bol bias 01 (VH) to 2.392292520470703 Volts Pacs_BOLC_SET_VH_G3(2.392292520470703); // Set group 3 bol bias 02 (VL) to -0.40770747952929703 Volts Pacs_BOLC_SET_VL_G3(-0.40770747952929703); // Set group 3 bol bias 03 (VRL) to 0.4021697329624589 Volts Pacs_BOLC_SET_VRL_G3(0.4021697329624589); // Set group 3 bol bias 20 (VH_BLIND) to 2.1577641659794593 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.1577641659794593); // Set group 4 bol bias 01 (VH) to 2.4154768618102183 Volts Pacs_BOLC_SET_VH_G4(2.4154768618102183); // Set group 4 bol bias 02 (VL) to -0.3845231381897817 Volts Pacs_BOLC_SET_VL_G4(-0.3845231381897817); // Set group 4 bol bias 03 (VRL) to 0.3940057360077043 Volts Pacs_BOLC_SET_VRL_G4(0.3940057360077043); // Set group 4 bol bias 20 (VH_BLIND) to 2.1512205810041753 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.1512205810041753); // Set group 5 bol bias 01 (VH) to 1.8335692925476144 Volts Pacs_BOLC_SET_VH_G5(1.8335692925476144); // Set group 5 bol bias 02 (VL) to -0.3664307074523857 Volts Pacs_BOLC_SET_VL_G5(-0.3664307074523857); // Set group 5 bol bias 03 (VRL) to 0.4137546426946729 Volts Pacs_BOLC_SET_VRL_G5(0.4137546426946729); // Set group 5 bol bias 20 (VH_BLIND) to 2.1694354729663026 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1694354729663026); // Set group 6 bol bias 01 (VH) to 1.8650655799281326 Volts Pacs_BOLC_SET_VH_G6(1.8650655799281326); // Set group 6 bol bias 02 (VL) to -0.3349344200718677 Volts Pacs_BOLC_SET_VL_G6(-0.3349344200718677); // Set group 6 bol bias 03 (VRL) to 0.42680279805702126 Volts Pacs_BOLC_SET_VRL_G6(0.42680279805702126); // Set group 6 bol bias 20 (VH_BLIND) to 2.1831115767935163 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1831115767935163); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)bleu = 3.0 Volts, (Vh-Vl)rouge = 2.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.659233455112943 Volts Pacs_BOLC_SET_VH_G1(2.659233455112943); // Set group 1 bol bias 02 (VL) to -0.3407665448870573 Volts Pacs_BOLC_SET_VL_G1(-0.3407665448870573); // Set group 1 bol bias 03 (VRL) to 0.4357667359040321 Volts Pacs_BOLC_SET_VRL_G1(0.4357667359040321); // Set group 1 bol bias 20 (VH_BLIND) to 2.202227439151187 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.202227439151187); // Set group 2 bol bias 01 (VH) to 2.5775120822428073 Volts Pacs_BOLC_SET_VH_G2(2.5775120822428073); // Set group 2 bol bias 02 (VL) to -0.4224879177571926 Volts Pacs_BOLC_SET_VL_G2(-0.4224879177571926); // Set group 2 bol bias 03 (VRL) to 0.4022726943042781 Volts Pacs_BOLC_SET_VRL_G2(0.4022726943042781); // Set group 2 bol bias 20 (VH_BLIND) to 2.1622988712184354 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1622988712184354); // Set group 3 bol bias 01 (VH) to 2.607019842418633 Volts Pacs_BOLC_SET_VH_G3(2.607019842418633); // Set group 3 bol bias 02 (VL) to -0.3929801575813674 Volts Pacs_BOLC_SET_VL_G3(-0.3929801575813674); // Set group 3 bol bias 03 (VRL) to 0.42413749621724284 Volts Pacs_BOLC_SET_VRL_G3(0.42413749621724284); // Set group 3 bol bias 20 (VH_BLIND) to 2.182052256680688 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.182052256680688); // Set group 4 bol bias 01 (VH) to 2.629606099011634 Volts Pacs_BOLC_SET_VH_G4(2.629606099011634); // Set group 4 bol bias 02 (VL) to -0.37039390098836616 Volts Pacs_BOLC_SET_VL_G4(-0.37039390098836616); // Set group 4 bol bias 03 (VRL) to 0.41622739514224655 Volts Pacs_BOLC_SET_VRL_G4(0.41622739514224655); // Set group 4 bol bias 20 (VH_BLIND) to 2.176626619436571 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.176626619436571); // Set group 5 bol bias 01 (VH) to 1.985885288691232 Volts Pacs_BOLC_SET_VH_G5(1.985885288691232); // Set group 5 bol bias 02 (VL) to -0.41411471130876787 Volts Pacs_BOLC_SET_VL_G5(-0.41411471130876787); // Set group 5 bol bias 03 (VRL) to 0.4096080690310894 Volts Pacs_BOLC_SET_VRL_G5(0.4096080690310894); // Set group 5 bol bias 20 (VH_BLIND) to 2.1644779360149737 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.1644779360149737); // Set group 6 bol bias 01 (VH) to 2.0210209551931566 Volts Pacs_BOLC_SET_VH_G6(2.0210209551931566); // Set group 6 bol bias 02 (VL) to -0.3789790448068432 Volts Pacs_BOLC_SET_VL_G6(-0.3789790448068432); // Set group 6 bol bias 03 (VRL) to 0.4239332746292668 Volts Pacs_BOLC_SET_VRL_G6(0.4239332746292668); // Set group 6 bol bias 20 (VH_BLIND) to 2.1796480894734325 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1796480894734325); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //*********************************************************** // Bias 12 (Vh-Vl)bleu = 3.3 Volts, (Vh-Vl)rouge = 2.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.981170520690957 Volts Pacs_BOLC_SET_VH_G1(2.981170520690957); // Set group 1 bol bias 02 (VL) to -0.3188294793090427 Volts Pacs_BOLC_SET_VL_G1(-0.3188294793090427); // Set group 1 bol bias 03 (VRL) to 0.4234907185268778 Volts Pacs_BOLC_SET_VRL_G1(0.4234907185268778); // Set group 1 bol bias 20 (VH_BLIND) to 2.187707391136623 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.187707391136623); // Set group 2 bol bias 01 (VH) to 2.90972510268461 Volts Pacs_BOLC_SET_VH_G2(2.90972510268461); // Set group 2 bol bias 02 (VL) to -0.3902748973153899 Volts Pacs_BOLC_SET_VL_G2(-0.3902748973153899); // Set group 2 bol bias 03 (VRL) to 0.41507556952678404 Volts Pacs_BOLC_SET_VRL_G2(0.41507556952678404); // Set group 2 bol bias 20 (VH_BLIND) to 2.1771251010500934 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.1771251010500934); // Set group 3 bol bias 01 (VH) to 2.9629000628153523 Volts Pacs_BOLC_SET_VH_G3(2.9629000628153523); // Set group 3 bol bias 02 (VL) to -0.33709993718464726 Volts Pacs_BOLC_SET_VL_G3(-0.33709993718464726); // Set group 3 bol bias 03 (VRL) to 0.44476673788957455 Volts Pacs_BOLC_SET_VRL_G3(0.44476673788957455); // Set group 3 bol bias 20 (VH_BLIND) to 2.204708823890883 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.204708823890883); // Set group 4 bol bias 01 (VH) to 2.954512570832443 Volts Pacs_BOLC_SET_VH_G4(2.954512570832443); // Set group 4 bol bias 02 (VL) to -0.34548742916755676 Volts Pacs_BOLC_SET_VL_G4(-0.34548742916755676); // Set group 4 bol bias 03 (VRL) to 0.41467669035170157 Volts Pacs_BOLC_SET_VRL_G4(0.41467669035170157); // Set group 4 bol bias 20 (VH_BLIND) to 2.174854321757311 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.174854321757311); // Set group 5 bol bias 01 (VH) to 2.177408017162427 Volts Pacs_BOLC_SET_VH_G5(2.177408017162427); // Set group 5 bol bias 02 (VL) to -0.42259198283757327 Volts Pacs_BOLC_SET_VL_G5(-0.42259198283757327); // Set group 5 bol bias 03 (VRL) to 0.42489482807292744 Volts Pacs_BOLC_SET_VRL_G5(0.42489482807292744); // Set group 5 bol bias 20 (VH_BLIND) to 2.182762150249038 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.182762150249038); // Set group 6 bol bias 01 (VH) to 2.1974322167664 Volts Pacs_BOLC_SET_VH_G6(2.1974322167664); // Set group 6 bol bias 02 (VL) to -0.4025677832336002 Volts Pacs_BOLC_SET_VL_G6(-0.4025677832336002); // Set group 6 bol bias 03 (VRL) to 0.42316906139092536 Volts Pacs_BOLC_SET_VRL_G6(0.42316906139092536); // Set group 6 bol bias 20 (VH_BLIND) to 2.1787256451671984 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.1787256451671984); // Wait for 60 s for stabilization delay(60); // Measurement during measure_time (s) TMMarker601(); delay(measure_time); TMMarker600(); //******************************** // Epilogue : Set the safe biases //******************************** PHOT_set_bias_volt(endBiasTable,1); PHOT_set_bias_volt(endBiasTable,2); PHOT_set_bias_volt(endBiasTable,3); PHOT_set_bias_volt(endBiasTable,4); PHOT_set_bias_volt(endBiasTable,5); PHOT_set_bias_volt(endBiasTable,6); // // sync the bus sync(); } // Missionphase : // // Purpose : Perform Setup Photometry according to TM's input: // Scripts: // a) tm_phot_dpu_dmc_setup.tcl // b) tm_phot_mec_setup.tcl // c) tm_phot_sequencer_setup.tcl // d) tm_phot_polar_bestM7_setup.tcl // (Setting of optimal polarisations in the cold 0.3K) // e) tm_phot_change_datamode.tcl <"Bolo & HK"> // f) tm_phot_change_seq_mode.tcl <"Sbolo-Sref"> // g) PACS_Phot_Gain_high.tcl // (gain setting <"high">) // h) tm_phot_spu_setup.tcl // // // CUS author : DAC // Script file : PHOT_setup.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 3.0 // History: // 0.1 DAC 22-apr-2005 // 0.2 DAC 25-apr-2005 New default: Do not start SPU // 1.0 TM 12-apr-2006, update for FM with new settings // 1.1 TM 08-aug-2006, new procedure to read bias tables in [V] // 1.2 TM 10-oct-2006, autonomy function added // 2.0 DAC 17-oct-2006 Use BIAS tables in volts, eliminate useless // timing calculation, call with BIAS table name and // initial filter position, initial CS temperatures // 2.1 TM 08-Nov-2006 add the switch on of the groups // 2.2 TM 08-Nov-2006 autonomy function 17 added // 2.3 TM 08-Nov-2006 autonomy functions modified again (moved to PHOT_switchon_groups) // 2.4 TM 10-Nov-2006 default bias table changed, low gain // 2.5 13-nov-2006 Use RAW bias tables // 2.6 15-nov-2006 Using volts again // 2.7 8-dec-2006 Add temperature autonomy function // 2.8 5-mar-2007 update for chopper, CSs // 2.9 4-apr-2007 TM: number of raw channels set to zero // 3.0 9-apr-2007 TM & KO: update of AFs // 3.1 9-apr-2007 TM & KO: AF 15 taken out again // 3.2 21-aug-2007 SRC-3507 Indicate end of BB // Sync bus at end of script // 3.3 06-oct-2008 TM & VDP: PHOT_change_seq_mode set to Sref_only // 3.4 12-nov-2008 KO: gotoDirect option added // int[] block PHOT_setup PACS 200 { string calUfile = "BOLObias_preILT_standard_low"; //BIAS table name string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double set_CS1 = 48.0; // CS1 settings (ohms) double set_CS2 = 58.0; // CS2 settings (ohms) bool gotoDirect = true in [true,false]; // DDCS setting to Direct setting }{ // Register BBID with environment WriteBBID($BBID); // Define variables to communicate various durations to HSPOT. int time_start = time(); PHOT_dpu_dmc_setup("BOTH Array",4); // Place filter wheel PHOT_dmc_setup(fltPOS,0,set_CS1,set_CS2); // switch on groups and enable AF 17 PHOT_switchon_groups(); // Set polarisations PHOT_set_bias_volt(calUfile,1); PHOT_set_bias_volt(calUfile,2); PHOT_set_bias_volt(calUfile,3); PHOT_set_bias_volt(calUfile,4); PHOT_set_bias_volt(calUfile,5); PHOT_set_bias_volt(calUfile,6); // Set sequencer PHOT_seq_setup(); // Set data mode PHOT_change_data_mode("Bolo_HK"); // PHOT_change_seq_mode("Sb_Sref"); New setup post-SOVT1 // Now we set the direct mode post-SOVT1 int operand = 0; if(gotoDirect) { //********************************************************* // Sequence mode : blocking on VDEC_X for the direct mode //********************************************************* // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); } else { // Set seq mode Sb_Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb_Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); } // Set gain LOW PHOT_set_gain("LOW"); // Set SPU but do not start it yet PHOT_spu_setup(0,0,0,0,false); // Time spent int duree_TCs = time() - time_start; int duree_num = duree_TCs; // Return the array of times int[] time_array = [duree_num,0,0,0,0]; // // enable AF 12 (to check for the protection biases) Pacs_DPU_SET_FUNCT("EVENT_BOL_BIAS","ENABLE"); // enable AF 14 to check for TEMP_EV < 0.3 K Pacs_DPU_SET_FUNCT("EVENT_BOL_T_FPU","ENABLE"); // enable AF 15 (to check for the VSS currents of groups and BUs) // Pacs_DPU_SET_FUNCT("EVENT_BOL_I_RO","ENABLE"); // Mark end of BB WriteEndBB(); // Sync bus sync(); return time_array; } // CVS comments : $Id: SPEC_get_grat_info.txt,v 1.12 2007/10/25 12:15:43 dcesarsk Exp $ // Purpose : Estimate grating parameters by referring to the U-CAL SPEC_BAND_params_PV and // grating calibration file mentioned therein // // CUS author : DAC // Script file : SPEC_get_grat_info_PV.txt // // Input arguments // type name description // double waveLen Desired wavelength [microns] // // Return values // Type Description // tuple {double,int,int, {waveLen,order,gratPos, // int,int} nbSteps,stepSize} // // Description : Access the table SPEC_BAND_params_PV. Verify that the given // wavelength is within range; obtain order and the name of the GratCal // grat vs. wavelength table. Get nominal grating position from GratCal table. // Returns the grating position such that nominal grating position will be // acchieved after nbSteps/2 steps // // Dependencies : // // Preconditions : // // Comments : With current version of lookup, first column has to be of // type string // // History : 0.1 22-may-2008 DAC As SPEC_get_grat_info but reading // SPEC_BAND_params_PV {double,int,int,int,int} procedure SPEC_get_grat_info_PV { double waveLen = 54.0 in [54.0,210.0]; // Sought wavelength string resol = "HI" in ["HI","MED","LOW","KHI","KMED","KLOW"]; // Desired resolution bool switching = true; // Return central pixel if true string extraConf = "normal" in ["normal","bright"]; string orderSel = "order2"; bool verbose = false; }{ // PacsRangeSpec may call with sedN instead of orderSelN; use // "conversion" table for sedN => orderSelN if(orderSel == "sed2") { orderSel = "order2"; } if(orderSel == "sed3") { orderSel = "order3"; } if(orderSel == "sed4") { orderSel = "order2"; } if(verbose) { debug_print("SPEC_get_grat_PV: order " + orderSel); } // Open and read SPEC_BAND_params_PV table. Table indexed by ORDER // Try two possible ORDERs: order 1 and order indicated by orderSel // Start with order = 1 int order = 1; bool found = false; int nbSRCH = 0; while(!found && nbSRCH < 2) { // SCR-3164. Deal with "L" lines string key = "L" + order; // SCR-3632 Deal with key wavelengths if(resol == "KHI" || resol == "KMED" || resol == "KLOW") { key = "K" + order; } // read BLU and RED edges of the SPEC bands double blu = dlookup("SPEC_BAND_params_PV",key,"BLU"); double red = dlookup("SPEC_BAND_params_PV",key,"RED"); found = blu <= waveLen && red >= waveLen; if(verbose) { debug_print("SPEC_get_grat: Switching is " + switching); debug_print("SPEC_get_grat: Wave " + waveLen); debug_print("SPEC_get_grat: FOUND " + found); debug_print("SPEC_get_grat: key " + key); debug_print("SPEC_get_grat: nbSRC " + nbSRCH); } // If not yet found search in order indicated by orderSel if(!found) { if(orderSel == "order2") { order = 2; } if(orderSel == "order3") { order = 3; } nbSRCH = nbSRCH + 1; } } // If given wavelength not found there is a problem if(!found) { error("Wavelength " + waveLen + " is not within " + orderSel); } // Found the ORDER. Get now the name of position vs. wavelength gratPosTab string gratPosTab = slookup("SPEC_BAND_params_PV",key,"CAL_FILE"); // Read the step size and the number of steps for this ORDER and resolution // Recast "resol" as it was before SCR3632 if(resol == "KHI") { resol = "HI"; } if(resol == "KMED") { resol = "MED"; } if(resol == "KLOW") { resol = "LOW"; } // Special case for "bright" source if(extraConf == "normal") { int stepSize = ilookup("SPEC_BAND_params_PV",key,resol); int nbSteps = ilookup("SPEC_BAND_params_PV",key,"NSTEPS"); } if(extraConf == "bright") { stepSize = ilookup("SPEC_BAND_params_PV",key,resol); nbSteps = ilookup("SPEC_BAND_params_PV",key,"FASTSTEP"); } // Get from gratPosTab the grating position corresponding to waveLen double gratPosDble = interpolate(gratPosTab,"grat_pos",waveLen); // gratPos will place waveLen in the middle of the array int gratPos = iround(gratPosDble); if(verbose) { debug_print("SPEC_get_grat Nominal wavelen: " + waveLen); debug_print("SPEC_get_grat Nominal grating: " + gratPos); } // Grating is scanned with a negative step size (increasing wavelength) // The grating start position should then be such that after nbSteps/2 we // are at nominal position: // gratPos = gratStartPos - stepSize*nbSteps/2 // hence: int gratStartPos = iround(gratPosDble + double(stepSize) * double(nbSteps) / 2.0); // and will scan by decreasing grating angle, i.e. negative step size: stepSize = -stepSize; // If frequency switch return return gratPos (central pixel) if(switching) { gratStartPos = gratPos; } if(verbose) { debug_print("SPEC_get_grat_PV: reads SPEC_BANDS_PV"); debug_print("SPEC_get_grat_PV: WAVE/order/gratNOMINAL/gratSTRT: " + waveLen + "/" + order + "/" + gratPos + "/" + gratStartPos); debug_print("SPEC_get_grat: nbSteps/stepSize: " + nbSteps + "/" + stepSize); } return {waveLen,order,gratStartPos,nbSteps,stepSize}; } // CVS comments : $Id: DMC_chop_grat_scan_cal.txt,v 1.3 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : EQM IMT // // Purpose : Compute duration of DMC Sequence 11 : Chopped grating scan // calibration (OBCP #13) // // Author : DAC // CUS script : DAC // CVS file : // // Arguments : // // Description : Detailed calibration sequence on the internal sources. The // nominal use of this sequence may be to move the grating at // rough (few micron) step sizes through the PACS spectral // ranges and perform small, chopped up-down scans at fine // grating step sizes on the internal calibration sources. // Note that the spectroscopy field of view fits ~3 times // into the calibration sources field of view. Therefore this // sequence may be called with different absolute chopper // positions for the two internal PACS calibration sources in // order to obtain averaging of possible inhomogeneities of the // calibration sources field of views. // For more details see PACS-ME-LI-005, section 4.2.7 // // Dependencies : None // // Preconditions: N/A // // Comments : No single command is executed here, only the duration is // computed here. Hence, not all parameters of the actual DMC // Seq. are relevant here! // // Version : 1.0 // // History : 1.0 25-Apr-2005 Creation by DAC // 1.1 14-feb-2007 WAIT=1 for chopper is now considered a // useful observation // // int[] procedure DMC_chop_grat_scan_cal { int nb_up_dn = 1; // Seq P#1 Nb of sequences: up down up ... int nb_grat_steps = 16; // Seq P#3 Nb of grating steps int nb_cycles_grat = 2; // Seq P#5 Nb cycles/grating position int nb_ramps_grat_pos = 3; // Seq P#7 Nb of ramps per grating position }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start of pseudo code // // WAIT 1 ; have a defined start duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // LOOP P#1 ; main loop for(int loop1 = 1 .. nb_up_dn) { // WAIT 1 ; wait for grating duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#2 ; incr. grating rough // LOOP P#3 ; grating loop up for(int loop2 = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#4 ; incr. grating fine // LOOP P#5 ; chop readout cycle for(int loop3 = 1 .. nb_cycles_grat) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to BB1 // LABEL 65 ; indicate BB1 // WAIT P#7 ; take P#7 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_CAL = duree_CAL + nb_ramps_grat_pos; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chopper to BB2 // LABEL 129 ; indicate BB2 // WAIT P#7 ; take P#7 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_CAL = duree_CAL + nb_ramps_grat_pos; // END_LOOP ; chop readout cycle done } // END_LOOP ; grating scan up done } // LOOP P#3 ; grating loop down for(int loop4 = 1 .. nb_grat_steps) { // WAIT 1 ; sync. for grating duree_num = duree_num + 1; duree_OVR = duree_OVR + 1; // MOVE_GRATING_RELATIVE P#9 ; decr. grating fine // LOOP P#5 ; chop readout cycle for(int lopp5 = 1 .. nb_cycles_grat) { // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#6 ; chopper to BB1 // LABEL 65 ; indicate BB1 // WAIT P#7 ; take P#7 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_CAL = duree_CAL + nb_ramps_grat_pos; // WAIT 1 ; sync. for chopper duree_num = duree_num + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE P#8 ; chopper to BB2 // LABEL 129 ; indicate BB2 // WAIT P#7 ; take P#7 ramps duree_num = duree_num + nb_ramps_grat_pos; duree_CAL = duree_CAL + nb_ramps_grat_pos; // END_LOOP ; chop readout cycle done } // END_LOOP ; grating scan down done } // END_LOOP ; main loop done } // WAIT 1 ; complete last plateau duree_num = duree_num + 1; duree_CAL = duree_CAL + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // 9 Parameters: // nb of "up-down" sequences (P#1); // rough grating step size (P#2); // 2 chopper positions for internal calibration sources (P#6, P#8); // nb of readouts per chopper position (P#7); // nb of chopper cycles per grating position (P#5); // size of relative grating move up (P#4); // size of relative grating move down (P#9); // nb of grating steps fine (P#3) // Note: Usually P#4 = -P#9 (P#3 is unique for loops up and down. // Hence, P#4 ==/ P#9 corresponds not to cover the same wavelength range // during up- and down-scans) // Sequence duration, in ramps : // 2 + P#1 * { 1+ 2 * P#3 * [1+ 2 * P#5 * (1+ P#7)]} // "Theoretical" duration" // int duree_DMC = 2 + nb_up_dn*(1+2*nb_grat_steps* // (1+2*nb_cycles_grat*(1+nb_ramps_grat_pos))); // Create time_array int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // debug_print("+++ DMC(13) reports: " + duree_DMC + " [ramps]"); return time_array; } // Missionphase : // // Purpose : Generic PACS spectroscopy AOT setup // // Author : Diego A. Cesarsky, HF // CUS script : Diego A. Cesarsky // CVS file : SPEC_aot_prologue.txt // // Arguments : // type Name DefVal Description // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' length // double bias_d_red 0.07 BIAS_D for red spectro (0-1V) // double bias_r_red 0.011 BIAS_R for red spectro (0-1V) // double bias_d_blu 0.21 BIAS_D for blue spectro (0-1V) // double bias_r_blu 0.011 BIAS_R for blue spectro (0-1V) // int capa_red 8 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 8 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // int comp_mode_blu 16 Compression mode blue channel // int comp_mode_red 16 Compression mode red channel // int nb_samp_subramp_blu 64 Number of blue samples per sub-ramp // int nb_samp_subramp_red 64 Number of red samples per sub-ramp // int nb_raw_spu_blu 1 Number of raw channels transmitted by SPUS // int nb_raw_spu_red 1 Number of raw channels transmitted by SPUL // int glitch_det 1 Glitch detection; 0=on; 1=off // int ramp_fit_alg 1 Ramp fit algorithm [0=LstSq;1=mean value] // int filter 0 Desired FLTW position (0: ignore FLTW) // // // Description : Calls successively: // - SPEC_cre_setup: generic setup of detectors for AOT // - SPEC_spu_setup: generic AOT setup of SPU // - SPEC_fltw_move: Move FWSPEC to default position // - SPEC_MOV_CHOP_and_GRAT: Move chopper and grating to // default position // // Dependencies : SPEC_fltw_move // SPEC_cre_setup // SPEC_spu_setup // SPEC_MOV_CHOP_and_GRAT // // Preconditions : // // Comments : This BB belongs to the 100 series (spectro) // // Version : 0.1 7-Oct-2004 Creation by DAC // History : 0.2 12-Oct-2004 Revised after revision of the used // 1.0 7-jun-2005 Adapted for SPEC_MEC_defalut table giving // filter position as {int} // 1.1 29-aug-2005 Added "whoCalledMe" to SpecSlewCal // 1.2 1-sep-2005 Added verbose // procedures // 0.3 18-Oct-2004 Was SPEC_prologue; normalized variable names // 0.4 22-Oct-2004 Use new SPEC_cre_setup; cre_ctrl default // is for capa_xx = 0, heater no longer handled by SPEC_cre_setup // 1.0 22-Apr-2005 HF introduce mechanisms to default and // removed duplicate stop SPUs // 1.1 10-May-2005 DAC Renamed HF's tables without ".txt" // Removed spurious "delay()" at end of block (each called // module sets it own delay) // 1.2 12-apr-2006 No longer moves FLTW // 1.3 1-jun-2006 Reinstated FLTW using passed value (null means ignore // FLTW logic) // 1.4 6-dec-2006 Adapted for SPEC_fltw_move from ILT // : int[] block SPEC_aot_prologue_DataRates PACS 112 { int ramp_len_red = 64; // Red ramps' length int ramp_len_blu = 64; // Blue ramps' length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.011 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.011 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 8; // Capacitor red (0=100f,4=300f,8=1pf,12=3pF) int capa_blu = 8; // Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 64; // Number of blue samples per sub-ramp int nb_samp_subramp_red = 64; // Number of red samples per sub-ramp int nb_raw_spu_blu = 1; // Number of raw channels transmitted by SPUS int nb_raw_spu_red = 1; // Number of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0:LstSq;1:MeanVal] int filter = 0; // Desired FLTW position (0: ignore filter) bool verbose = true; }{ // Register start of BB WriteBBID($BBID); // before SPU started: set data_rate data_rate(120.0); // Define the elements of time_array int duree_sec = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); // Accumulated duree [milliseconds] int duree_msec = 0; // Perform SPEC_cre_setup. // NOTE: capa_xxx is added to cre_ctrl_xx within SPEC_cre_setup int cre_ctrl_red = 386; int cre_ctrl_blu = 386; int duree2 = SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); duree_msec = duree_msec + duree2; if(verbose) { debug_print("duree of SPEC_cre_setup: " + duree2); } // Perform SPEC_spu_setup, starting SPU bool startSPU = true; int duree3 = 0; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); duree_msec = duree_msec + duree3; // Position filter wheel at desired position // Look up table order <=> telecommand ENG parameter string[] fltPOS = ["N/A","NoFilter","POS B","POS A"]; // Command only for filter 2 or 3 if(filter == 2 || filter == 3) { string fw_posENG = fltPOS[filter]; int duree4 = SPEC_fltw_move(fw_posENG); // WARNING! SPEC_fltw_move returns its duration in [sec] duree_msec = duree_msec + 1000 * duree4; if(verbose) { debug_print("SPEC_aot_prologue turns FLTW to " + fw_posENG); } } // Position chopper and grating at their default positions int chop_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); int grat_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); if(verbose) { debug_print("Moving CHOP and GRAT to positions: " + chop_pos + ", " + grat_pos); } int[] duree5 = SPEC_MOV_CHOP_and_GRAT(chop_pos,grat_pos); duree_msec = duree_msec + duree5[0]; // Total time is now computed including TC rate duree_sec = time() - time_start; // All the time spent here is OVR duree_OVR = duree_sec; // Define time_array int[] time_array = [duree_sec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // Report duration if(verbose) { debug_print("+++++ SPEC_aot_prologue: " + time_array); } // Return the array of times //Reset Block ID WriteEndBB(); //Return time_array return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // // Missionphase : PACS IST Chopper Day // // Purpose : Switch-on/switch-off and enanle/disable test of chopper // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : This script allows to insert a duration in seconds during // which the chopper is switched-on and enabled. This is used // to evaluate the // stability of the chopper while selecting various chopper // control parameters. // // Comments : // // Version : 4.0 // History : 1.0 20-Mar-2007 initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // 2.0 05-Jul-2007 IST Chopper Day // 3.0 12-Nov-2007 edited for SVT/PV conformance // 4.0 -4-mar-2008 translated into PV script VDP // obs PacsEng_Chopper_EnDis_Test_ast300 { /* Needed variables to call PacsEng_Chopper_EnDis_Test_ast300 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_EnDis_Test_ast300 */ }{ // 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(PACS_Chopper_EnDis_Test_NoConf_ast300())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_EnDis_Test_NoConf_ast300(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_CRE_Setup_Cold_HeI.cus // Missionphase : PACS EQM Test // // Purpose : Configure CRE bias, reset interval and capacitor for // testing at room temperature // // Author : H. Feuchtgruber // CUSification : DAC // Comments : Intermediate version // // // Version : 1.0 // History : 1.0 / 24-Nov-2006 IBased on PACS_Spec_CRE_Setup_Cold // 1.1 7-mar-2006 SPEC_HEAT_1_C renamed // 1.2 10-apr-2006 Modified heater setting for FM // 1.3 06-nov-2006 HF - Changed bias_r to 82 // 1.4 13-nov-2005 Changed bias_r to 12 procedure PACS_Spec_CRE_Setup_Cold_HeI { }{ int red_reset = 64; int blue_reset = 64; int red_bias_d = 4; int red_bias_r = 12; int blue_bias_d = 4; int blue_bias_r = 12; int red_capacitor = 0; int blue_capacitor = 0; int heater_blue = 0; // PC174420 "DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on int blue_cre_ctrl = blue_capacitor + 256 + 128 + 2 + 1; int[] list_int = [32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0,chksum); delay(1); // PC173420 "DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on // set red_cre_ctrl [expr $red_capacitor+256+128+2+1] // set spec_par_r [list {PP095420 32} \ // [list PP096420 $red_reset] \ // [list PP097420 $red_cre_ctrl] \ // [list PP098420 $red_bias_r] \ // [list PP099420 $red_bias_d] {PP100420 0}] // set chksum [getChkSum -d -32 $spec_par_r] // putlog "ChkSum for spec_par_r: $spec_par_r" int red_cre_ctrl = red_capacitor + 256 + 128 + 2 + 1; list_int = [32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0]; chksum = checksum("int",list_int); Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0,chksum); delay(1); // PC094420 "DMC_SET_PAR_BOTH_SPEC" SEND COMPLETE PARAMETERS TABLE TO BOTH DECS // tcsend PC094420 // waittime 0.5 Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC //tcsend PC086420 //waittime 0.5 Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC //tcsend PC093420 //waittime 0.5 Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SET_B_SPE_HEAT_1C(0) // eval tcsend PC087420 [list [list PP073420 $heater_blue]] // waittime 0.5 Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(heater_blue); delay(1); //----------------- // End of Procedure //----------------- } // Missionphase : FM ILT // // Purpose : Performance Test of internal PACS calibration sources // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We start with a heat-up of the calibration sources. // After monitoring for some while the behaviour on the desired temperature of // both internal PACS calibration sources, we do a smaller heat-up which is followed // by a cooling down. The monitoring is based on diag. HK. // PTD 0.7.11 and 0.7.12 are the basis for this test. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT Tests. // // Version : 1.0 // // History : // 1.0 09-11-06 HD. Adapted on FM ILT requirements. // 2.0 24-02-07 HD. Adapted for FM ILT. block SPEC_CS_fmilt071112_switchoff_cs_bb PACS 477 { }{ // Register start of BB WriteBBID($BBID); //Switchff and disabling CSs Pacs_DMC_DISABLE_BB_1_CONT(); Pacs_DMC_SWOF_BB_1_CONT(); Pacs_DMC_DISABLE_BB_2_CONT(); Pacs_DMC_SWOF_BB_2_CONT(); // Mark End of Block WriteEndBB(); } // Missionphase : // // Purpose : Read a BOLObias calibration table and command bias // voltages for VH, VL, VRL and VH_BLIND group by group // // Author : Koryo Okumura // CUS script : Koryo Okumura modified from PHOT_set_bias_volt.txt // CVS file : PHOT_change_bias_volt.cus // // Arguments : // string calTableName The Cal table name, f.i. BOLObias or BOLOsafe // // Description : Read VH, VL, VRL and VH_BLIND from a given Bias U-CAL // tables in volts and command them // // Dependencies : // // Preconditions : The other biases should be alredy set by PHOT_set_bias // or PHOT_set_bias_volt // // Comments : This script is used especially in calibration purpose // // Version : 1.0 // History : // 24-aug-2006 KO, First try // 22-jul-2008 KO, Reformatted for CP, PV and operation phase // procedure PHOT_change_biases { string biasTable = "BOLObias_standard_high"; // Bias table [volts] string setting = "NO_CHANGE" in ["NO_CHANGE","DIRECT","DDCS"]; // Readout mode string gain = "NO_CHANGE" in ["NO_CHANGE","LOW","HIGH"]; // Gain }{ int operand = 0; // Bias setting order string[] biasOrder = ["VH","VL","VRL","VH-BLIND"]; // Introduce 1 sec delay after commanding each bias (not used) int waitFor = 1; for(int groupNb = 1 .. 6) { // Construct BiasGR entry string biasGR = "BiasGR" + groupNb; for(int index = 0 .. 3) { // Use lookup function; get BIAS voltage for given group and Bias number // For each BIAS defined in table and for the given group int biasNb = ilookup(biasTable,biasOrder[index],"Bias"); double biasVolt = dlookup(biasTable,biasOrder[index],biasGR); // Branch according to group number if(groupNb == 1) { PHOT_bias_group_1(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 2) { PHOT_bias_group_2(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 3) { PHOT_bias_group_3(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 4) { PHOT_bias_group_4(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 5) { PHOT_bias_group_5(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 6) { PHOT_bias_group_6(groupNb,biasNb,biasOrder[index],biasVolt); } } } // Set the readout mode if(setting == "DIRECT") { //********************************************************* // Sequence mode : blocking on VDEC_X for the direct mode //********************************************************* // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //********************************************************** // Sequence mode : Sref_only (meaning set for the bolometer) //********************************************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); } if(setting == "DDCS") { //************************************************************ // Sequence mode : deblocking on VDECX-L for the DDCS mode //************************************************************ // string[] paramName = ["VDECX-L","CKRLH"]; for(int grpNb = 1 .. 6) { // Construct BiasGR entry biasGR = "BiasGR" + grpNb; for(int indx = 0 .. 1) { // Use lookup function; get BIAS voltage for given group and Bias number // For each BIAS defined in table and for the given group biasNb = ilookup(biasTable,paramName[indx],"Bias"); biasVolt = dlookup(biasTable,paramName[indx],biasGR); // Branch according to group number if(grpNb == 1) { PHOT_bias_group_1(grpNb,biasNb,paramName[indx],biasVolt); } if(grpNb == 2) { PHOT_bias_group_2(grpNb,biasNb,paramName[indx],biasVolt); } if(grpNb == 3) { PHOT_bias_group_3(grpNb,biasNb,paramName[indx],biasVolt); } if(grpNb == 4) { PHOT_bias_group_4(grpNb,biasNb,paramName[indx],biasVolt); } if(grpNb == 5) { PHOT_bias_group_5(grpNb,biasNb,paramName[indx],biasVolt); } if(grpNb == 6) { PHOT_bias_group_6(grpNb,biasNb,paramName[indx],biasVolt); } } } // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sbolo-Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sbolo-Sref"); //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); } if(gain != "NO_CHANGE") { //************************************** // Start SPU in the appropriate setting // including bits rounding for high gain //************************************** PHOT_spu_gain_setup(gain,0,0,3,3,true); delay(1); } // to sync the bus sync(); } // Script : Pacs_Chopper_AutoOpt.txt // Missionphase : Commissioning // // Purpose : Check a series of different chopper controller settings by // chopping between +/- 12000 units (~4 deg) // // Author : Markus Nielbock/Helmut Dannerbauer // CUS author : MN/HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-12000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions: PACS switched on and Chopper switched off. // // Comments : This script is based on the commanding script // PACS_Chopper_uk_move_12000_OBS.cus // // Version : 1.1 // // History : 1.0 20-Nov-2007 (MN) Script to do simple chopper cycle // 1.1 10-Mar-2008 (MN) adopted extended CUS naming conventions // 1.2 19-May-2008 (MN) added +3 to all parameters (XHSPOT bug) // // Initialise input parameters: // Defines control parameter range, loops run from k(p,i,c,f)min to // k(p,i,c,f)max defining the inverse of the ratio of parameter change w.r.t. // the default value. procedure Pacs_Chopper_AutoOpt_bug { int kpmin = 3 in [0,6]; int kpmax = 3 in [0,6]; int kimin = 3 in [0,6]; int kimax = 3 in [0,6]; int kcmin = 3 in [0,6]; int kcmax = 3 in [0,6]; int kfmin = 3 in [0,6]; int kfmax = 0 in [0,6]; }{ // PACS instrument code for BBID int instrument = 0x40000000; // chopper position (approx. +/- 4 deg in FPU) int chop_pos = 12000; // number of chop cycles int cycle = 10; // length of plateau time in seconds int plateau_time = 2; // Initialise variables for conversion from int to string and double string sU = "+0"; string sV = "+0"; string sW = "+0"; string sX = "+0"; double dU = 0.0; double dV = 0.0; double dW = 0.0; double dX = 0.0; int bU = 0x4000; int bV = 0x400; int bW = 0x40; int bX = 0x4; // CALU table file to be accessed string fileU = "PacsTable_CONFChopper_auto"; // Start diag. HK SPEC_Chopper_dhk_5hk_1khz_bb(); // Cycle through calibration table columns if(kpmax < kpmin) { kpmax = kpmin; } if(kimax < kimin) { kimax = kimin; } if(kcmax < kcmin) { kcmax = kcmin; } if(kfmax < kfmin) { kfmax = kfmin; } for(int u = kpmin - 3 .. kpmax - 3) { for(int v = kimin - 3 .. kimax - 3) { for(int w = kcmin - 3 .. kcmax - 3) { for(int x = kfmin - 3 .. kfmax - 3) { // calculate inverse -> ratio of changes if(u != 0) { dU = 1.0 / double(u); } else { dU = 0.0; } if(v != 0) { dV = 1.0 / double(v); } else { dV = 0.0; } if(w != 0) { dW = 1.0 / double(w); } else { dW = 0.0; } if(x != 0) { dX = 1.0 / double(x); } else { dX = 0.0; } if(abs(dU + dV + dW + dX) < 0.01) { // convert int to string variables // and determine BBID for column recovery // BBID is a 32 bit word with: // 2 bits: Instrument (PACS = 01) // 14 bits: block number (not used here) // 16 bits: a counter, used here as follows: // 4 bits for every PID parameter (P, I, C, F) // of this: 2 bits for the sign (01 = +, 10 = -) // 2 bits for the number (01, 10, 11 = 1, 2, 3) if(u >= 0) { sU = "+" + u; bU = 16384 + 4096 * u; } else { sU = "" + u; bU = 32768 - 4096 * u; } if(v >= 0) { sV = "+" + v; bV = 1024 + 256 * v; } else { sV = "" + v; bV = 2048 - 256 * v; } if(w >= 0) { sW = "+" + w; bW = 64 + 16 * w; } else { sW = "" + w; bW = 128 - 16 * w; } if(x >= 0) { sX = "+" + x; bX = 4 + x; } else { sX = "" + x; bX = 8 - x; } // construct column identifier string calUcol = "P" + sU + "I" + sV + "C" + sW + "F" + sX; debug_print("CALU column is " + calUcol); int bbid = instrument + bU + bV + bW + bX; WriteBBID(bbid); // Upload Chopper Controller Parameter CONF_chopper(fileU,calUcol); delay(2); // Switch on and enable chopper controller PACS_Chopper_SWON_SWOF_only("ON"); delay(2); EnDis_chopper("ON"); delay(5); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // chop cycle int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // Disable and switch off chopper controller EnDis_chopper("OFF"); delay(2); PACS_Chopper_SWON_SWOF_only("OFF"); delay(5); } } } } } // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); sync(); } // $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 // // 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 */ }{ // 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())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_phot_fltw(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : CQM // // Purpose : CONFigure the CSs servo loops // // Author TCL : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : CONF_cs.txt // // Arguments : This version uses the hardcoded parameters found in the // DEC/MEC User Manual V3.3 // // type name default Description // string whichCS "CS1" Which CS is configured // Description : // // Dependencies : // // Preconditions : // // Comments : Current version (0.2) uses hardcoded values from DEC/MEC // SUM V3.3 // // Version : 0.3 // History : 0.1 13-Oct-2004 Creation by DAC // : 0.2 27-apr-2005 DAC Added missing 7th argument // : 0.3 30-sep-2005 CS1 and CS2 were called with same variable // : int procedure CONF_cs { string whichCS = "CS1" in ["CS1","CS2","Both"]; // CS to configure }{ // Tally total duration [milliseconds] int duration_msec = 0; // Use HF's version where everything is hardcoded // Parameters for CS1 int[] aux1 = [1000000,5000,3277,1857,327,0x7fff,0]; int check_sum1 = checksum("int",aux1); {int}[] parlist1 = Array2grp_1(aux1); // Parameters for CS2 int[] aux2 = [1000000,5000,3277,1857,327,0x7fff,0]; int check_sum2 = checksum("int",aux2); {int}[] parlist2 = Array2grp_1(aux2); if(whichCS == "CS1") { Pacs_DMC_WRT_CS1_CONF_PAR(parlist1,check_sum1); } if(whichCS == "CS2") { Pacs_DMC_WRT_CS2_CONF_PAR(parlist2,check_sum2); } if(whichCS == "Both") { Pacs_DMC_WRT_CS1_CONF_PAR(parlist1,check_sum1); Pacs_DMC_WRT_CS2_CONF_PAR(parlist2,check_sum2); } // Set delay int duration_sec = Msec2sec(duration_msec); delay(duration_sec); return duration_msec; } // File : PACS_Close_Launch_Lock.cus // Missionphase : PACS EQM Test // // Purpose : Close the launch lock // // Author : H. Feuchtgruber // CUSification : DAC // Arguments : none // // // Description : This script will do what's necessary to close the launch lock // // Comments : // // Version : 1.0 // History : 1.0 / 17-Nov-2004 initial version // 1.1 4-apr-2006 Adapted to DMC v6.0.1 // 1.2 6-apr-2006 gratPara must be 0x10 for breadboard (User Manual says 0x12) // 1.3 18-Jul-2006 added required wait times after disable grating cntr. procedure PACS_Close_Launch_Lock { }{ debug_print("Start PACS_Close_Launch_Lock"); //DPU_SET_HK_LIST (SPEC for both channels) Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); // Set the mechanisms // PC112420 "DMC_MOVE_GRAT_ABS" MOVE GRATING TO Lock position // PP079420 "SET_POINT" // tcsend PC112420 {PP079420 496000} int gratPos = 496000; Pacs_DMC_MOVE_GRAT_ABS(gratPos); delay(30); // Disable grating contoller Pacs_DMC_DISABLE_GRAT_CONT(); delay(2); // "DMC_LOCK_GRATING" Lock the Grating launch lock // in open loop mode // tcsend PC117420 {PP092420 2} int gratPara = 0x12; Pacs_DMC_LOCK_GRAT(gratPara); delay(12); // "DMC_SWOF_GRAT_CONT" Switch off grating controller Pacs_DMC_SWOF_GRAT_CONT(); delay(1); // --------------------- // End of Procedure // --------------------- } // SpirePOF5Pointing // // $id$ // // This procedure calculates and returns the pointing parameters for the POF5 observing mode // // 13/04/07: SCR3010 - changed default obsMode // {int,int,int,int,int,double,double} procedure SpirePOF5Pointing { string obsMode = "POF5_S_N"; int nMaps = 1; // total number of number of maps to perform int nLines = 1; // number of lines per map int nCal = 99999; // number of lines per Gyro calibration int nFlash = 99999; // number of lines per PCAL flash }{ // // ***** fetch fixed operating mode parameters ***** // bool initFlash = blookup("SpireParms.txt",obsMode,"InitFlash"); // initial flash flag bool endFlash = blookup("SpireParms.txt",obsMode,"EndFlash"); // final flash flag double rate = dlookup("OpsParms.txt",obsMode,"ScanRate"); // scan rate double d2 = dlookup("OpsParms.txt",obsMode,"D2"); // scan line separation // // // ****** calculate parameters for pointing mode ****** // int tSlewMin = duration(SpireBbObsConfig(0)) + duration(SpireBbPOF5Config()) + 2; // // time for Initial Hold int tInitHold = duration(SpireBbPOF5Init()) + 2; int tFlash = duration(SpireBbPcalFlash("PFlash",0)); if(endFlash || nFlash < nLines) { tInitHold = tInitHold + tFlash; } // int tHold = tFlash + duration(SpireBbStopDcuData()) + duration(SpireBbStartDcuData("PF")) + 2; // int nHold = 0; // default if no flashes required during scanning if(nFlash < nMaps * nLines) { nHold = nLines; // flash required every map } if(nFlash < nLines) { nHold = nFlash; // flash required within map } // // time for Final Hold int tFinalHold = duration(SpireBbPOF5End()) + duration(SpireBbStopDcuData()) + 2; if(endFlash && nHold != nLines) { tFinalHold = tFinalHold + tFlash; } return {tSlewMin,tInitHold,tFinalHold,tHold,nHold,d2,rate}; } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Start Autonomy Function 14 as an ObsMode // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : Simply call Aut_14 // // Dependencies : Aut_14 // // Comments : // // Version : 2.0 // History : 1.0 26-Mar-2007 initial Version // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Start_Autonomy_Function_14 { /* Needed variables to call PacsEng_Start_Autonomy_Function_14 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Start_Autonomy_Function_14 */ }{ // 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(Aut_14())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Aut_14(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Start Autonomy Function 17 as an ObsMode // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : Simply call Aut_17 // // Dependencies : Aut_17 // // Comments : // // Version : 2.0 // History : 1.0 26-Mar-2007 initial Version // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Start_Autonomy_Function_17 { /* Needed variables to call PacsEng_Start_Autonomy_Function_17 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Start_Autonomy_Function_17 */ }{ // 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(Aut_17())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Aut_17(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // SpireBbPOF5End // // $Id: SpireBbPOF5End.txt,v 1.1 2006/08/10 09:38:58 kking Exp $ // // Building Block to reconfigure the instrument to PHOT_STBY mode from POF5 (scan map) mode // // block SpireBbPOF5End SPIRE 8274 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Reconfiguration started"); SpireMsg(2," $Id: SpireBbPOF5End.txt,v 1.1 2006/08/10 09:38:58 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP to zero tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0000)"); Spire_SET_OBS_STEP_RAW(0x0); // // Move BSM to HOLD int bsmHoldChopPosn = ilookup("BSM.txt","Hold","ChopPosn"); int bsmHoldJiggPosn = ilookup("BSM.txt","Hold","JiggPosn"); SpireBsmMove(bsmHoldChopPosn,bsmHoldJiggPosn); // // Set Mode to PHT_STBY tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(0x0300)"); Spire_SET_OBS_MODE_RAW(0x300); // // Clear OBSID/BBID to null values int obsId = SpireNullObsid(); tstr = SpireTimeStr(time()); hstr = SpireHexStr(obsId,8); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBSID_RAW(" + hstr + ")"); Spire_SET_OBSID_RAW(obsId); tstr = SpireTimeStr(time()); message("5 " + tstr + "Cmd: Spire_SET_BBID_RAW(0x80000000)"); Spire_SET_BBID_RAW(0x80000000); // // ..... completion ..... // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Reconfiguration ended"); SpireMsg(1," ..POF5 Reconfiguration to PHT_STBY mode (" + (time() - t) + " seconds)"); } // $Id: PacsEng_Spec_Fltw_mec_Setup.txt,v 1.2 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 05-Jul-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Fltw_mec_Setup_l { /* No variables to call PacsEng_Spec_Fltw_mec_Setup_l */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Fltw_mec_Setup_l */ }{ // 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_spec_fltw())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } string procedure SpireHexStr { int n = 0; // input value int field = 4; // number of digits in hexadecimal number in output string }{ string s = ""; int signbit = 0; int x = 0; string h = ""; // // extract sign bit if(n < 0) { signbit = 1; n = n & 0x7fffffffffffffff; } // // convert nibble by nibble for(int i = 1 .. 16) { x = n % 0x10; // get next character if(x < 10) { h = "" + x; } else { if(x == 10) { h = "a"; } if(x == 11) { h = "b"; } if(x == 12) { h = "c"; } if(x == 13) { h = "d"; } if(x == 14) { h = "e"; } if(x == 15) { h = "f"; } } // perepare next nibble n = n / 0x10; if(i == 15) { n = n + signbit * 8; } if(i == field && n != 0) { field = field + 1; } // add character to output if necessary if(i <= field) { s = h + s; } } // return "0x" + s; } // $Id: PacsEng_Phot_SPU_Reset.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_SPU_Reset_u { /* No variables to call PacsEng_Phot_SPU_Reset_u */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_SPU_Reset_u */ }{ // 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(PACS_Phot_SPU_Reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_SPU_Reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : DMC sequence 7 for OBCP 12: Photometry Calibration III // // // // DMC author : Helmut Feuchtgruber // CUS script : Thomas G. Mueller // CVS file : photometry_calibration_III.txt // // Arguments used by the calling OBCP // Type Name DMCseq Description : // int nb_main_loop p01 number of times main loop is repeated // int chop_pos_1 p02 first chopper position // int nb_rdouts_plateau p03 number of readouts per chopper plateau // int nb_CS1_CS2_cycles p04 chopper cycles per incremental step // int chop_step_CS1_CS2 p05 Step to go from CS1 to CS2 // int chop_step_CS2_CS1 p06 Step to go from CS2 to CS1 // int chop_step_CS1 p07 relative chopper increment on CS1 // int nb_steps p08 number of incremental steps // // NOTE: For CUS scripts, only the loop parameters are relevant since they // determine the DMC duration // // Description : // CUS transcription of 4.1.7 "Chopping on Internal Calibration // Sources (fixed-fixed)" Detailed calibration sequence on // the internal sources, version III. Chopping is done to a set of // positions on both calibration sources, where the distance // between 2 respective positions stays constant for a while // and then the next position is being measured. // Note: nb_rdouts_plateau must be defined such that: // (nb_rdouts_plateau + 1) mod 4 = 0. // chop_step_CS1_CS2 = -1 * chop_step_CS2_CS1 // This procedure returns its duration in number of readouts // It is up to the calling program to convert number of readouts into // [sec] (this procedure does not know the duration of each readout) // // This procedure generates no TC; its only purpose is to illustrate // inner works of the DMC sequence and to compute its duration. Hence // it is called with only the duration relevant parameters // int[] procedure DMC_phot_cal_III { int nb_main_loop = 2; // p01 Number of times main loop is repeated int nb_rdouts_plateau = 39; // p03 Number readouts/plateau (4*n-1) int nb_CS1_CS2_cycles = 1; // p04 chopper cycles per incremental step int nb_steps = 6; // p08 number of incremental steps }{ int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start tallying the duration (measured in number of readouts) int duration_rdouts = 0; // // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LOOP P#1 ; main loop measurement for(int main_loop = 1 .. nb_main_loop) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_ABSOLUTE P#2 ; start pos. chopper on BB1 // LABEL 65 ; start quadruple on BB1 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // LOOP P#8 ; loop through increments for(int inner_loop = 1 .. nb_steps) { // LOOP P#4 ; do P#4 chops per step for(int cho_cycle_loop = 1 .. nb_CS1_CS2_cycles) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#5 ; go to BB2 // LABEL 129 ; start quadruple on BB2 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#6 ; go back to BB1 // LABEL 65 ; start quadruple on BB1 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // END_LOOP ; end of chop } // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // MOVE_CHOPPER_RELATIVE P#7 ; incr. chop position on BB1 // WAIT P#3 ; take P#3 images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // END_LOOP ; end of increments loop } // END_LOOP ; end main loop } // WAIT 1 ; complete last plateau duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // Define return array int[] time_array = [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; debug_print("DMC_phot_cal_III duration [readouts]: " + duration_rdouts); // Return the array of times return time_array; } // Missionphase : // // Purpose : Reset SPU after spectroscopy data flow // // Author TCL : Thomas Mueller // CUS script : Diego A. Cesarsky // CVS file : SPEC_spu_reset.txt // // Arguments : none // // Description : Stops SPU and sets default values for compression mode, // several threshold values (glitch, chopper, grating) // NOTE: amended version only stops SPUs // // Dependencies : Only low level PACS TCs // // Comments : Based on V1.3 of TM's tm_spec_spu_reset.tcl // // Version : 0.1 21-Jan-2004 Creation by DAC // History : 0.2 8-Oct-2004 Editorial revision (DAC) // Return duration [milliseconds] // 0.3 12-Oct-2004 Removed operations redundant with spu_setup // leaving only 2xSPUx_STOP_REDUCT_COMPR // Removed "wait" between TCs // 0.4 27-Oct-2004 Put delay statement // 1.0 20-nov-2006 Removed "duree" logic // : procedure SPEC_spu_reset { }{ // Stop "blue" and "red" SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up 12 housekeeping parameter for diagnostic housekeeping // of the chopper during the chopper full functional test. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 3.0 // // History : 1.0 21-07-06 creation by HD. Based on EQM IMT scripts. // 2.0 24-07-06 HD. test this script. // 3.0 24-07-06 HD. script works. block SPEC_Chopper_dhk_imt_bb PACS 353 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 13; {int}[] parlist = [{209},{244},{245},{246},{247},{248},{249},{258},{407},{557},{561},{565},{0xffff}]; int[] aux = [209,244,245,246,247,248,249,258,407,557,561,565,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 1; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); sync(); } // Missionphase : FM ILT // // Purpose : Synchronise on blue spectrometer readout // // Author : Markus Nielbock // CUS author : MN // // Description : Sets default blue spectrometer readout setting // // Dependencies : Used mostly for chopper SFT // // Comments : Adapted from PACS_Chopper_SFT_Init_Cold.cus // // Version : 1.0 // // History : 1.0 09-03-07 creation by MN // Begin Mode description procedure SPEC_Chopper_SynchBlue { }{ {int}[] list_tuple = [{0x0},{0x0},{0x0},{26},{0x95217cb},{0xb}]; int[] list_int = [0x0,0x0,0x0,26,0x95217cb,0xb]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_TIMING_FPGA_PAR(list_tuple,chksum); delay(1); } // Missionphase : FM // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. // // Dependencies : // // Preconditions : PACS switched-on and chopper enabled. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 3.0 // // History : 1.0 21-07-05 creation by HD. Based on EQM IMT script // "Chop_mov_abs.txt" // 2.0 24-07-06 HD. test this script. // 3.0 24-07-06 HD. script works. // 3.1 21-jan-2008 DAC Added WriteEndBB block PACS_Chopper_mov_abs_fm_bb PACS 355 { int chop_abs_pos = 0; // chopper absolute position }{ // Register start of BB WriteBBID($BBID); Pacs_DMC_MOVE_CHOP_ABS(chop_abs_pos); // Signal end of BB WriteEndBB(); } // Mission phase : Commissioning Phase // // Purpose : First measurement of the telescope background // during the Commissioning Phase with variable VH_BLIND // // Author : Koryo Okumura // // CUS script : obs PacsCal_Phot_telescBack // // Argument : // double[] vhbs = [2.4, 2.25, 2.1, 1.95, 1.8]; // VH_BLIND values to explore // int measure_time = 60; // measure time in seconds // string startBiasTable = "BOLObias_firstTelescBack"; // Bias table containing the initial values // string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values // double ra = 267.292; // RA : 17h49m10.0s // double dec = 69.807; // DEC : 69d48m26.0 // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + Instrument is in safe mode // // Description : PacsCal script of Phot_telescBack // // Dependencies : PCD req.1.1.1bis ILT data for bias computation // // Comments : None // // Version : // Fri Jun 27 2008 KO, First try // Thu Jul 03 2008 KO, Pacs_OBCP_chopped_photometry added before and after // Thu Jul 04 2008 KO, Pacs_OBCP_chopped_photometry added also during slew // Tue Jul 08 2008 KO, Default pointing set as PV phase plan document // obs PacsCal_Phot_telescBack { double[] vhbs = [2.4,2.25,2.1,1.95,1.8]; // VH_BLIND values to explore int measure_time = 60; // measure time in seconds string startBiasTable = "BOLObias_firstTelescBack"; // Bias table containing the initial values string endBiasTable = "BOLObias_ILT_standard_low"; // Bias table containing the final values double ra = 267.292; // RA : 17h49m10.0s double dec = 69.807; // DEC : 69d48m26.0 int nLoops1 = 30; // number of CSs cycles during slew int nLoops2 = 30; // number of CSs cycles during initial hold int nLoops5 = 30; // number of CSs cycles during final hold bool verbose = true; }{ // Several arguments needed for "basic_fine_pointing" //Execute the pointing request bool execute = true; // time to set OBSID and biases then PacsPhotSlewCal int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeSetBias = duration(PHOT_set_biases(endBiasTable,"DIRECT","LOW")); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR2 = duration(Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); //Minimum slew time int tslewmin = timeOBSID + timeSetBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } double temp_CS1 = 48.0; // CS1 temperature in kelvins double temp_CS2 = 58.0; // CS1 temperature in kelvins //Initial hold int tih = timeCal3CPR2; //Final hold int tfh = timeEndID + timeSetBias + timeCal3CPR5; //Use PHOTOMETER virtual aperture string ib = "P01_0"; // 0 = Non Solar System source, 0< If fast tracking is required (Solar System Sources) int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // xoffset [arcsec] double xoffset = 0.0; //Duration of "stable" pointing int tp = duration(Phot_telescBack(vhbs,measure_time,startBiasTable,endBiasTable)); //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,xoffset,tp); }{ // Start the sequence int[] state = [0]; while(state[0] >= 0) { state = next_state(); int tNOW = time(); if(state[0] == 1) { if(verbose) { tNOW = time(); debug_print("SLEW/CAL starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } // Set biases and start SPU //PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops2,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the Phot_telescBack Phot_telescBack(vhbs,measure_time,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_set_biases(endBiasTable,"DIRECT","LOW"); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,39,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } // File : PACS_Phot_Fil_Trapping_DEG_MODE // Missionphase : PACS FM ILT // // Purpose : Position sequence test of spectrometer filterwheel, intensively using the relative movements // // Author : PR // // Arguments : // // Description : Operations in 2 phases // Phase 1 Open loop movements of increasing size from both FW stop positions // Phase 2 Repetition of the same small open loop movements, from positions 45 degrees from the stop positions. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.0 // History : 1.0 / 12-May-2006 Creation // block PACS_Phot_Fil_Trapping_DEG_MODE PACS 279 { int num_iter = 2; // Number of repetitions of each sub-test block int maxkick = 15; // Maximal amplitude of the kicks in each sub-test block (degrees) }{ // Register start of BB WriteBBID($BBID); // double deg = 0.0; deg = 1536.0 / 360.0; // One degree in commanding units of the FW num_iter = 2 * num_iter; // int slew_time = 10; // max slew_time for any movement int kicktime = 4; // int fw_start = 0; // initial filter wheel position (0=A; 1=B) int fw_pos2 = (fw_start + 1) % 2; // // other filter wheel position // string[] fltPOS = ["POS A","POS B"]; // number of iterations in all the test loops // // SWON FW CONTROLLER Pacs_DMC_SWON_FW_PHOTO(); delay(1); // // STARTING FROM FW STOP POSITION // ============================== // Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // int step = 0; double n = 0.0; // for(int loop0 = 0 .. num_iter - 1) { Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[loop0 % 2]); delay(slew_time); for(int npos = 1 .. maxkick) { n = double(npos); Pacs_DMC_MOVE_PHOT_FW_STEP(iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop1 = 0 .. num_iter - 1) { Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[loop1 % 2]); delay(slew_time); for(int nneg = 1 .. maxkick) { n = double(nneg); Pacs_DMC_MOVE_PHOT_FW_STEP(-1 * iround(n * deg)); delay(kicktime); } } // // 45 DEGREES FROM POSITION // ======================== Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop2 = 0 .. num_iter - 1) { for(int npos2 = 1 .. maxkick) { n = double(npos2); Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[loop2 % 2]); delay(slew_time + 5); Pacs_DMC_MOVE_PHOT_FW_STEP(iround(45.0 * deg)); delay(slew_time); // Pacs_DMC_MOVE_PHOT_FW_STEP(iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // for(int loop3 = 0 .. num_iter - 1) { for(int nneg2 = 1 .. maxkick) { n = double(nneg2); Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[loop3 % 2]); delay(slew_time + 5); Pacs_DMC_MOVE_PHOT_FW_STEP(iround(-45.0 * deg)); delay(slew_time); // Pacs_DMC_MOVE_PHOT_FW_STEP(-1 * iround(n * deg)); delay(kicktime); } } // Pacs_DMC_MOVE_PHOT_FW_LOC(fltPOS[fw_start]); delay(slew_time); // // Mark End of Block WriteEndBB(); } // $Id: PacsEng_Spec_spu_reset.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // // Purpose : Reset SPU after SPECtroscopy observations // // Author : DAC // CUS script : DAC // CVS file : // // Arguments : none // // Description : Calls procedure "SPEC_spu_reset". See there for details. // // Dependencies : Only low level PACS TCs // // Comments : // // Version : 1.0 // // History : 0.1 20-nov-2006 DAC // History 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_spu_reset_l { /* Needed variables to call PacsEng_Spec_spu_reset_l */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_spu_reset_l */ }{ // 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(SPEC_spu_reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_spu_reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsRangeSpec AOT // // CUS author : DAC &VDP // Script file : PacsCal_PacsRangeSpec_PV.txt // // Input arguments // type name description // // Return values // // Description : // // Dependencies : // // Preconditions : // // Comments : If the file is called PacsRangeSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsRangeSpec.def // - rename module to PacsRangeSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false // // History: // For history before 24-apr-2007 see v1.42 in CVS // 25-apr-2007 14.4 Suppressed history before today (kept in CVS though) // Use rangeSPOT throughtout (i.e. merged ranges & rangeEXT) // 9-may-2007 14.5 SPR-3186 Use userNODcycles as map repetion for OFF // 22-may-2007 14.6 SPR-3199 Return SRC time without overheads // 29-may-2007 14.7 SPR-3237 // 11-jun-2007 14.8 SPR-3277 Use referenceWave (rangeSPOT{9}) for SED mode // 20-sep-2007 14.9 SPR-3570 RA,DEC offsets may be negative // SCR-3552 Read skewCorrec from PACSyzoffsets; add to pattnod // 24-sep-2007 15.0 SPR-3581 S/N is not computed in SED mode // 28-mar-2008 16.0 remove mapRasterRefXXX replaced by raoff, // decoff and refSelected (refSelected is complement to // chopNod hence not used in our logics) // 29-mar-2008 17.0 Removed section computing ABS or REL offsets: now an HSPOT // functionality // 28-apr-2008 18.0 raoff and decoff had the wrong range: in dgrees now // 17-Jul-2008 19.0 PV version: flexibility on parameters // {int,int,int,{string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[]} obs PacsCal_PacsRangeSpec_PV { /* "rangeSPOT" is a tuple defined by HSPOT */ /* It contains */ /* {id, bluEdge, redEdge, repeatFactor, lineFlux, contFlux, lineWidth, */ /* fluxUnitSel, widthUnitSel, refWave} */ {string,double,double,int,double,double,double,string,string,double}[] rangeSPOT = []; /*------------- CUS section for All parameters setup ------------------------------------*/ bool useScanParam = false; // Overwrite cal-u values for the scan parameters int nb_SRC_OFF = 1; // scan parameter: chop cycles per grating position int nb_ramps_plateau = 2; // scan parameter: ramps per chopper plateau int grat_step = 1200; // scan parameter: grating step size bool useCalblockParam = false; // overwrite cal-u values for the calibration block parameters int nload = 0; // cal block : repeat calibration block every n nod / raster slews int cb_nb_grat_step = 16; // cal block : number of grating steps around key wavelength int cb_grat_step = 168; // cal block : grating step size int cb_nb_up_down = 1; // cal block : number of up/down repetitions int cb_nb_ramps_plateau = 2; // cal block : number of ramps per chopper plateau int cb_nbRdoutRamp = 64; // cal block: readouts per ramp bool useDetParam = false; // overwrite cal-u values for the detector settings int capaBlue = 0; // detector setting: capacitance blue allowed [0,4,8,12] int capaRed = 0; // detector setting: capacitance red allowed [0,4,8,12] int det_nbRdoutRamp = 64; // detector setting: readouts per ramp int nb_rdouts_subramp = 16; // detector setting: number of readouts per subramp string reduction_mode = "ramp average" in ["ramp average","ramp fitting"]; // detector setting: spu reduction mode bool useNoChopScanParam = false; // overwrite cal-u values for unchopped scans int chopperthrow = 0; // unchopped scan: chopperthrow (chopper units) (158 = stay on center fov) /*------------- following only to use CUS interface -------------------------*/ string[] rangeId = ["Interesting range"]; double[] bluWave = [106.0]; // blue limit in [55.0,220.0] double[] redWave = [209.0]; // red limit in [55.0,220.0] int repeatLine = 1 in [0,10]; double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lineWidth = [400.0]; // line width in [0.0,1000.0] string[] widthUnit = ["kms"]; // width unit in ["kms","micron"] double[] lcontFlux = [111.11]; // continuum flux in [0.0,10000.0] double[] refWave = [180.0]; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order3" in ["order2","order3","sed2","sed3","sed4"]; bool chopNod = true; string density = "nyquist" in ["nyquist","high"]; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large","large_b"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 2 in [2,32]; int n = 1 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target int naifid = 0; // RA,DEC or SSO double pointStep = 2.0 in [0.0,480.0]; double lineStep = 2.0 in [0.0,480.0]; int knod = 1; // knod in [1,m*n] bool refSelected = false; //OFF Posistion needed double raoff = 0.0 in [0.0,360.0]; // units in degrees double decoff = 0.0 in [-90.0,90.0]; // units in degrees int obsOverhead = 180; // Slew overhead bool startAtOFF = false; bool verbose = true; }{ //*--------- following only when using CUS interface -------------------*/ int rangeIdLength = length(rangeId); int rangeLength = length(rangeSPOT); if(rangeLength == 0) { for(int rloop00 = 0 .. rangeIdLength - 1) { rangeSPOT[rloop00] = {rangeId[rloop00],bluWave[rloop00],redWave[rloop00],repeatLine,lineFlux[rloop00],lcontFlux[rloop00],lineWidth[rloop00],"",widthUnit[rloop00],refWave[rloop00]}; } } //*--------- above only when using CUS interface -------------------*/ // // Boolean variables "range" and "sedXXX" are mutually exclusive for HSPOT. For // time being I will use them independently of each other // Specifying bool sed = true is a special case of predefined ranges. // 30-oct-2006 // Variables "sed" or "range" have disappeared from front end. Define as bool range = true; bool sed = false; if(orderSel == "sed2" || orderSel == "sed3" || orderSel == "sed4") { range = false; sed = true; } // Yet to be defined symbol to access CAL-U file info for detector setup // May come from HSPOT front-end in the future // The future has come!!! string confTable = "normal"; // In SED or nyquist sample, we use the option "bright" if(sed || density == "nyquist") { confTable = "bright"; } // mapOff no longer an input variable but still used elsewhere bool mapOff = !chopNod; // to make sure that noone gets funny idea about refSelected refSelected = !chopNod; // Variable "grating" has disapeared from the front end. Since it's used by // several modules, I keep it with its new (default) definition string grating = "nyquist"; // OFF pointing only when in raster mode if(mapOff && source != "large") { error("NOD = false only allowed for large sources"); } // Start of "Pointing" section // // Set messages for HTML format message(""); message(""); // In "sed" mode, rangeSPOT is filled by module PacsRangeSpecSed if(!range) { // Define the RefWave as the mean value of bluWave and redWave // double meanRef = (rangeSPOT[0]{1} + rangeSPOT[0]{2})/2.0; // SPR-3277 Save waveRef first! // Catch case of rangeSPOT not being defined int theLength = length(rangeSPOT); if(theLength == 0) { error("ERROR! Need a reference wavelength for the SED observation (see UM)"); } // caught! Now extract wavelength double waveRef = rangeSPOT[0]{9}; // SPR-3581. Save information to compute S/N double contFlux = rangeSPOT[0]{5}; // Fill rangeSPOT with SED information rangeSPOT = PacsRangeSpecSed(orderSel); // Insure that user given reference is within order range if(waveRef < rangeSPOT[0]{1} || waveRef > rangeSPOT[0]{2}) { error("Reference wave must be comprised between " + rangeSPOT[0]{1} + " and " + rangeSPOT[0]{2} + " for " + orderSel); } // Reference within limits rangeSPOT[0]{9} = waveRef; // SPR-3581. Add information to compute S/N rangeSPOT[0]{5} = contFlux; } // Cannot call with empty "rangeSPOT" int nbRanges = length(rangeSPOT); int nbRanges1 = nbRanges - 1; if(nbRanges == 0) { error("STOP!! There are no spectral ranges defined!"); } // No more than 10 ranges or repetitions int nbRangesRep = 0; for(int loop00 = 0 .. nbRanges - 1) { // Default repetion factor is 1 int repFactor = rangeSPOT[loop00]{3}; if(repFactor == 0) { repFactor = 1; } nbRangesRep = nbRangesRep + repFactor; } if(verbose) { debug_print("Total ranges/repeat: " + nbRangesRep); } if(nbRangesRep > 10) { error("STOP!! The number of ranges/repetitions exceeds 10"); } // Decode "rangeSPOT" (only if verbose mode) if(verbose) { for(int iiii = 0 .. nbRanges1) { debug_print("RANGE or SED: " + orderSel); debug_print("Wave from/to : " + rangeSPOT[iiii]{1} + "/" + rangeSPOT[iiii]{2}); debug_print("RefWave : " + rangeSPOT[iiii]{9}); debug_print("repeat factor: " + rangeSPOT[iiii]{3}); } } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto and PacsLineSpec) // Pointing mode is still undefined int pointCase = 0; // FinePointingMode with setup time if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding"; pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (dithering and no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (dithering and nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(mapOff) { chopNod = false; pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 30; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } if(source == "large_b") { // Raster mode without noding if(mapOff) { chopNod = false; pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 30; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_of_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. // Use special throw value in case of raster w/OFF as we chop between SRC and // CS1 if(mapOff) { throw = "offraster"; } // Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Check that rangeSPOT is commensurate with U-CAL SPEC_BAND_params; get // grating positions on the fly // NOTE: rangeInfo is defined as // {typeOBS,order,blu_grat,red_grat,gratStep,bluWave,redWave} // New: is useScanParam = true, then fill some RangeInfo manually (sort of) {string,int,int,int,int,double,double}[] rangeInfo = PacsRangeSpecCheckFillRange(rangeSPOT,density,grating,orderSel,verbose); if(verbose) { for(int loopA = 0 .. nbRanges1) { debug_print("++RangeInfo: " + rangeInfo[loopA]); } } // Reject invalid ranges; abort CUS if invalid ranges are present for(int loop000 = 0 .. nbRanges1) { if(rangeInfo[loop00]{1} == 0) { error("Demanded range " + rangeInfo[loop000]{5} + "-" + rangeInfo[loop000]{6} + " [microns] is out of allowed boundaries"); } } // rangeInfo contains all the relevant information. We can sort here, either // by wavelength or by start grating position. Create arrays to be sorted // Define array of wavelengths and start grating positions; create "order" array // in case we want to enforce the no order mixing rule double[] rangeWave = [0.0]; double[] rangeGrat = [0.0]; int[] orders = [0]; // order array as float for sort algorithm double[] dorder = [0.0]; // Populate the arrays for(int loop0 = 0 .. nbRanges1) { rangeWave[loop0] = rangeInfo[loop0]{5}; // SORT algorithm requires float input! rangeGrat[loop0] = double(rangeInfo[loop0]{2}); orders[loop0] = rangeInfo[loop0]{1}; dorder[loop0] = double(rangeInfo[loop0]{1}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbRanges1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("2"); double[] band3 = SPEC_BAND_read("3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 // This case is history: // HSPOT proposes order 1&2 or 1&3, reported as 2 or 3; filter=1 is no // longer possible int filter = 1; // Determine filter based on HSPUT input if(orderSel == "order2" || orderSel == "sed2" || orderSel == "sed4") { filter = 2; } if(orderSel == "order3" || orderSel == "sed3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders + "; FILTER: " + filter); debug_print("The whole OBS will be performed with filter " + filter); } // Sort by order // int [] sortIndex = SortProc(verbose,dorder); // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,rangeGrat); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,rangeWave); // Recast "rangeSPOT" and rangeInfo according to the ordered grating // positions {string,double,double,int,double,double,double,string,string,double}[] sortRanges = clone(rangeSPOT); {string,int,int,int,int,double,double}[] sortRangeInfo = clone(rangeInfo); for(int reSORT = 0 .. nbRanges1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbRanges1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortRanges[reSORT] = rangeSPOT[sortedIndex]; sortRangeInfo[reSORT] = rangeInfo[sortedIndex]; } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 // chop_pos_CS1 chop_pos_CS2 chop_def // detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC{0 -> 8} contains: // capa nb_rdouts_ramp nb_rdouts_subramp comp_mode // glitch_det ramp_fit_alg nb_raw bias_r bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values // NEW. Saturation and capacitor/samples choice // Most SPEC configuration values are obtained from CONF_SPEC_params (read // in PacsSpecDefaults). Have to analyze given fluxes for each reference // wavelength. It may happen that a saturation situation will be found // Review the reference wavelengths, obtain telescope background, and PSF // fraction for(int rangeLOOP0 = 1 .. nbRanges) { int range1 = rangeLOOP0 - 1; waveRef = sortRanges[range1]{9}; contFlux = sortRanges[range1]{5}; // Obtain background and PSF fraction from CALU double telBckg = interpolate("SPEC_BCKG_FRAC","BackG",waveRef); double psfFrac = interpolate("SPEC_BCKG_FRAC","FracPnt",waveRef); debug_print("SATUR. Wave " + waveRef); debug_print("SATUR. Flux " + contFlux); debug_print("SATUR. Backg " + telBckg); debug_print("SATUR. PSF " + psfFrac); debug_print("SATUR. Order " + sortRangeInfo[range1]{1}); } paramsSPECdef = PacsSpecDefaults(throw,confTable,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module to estimate PACS parameters as a function of the // exposure time given by the user. This is the pilar of the // whole AOT logic. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; double waveMAXnods = 0.0; // Accumulated total OBS time int totalOBS = 0; for(int rangeLOOP = 1 .. nbRanges) { range1 = rangeLOOP - 1; paramsSPECext = PacsRangeSpecEstimatorOBCP27(sortRanges[range1],sortRangeInfo[range1],paramsSPEC,chopNod,verbose); // Copy estimates to respective tuples confSPECblu[rangeLOOP] = paramsSPECext{0}; confSPECred[rangeLOOP] = paramsSPECext{1}; confOBCP[rangeLOOP] = paramsSPECext{2}; if(useScanParam) { confOBCP[rangeLOOP]{1} = grat_step; confOBCP[rangeLOOP]{2} = grat_step; confOBCP[rangeLOOP]{3} = nb_SRC_OFF; confOBCP[rangeLOOP]{4} = nb_ramps_plateau; } if(useCalblockParam) { confOBCP[rangeLOOP]{0} = cb_nb_up_down; confOBCP[rangeLOOP]{1} = cb_grat_step; confOBCP[rangeLOOP]{2} = cb_grat_step; confOBCP[rangeLOOP]{4} = cb_nb_ramps_plateau; confOBCP[rangeLOOP]{6} = cb_nb_grat_step; confOBCP[rangeLOOP]{7} = cb_nb_grat_step; confSPECblu[rangeLOOP]{1} = cb_nbRdoutRamp; confSPECred[rangeLOOP]{1} = cb_nbRdoutRamp; } if(useDetParam) { confSPECred[rangeLOOP]{0} = capaRed; confSPECblu[rangeLOOP]{0} = capaBlue; confSPECblu[rangeLOOP]{1} = det_nbRdoutRamp; confSPECred[rangeLOOP]{1} = det_nbRdoutRamp; confSPECred[rangeLOOP]{2} = nb_rdouts_subramp; confSPECblu[rangeLOOP]{2} = nb_rdouts_subramp; if(reduction_mode == "ramp average") { confSPECblu[rangeLOOP]{5} = 1; confSPECred[rangeLOOP]{5} = 1; } else { if(reduction_mode == "ramp fitting") { confSPECred[rangeLOOP]{5} = 0; confSPECblu[rangeLOOP]{5} = 0; } } } if(useNoChopScanParam) { //SRC REF1 REF1 confOBCP[rangeLOOP]{12} = -chopperthrow; confOBCP[rangeLOOP]{13} = chopperthrow; confOBCP[rangeLOOP]{14} = chopperthrow; } } // nb_nods below is the quantity used by Estimator to compute its duration int nb_nods = paramsSPECext{3}{0}; // if(verbose) { debug_print("confOBCP[" + rangeLOOP + "]: " + confOBCP[rangeLOOP]); } // Accumulated time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("Minimum required time: " + totalOBS + " [sec] for " + nb_nods + " nod cycles"); } if(chopNod) { nbNods = userNODcycles; if(verbose) { debug_print("The PointReq will contain " + nbNods + " nod cycles"); } } else { nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

    Estimated total OBStime (SRC+REF) for requested ranges: " + totalOBS + "[sec]

    "; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

    With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

    "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

    Since no NOD was specified the total OBS time is equal" + " to the estimated SRC+REF time. OBS times can be changed" + " by specifying the line(s) repeat factor

    "; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

    Red channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECred[0]{1} + "
    • "; lineCnt = lineCnt + 1; int subRamps = confSPECred[0]{1} / confSPECred[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECred[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECred[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Blue channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECblu[0]{1} + "
    • "; lineCnt = lineCnt + 1; subRamps = confSPECblu[0]{1} / confSPECblu[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECblu[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECblu[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); if(verbose) { debug_print("Duration WriteOBSID: " + timeSetOBSID); } // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double [] keyWAVE = PacsRangeSpecKeyWaves(sortRangeInfo); int nbKeyWAVE = 1; // int nbKeyWAVE = length(keyWAVE); if(verbose) { debug_print("keyWAVES " + keyWAVE); } // With latest versions of CommandOBCP27 the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOTprologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration may be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per nod; nb_nods: " + nb_nods); } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); if(verbose) { debug_print("Duration WriteEndID: " + timeEndID); } // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbRanges per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one needs some time during // slew to perform leading CAL. // Make sure that the Preq is possible (possible reason for failure: too short // dwell time - currently 10 sec int minTdwell = 10; if(timeOBS < minTdwell) { error("Estimated dwell time is too short. Perhaps your range span is too small"); } // // The chopper throws have been read already (PacsSpecDefaults) and angles // have been converted into ENG units (OBCPconf). Here,angles are needed in // [arcsec]; easiest is to read again the relevant CAL-U table. // Read chopper position SRC and REF1 [arcsec] if(useNoChopScanParam) { double engChopRef = -1.0 * double(chopperthrow); double engChopSrc = 1.0 * double(chopperthrow); double chopAngleSrc = interpolate("SPEC_SKY_chop","SKY",engChopSrc); double chopAngleRef = interpolate("SPEC_SKY_chop","SKY",engChopRef); } else { chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); } // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("MAIN:CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; int thold = 0; int nhold = 0; // int nload = 0; int tloadslewmin = 0; bool fixed = true; if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode with nodding, section 3.4 ib = "P02_0"; // Nodding angle is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chop pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode without nodding, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int ncover = 1; // New arguments for pointing request; will be dealt with next iteration int top = 0; raoff = 0.0; decoff = 0.0; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,ncover,thold,nhold,k,top,raoff,decoff); } if(pointCase == 30) { // RasterMode with no nodding and OFF, section 3.5 ib = "P02_0"; // SPR-3237: fix is true, patt is inherited from HSPOT fixed = true; patt = mapRasterAngle; // Raster steps d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; // OFF periodicity (here at beginning and at end of raster) k = m * n; // The number of repetions is given in this case by the NOD count SPR-3186 int nrepeat = userNODcycles; if(nrepeat == 0) { nrepeat = 1; } // Same Tobs during OFF that during "SRC" top = tp; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32 && source != "large_b") { // RasterMode with nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; // nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } if(pointCase == 32 && source == "large_b") { // Nodding of Raster, section 3.6 debug_print("toto"); ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; // k = m * n; int ncycles = userNODcycles; nrepeat = 1; tloadmin = 0; fromPntReq = nodding_of_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,pattnod,nodThrow,ncycles,knod,nrepeat,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("=====> Return from " + pointMode + ": " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); } if(verbose) { int tNOW = time(); debug_print("=== Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOFF = nbOFF + 1; // Logic to sum up obsTime if(nbOFF == 1) { int[][] sumUpOffTime = obsTime; } if(nbOFF > 1) { sumUpOffTime = SumFunction(obsTime,sumUpOffTime); } if(verbose) { tNOW = time(); debug_print(" SumUpOffTime: " + sumUpOffTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD started at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL ranges). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // and per wavelength array(s): // [waveSTART,waveEND,order,gratStep,nbGratSteps,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Fill infoArray with data from OBCP27 // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int nbRampPlateau = confOBCP[1]{4} + 1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime (incl. WAIT=1): " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbRanges1) { // Create element [loop3] infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy from/to wavelengths infoArray[1]{1}[loop3]{0} = sortRanges[loop3]{1}; infoArray[1]{1}[loop3]{1} = sortRanges[loop3]{2}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortRangeInfo[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortRangeInfo[loop3]{4}; // copy the number of grating step infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from obsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Add more data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of ranges observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbRanges; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal - 1 - timeSetOBSID; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); } // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Populate the 3rd dimension of infoArray: global timing and AOT information // timeObsEnd is the total duration of the AOT infoArray[2] = {{"RangeSpec",0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Case of SmallSrc with dithering if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // Case of raster/w OFF, repeated map if(source == "large" && mapOff) { infoArray[1]{0}{0} = "RasterOFF"; infoArray[2]{0}{5} = nrepeat; } // Process the information contained in infoArray // NOTE: since implementing waveRef and fluxes, have to pass also // sortRanges and sortRangesExt data to ProcessInfoArray // aotID is no longer needed as only used for Range // but orderSel is needed by PacsSpecRMS // SPR-2927 Return bigTuple with information for plotting // Add nbOBS and nbOFF to ProcessInfoArray {{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[] bigTuple = PacsProcessInfoArrayRange(infoArray,sortRanges,confOBCP,orderSel,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); //////// Silly code to convert bigTuple into smallTuple //////////////////// // bigTuple is too big for HSPOT. I have to remove the 1st double[] to // please HSPOT. Create smallTupleN {string,double[],double[],double[],string,double[],double[],double[],string,double[],double[],double[]}[] smallTuple = [{"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}]; // Old returned tuples {int,int,{{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]},{string,double[],double[],double[],double[]}}[]} returnTuple = {fromPntReq[0],fromPntReq[1],bigTuple}; // Copy returnTuple onto smallTuple nbRanges = length(bigTuple); // The accumulated SRC+REF time int accumSrceRef = 0; for(int loopR = 0 .. nbRanges - 1) { // Use the nbRanges loop to add up SrceRef times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopR]{6} + infoArray[1]{1}[loopR]{7}; // Define smallTuple smallTuple[loopR] = {"1",[0.0],[0.0],[0.0],"2",[0.0],[0.0],[0.0],"3",[0.0],[0.0],[0.0]}; // Extract vectors; retrun CONT noise in mJy // First tuple is always the nominal range. Label it as RangeID + "Nominal" string id = sortRanges[loopR]{0} + "-nominal"; smallTuple[loopR]{0} = id; double[] wave = returnTuple{2}[loopR]{0}{2}; double[] cont = returnTuple{2}[loopR]{0}{3}; double[] line = returnTuple{2}[loopR]{0}{4}; int nbElem = length(wave); for(int loopT1 = 0 .. nbElem - 1) { smallTuple[loopR]{1}[loopT1] = wave[loopT1]; smallTuple[loopR]{2}[loopT1] = 1000.0 * cont[loopT1]; smallTuple[loopR]{3}[loopT1] = line[loopT1]; } wave = returnTuple{2}[loopR]{1}{2}; cont = returnTuple{2}[loopR]{1}{3}; line = returnTuple{2}[loopR]{1}{4}; nbElem = length(wave); // If there is no "free" data id = "undefined"; // Else label second tuple as RangeID + "-free1" if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free1"; } smallTuple[loopR]{4} = id; for(int loopT2 = 0 .. nbElem - 1) { smallTuple[loopR]{5}[loopT2] = wave[loopT2]; smallTuple[loopR]{6}[loopT2] = 1000.0 * cont[loopT2]; smallTuple[loopR]{7}[loopT2] = line[loopT2]; } wave = returnTuple{2}[loopR]{2}{2}; cont = returnTuple{2}[loopR]{2}{3}; line = returnTuple{2}[loopR]{2}{4}; nbElem = length(wave); // If existing, label third tuple as RangeID + "-free2" id = "undefined"; if(nbElem > 1) { id = sortRanges[loopR]{0} + "-free2"; } smallTuple[loopR]{8} = id; for(int loopT3 = 0 .. nbElem - 1) { smallTuple[loopR]{9}[loopT3] = wave[loopT3]; smallTuple[loopR]{10}[loopT3] = 1000.0 * cont[loopT3]; smallTuple[loopR]{11}[loopT3] = line[loopT3]; } // End loop on nbRanges } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; return {accumSrceRef,fromPntReq[1],overPACSandSC,smallTuple}; } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 4x9 or 4x8 raster on a point source: // Chopped : Noise measured after the 4x8 raster at the off chopper position // during 4*measure_time. The chopped measurement requires 105 arcsec offset. // Non-chopped : Noise measured at last 4 pointings of the 4x9 raster of 13.5 arcsec offset. // // Author : Koryo Okumura // // Version : Thu Jul 24 20:07:51 CEST 2008 // // CUS script : obs PacsCal_Phot_highGainBiasDDCS // // Argument : // string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration // int naifid = 2000001; // SSO tracking object number // double ra = 0.0; // RA // double dec = 0.0; // Dec // int measure_time = 120; // measure time in seconds // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops5 = 30; // number of CSs cycles during final hold // int readouts_plateau = 16; // number of readouts per chopper plateau // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // bool chop = true; // Chopping within FOV during the raster // bool verbose = true; // // Check before executing : // + Cooler is recycled // + BOLC is ON // + PHOT_orbit_prologue is executed (then more than the minimum requirement below is fullfilled): // - Bolometers are biased // - Sequencer is activated // // Description : PacsCal script of Phot_highGainBiasDDCS // init + During the slew, CSs are measured through 2 filters // + Set a filter corresponding to the given seqNum // + Set the biases group by group // if no_chop // + Set the chopper on the optical center // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x9 raster measurement // if chop // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x8 raster with chopped measurement // + After the raster, noise measurement during 4xmeasure_time // then + After the raster, CSs and sky are measured through 2 filters // stop + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(0) // obs PacsCal_Phot_highGainBiasDDCS { string select = "ginit" in ["ginit","g2_0","g2_6","g3_0","binit","b2_0","b2_6","b3_0","final"]; // Sequence number to define a configuration int naifid = 2000001; // SSO tracking object number double ra = 0.0; // RA double dec = 0.0; // Dec int measure_time = 120; // measure time in seconds per pointing string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks int nLoops1 = 30; // number of CSs cycles during slew int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per chopper plateau string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE bool chop = true; // Chopping within FOV during the raster bool verbose = true; }{ bool execute = true; int nRdts = readouts_plateau - 1; int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = duration(PHOT_change_biases(endBiasTable,calMode,calGain)); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int tNewSetup = duration(Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable)); int tslewmin = 0; int tih = 0; int tfh = 0; // Use PHOTOMETER virtual aperture string ib = "P01_0"; // yoffset [arcsec] (Positive offset to get an empty sky in the last 4 pointings) double yoffset = 13.5; // zoffset [arcsec] double zoffset = 0.0; // Duration of "stable" pointing in seconds int tp = 0; //Issue PointReq int[] ts = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Several arguments needed for "basic_fine_pointing" // time to set OBSID and biases then PacsPhotSlewCal // Minimum slew time if(select == "final") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS","HIGH")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DDCS",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"HIGH")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } } tslewmin = timeOBSID + timeChgBias + timeCal3CPR1 + tNewSetup; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = 0; // Final hold tfh = timeEndID; // Duration of "stable" pointing in seconds tp = 1; //Issue PointReq ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); } else { // Several arguments needed for "basic_raster_pointing" // time to set OBSID and biases then PacsPhotSlewCal int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); // Minimum slew time tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = tNewSetup; // Final hold tfh = timeChgBias + timeCal3CPR5 + timeEndID; // Fixed in the sky coordinates bool fixed = false; // Orientation angle (degrees) double patt = 0.0; // Number of pointings in a leg int m = 4; // Number of legs int n = 9; // Angular distance (arcsec) between 2 pointings double d1 = 26.0; // Angular distance (arcsec) between 2 legs double d2 = 26.5; // Duration of "stable" pointing in seconds if(chop) { int nLoops = measure_time * 40 / (2 * readouts_plateau); tp = duration(OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,644)); // 4x8 raster instead of 4x9 n = 8; // Noise measurements after the raster tfh = tfh + 4 * measure_time + duration(TMMarker602()) + duration(TMMarker600()); // Positive pointing offset for chopping to get negative chopper position offset yoffset = 105.0; } else { tp = measure_time; } // Go to OFF position every k pointings (not relevant with SSO tracking) int k = 0; // time in seconds on the OFF position (not relevant with SSO tracking) int top = 0; // OFF position RA coordinate (not relevant with SSO tracking) double raoff = 0.0; // OFF position Dec coordinate (not relevant with SSO tracking) double decoff = 0.0; //Issue PointReq ts = basic_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,k,top,raoff,decoff); } }{ int tNOW = time(); int[] state = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU if(select == "final") { PHOT_change_biases(calBiasTable,calMode,calGain); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS","HIGH"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DDCS",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"HIGH"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); //************************************ // Call the Phot_highGainBiasDDCS //************************************ Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } else { int finalChop = 0; // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //************************************ // Call the Phot_highGainBiasDDCS //************************************ Phot_highGainBiasDDCS(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } if(chop) { //********************************* // 2 positions chopping in the FOV //********************************* if(state[2] < m * n) { finalChop = -6578; } else { finalChop = 7756; } OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,finalChop); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } if(chop) { TMMarker602(); delay(4 * measure_time); TMMarker600(); } // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } } // Missionphase : PACS AVM ILT // // Purpose : Reset detectors and HK after photometry, // // Author TCL : T. Mueller // Author CUS : DAC // // Arguments : none // // // Description : This script will reset all parameters after // photometry // // Comments : Has to be modified for CQM // // Version : 1.0 DAC 20-apr-2005 // History : 1.0 DAC 20-apr-2005 Based on TM's 1.1 of 20-apr-2004 // 1.1 DAC 14-nov-2006 Cosmetical cleaning procedure PHOT_dpu_dmc_reset { }{ // Invalidate science data photometry Pacs_DMC_INVAL_SCI_DATA_B(); Pacs_DMC_INVAL_SCI_DATA_R(); // Stop forwarding data to packet encoder int aux = 4; int check_sum = checksum("int",[aux]); {int}[] arg = Array2grp_1([aux]); Pacs_DMC_WRT_BOL_REC_OPT(arg,check_sum); aux = 4; check_sum = checksum("int",[aux]); arg = Array2grp_1([aux]); Pacs_DMC_WRT_B_DEC_REC_OPT(arg,check_sum); aux = 4; check_sum = checksum("int",[aux]); arg = Array2grp_1([aux]); Pacs_DMC_WRT_R_DEC_REC_OPT(arg,check_sum); Pacs_DPU_SET_HK_LIST("NO_PRIME","BOTH Array"); } // CVS comments : $Id: DMC_phot_2_3_chop.txt,v 1.5 2007/04/25 15:14:03 dcesarsk Exp $ // Missionphase : // // Purpose : Two or three position chopping followed // by calibration readouts chopping between CS1 and CS2 // // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : DMC_phot_2_3_chop.txt from AOT code // // Arguments : // nb_SRC_REF Number of SRC->CHOPP1->SRC->CHOPP2 cycles // chop_pos_SRC Position of chopper to see SRC // nb_rdouts_plateau Number of readouts per chopper plateau // chop_pos_REF1 Position of chopper for REF1 // chop_pos_REF2 Position of chopper for REF2 // nb_cycles_obs_cal Number of times (OBS = CAL) // nb_CS1_CS2 Number of CS1->CS2 cycles // chop_pos_CS1 Chopper position for CS1 // chop_pos_CS2 Chopper position for CS2 // // Description : Chopped observations of SRC in the manner: // SRC->REF1->SRC->REF2 // followed by a calibration sequence using the internal // blackbodies // CS1 -> CS2 // User can specify the number of source observing cycles // (nb_SRC_REF), the number of calibration cycles (nb_CS1_CS2) // and how many times the whole sequence shall be repeated // (nb_cycles_obs_cal). // The number of readouts per quiescent chopper position is // the same (nb_rdouts_plateau) within each cycle // // // Dependencies : Stand alone DEC/MEC sequence // // Comments : Follows line by line 4.1.1 in PACS-ME-LI-005 // // Version : 0.1 21-Jan-2004 Creation by DAC // History : 0.2 12-Oct-2004 Use only time related arguments // 0.3 18-Oct-2004 Normalized variable names // 0.4 9-Nov-2004 Return array containing 4 times. // time[0] = total SRC time // time[1] = total CAL time // time[2] = total overhead time // time[3] = total DMC time (by Version 0.1) // 0.5 22-nov-2006 Removed debug_print // 0.6 14-mar-2007 WAIT=1 for chopper are useful // : int[] procedure DMC_phot_2_3_chop { int nb_SRC_REF = 1; // p01 Nb of cycles SRC->REF1->SRC->REF2 int nb_rdouts_plateau = 16; // p03 Nb of readouts per chopper plateau int nb_cycles_obs_cal = 1; // p06 Nb of repetions of OBS-CAL cycle int nb_CS1_CS2 = 0; // p07 Nb of cycles CS1->CS2 }{ int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Start tallying the duration (measured in number of readouts) int duration_rdouts = 0; // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; set Label to 0 // WAIT 1 ; have a defined start duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // Outermost LOOP on nb_cycles_obs_cal for(int obs_cal_loop = 1 .. nb_cycles_obs_cal) { // Inner LOOP on nb_SRC_REF for(int obs_loop = 1 .. nb_SRC_REF) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_SRC; chopper to chop_pos_SRC // LABEL 1 ; start quadruple // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_SRC = duree_SRC + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_REF1; chopper to chop_pos_REF1 // LABEL 3 ; next chopper position // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_REF = duree_REF + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_SRC; chopper to chop_pos_SRC // LABEL 1 ; first chopper position // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_SRC = duree_SRC + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_SRC = duree_SRC + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_REF2 ; move chopper to chop_pos_REF2 // LABEL 5 ; chopper position 3 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_REF = duree_REF + nb_rdouts_plateau; // End inner loop on nb_SRC_REF // END_LOOP ; end loop measurement } // Inner LOOP on nb_CS1_CS2 for(int cal_loop = 1 .. nb_CS1_CS2) { // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS1 ; move chopper to CS1 // LABEL 65 ; chopper to CS1 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // WAIT 1 ; sync. for chopper duration_rdouts = duration_rdouts + 1; duree_CAL = duree_CAL + 1; // MOVE_CHOPPER_ABSOLUTE chop_pos_CS2 ; move chopper to CS2 // LABEL 129 ; chopper to CS2 // WAIT nb_rdouts_plateau ; take nb_rdouts_plateau images duration_rdouts = duration_rdouts + nb_rdouts_plateau; duree_CAL = duree_CAL + nb_rdouts_plateau; // End inner loop on nb_CS1_CS2 // END_LOOP ; end loop calibration } // End outermost loop on nb_cycles_obs_cal // END_LOOP ; end main loop } // WAIT 1 ; complete last plateau duration_rdouts = duration_rdouts + 1; duree_OVR = duree_OVR + 1; // LABEL 0 ; no sequence anymore // END_SEQUENCE // Define return array int[] time_array = [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // debug_print("DMC_phot_2_3_chop: " + time_array); // Return the array of times return time_array; } // Mission phase : Commissioning phase and later // // Purpose : Read a BOLObias calibration table and command bias // voltages for all the groups. // VDL-BU for Group 3. Will also establish VDD_PROT_BLU // and VDD_PROT_CL before setting bias voltages // Then CKRLH and VDECX-L are set for the direct mode // // Author : Koryo Okumura // CUS script : Koryo Okumura // // Arguments : // string biasTable The bias table name // string gain The gain "LOW" or "HIGH" // // Description : Read a bias table in volts and set the direct mode // // Dependencies : None // // Preconditions : Photometer is on and the sequencer is set // // Comments : // // Version : 0.1 // History : 02-Jul-2008, KO: First version // procedure PHOT_set_bias_direct { string biasTable = "BOLObias_ILT_standard_low"; // Bias table [volts] string gain = "LOW"; // "LOW" or "HIGH" }{ // //*********************************************** // Bias setting of the detectors //*********************************************** // PHOT_set_bias_volt(biasTable,1); PHOT_set_bias_volt(biasTable,2); PHOT_set_bias_volt(biasTable,3); PHOT_set_bias_volt(biasTable,4); PHOT_set_bias_volt(biasTable,5); PHOT_set_bias_volt(biasTable,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //********************************************************** // Sequence mode : Sref_only (meaning set for the bolometer) //********************************************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 int operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //************************************** // Start SPU in the appropriate setting //************************************** PHOT_spu_gain_setup(gain,0,0,3,3,true); delay(1); // to sync the bus sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Heat_SFT { /* No variables to call PacsEng_Spec_Heat_SFT */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Heat_SFT */ }{ // 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(PACS_Spec_Heat_SFT())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Heat_SFT(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Filename : Pacs_Spec_Rsrf // Purpose : Deep staring scan for RSRF verification // // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Uses OBCP28 for executing a deep scan // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // Comments : // Version : 1.0 // History : 1.0 30-oct-2008 BV Adopted from ILT PACS_Spec_Rsrf_OBS // // procedure Pacs_Spec_Rsrf { int chop_def = -21350; // chopper position during grating scan string filter = "POS A" in ["POS A","POS B"]; // Filter wheel position int grating_start = 32000; // grating start position for scan int grating_stepsize = 133; // grating step size int grating_numsteps = 7759; // number of grating steps int grating_numramps = 4; // number of ramps per grating position int readoutsperramp = 64; // number of readouts per ramp int capa_red = 12; // Red capacitor int capa_blu = 0; // Blue capacitor double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.011 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.011 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) }{ // OBCP parameters that are fixed int num_updown = 1; // number of grating updown scans int grat_def = 496000; // position of grating after the scan int chop_pos_CS1 = -21350; int chop_pos_CS2 = 21200; int detector = 1; // Synchronize on this detector 1:Blue 2:Red int nb_CS1_CS2 = 0; // number of cycles on calsources, 0=don't use them int nb_ramps_CS = 3; // number of ramps on CSs (not used) int grat_start_time = 15000; // time for grating to start [ms] int grat_def_time = 15000; // time for grating to go to default [ms] // CRE setup // cre_ctrl is a bit field: // 256=sync width=2, 128=T sensor on, 2=enable, 1=power on // Do not enable yet int cre_ctrl_red = 256 + 128 + 2 + 1; int cre_ctrl_blu = 256 + 128 + 2 + 1; int ramp_len_red = readoutsperramp; // Red ramp length int ramp_len_blu = readoutsperramp; // Blue ramps' length SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Move the filter wheel to Position string filtername = "A"; if(filter == "POS B") { filtername = "B"; } SPEC_fltw_move(filter); // SPU setup int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // scan OBCP_grat_scan_nochop(num_updown,grating_numsteps,grating_stepsize,-grating_stepsize,grating_numramps,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,nb_ramps_CS,grating_numsteps,chop_def,detector,grating_start,grat_start_time,comp_mode_blu,comp_mode_red,grat_def,grat_def_time,readoutsperramp); // // Reset spu SPEC_spu_reset(); } // Missionphase : // // Purpose : Move grating from gratNOW to gratNEW // gratNOW is given only to estimate the needed time // // Author : DAC // CUS script : Diego A. Cesarsky // CVS file : SPEC_grat_move.txt // // Arguments : //Type Name DefVal Description //int filter_id 1 Position of spectroscopic filter wheel // // Description : // Dependencies : // // Comments : This procedure sets necessary delay // // Version : 0.1 // History : 0.1 14-feb-2007 DAC // : procedure SPEC_grat_move { int gratNOW = 535000; int gratNEW = 596000; bool verbose = true; }{ // Time to move from NOW to NEW (SPEC_grat_time converts argument to abs) int neededTime = SPEC_grat_time(gratNOW - gratNEW); // Convert from msec to sec (at least 1 second wait!) neededTime = (neededTime + 999) / 1000; // Move now Pacs_DMC_MOVE_GRAT_ABS(gratNEW); if(verbose) { debug_print("MovGRAT: " + neededTime + " sec to move from/to " + gratNOW + "/" + gratNEW); } // set movement delay delay(neededTime); } // $Id$ // Missionphase : PACS PV Phase // // Script : PACS_En_chopper_ast_OBS.cus // // // Missionphase : PACS IST Chopper Day // // Purpose : Enable the chopper electronics // Author CUS : DAC/HD // // Input arguments // Type Name Description // Description : Enable electronics, controller // // Dependencies : // Comments : // Version : 1.0 // History : 0.1 07-dec-2006 first creation // : 1.0 04-mar-2008 Converted into Eng OBS by VDP // // : 0.2 05-jul-2007 IST Chopper Day // : 0.3 12-nov-2007 edited for SVT/PV conformance (MN) obs PacsEng_En_chopper_ast { /* Needed variables to call PacsEng_En_chopper_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_En_chopper_ast */ }{ string onoff = "ON"; // 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(EnDis_chopper(onoff))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure EnDis_chopper(onoff); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM IST // // Purpose : Moves the grating back & forth throughout the RSRF, with long wait times, to study the transients // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : // // Description : // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON and ENABLED // The FWSPEC is placed on position B // // Comments : // // Version : 1.0 // // History : 1.0 06-Apr-2007 PR Creation // procedure PACS_Spec_Time_Constant_IST { int idle_time = 240; }{ // Set OBSID WriteOBSID($OBSID); int gratposref = 150000; int[] gratpos = [350000,550000,725000,925000]; int npos = length(gratpos); int chop_BB1 = -21350; // // Position FWSPEC on POS B // SPEC_fltw_move("POS B"); // // Position Chopper on BB1 // Pacs_DMC_MOVE_CHOP_ABS(chop_BB1); delay(1); // // Go // for(int n = 0 .. npos - 1) { Pacs_DMC_MOVE_GRAT_ABS_RAW(gratposref); delay(idle_time); Pacs_DMC_MOVE_GRAT_ABS_RAW(gratpos[n]); delay(idle_time); } Pacs_DMC_MOVE_GRAT_ABS_RAW(gratposref); delay(idle_time); // Reset OBSID WriteEndID(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // 0.2 10-apr-2006 Update procedure name obs PacsEng_SpectroscopytoNonPrime { /* No variables to call PacsEng_SpectroscopytoNonPrime */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_SpectroscopytoNonPrime */ }{ // 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(SpectroscopytoNonPrime())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SpectroscopytoNonPrime(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OBCP 10: Photometry Calibration I, calls DMC sequence 5 // // OBCP author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // // Arguments: // Type Name Description // int nb_main_loop p01 number of times main loop is repeated // int chop_pos_CS1 p02 Chopper position on CS1 // int nb_rdouts_plateau p03 Number of readouts per chopper plateau // int nb_CS1_CS2_cycles p04 Number of cycles alternating CS1-CS2 // int chop_step_CS2_CS1 p05 Step size to go from CS2 to CS1 // int chop_step_CS1_CS2 p06 Step size to go from CS1 to CS2 // // Description : This script mimics the OBCP_PHOT_CAL_I // pseudo script, section 3.11.1 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DEC_phot_cal_I DECMEC sequence, 4.1.5 // WriteBBID to declare its BB identification // Comments : // // Version : 0.1 17-Sep-2004 DAC // History : 0.2 29-Oct-2004 Editorial changes // int[] block OBCP_phot_cal_I PACS 10 { int nb_main_loop = 2; // p01 Number of times main loop is repeated int chop_pos_CS1 = -23680; // p02 Chopper position on CS1 int nb_rdouts_plateau = 39; // p03 Nb rdouts per chopper plateau (4*n+1) int nb_CS1_CS2_cycles = 8; // p04 Number of cycles alternating CS1-CS2 int chop_step_CS1_CS2 = 46270; // p05 Step to go from CS1 to CS2 int chop_step_CS2_CS1 = -46020; // p06 Step to go from CS2 to CS1 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position }{ // Starting time int time_start = time(); // Anounce start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Bolo sampling rate (needed to compute readout duration) double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; debug_print("Bolo frequency: " + bol_freq + " " + bol_unit); debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Accumulated duration of this script [msec] int duration_msec = 0; // OBCP pseudo-code starts here; accumulate duration as it goes) // OBCP_PHOT_CAL_I(seq,seq_time,P#1,&, P#6,comp_mode_blu,comp_mode_red,chop_def) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Call CUS version of DECMEC sequence to obtain duration // Returns array with [duration_rdouts,duree_SRC,duree_REF,duree_CAL,duree_OVR] int[] duree1 = DMC_phot_cal_I(nb_main_loop,nb_rdouts_plateau,nb_CS1_CS2_cycles); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // SYNCHRONIZE_ON_DETECTOR(4) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, comp_mode_blu, comp_mode_red, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_START_SEQUENCE duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(seq_time) // ; Check execution status of the sequence and in case of failure stop OBCP // DMC_MOVE_CHOP_ABS(chop_def) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) // End // Duration: 7 x 200ms + seq_time + 0.5s // This procedure calls the sequence described in sec.4.1.5. // // Now trigger execution of OBCP // This OBCP is number 10, requires 11 parameters, call DEC seq #5 // which lasts seq_time [msec] string obcp_ID = "PHOT_CALIB_I"; int obcp_par_nber = 11; int seq_DMC = 5; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_main_loop},{4,chop_pos_CS1},{5,nb_rdouts_plateau},{6,nb_CS1_CS2_cycles},{7,chop_step_CS1_CS2},{8,chop_step_CS2_CS1},{9,comp_mode_blu},{10,comp_mode_red},{11,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the OBCP "jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Ending time int time_elapsed = time() - time_start; time_array[0] = time_elapsed; // Return return time_array; } // $Id: PacsEng_Spec_dark_current_pv.txt,v 1.1 2008/11/12 11:40:20 vanessad Exp $ // Missionphase : PACS PV Phase // // // // // Purpose : Short performance test Dark Current // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do dark current measurements in buffer transmission mode on // both CS positions. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and internal CSs switched off. // CDMS has to be switched to burst mode. After the end of the // test go back to nominal mode. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : 1.0 04-04-07 HD. IST update. // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // based on PacsEng_Spec_dark_current_imt502 // 3.0 15-07-08 HD. Version now for PV. // 4.0 13-11-08 HD. now including the busconfig(7) command obs PacsEng_Spec_dark_current_pv { /* Needed variables to call PacsEng_Spec_dark_current_pv */ string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position int gratPOS = 500000; // Grating Position /* End of needed variables for PacsEng_Spec_dark_current_imt502 */ }{ // busconfig (7); // BURST MODE : 4:PACS PRIME - 7:BURST MODE - 8:PARALLEL MODE // 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(Pacs_Spec_dark_current_pv(fltPOS,gratPOS))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(300.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_dark_current_pv(fltPOS,gratPOS); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Purpose : SPU nominal data rate check (photometry) // // Author : Roland Vavrek // CUS script : RV // CVS file : // // Arguments : No interactive parameters // // // // Description : Photometry, staring 7 min on CS2/CS1 and chopper zero position in default/double compression SPU setup. // // // Dependencies : - Chop_mov_abs // - PHOT_spu_reset // - PHOT_spu_setup // // // Preconditions : - PACS is switched on // - Setup photometry with nominal parameters // - Mechanics and CS controllers are SWON and ENABLED // - CS2/CS1 temperature is raising but not yet stabilized // // Comments : The default detector selection table is assumed to be used before executing this script. // // Version : 2.0 // // History : 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 1.3 09-Apr-2007 Use PHOT_spu_reset and PHOT_spu_setup // 1.2 05-Apr-2007 Chopper positions on CS1 and zero added, double compression mode // added on CS2, unit time is reduced to 2 min. Constants updated for FM/ILT // 1.1 27-Apr-2005 SPU reset attached to the end // 1.0 21-Apr-2005 Creation by RV // procedure Pacs_Phot_spu_data_rate { }{ // // 1 - Mechanics parameters // // chopper in zero position int chop_def_zero = 664; // chopper on CS2 int chop_CS2_pos = 21200; // chopper on CS1 int chop_CS1_pos = -21350; // // 2 - SPU parameters // // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int comp_mode_blu = 0; // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int comp_mode_red = 0; // Number of raw channels transmitted in the blue SPU int nraw_blu = 3; // Number of raw channels transmitted in the red SPU int nraw_red = 3; // Start SPU or not [true,false] bool startSPU = true; // // 3- Start test // // // 3.1 - Default compression, 3 raw channels // // // 3.1.1 - Position chopper on CS2 position // Chop_mov_abs(chop_CS2_pos); // Switch off science data flow PHOT_spu_reset(); // Default compression, 3 raw channels PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); // 2 min staring measurement on CS2 delay(120); // // 3.1.2 - Move chopper to position 0 // Chop_mov_abs(chop_def_zero); // 2 min staring measurement on chopper zero position delay(120); // // 3.1.3 - Move chopper to CS1 // Chop_mov_abs(chop_CS1_pos); // 2 min staring measurement on chopper zero position delay(120); // Position chopper on zero position Chop_mov_abs(chop_def_zero); // // 3.2 - Double compression, 3 raw channels // // // 3.2.1 - Position chopper on CS2 position // Chop_mov_abs(chop_CS2_pos); // Switch off science data flow PHOT_spu_reset(); // Change compression mode comp_mode_blu = 1; comp_mode_red = 1; // Double compression, 3 raw channels PHOT_spu_setup(comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); // 2 min staring measurement on CS2 delay(120); // // 4 - End of measurement // // Switch off science data flow PHOT_spu_reset(); // Position chopper on zero position Chop_mov_abs(chop_def_zero); } // Missionphase : EQM IMT // // Purpose : Perform one MOVE_GRATING_ABSOLUTE // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : target_pos : Grating target position // // Description : executes Pacs_DMC_MOVE_GRAT_ABS_RAW // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON, ENABLED and HOMED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : Since the amplitude of the movement cannot be computed, THIS BBlock/COMMAND DOES NOT INCLUDE ANY DELAY!!! // // Version : 1.0 // // History : 1.0 30-Mar-2004 Creation by PR // block SPEC_Gra_move_abs_raw PACS 103 { int target_pos = 500000; // Target position }{ // Register start of BB WriteBBID($BBID); Pacs_DMC_MOVE_GRAT_ABS_RAW(target_pos); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Perform Spectroscopy Thermal behaviour test // // CUS author : TM // Script file : SPEC_thermal_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Perform PACS spectroscopy thermal behaviour // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // // History : 0.1 TM 17-nov-2006 // History : 1.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_thermal { /* Needed variables to call PacsEng_Spec_thermal */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_thermal */ }{ double temp_CS1 = 48.0; double temp_CS2 = 58.0; string fltPOS = "POS A"; // 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(SPEC_thermal(fltPOS,temp_CS1,temp_CS2))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_thermal(fltPOS,temp_CS1,temp_CS2); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Start Autonomy Function 17 // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : Simply call Aut_17 // // Dependencies : Aut_17 // // Comments : // // Version : 1.0 26-Mar-2007 HF // History : 1.0 26-Mar-2007 initial Version // procedure Aut_17 { }{ Pacs_DPU_SET_FUNCT("EVENT_BOL_V_PWR","ENABLE"); } // Missionphase : // // Purpose : Start Autonomy Function 14 // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : Simply call Aut_14 // // Dependencies : Aut_14 // // Comments : // // Version : 1.0 26-Mar-2007 HF // History : 1.0 26-Mar-2007 initial Version // procedure Aut_14 { }{ Pacs_DPU_SET_FUNCT("EVENT_BOL_T_FPU","ENABLE"); } // $Id: PacsCal_WaveCalChop.txt,v 1.3 2008/04/21 09:48:07 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration and instrumental profile // with Chop/Nod // Author : HF // // Arguments � : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Uses OBCP27 for executing a parameterized scan of any length, // �stepsize etc. Represents a generic chopped grating scan // Comments : // // Version : 1.0 // // History : 0.1 Using example from PacsCal_WaveCalNoChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping obs PacsCal_WaveCalNodRaster { /* Needed variables to call WaveCalChop */ /* Spectro definitions */ string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int grat_pos = 500000; // grating start position for scan int grat_time = 0; // time for grating to move to start position [msec] int grat_step_up = 200; // grating step size int nb_ramps_plateau = 1; // number of readouts per grating position int grat_step_dn = 200; // grating step size int nb_grat_steps = 50; // number of grating steps in one direction int order = 2; // end position for order selection: 1=Red, 2= or 3= Blue) int nb_SRC_REF = 3; // number of ramps (cycles) per grating position int nb_CS1_CS2 = 0; // nb of cycles on internal CS int nb_rdouts_ramp = 64; // number of readouts per ramp int nb_up_down = 1; // number of grating updown scans /* Detector definitions */ int nb_raw_red = 3; // number of red pixels int nb_raw_blu = 3; // number of blue pixels 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 comp_mode_blu = 16; // compression mode for blue detector int detector = 1; // 1=blue 2=red (sync on detector) int comp_mode_red = 16; // compression mode for red detector 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 /* Pointing parameters */ int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; bool refSelected = false; // OFF position needed bool startAtB = false; // false=start nodding at A, true=start at B /* raster */ int m = 2 in [2,100]; // Number of points in a raster line int n = 1 in [1,100]; // number of raster lines double d1 = 2.0 in [2.0,480.0]; // Raster point separation in a line [arcsec] double d2 = 2.0 in [2.0,480.0]; // Raster line separation [arcsec] bool fixed = false; // Raster in S/C (=false) or SKY coordinates (=true) int nnod = 1; // number of nods (AB or BA) double nodthrow = 30.0 in [2.0,960.0]; // chop/nod throw double patt = 0.0; // Raster pattern orientation double pattnod = 270.0; // Nodding orientation (defined along y-axis if fixed=false, else ccw to north) bool verbose = true; }{ // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Set OBSID int tobsid = duration(WriteOBSID($OBSID)); // Verification for grating and chopper hard limits int[] gratpos = [0]; Pacs_HardLimitsCheck(gratpos,nodthrow); // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,comp_mode_blu,nb_raw_blu,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,comp_mode_red,nb_raw_red,0,0,0,0,0,0}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // frstLstGratPos is the last position for the grating after the Cals done // during Slew time... must be same as observations start position: grat_pos // Perform/don't AOT prologue bool doPROLOG = true; // "N/A" in string because of indexing 0,1,2,3 string[] choix = ["N/A","order1","order2","order3"]; string order_str = "order" + order; // if(choix[order] != "order1") { // double keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); double keyWL = PacsSpecKeyWaves(order_str); double[] keyWAVE = [keyWL]; int tpacsSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); // } else { // keyWAVE1 = dlookup("KEY_WAVES",order_str,"KeyWave1"); // double keyWAVE2 = dlookup("KEY_WAVES",order_str,"KeyWave2"); // keyWAVE = [keyWAVE1,keyWAVE2]; // tpacsSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order])); // } //Initial hold int tih = 0; //Final hold int tendobsid = duration(WriteEndID()); int grat_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_def,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,nodthrow,detector)); if(verbose) { debug_print("Duration of WaveCalChop" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; int k = 0; int tloadmin = 0; int nload = 0; int thold = 0; int nhold = 0; int top = 0; int nrepeat = 1; // minimum duration of the slew between repeats int trepeatmin = 0; //Issue PointReq int tslewmin = tobsid + tpacsSlewCal; if(verbose) { debug_print("Slewing time is:" + tslewmin + "sec"); } int[] ts = nodding_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodthrow,nnod,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); // slew time calibration WriteOBSID($OBSID); if(verbose) { debug_print("Slewing starts at :" + tNOW + " sec"); } if(choix[order] == "order1") { PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); } else { PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doPROLOG,keyWAVE,order,grat_pos,choix[order]); } tNOW = time(); if(verbose) { debug_print("Slewing ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,nodthrow,detector); tNOW = time(); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 7) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation at NOD starts at :" + tNOW + " sec"); } WaveCalChop(fltPOS,grat_pos,grat_time,grat_step_up,grat_step_dn,nb_grat_steps,nb_CS1_CS2,nb_rdouts_ramp,nb_ramps_plateau,nb_up_down,capa_red,capa_blu,bias_r_blu,bias_r_red,bias_d_blu,bias_d_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_SRC_REF,nodthrow,detector); tNOW = time(); if(verbose) { debug_print("Observation at NOD ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_def,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } } // End of Observation } procedure PACS_Spec_Gra_PID_loop_Short_Less { }{ int[] kp = [1000,1250,1500,1750,2000]; int[] ki = [10000,20000,30000,40000,50000]; int[] kd = [5,8,11,15]; int nsteps_kp = length(kp) - 1; int nsteps_ki = length(ki) - 1; int nsteps_kd = length(kd) - 1; string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrow = "ISTSafe"; // INSTRUMENT VERSION // // ---------------------------- // SWITCH ON GRATING CONTROLLER // ---------------------------- Pacs_DMC_SWON_GRAT_CONT(); delay(1); // int word0 = ilookup(calUname,calUrow,"Kp"); int word1 = ilookup(calUname,calUrow,"Ki"); int word2 = ilookup(calUname,calUrow,"Kd"); int word3 = ilookup(calUname,calUrow,"Kf"); int word4 = ilookup(calUname,calUrow,"Rate"); int word5 = ilookup(calUname,calUrow,"AccLimit"); int word6 = ilookup(calUname,calUrow,"OutputLimit"); int word7 = ilookup(calUname,calUrow,"Scaling"); int word8 = ilookup(calUname,calUrow,"ErrorLimit"); {int}[] params = []; int[] aux = []; int chksum = 0; // for(int np = 0 .. nsteps_kp) { for(int ni = 0 .. nsteps_ki) { for(int nd = 0 .. nsteps_kd) { // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); // word0 = kp[np]; word1 = ki[ni]; word2 = kd[nd]; // Create the parameter list tuple params = [{word0},{word1},{word2},{word3},{word4},{word5},{word6},{word7},{word8}]; // Create the array for the checksum function aux = [word0,word1,word2,word3,word4,word5,word6,word7,word8]; chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_PAR(params,chksum); delay(1); // ENABLE GRATING CONTROLLER Pacs_DMC_ENABLE_GRAT_CONT(); delay(3); for(int m = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(117); delay(1); } for(int j = 0 .. 5) { Pacs_DMC_MOVE_GRAT_REL_RAW(-117); delay(1); } Pacs_DMC_MOVE_GRAT_REL_RAW(233010); delay(10); Pacs_DMC_MOVE_GRAT_REL_RAW(-233010); delay(10); } } } // DISABLE GRATING CONTROLLER Pacs_DMC_DISABLE_GRAT_CONT(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Fil_Diaghk_Setup { /* variables to call PacsEng_Spec_Fil_Diaghk_Setup */ int diag_hk_period = 5; //1: sync w/ BLUE DET 2: sync with RED DET >4 period in ms 0: 1Khz (not to use w/ science /* End of needed variables for PacsEng_Spec_Fil_Diaghk_Setup */ }{ // 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(PACS_Spec_Fil_Diaghk_Setup(diag_hk_period))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Fil_Diaghk_Setup(diag_hk_period); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Script file : PACS_Spec_Gra_IST_Full_Charac_OBS.cus // // Purpose : Fully Characterize one set of PID parameters (Healthcheck & slewtime cal) // // Description : // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 1.1 13-Nov-2007 BV Added MOIS comments // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // procedure Pacs_Spec_Gra_IST_Full_Charac { }{ mois_comment("Start of procedure: Full characterisation of the grating control loop parameter set"); // mois_step("Configure Nominal SPEC_HK"); debug_print("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // // SETUP DIAGHK // int diag_hk_period = 5; // 5 msec diag hk period debug_print("Configure Diag_HK"); mois_step("Configure Diag_HK"); PACS_Spec_Gra_Diaghk_SINCOS_Setup(diag_hk_period); // // PRE-CONFIGURE & HOME GRATING : SLOW RATE // mois_step("PRE-CONFIGURE & HOME GRATING : SLOW RATE"); string calUname = "CONFGrat"; // GRATING CALIBRATION TABLE string calUrowSLOW = "ISTSlow"; string calUrowFAST = "IST"; string calUrowSECURE = "ISTSafe"; // INSTRUMENT VERSION CONF_grating(calUname,calUrowSLOW); // // GRATING HEALTHCHECK // // HOMING_MODE : 0 for "POSITIVE" (homing at low grating positions), 1 for 'NEGATIVE" mois_step("Health check - homing positive"); string homing_mode = "POSITIVE"; PACS_Spec_Gra_Healthcheck_BB(homing_mode); mois_step("Health check - homing negative"); homing_mode = "NEGATIVE"; PACS_Spec_Gra_Healthcheck_BB(homing_mode); // // SET THE PID PARAMETERS SPECIFIC TO THIS TEST : FAST // mois_step("Configure grating controller: fast rate"); int homing_mode_rate = 0; PACS_Spec_Gra_Set_Ctrl_Par(calUname,calUrowFAST,homing_mode_rate); // // MINI-SCANS OVER THE FULL RANGE // mois_step("mini-scans over the full range"); int grat_start_pos = 80000; // grating starting position (~3 degrees from the hard stop) PACS_Spec_Gra_Tune_PID(grat_start_pos); // // FULL CHARACTERISATION WITH MOVEMENTS OF ALL AMPLITUDES // // (copy & paste of PACS_Spec_Gra_Slew_Time_Cal int gra_steps_per_block = 3; int time_on_pos = 2; double atomic_step_pos = 116.505; double atomic_step_neg = -116.505; double[] steps = [1.0,2.0,3.0,3.43,5.15,7.725,10.3,15.0,20.6,50.0,100.0,200.0,600.0]; int n_steps = length(steps) - 1; int astep = 0; mois_step("full characterisation with movements of all amplitudes- block 1 - bottom upwards"); // First block : from bottom, upwards SPEC_Gra_move_abs_raw(66000); delay(25); for(int n1 = 0 .. n_steps) { // debug_print("n1 =" + n1 + " steps[n1] = " + steps[n1]); astep = iround(steps[n1] * atomic_step_pos); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } mois_step("full characterisation with movements of all amplitudes- block 2 - center upwards"); // Second block : from center, upwards SPEC_Gra_move_abs_raw(500000); delay(25); for(int n2 = 0 .. n_steps) { astep = iround(steps[n2] * atomic_step_pos); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // Third block : from top, downwards mois_step("full characterisation with movements of all amplitudes- block 3 - top downwards"); SPEC_Gra_move_abs_raw(1030000); delay(25); for(int n3 = 0 .. n_steps) { astep = iround(steps[n3] * atomic_step_neg); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // Fourth block : from center, downwards mois_step("full characterisation with movements of all amplitudes- block 4 - center downwards"); SPEC_Gra_move_abs_raw(500000); delay(25); for(int n4 = 0 .. n_steps) { astep = iround(steps[n4] * atomic_step_neg); SPEC_Gra_move_rel_raw_loop(gra_steps_per_block,astep,time_on_pos); } // End : bring the grating back to central position mois_step("Bring the grating back to central position"); SPEC_Gra_move_abs_raw(500000); delay(25); // // RESTORE ORIGINAL PID PARAMETERS // mois_step("Restore origiinal PID parameters"); homing_mode_rate = 0; PACS_Spec_Gra_Set_Ctrl_Par(calUname,calUrowSECURE,homing_mode_rate); // // RESET DIAGHK // mois_step("Reset diagnostic housekeeping"); PACS_Diaghk_Reset(); // mois_step("PACS to safe mode"); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // Missionphase : // // Purpose : Read a BOLObias calibration table and command bias // voltages for the given group, viz. // VDL-BU for Group 3. Will also establish VDD_PROT_BLU // and VDD_PROT_CL before setting bias voltages // // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CVS file : PHOT_set_bias_volt.txt // // Arguments : // string calTableName The Cal table name, f.i. BOLObias or BOLOsafe // string BiasGR The group number, BiasGRn (n:1, 2, ..6) // // Description : Read Bias U-CAL tables in volts. // Since BIAS are to be set in a predetermined order, the // array biasOrder lists the preconised ordering. // Prior to commanding the voltage generators, two voltages // have to be switched ON with the operand // // 0x0001 + 0x10000*BiasNum + 0x1000000*GroupNum // // and this for BiasNum 23, 22 and 21 // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.3 // History : 0.1 07-aug-2006; 1st version DAC // 0.1.1 22-aug-2006, KO, waitFor set to 1s everywhere // 0.2 17-oct-2006 DAC Had forgotten GND-BU // 0.3 13-nov-2006 DAC&TM Wait 3 sec after GND-BU // procedure PHOT_set_bias_volt { string calTableName = "PHOT_bias_low_direct"; // The U-Cal table [volts] int groupNb = 1 in [1,6]; // Requested group }{ // Construct BiasGR entry string biasGR = "BiasGR" + groupNb; // Switch ON the requested group (bias numbers 22 and 21) int biasHexa = 0x1; int biasNb = 22; int operand = groupNb * 0x1000000 + biasNb * 0x10000 + biasHexa; Pacs_DMC_SEND_COMMAND_BOLC(operand); int waitFor = 1; delay(waitFor); biasNb = 21; operand = groupNb * 0x1000000 + biasNb * 0x10000 + biasHexa; Pacs_DMC_SEND_COMMAND_BOLC(operand); waitFor = 1; delay(waitFor); biasNb = 23; operand = groupNb * 0x1000000 + biasNb * 0x10000 + biasHexa; Pacs_DMC_SEND_COMMAND_BOLC(operand); waitFor = 3; delay(waitFor); // Bias setting order string[] biasOrder = ["VDD-PROT-BU","VDD-PROT-CL","GND-BU","VGL-BU","VDL-BU","VSS-BU","VGG","VDD","VGL","VDL","VH-BLIND","VSS","VDECX-L","VDECX-H","CKRLL","CKRLH","VSMS-L","VSMS-H","VINJ","VH","VL","VRL","VCH"]; // Introduce 1 sec delay after commanding each bias waitFor = 1; // Use lookup function; get BIAS voltage for given group and Bias number // For each BIAS defined in table and for demanded group for(int index = 3 .. 22) { biasNb = ilookup(calTableName,biasOrder[index],"Bias"); double biasVolt = dlookup(calTableName,biasOrder[index],biasGR); // Branch according to group number if(groupNb == 1) { PHOT_bias_group_1(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 2) { PHOT_bias_group_2(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 3) { PHOT_bias_group_3(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 4) { PHOT_bias_group_4(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 5) { PHOT_bias_group_5(groupNb,biasNb,biasOrder[index],biasVolt); } if(groupNb == 6) { PHOT_bias_group_6(groupNb,biasNb,biasOrder[index],biasVolt); } } // to sync the bus sync(); } // CVS comments : $Id: PacsReadKeyWave.txt,v 1.2 2007/04/25 15:14:04 dcesarsk Exp $ // Missionphase : Operations // // Purpose : // // CUS author : // Script file : PacsReadKeyWave.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-may-2005 DAC double procedure PacsReadKeyWave { string order = "1"; // double waveUSER = 100.0; // }{ // Local variables double[] waves = [0.0]; double differ = 1000.0; double closest = 0.0; // Open KEY_WAVES table and read number of columns for given order int nb_cols = ilookup("KEY_WAVES",order,"nWAVE"); // Read each column (KeyWave1, KeyWave2, etc.) for(int loop1 = 1 .. nb_cols) { string colNAME = "KeyWave" + loop1; waves[loop1 - 1] = dlookup("KEY_WAVES",order,colNAME); if(abs(waves[loop1 - 1] - waveUSER) <= differ) { closest = waves[loop1 - 1]; differ = abs(closest - waveUSER); } } // debug_print ("Waves: " + waves + " closest " + closest); return closest; } // $Id$ // Missionphase : PACS PV Phase // File : PACS_Chopper_EnDis_PlateauTest_ast_OBS.cus // // // Purpose : Switch-on/switch-off and enanle/disable test of chopper // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : This script allows to insert a chopper defelction and a // duration in seconds during // which the chopper is enabled. This is used to evaluate the // stability of the chopper while selecting various chopper // control parameters. // // Comments : // // Version : 4.0 // History : 1.0 11-Apr-2007 initial version // : 2.0 05-Jul-2007 IST Chopper Day // : 3.0 12-Nov-2007 edited for SVT/PV conformance // : 4.0 04-mar-2008 translated into PV phase script VDP // obs PacsEng_Chopper_EnDis_PlateauTest_ast { /* Needed variables to call PacsEng_Chopper_EnDis_PlateauTest_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_EnDis_PlateauTest_ast */ }{ // 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(PACS_Chopper_EnDis_PlateauTest_NoConf_ast())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_EnDis_PlateauTest_NoConf_ast(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT // // Purpose : Switch on/off the chopper electronics // // Author CUS : MN // // Author TCL : N/A // // Original TCL : N/A // // Input arguments // Type Name DefVal Description // string on_off "ON" ON: switch on chopper, OFF: switch off // // Description : // // Dependencies : // // Comments : // // Version : 0.1 08-03-2007 First creation // : // procedure PACS_Chopper_SWON_SWOF_only { string on_off = "ON" in ["ON","OFF"]; }{ if(on_off == "ON") { // debug_print("Switching on chopper"); Pacs_DMC_SWON_CHOP_CONT(); } if(on_off == "OFF") { // debug_print("Switching off chopper"); Pacs_DMC_SWOF_CHOP_CONT(); } } // Script file : PACS_Spec_Gra_IST_PID_Loop_OBS.cus // Purpose : Run a loop of tens of different sets of PID parameters // // Description : For each set, performs a dozen of small and two larger movements // // CUS author : PR // // Preconditions : PACS in SAFE MODE // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Spec_Gra_IST_PID_Loop { }{ mois_comment("Start of procedure: Run a grid of daring PID parameters"); // Register start of OBS // mois_step("Configure Nominal SPEC_HK"); debug_print("Configure Nominal SPEC_HK"); PACS_Spec_HK_Setup(); // mois_step("Configure Diagnostic HK"); debug_print("Configure DIAG_HK"); int diag_hk_period = 5; PACS_Spec_Gra_Diaghk_Setup(diag_hk_period); // mois_step("Configure grating"); debug_print("Configure Grating"); string calUname = "CONFGrat"; string calUrow = "IST"; CONF_grating(calUname,calUrow); delay(10); // debug_print("PID LOOP : PIDs greater than in FMILT"); mois_step("Loop over PID parameters; reconfigure and do diagnostic movements"); PACS_Spec_Gra_PID_loop_Short(); // mois_step("Reset DIAG_HK"); debug_print("Reset DIAG_HK"); PACS_Diaghk_Reset(); // mois_step("PACS to SAFE mode"); debug_print("PACS to SAFE MODE"); OBCP_SAFE(); delay(10); } // File : CONF_chopper_ast.cus // Missionphase : PACS IST Chopper Day // // Purpose : Configure the chopper servo loop // // Author : DAC/MN/HD // CUSification : DAC/MN/HD // Arguments : // string calUfile CAL-U file // string calUcol Column identifier // // // Description : Read servo loop parameters off a CALU table; a set // of parameters is arranged as a column; different // columns list different sets. Must specify the CALU // file name and the column identification string. // Example: CONF_chopper ("CONFChopper","nom_sky") // // Comments : // // Version : 0.6 // History : 0.1 9-nov-2006 Initial version // 0.2 22-feb-2007 Adapted to revised CONFChopper table // (PosLimit <=> Scaling // 0.3 8-mar-2007 Added 2sec delay at end per HD's mail // 0.4 9-jun-2007 Changed entries for new DECMEC (MN) // 0.4 9-jun-2007 newly optimised parameters (MN) // 0.5 5-jul-2007 IST Chopper Day // 0.6 12-oct-2007 BV: added mois comment procedure CONF_chopper_ast { string fileU = "CONFChopper_ast"; // CAL-U file string calUcol = "nom_ast"; // Column identifier }{ mois_comment("Start of procedure to write PACS chopper control parameters"); mois_step("Write the control parameters to the DMC"); // # DMC_WRT_CHOP_CONF_PAR (21 params). Use values // obtaied from CALU file int aKp = ilookup(fileU,"Kp",calUcol); int aKi = ilookup(fileU,"Ki",calUcol); int aKd = ilookup(fileU,"Kd",calUcol); int aKf = ilookup(fileU,"Kf",calUcol); int aRate = ilookup(fileU,"Rate",calUcol); int aAccumLimit = ilookup(fileU,"AccumLimit",calUcol); int aOutputLimit = ilookup(fileU,"OutputLimit",calUcol); int aPosLimit = ilookup(fileU,"PosLimit",calUcol); int aErrorLimit = ilookup(fileU,"ErrorLimit",calUcol); int aPosOffset = ilookup(fileU,"PosOffset",calUcol); int aKiCurr = ilookup(fileU,"KiCurr",calUcol); int aSelectFieldPlateLUT = ilookup(fileU,"SelectFieldPlateLUT",calUcol); int aSpare = ilookup(fileU,"Spare",calUcol); int aFilterN1 = ilookup(fileU,"FilterN1",calUcol); int aFilterN2 = ilookup(fileU,"FilterN2",calUcol); int aFilterN3 = ilookup(fileU,"FilterN3",calUcol); int aFilterD1 = ilookup(fileU,"FilterD1",calUcol); int aFilterD2 = ilookup(fileU,"FilterD2",calUcol); int aInductance = ilookup(fileU,"Inductance",calUcol); int aResistance = ilookup(fileU,"Resistance",calUcol); int aControlLoopGain = ilookup(fileU,"ControlLoopGain",calUcol); // Create tuple array and int array {int}[] list_tuple = [{aKp},{aKi},{aKd},{aKf},{aRate},{aAccumLimit},{aOutputLimit},{aPosLimit},{aErrorLimit},{aPosOffset},{aKiCurr},{aSelectFieldPlateLUT},{aSpare},{aFilterN1},{aFilterN2},{aFilterN3},{aFilterD1},{aFilterD2},{aInductance},{aResistance},{aControlLoopGain}]; // Define as int [] to compute check sum int[] list_int = [aKp,aKi,aKd,aKf,aRate,aAccumLimit,aOutputLimit,aPosLimit,aErrorLimit,aPosOffset,aKiCurr,aSelectFieldPlateLUT,aSpare,aFilterN1,aFilterN2,aFilterN3,aFilterD1,aFilterD2,aInductance,aResistance,aControlLoopGain]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_CHOP_CONF_PAR(list_tuple,chksum); delay(2); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Open the Grating Launch Lock // // // // TCL author : HF // TCL file : PACS_Open_Launch_Lock.tcl // CUS author : HF // Script file : LLock_Open.txt // // Input arguments none // type name description // // Return values none // Type Name Default Description // // Description : Calls only OpenLLock // You can use the same parameters with both redundant and nominal electronics and command both motors separetely. // Let's name "Motor N" the motor connected to nominal electronics and "Motor R" the motor connected to redundant electronics. // Then the different parameters have the following effects : // // - When using nominal electronics : // DMC_LOCK_GRAT + 0x12 = Lock Motor N + Motor R // DMC_LOCK_GRAT + 0x2 = Lock Motor N // DMC_LOCK_GRAT + 0x10 = Lock Motor R // DMC_UNLOCK_GRAT + 0x28 = Unlock Motor N + Motor R // DMC_UNLOCK_GRAT + 0x8 = Unlock Motor N // DMC_UNLOCK_GRAT + 0x20 = Unlock Motor R // // - When using redundant electronics : // DMC_LOCK_GRAT + 0x12 = Lock Motor R + Motor N // DMC_LOCK_GRAT + 0x2 = Lock Motor R // DMC_LOCK_GRAT + 0x10 = Lock Motor N // DMC_UNLOCK_GRAT + 0x28 = Unlock Motor R + Motor N // DMC_UNLOCK_GRAT + 0x8 = Unlock Motor R // DMC_UNLOCK_GRAT + 0x20 = Unlock Motor N // // // Dependencies : OpenLLock // // Preconditions : PACS must be switched-on and in the equivalent of the SAFE mode // // Version : 2.0 // History : 1.0 24-Mar-2005 creation by HF // 1.1 12-Apr-2006 HF, include degraded modes operation // 2.0 04-Mar-2008 Translated into PV script VDP // obs PacsEng_LLock_Open { /* Needed variables to call PacsEng_LLock_Open */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_LLock_Open */ }{ int unlock_mode = 40; // use motors: 8=motor 1, 32 =motor 2, 40 = both motors // 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(OpenLLock(unlock_mode))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure OpenLLock(unlock_mode); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : EQM IMT // // Purpose : SAFE mode OBCP // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : OBCP_SAFE.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Transit to SAFE mode // // // // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // // Comments : // // History : 1.0 29-Mar-2005 creation by HF // int block OBCP_SAFE PACS 24 { }{ // Register start of BB WriteBBID($BBID); // Tally duration (NOTE: we use [msec] for the return value) int duration_msec = 0; Pacs_DPU_START_OBCP("GO_SAFE_MODE",0,[]); delay(10); duration_msec = duration_msec + 10000; // Mark End of Block WriteEndBB(); // Return time return duration_msec; } // Missionphase : // // Purpose : Prepare MEC for photometry, including filterwheel, // chopper and calibration sources // // TCL author : TM // TCL file : tm_phot_mec_setup.tcl // CUS author : DAC // Script file : PHOT_dmc_setup.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will switch on and set all required // parameters for the chopper, the photometry filter // wheel and the calibration sources. // This script should be executed just after the // switch-on procedure and the bolometer setup // // Dependencies : // // Preconditions : // // Comments : // // Version 0.8 // History // 0.1 12-apr-2005 DAC (based on TM's version 1.2) // 0.2 13-apr-2005 DAC Redefined as procedure // 0.3 20-apr-2005 DAC Use new CONF_cs // 0.4 08-aug-2006 TM, integration of diagnostic HK for fw and chopper // 0.5 10-nov-2006 DAC Use "current" chopper controller parameters // 0.6 13-nov-2006 DAC Use "Heidelberg 4deg" chopper controller parameters // 0.7 05-mar-2007 TM update for chopper and CSs // 0.8 15-Jun-2007 PR modify PHOT_fltw_conf -> CONF_phot_fltw // int[] procedure PHOT_dmc_setup { string phot_fltw_id = "POS B" in ["POS A","POS B"]; // Photometer filter ID int chop_def_pos = 0; // Chopper default position double temp_CS1 = 48.0; // Temperature for the PACS calibration source 1 double temp_CS2 = 58.0; // Temperature for the PACS calibration source 2 }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); //------------------- // FILTERWHEEL //------------------- // // Configure diagnostik HK for filterwheel // Read out every 5 ms // DMC_WRT_DIAG_HK_LIST // DMC_FW_PHOT_CTRL 211 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FWPH_CUR_POS 260 // DMC_FPU_T_SEN_ST 404 // DMC_FW_PHOT_TEMP 406 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_IMOTA 560 // DMC_FWPHOT_POS_A 563 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTB 567 // DMC_FWPHOT_POS_B 569 {int}[] parlist_fw = [{211},{256},{257},{260},{404},{406},{556},{560},{563},{564},{567},{569},{0xffff}]; int[] aux_fw = [211,256,257,260,404,406,556,560,563,564,567,569,0xffff]; int check_sum_fw = checksum("int",aux_fw); int diag_hk_length_fw = 13; int diag_hk_period_fw = 5; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_fw,parlist_fw,check_sum_fw); Pacs_DMC_START_DIAG_HK(diag_hk_period_fw); // CONF_phot_fltw(); //PHOT_fltw_conf(); // PC129420 "DMC_SWON_FW_PHOTO" SWITCH ON POWER SUPPLY OF FILTER WHEEL PHOTO // PC136420 "DMC_MOVE_PHOT_FW_LOC" MOVE PHOTOMETER FILTER WHEEL TO LOCATION // PP075420 "FW_ID" // PC109420 "DMC_SWOF_GRAT_CONT" SWITCH OFF GRATING CONTROLLER PHOT_fltw_move(phot_fltw_id); delay(1); // Pacs_DMC_STOP_DIAG_HK(); delay(1); // //------------------- // CHOPPER //------------------- // // Configure diagnostik HK for chopper // Read out every 5 ms // DMC_CHOP_CTRL_ST 209 // DMC_CHOP_CUR_POS 244 // DMC_CHOP_SETPOIN 245 // DMC_CHOP_TARGET 246 // DMC_CHOP_PID_ERR 247 // DMC_CHOP_PID_ACC 248 // DMC_CHOP_MAX_DIT 249 // DMC_CHOP_OUTPUT 258 // DMC_CHOPPER_TEMP 407 // DMC_CHOP_VA 557 // DMC_CHOP_IA 561 // DMC_CHOP_VB 565 {int}[] parlist_cho = [{209},{244},{245},{246},{247},{248},{249},{258},{407},{557},{561},{565},{0xffff}]; int[] aux_cho = [209,244,245,246,247,248,249,258,407,557,561,565,0xffff]; int check_sum_cho = checksum("int",aux_cho); int diag_hk_length_cho = 13; int diag_hk_period_cho = 5; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_cho,parlist_cho,check_sum_cho); Pacs_DMC_START_DIAG_HK(diag_hk_period_cho); // // DMC_WRT_CHOP_CONF_PAR (now modified for 20 parameters) CONF_chopper("CONFChopper","nom_sky"); // PC119420 "DMC_SWON_CHOP_CONT" SWITCH ON CHOPPER CONTROLLER // PC121420 "DMC_ENABLE_CHOP_CONT" ENABLE CHOPPER CONTROLLER CHOP_on_off("ON"); // PC123420 "DMC_MOVE_CHOP_ABS" MOVE CHOPPER TO AN ABSOLUTE POSITION // PP079420 "SET_POINT" Pacs_DMC_MOVE_CHOP_ABS(chop_def_pos); delay(1); // Pacs_DMC_STOP_DIAG_HK(); delay(1); // //------------------------- // PACS CALIBRATION SOURCES //------------------------- // DMC_WRT_CS1_CONF_PAR // DMC_WRT_CS2_CONF_PAR CONF_cs("Both"); // PC138420 "DMC_SWON_BB_1_CONT" SWITCH ON BLACK BODY 1 CONTROLLER // PC206420 "DMC_ENABLE_BB_1_CONT" ENABLE BB1 CONTROLLER CS_on_off("CS1","ON"); // PC140420 "DMC_SET_TEMP_BB_1" SET THE TEMPERATURE OF THE BLACK BODY 1 // PP079420 "SET_POINT" CS_temp("CS1",temp_CS1); // PC142420 "DMC_SWON_BB_2_CONT" SWITCH ON BLACK BODY 2 CONTROLLER // PC208420 "DMC_ENABLE_BB_2_CONT" ENABLE BB2 CONTROLLER CS_on_off("CS2","ON"); // PC144420 "DMC_SET_TEMP_BB_2" SET THE TEMPERATURE OF THE BLACK BODY 2 // PP079420 "SET_POINT" CS_temp("CS2",temp_CS2); //------------------------- // End of Procedure //------------------------- // Return empty array for time being... // Time spent int duree_TCs = time() - time_start; duree_OVR = duree_TCs; duree_num = duree_OVR; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // Filename : Pacs_Spec_chopped_SED // Purpose : Exercise chopped SED // // // // TCL author : N/A // TCL file : tN/A // CUS author : TM // Script file : // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Exercise all available OBCPs for PHOT // // Dependencies : // // Preconditions : SPEC_setup has been executed // // Comments : // // Version 2.1 // History 0.1 11-apr-2007 TM // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 15-Apr-2008 VDP Adjusted blue heater current value // from 1.5mA to 0.78mA // procedure Pacs_Spec_chopped_SED { }{ // Register with environment // Start SPU int comp_mode_blu = 16; int comp_mode_red = 16; int nb_samp_subramp_blu = 32; int nb_samp_subramp_red = 32; int nb_raw_spu_blu = 0; int nb_raw_spu_red = 0; int glitch_det = 1; int ramp_fit_alg = 0; // // 32 readouts per ramp, 0,0 capacitor, (obsolete) 1.5mA blue heater current // 0.78 mA // SPEC_CRE_setup(32,32,0.069,0.01,0.198,0.01,0,0,0.78); // SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,true); // // Position the filter wheel at POS A // SPEC_fltw_move("POS A"); // // Perform OBCP_grat_line_scan_chop_2 with default parameters debug_print("Start OBCP_grat_line_scan_chop_2"); OBCP_grat_line_scan_chop_2(1,430,1,648,2,-21350,0,0,0,2400,-2400,1,32000,20000,16,16,500000,0,10000,32); delay(2); // // Position the filter wheel at POS B // SPEC_fltw_move("POS B"); // // Perform OBCP_grat_line_scan_chop_2 with default parameters debug_print("Start OBCP_grat_line_scan_chop_2"); OBCP_grat_line_scan_chop_2(1,430,1,648,2,-21350,0,0,0,2400,-2400,1,32000,20000,16,16,500000,0,10000,32); delay(2); // SPEC_fltw_move("POS A"); // // Stop SPU // PACS_spu_reset(); // Leave environment sync(); } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //- Test of internal calibration recipes including different chopper // frequencies photometry including time constants for flux changes // (just between the 2 CSs) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // // TCL author : TM // TCL file : TM // CUS author : TM // Script file : PHOT_cal_recipes_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 27-apr-2005 DAC // // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 0.5 4-nov-2005 DAC Added 1 sec to the wait after DMC load (from 2 to 3 sec) // 0.6 11-apr-2007 update by TM (OBCPs, 40Hz, ....) // 1.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Phot_cal_recipes { /* Needed variables to call PacsEng_Phot_cal_recipes */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_cal_recipes */ }{ // 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(Pacs_Phot_cal_recipes())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_cal_recipes(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT // // Purpose : Move chopper in open-loop mode // // Author : Markus Nielbock // CUS author : MN // // Description : This building block moves the chopper while in open-loop // mode. The parameters are assumed in ROU representing // current settings that are directly sent to the chopper. // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched on, enabled and in // open-loop mode // // Comments : First try of a CUS BB // // Version : 1.0 // // History : 1.0 15-12-06 creation by MN // Begin Mode description block PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB PACS 432 { int chop_pos = 0; }{ // Get BBID from environment int myBBID = $BBID; // Send BBID to DMC WriteBBID(myBBID); // Moving chopper debug_print("Commanding chopper to " + chop_pos); Pacs_DMC_MOVE_CHOP_ABS(chop_pos); // Mark End of Block WriteEndBB(); } ///////////////////////////////////////////////////////////////////////////// /// $Id$ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsCal_PacsLineSpec // // CUS author : DAC // // Input arguments: see after module identification // // Return values // {int,int,int} {totalDuration,slewDuration,obsOverPACSandSC} // // Comments : // // History: // 22-may-2008 0.1 DAC PV version based on PacsLineSpecObs // - reads PV version of EstimatorOBCP27 // - removed most of AOT features // - only one line per AOT // - either raster or scan w/off mode // - chopper throw is user defined {int,int,int} obs PacsCal_PacsLineSpec { /* "lines" is defined as an array; its elements (and hence its dimension) */ /* are provided by HSPOT in the AOT version. Here they are filled in-situ */ /* {id,redshifted wavelength,repeat factor,line flux,continuum flux, */ /* line width,line flux unit,line width unit} */ {string,double,int,double,double,double,string,string}[] lines = []; /*------------- following only to use CUS interface -------------------------*/ string[] lineId = ["My lines"]; double[] lWave = [82.0]; // line wavelength in [55.0,210.0] int[] repeatLine = [1]; // repeat line in [0,10] double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lcontFlux = [111.11]; // Continuum flux in [0.0,10000.0] double[] lineWidth = [30.0]; string[] fluxUnit = ["Jy/m2"]; string[] widthUnit = ["kms"]; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order2" in ["order2","order3"]; /* Here we may chop and/or nod, raster or scan mode (no staring mode!!) */ bool chopper = true; // Chopping does not apply to scan mode bool nodding = false; // Nodding does not apply to scan mode string pmode = "raster" in ["raster","scan"]; /* Raster parameters */ int m = 3 in [2,32]; int n = 3 in [1,32]; double pointStep = 20.0 in [2.0,480.0]; double lineStep = 20.0 in [2.0,480.0]; /* Scan parameters */ double mapScanSpeed = 10.0; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanConstrFrom = 0.0 in [0.0,360.0]; double mapScanConstrTo = 0.0 in [0.0,360.0]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool faintLines = true; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; double chopthrow = 60.0; // Chopper throw [arcsec] string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target bool refSelected = false; double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; int naifid = 0; // RA,DEC or SSO string redshiftType = "redshift" in ["redshift","optical"]; double redshiftValue = 0.0; int obsOverhead = 180; // Slew overhead bool verbose = true; // debugging verbose }{ //*--------- following only when using CUS interface -------------------*/ int linesIdLength = length(lineId); int linesLength = length(lines); if(linesLength == 0) { for(int lLoop00 = 0 .. linesIdLength - 1) { lines[lLoop00] = {lineId[lLoop00],lWave[lLoop00],repeatLine[lLoop00],lineFlux[lLoop00],lcontFlux[lLoop00],lineWidth[lLoop00],fluxUnit[lLoop00],widthUnit[lLoop00]}; } } //*--------- above only when using CUS interface -------------------*/ // Start of "Pointing" section // New variable to start at nodded position bool startAtOFF = false; // extraConf: whatever affects PACS default configuration // Currently: the option faintLines calls for an extraConf string extraConf = "normal"; // For bright lines if(!faintLines) { extraConf = "bright"; } // Set messages for HTML format message(""); message(""); // Need switching boolean bool chopNod = true; bool switching = !chopNod; // Decode more HSPOT information int nbLines = length(lines); int nbLines1 = nbLines - 1; // Cannot call with empty "lines" if(nbLines == 0) { error("STOP!! There are no spectral lines defined!"); } // Nodding/chopping are not allowed in scan pmode if(pmode == "scan") { nodding = false; } if(pmode == "scan") { chopper = false; } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto) // Pointing mode is undefined. If it remains undefined at the end of // the next tests, then there is a problem with the source definition int pointCase = 0; // Based on the definitions of PacsPhoto, and since there is no staring case, // pointCase is of the form 31 (raster no nod), 32 (raster w/nod) or 33 (scan // mode) if(pmode == "raster" && !nodding) { pointCase = 31; string pointMode = "raster_pointing"; string userMode = "Raster, no chopper, no nodding"; if(chopper) { userMode = "Raster, chopper, no nodding"; } } if(pmode == "raster" && nodding) { pointCase = 32; pointMode = "nodding_raster_pointing"; userMode = "Raster, no chopper, nodding"; if(chopper) { userMode = "Raster, chopper, nodding"; } } if(pmode == "scan") { pointCase = 33; pointMode = "line_scan_pointing"; userMode = "Scan, no chopper, no nodding"; } // Establish pointing offsets (index into PACSyzoffsets CAL file) string yzoffsetROW = "S" + pointCase; // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. The chopperthrow will be used to compute yzoffsets yzoffsetROW = yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } // Define array of wavelengths (will be needed by the SORT procedure) double[] lineWave = [55.0]; // Populate the array of wavelengths (inherited from AOT where several lines // are allowed) lineWave[0] = lines[0]{1}; // For each line obtain the grating order and the grating position int[] orders = [0]; double[] grat_pos = [0.0]; // Fill the tuple waveTuple {waveLen,order,gratPos,nbStep,gratStep} {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; waveTuple[0] = SPEC_get_grat_info_PV(lineWave[0],"HI",switching,extraConf,orderSel,verbose); // Create vector of intermediate results orders[0] = waveTuple[0]{1}; grat_pos[0] = double(waveTuple[0]{2}); // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 int filter = 1; // Determine filter based on HSPOT input if(orderSel == "order2") { filter = 2; } if(orderSel == "order3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders); } // Filter below will be set by SPEC_aot_prologue via SlewCal if(verbose) { debug_print("MAIN:The full OBS will be performed with filter " + filter); } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 chop_pos_CS1 // chop_pos_CS2 chop_def detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC contains: // capa, nb_rdouts_ramp, nb_rdouts_subramp, comp_mode, // glitch_det, ramp_fit_alg, nb_raw, bias_r, bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} // Reunite all three tuples into paramsSPECdef {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // AOT code uses "throwUsage" as a description of allowed chopper throws // Here the throw is user defined. Use "large" to please the script and // compute the ENG throw below. paramsSPECdef = PacsSpecDefaults("large",extraConf,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Convert chopperthrow into into ENG values string convU = "SPEC_CHOP_sky"; confOBCP[0]{12} = PacsReadChopSky(convU,-chopthrow / 2.0); confOBCP[0]{13} = PacsReadChopSky(convU,chopthrow / 2.0); confOBCP[0]{14} = confOBCP[0]{13}; // Here comes the module(s) to estimate OBS times as a function of the // input given by the HSPOT user. // Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // Need more info... create paramsSPECext (zut alors!) // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,timeOBS,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("MAIN.confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; // Accumulator total OBS time int totalOBS = 0; // For each demanded wavelength compute minimum duration (only one wave // in PV version) // Always use OBCP27 // Here we perform nodding/chopping // SCR-2942: consider case of faintLines = false string forDEBUG = "chop/nod"; paramsSPECext = PacsLineSpecEstimatorOBCP27_PV(lines[0],waveTuple[0],paramsSPEC,nodding,faintLines,verbose); // Copy estimates to respective tuples confSPECblu[1] = paramsSPECext{0}; confSPECred[1] = paramsSPECext{1}; confOBCP[1] = paramsSPECext{2}; // Accumulate total OBS time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("MAIN.Wavelength: " + lines[0]{1}); debug_print("MAIN.confOBCP[" + 1 + "]: " + confOBCP[1]); debug_print("MAIN.confSPEC[" + 1 + "]: " + confSPECblu[1]); debug_print("MAIN.Minimum required time: " + totalOBS + " [sec]"); } if(nodding) { // Here we perform nodding/chopping nbNods = userNODcycles; if(verbose) { debug_print("MAIN.The PointReq will contain " + nbNods + " nod cycles"); } } else { // Here we perform freq switch nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

    Minimum required OBStime: " + totalOBS + " [sec]

    "; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(nodding) { msgLine[lineCnt] = "

    With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

    "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

    Since no NOD was specified the total OBS time is equal" + " to the minimum required time. The time can be changed" + " by changing the line(s) repeat factor

    "; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

    Red channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECred[0]{1} + "
    • "; lineCnt = lineCnt + 1; int subRamps = confSPECred[0]{1} / confSPECred[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECred[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECred[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

    Blue channel

    "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Number of readouts per ramp: " + confSPECblu[0]{1} + "
    • "; lineCnt = lineCnt + 1; subRamps = confSPECblu[0]{1} / confSPECblu[0]{2}; msgLine[lineCnt] = "
    • Number of subramps/ramp: " + subRamps + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Fitting algorithm: " + confSPECblu[0]{5} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    • Integration capacitor: " + confSPECblu[0]{0} + "
    • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
    "; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths // MODIF: this leads to redundancy when Lines are selected both in // the norder+1st order: hence 1KWL per Filter: i.e. in practice 1 // per "blue order double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double[] keyWAVE = PacsLineSpecKeyWaves(waveTuple); // int nbKeyWAVE = length(keyWAVE); == 1 int nbKeyWAVE = 1; // With current versions of CommandOBCP27 and CommandOBCP32, the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:waveTuple: " + waveTuple); debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOT // prologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // CAL for HOLD doAOTprologue = false; int timeHoldCal = duration(PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,0,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during HOLD: " + timeHoldCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration could be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation // Different OBCP for wavelength switch if(!switching) { // Here we perform nodding/chopping int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per pointing; nbNods: " + nbNods); } } else { // Here we perform freq switch timeOBS = duration(PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP32: " + timeOBS + " [sec] per pointing"); } } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbLines per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one will use time during // slew to perform SlewCal. // // The chopper step has been read already (PacsSpecDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table. Read chopper position SRC and // REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("PacsSpecDef: CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file // Here since the chopper throw is user defined, compute yhe yoffset /// double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); /// double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); /// double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); double yoffset = chopthrow / 2.0; double zoffset = 0.0; double skewCorrec = 0.0; if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; // DAC Test ONLY int thold = timeHoldCal; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; // FinePointingMode with setup time if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode without nodding, section 3.4 ib = "P02_0"; // Nodding is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chopper pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode repeated_raster_with_hold_and_OFF, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int top = 0; int nrepeat = 1; // If Small source: no Off position if(!switching && pointCase == 21) { raoff = 0.0; decoff = 0.0; } // If switching for "large" source perform OFF observation if(switching || pointCase == 31) { // Repeat raster according to userNODcycles nrepeat = userNODcycles; k = n * m; top = tp; } int trepeatmin = 0; int tloadmin = 0; nload = 0; // SPR-3237 (map orientation parameter) applies only to raster if(pointCase == 31) { fixed = true; patt = mapRasterAngle; } fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // Raster mode w/nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } if(pointCase == 33) { ib = "P01_0"; // Use instrument coordinates unless HSPOT says otherwise fixed = false; /// if (useINST == false) {fixed = true;} patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeSlewCal; nhold = 0; nrepeat = 1; fromPntReq = line_scan_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,mapScanSpeed,thold,nhold,nrepeat); } // Parameters returned by PointReq if(verbose) { debug_print("++++++++++++++++++++++++ Issue PointRequest now"); debug_print("Return from PointReq: " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + userMode); int tNOW = time(); debug_print("=====Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { /// obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { /// obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOFF = nbOFF + 1; // Logic to sum up obsTime /// if (nbOFF == 1) {sumUpObsTime = obsTime;} /// if (nbOFF > 1) {sumUpObsTime = SumFunction(obsTime,sumUpObsTime);} if(verbose) { tNOW = time(); /// debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== LINE starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== LINE ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print("Ending with NbOFF: " + nbOFF); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL lines). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // // and a per wavelength array: // [waveSTART,waveEND,order,gratStep,nbGratStep,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill 1st dimension of infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int wait1 = 1; // but there is no wait in FreqSwitch // Count the WAIT=1 for grating as a useful SRC if(switching) { wait1 = 1; } int nbRampPlateau = confOBCP[1]{4} + wait1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime : " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbLines1) { // for some reason it has to be "initialized" infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the START wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{0} = lines[loop3]{1}; // copy the END wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{1} = lines[loop3]{1}; // copy the grating order infoArray[1]{1}[loop3]{2} = waveTuple[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = waveTuple[loop3]{4}; infoArray[1]{1}[loop3]{3} = (confOBCP[loop3 + 1]{2} - confOBCP[loop3 + 1]{1}) / 2; // copy the number of grating steps infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from sumUpObsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Also data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTimeTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of lines observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbLines; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal; // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Fill 3rd dimension of infoArray with global timing and AOT information // timeObsEnd is the total duration of the AOT // Pass details of AOT // We use OBCP27: OBCP_grat_scan_chop2 (unless FreqSwitch) string aotName = "GratScanChop2"; // Special "sky time" for FreqSwitch and SmallSourceDither if(switching) { aotName = "FreqSwitch"; } if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } infoArray[2] = {{aotName,0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // If switching if(switching && source == "Large") { infoArray[1]{0}{0} = "RasterOFF"; } else { if(switching && source == "Point") { infoArray[1]{0}{0} = "Pointed"; } infoArray[2]{0}{5} = userNODcycles; } // Process the information contained in infoArray (pass also lines) PacsProcessInfoArrayLine(infoArray,lines,confOBCP,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); // Compute the total time SRC + REF int accumSrceRef = 0; for(int loopL = 0 .. nbLines - 1) { // Add up Srce and Ref times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopL]{6} + infoArray[1]{1}[loopL]{7}; } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; // Return demanded tuples return {accumSrceRef,fromPntReq[1],overPACSandSC}; } // CVS comments : $Id: SPEC_BAND_read.txt,v 1.3 2007/05/07 13:48:17 dcesarsk Exp $ // Purpose : Return the BAND limits (from SPEC_BAND) for a given order // CUS author : DAC // Script file : SPEC_BAND_read.txt // // Input arguments // type name description // int order Grating order // // Return values // Type Description // double [] LO and HI wavelengths // // Description : Access the table SPEC_BAND_params. Read and return the // band limits for a given order // // Dependencies : // // Preconditions : // // Comments : // type string // // History : 0.1 23-may-2008 DAC Based on SPEC_BAND_read // - Reads SPEC_BAND_params_PV double[] procedure SPEC_BAND_read_PV { string order = "1"; // Give order }{ // Open and read SPEC_BAND_params table. Table indexed by ORDER // read BLU and RED edges of the SPEC bands double blu = dlookup("SPEC_BAND_params_PV",order,"BLU"); double red = dlookup("SPEC_BAND_params_PV",order,"RED"); return [blu,red]; } // Script : PACS_Chopper_uk_move_3000_NoConf_ast.cus // Missionphase : SVT / Flight // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-3000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on PACS_Chopper_uk_move_3000_ast_OBS, // but without configuration and with mois comments // // Version : 1.0 // // History : 1.0 17-10-2007 BV First version // procedure PACS_Chopper_uk_move_3000_NoConf_ast { }{ mois_comment("Perform rectangular chopping with step 3000"); // int chop_pos = 3000; // chopper position int cycle = 10; // give cycle # int plateau_time = 2; // select plateau time in sec // Start Diag. HK mois_step("Start Diagnostic housekeeping"); SPEC_Chopper_dhk_5hk_1khz_bb(); mois_step("Enable chopper controller"); // Enable Chopper Controller EnDis_chopper("ON"); delay(5); mois_step("Perform rectangular chopping"); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // do observations int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); mois_step("Disable chopper"); // Disable Chopper Controller EnDis_chopper("OFF"); delay(5); mois_step("Disable diagnostic housekeeping"); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // detector test PTD 0.7.6 in spectroscopy. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up housekeeping parameter for diagnostic housekeeping // of the detector. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy. // // Comments : // // Version : 3.0 // // History : 1.0 27-07-06 creation by HD. script test. // 2.0 27-07-06 HD. script works. // 3.0 20-06-07 HD. Prepare Test for FM-ILT3. block SPEC_chop_det_dhk_fmilt076spec_V2_bb PACS 386 { }{ // Register start of BB WriteBBID($BBID); //----------------------------------------------------- // Setup and start diagnostic HK for PTD 0.7.6 V2 //----------------------------------------------------- int diag_hk_length = 5; {int}[] parlist = [{209},{244},{245},{258},{0xffff}]; int[] aux = [209,244,245,258,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length,parlist,check_sum); int diag_hk_period = 0; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // CVS comments : $Id: PacsRangeMessage.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Script file : PacsRangeMessage.txt // // Purpose : 'HTMLize' some information passed in tinyTuple // // CUS author : DAC // // Input arguments // // tuple sortRangesEXT HSPOT input added later // {string,double[],double[],double[],double[]} tinyTuple // // Description : Print the information in tinyTuple in HTML format // Dependencies : // // Comments : NOTE!! Here we start UnorderedList
      ; it has to
    in // the next module writing to HTML // // History : 0.1 19-apr-2007 DAC // 0.2 7-may-2007 Added missing "worst" line information {int,string[]} procedure PacsRangeMessage { {string,double[],double[],double[],double[]} tinyTuple = {"",[0.0],[0.0],[0.0],[0.0]}; }{ int lineCnt = 0; string[] msgLine = [""]; double[] noiseWave = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; // CONTinuum noiseWave[0] = tinyTuple{1}[0]; noiseWave[1] = tinyTuple{1}[1]; noiseWave[2] = tinyTuple{1}[2]; noiseWave[3] = tinyTuple{1}[3]; // LINE noiseWave[4] = tinyTuple{1}[4]; noiseWave[5] = tinyTuple{1}[5]; noiseWave[6] = tinyTuple{1}[6]; noiseWave[7] = tinyTuple{1}[7]; // CONT and LINE for refWave noiseWave[8] = tinyTuple{1}[8]; noiseWave[9] = tinyTuple{1}[9]; noiseWave[10] = tinyTuple{1}[10]; // Start HTML list msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; double waveRef = noiseWave[8]; msgLine[lineCnt] = "
    • Reference wavelength: " + dformat(waveRef,1) + " [µm]
    • "; lineCnt = lineCnt + 1; int noiseMjy = ifloor(1000.0 * noiseWave[9]); msgLine[lineCnt] = "
    • Continuum RMS (reference wavelength): " + noiseMjy + " [mJy]
    • "; lineCnt = lineCnt + 1; double lineNoise = noiseWave[10] * 1.0E18; msgLine[lineCnt] = "
    • Line RMS (reference wavelength): " + dformat(lineNoise,2) + "E-18 [W/m2]
    • "; lineCnt = lineCnt + 1; noiseMjy = ifloor(1000.0 * noiseWave[1]); msgLine[lineCnt] = "
    • Best continuum RMS occurs at " + dformat(noiseWave[0],2) + " [µm]: " + noiseMjy + " [mJy]
    • "; lineCnt = lineCnt + 1; lineNoise = noiseWave[5] * 1.0E18; msgLine[lineCnt] = "
    • Best line RMS occurs at " + dformat(noiseWave[4],2) + " [µm]: " + dformat(lineNoise,2) + "E-18 [W/m2]
    • "; lineCnt = lineCnt + 1; noiseMjy = ifloor(1000.0 * noiseWave[3]); msgLine[lineCnt] = "
    • Worst continuum RMS occurs at " + dformat(noiseWave[2],2) + " [µm]: " + noiseMjy + " [mJy]
    • "; lineCnt = lineCnt + 1; lineNoise = noiseWave[7] * 1.0E18; msgLine[lineCnt] = "
    • Worst line RMS occurs at " + dformat(noiseWave[6],2) + " [µm]: " + dformat(lineNoise,2) + "E-18 [w/m2]
    • "; lineCnt = lineCnt + 1; // Return count and messages /// lineCnt = lineCnt - 1; return {lineCnt,msgLine}; } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Diaghk_Reset { /* No variables to call PacsEng_Diaghk_Reset */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Diaghk_Reset */ }{ // 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(PACS_Diaghk_Reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Diaghk_Reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 16-oct-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_CRE_01pF0bias_Setup_Warm { /* No variables to call PacsEng_Spec_CRE_01pF0bias_Setup_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_01pF0bias_Setup_Warm */ }{ // 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(PACS_Spec_CRE_01pF0bias_Setup_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_CRE_01pF0bias_Setup_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : EQM IMT // // Purpose : Switch on/off and enable/disable a controller for a PACS // internal Calibration Source // // Author : DAC // CUS script : DAC // CVS file : CS_on_off.txt // // Arguments : // type name Description // string cal_source Either CS1 or CS2 // string on_off Either ON or OFF // // Description : Switch on/off and enable/disable controller for selected // PACS internal CS (calibration source) // // Dependencies : // // Preconditions : Configuration parameters have been uploaded for CS1 and CS2 // // Comments : Several ways exist to fill in the preconditions, // e.g. CONF_csx, or SetupSpectroscopyEQMIMT. // // Version : 1.0 // // History : 1.0 12-Apr-2005 Creation by DAC // procedure CS_on_off { string cal_source = "CS1" in ["CS1","CS2"]; string on_off = "ON" in ["ON","OFF"]; }{ // Start with internal source CS1 if(cal_source == "CS1") { if(on_off == "ON") { Pacs_DMC_SWON_BB_1_CONT(); Pacs_DMC_ENABLE_BB_1_CONT(); } if(on_off == "OFF") { Pacs_DMC_DISABLE_BB_1_CONT(); Pacs_DMC_SWOF_BB_1_CONT(); } } // Continue with CS2 if(cal_source == "CS2") { if(on_off == "ON") { Pacs_DMC_SWON_BB_2_CONT(); Pacs_DMC_ENABLE_BB_2_CONT(); } if(on_off == "OFF") { Pacs_DMC_DISABLE_BB_2_CONT(); Pacs_DMC_SWOF_BB_2_CONT(); } } // end of procedure } // $Id // Missionphase : PACS PV Phase // // Purpose : Wavelength calibration during PacsSlew // Author : VDP // // Arguments : // // Prerequisite : PACS does not need to be on nor setup for spectroscopy // // Description : Uses OBCP13 and performs AOT prologue and epilogue // // Comments : // // Dependencies : CONF_SPEC_params : The detector biases are read from column "Normal0" // // Version : 1.1 // // History : 0.1 Using example from PacsCal_WaveCalChop // : 1.0 perform calibrations during slew and // then a wavelength calibration on source // usng NOD=1 and Choping // 1.1 13-Nov-2008 Added data_rate() commands // obs PacsCal_PacsSpecSlewCal_Flex { /* Needed variables to call PacsSpecSlewCal */ /* FW, WAVELENGTH & OBCP parameters */ double[] waves = [60.0]; // Wavelengths int order = 2; string fltPOS = "POS A" in ["POS A","POS B"]; //Filter wheel position 0="POS A", 1="POS B" int nb_up_dn = 1; // nb_up_down OBCP 13 DMCSeq. P#1 int nb_grat_steps = 16; // nb_grating_steps OBCP 13 DMCSeq. P#3 int nb_cycles_grat = 2; // nb_chop_cycles_per_gratpos OBCP 13 DMCSeq. P#5 int nb_ramps_grat_pos = 1; // nb_clean_ramps_per_gratpos OBCP 13 DMCSeq. P#7 /* CRE & SPU PARAMETERS */ int capa_blu = 12; int capa_red = 12; int nb_rdouts_ramp_blu = 64; int nb_rdouts_ramp_red = 64; int nb_rdouts_subramp_blu = 16; int nb_rdouts_subramp_red = 16; int comp_mode_blu = 16; int comp_mode_red = 16; /* POINTING PARAMETERS */ int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC bool verbose = true; }{ // FIXED CRE & SPU Parameters int glitch_det_blu = 1; int glitch_det_red = 1; int ramp_fit_alg_blu = 1; int ramp_fit_alg_red = 1; int nb_raw_blu = 3; int nb_raw_red = 3; int bias_d_blu_mV = ilookup("CONF_SPEC_params","bias_d_blu","Normal0"); int bias_d_red_mV = ilookup("CONF_SPEC_params","bias_d_red","Normal0"); int bias_r_blu_mV = ilookup("CONF_SPEC_params","bias_r_blu","Normal0"); int bias_r_red_mV = ilookup("CONF_SPEC_params","bias_r_red","Normal0"); // FIXED OBCP Parameters // OBCP 13 DMCSeq. P#2 int grat_step_coarse = 0; // OBCP 13 DMCSeq. P#4 string order_str = "" + order; int grat_step_up_fine = ilookup("SPEC_BAND_params",order_str,"HI"); // OBCP 13 DMCSeq. P#6 int chop_pos_CS1 = ilookup("CHOPPERCSparams","SPEC","pos_CS1"); // OBCP 13 DMCSeq. P#8 int chop_pos_CS2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); // OBCP 13 DMCSeq. P#9 : this parameter is set in PacsSpecSlewCal_Flex // int grat_step_dn_fine = -grat_step_up_fine; // Synchronize on this detector 1:Blue 2:Red int detector = 1; // Chopped default position int chop_def = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); int grat_pos = grat_park; // PacsSpecSlewCal_Flex parks the grating already // // compiting time for slw / calibration during slew time and others //Execute the pointing request bool execute = true; // Verification for grating and chopper hard limits //double chopthrow = 30.0; //int[] gratpos = [0]; //Pacs_HardLimitsCheck(gratpos,chopthrow); // Calibration time during slew // SPEC parameters for BLU and RED {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{capa_blu,nb_rdouts_ramp_blu,nb_rdouts_subramp_blu,comp_mode_blu,glitch_det_blu,ramp_fit_alg_blu,nb_raw_blu,bias_r_blu_mV,bias_d_blu_mV}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{capa_red,nb_rdouts_ramp_red,nb_rdouts_subramp_red,comp_mode_red,glitch_det_red,ramp_fit_alg_red,nb_raw_red,bias_r_red_mV,bias_d_red_mV}]; // OBCP parameters none is given since PacsSpecSlewCal takes them from OBCPparam {int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,detector,chop_def}]; // Perform/don't AOT prologue bool doPROLOG = true; // // //Initial hold int tih = duration(WriteOBSID($OBSID)); int tslewmin = 0; //Final hold int tendobsid = duration(WriteEndID()); int tepilog = duration(SPEC_aot_epilogue(grat_pos,grat_park,verbose)); int tfh = tendobsid + tepilog; //Duration of stable pointing int tp = duration(PacsSpecSlewCal_Flex(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,waves,fltPOS,order)); if(verbose) { debug_print("Duration of PacsSpecSlewCal_Flex" + tp + "sec"); } if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); debug_print("ts: " + ts); // }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { int tNOW = time(); // WriteOBSID($OBSID); data_rate(120.0); if(verbose) { debug_print("WriteOBSID at :" + tNOW + " sec"); } tNOW = time(); if(verbose) { debug_print("WriteOBSID ends at " + tNOW + " sec"); } } else { if(state[0] == 3) { // Call the WaveCal procedure tNOW = time(); if(verbose) { debug_print("Observation on SRC starts at :" + tNOW + " sec"); } tNOW = time(); PacsSpecSlewCal_Flex(verbose,confSPECblu,confSPECred,confOBCP,doPROLOG,waves,fltPOS,order); if(verbose) { debug_print("Observation on SRC ends at :" + tNOW + " sec"); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("Final Hold starts at :" + tNOW + " sec"); } SPEC_aot_epilogue(grat_pos,grat_park,verbose); data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("Final Hold ends at :" + tNOW + " sec"); } } } } } // End of Observation } // SpireSetMode // // $id$ // // This building block sets the Observing Mode parameter // procedure SpireSetObsMode { string obsmode = "REDY"; // name of the mode }{ string hstr = ""; // hex string string tstr = ""; // time string // // find mode number int modeid = ilookup("InstrumentConfigurations.txt",obsmode,"value"); // // set it hstr = SpireHexStr(modeid,4); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(" + hstr + ")"); Spire_SET_OBS_MODE_RAW(modeid); } // // Author : DAC // CUS script : DAC // CVS file : // // Arguments : // type name Description // string cal_source Internal CAL source CS1 or CS2 // double resist_temp Desired resistance [ohm] // // Description : Set the temperature of a PACS internal Calibration source // // Dependencies : // // Preconditions : Configuration parameters have been uploaded and the // controller has been SWON & enabled // // Comments : // // Version : 1.0 // // History : 1.0 13-Apr-2005 Creation by DAC // procedure CS_temp { string cal_source = "CS1" in ["CS1","CS2"]; // Chosen calibration source double resist_temp = 80.0; // The desired resistance of CS2, in Ohms }{ // Start with CS1 if(cal_source == "CS1") { Pacs_DMC_SET_TEMP_BB_1(resist_temp); } // Continue with CS2 if(cal_source == "CS2") { Pacs_DMC_SET_TEMP_BB_2(resist_temp); } } // File : PACS_Spec_Curing.cus // Missionphase : PACS FM ILT tests // // Purpose : Flasher curing : short flashes with dead times -> Temp & signal evolutions // Third part of the Flashers Performance check (curing schemes) // // Author : P. Royer // // Arguments : flasher current for the curing // number & duration of flashes // idle time between the flashes // // Prerequisite : spectrometer detectors & chopper configured // // Description : SPU Setup // position chopper on BB2 (reasonnable signal when trying to estimate quality of curing), grating supposed at default position, FW position not critical // Flexible scheme for flasher curing : short flashes with dead times // chopper to default position // SPU reset // // Dependencies : SPEC_spu_setup // SPEC_spu_reset // PACS_Spec_Flash_SWON // PACS_Spec_Flash_Setup // PACS_Spec_Flash_SWOF // // Comments : // // Version : 1.1 // History : 1.0 / 12-Mar-2008 initial version by PR // 1.1 / 01-Jul-2008 introduced CRE Setup & corresponding CALU, "final_delay" & grat_pos // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Flasher curing : short flashes with dead times -> Temp & signal evolutions // @comment - // procedure PACS_Spec_Curing { int blue_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int red_flasher_current = 819 in [0,820]; //4mA. [0,4095] = [0,20 mA] int nflash = 3; // Number of flashes int flash_time = 20; // Duration of each flash int idle_time = 30; // Idle time between the flashes int final_delay = 1; // Idle time at the end of the test (flasher cooldown, detector stabilisation), }{ // // Internal parameters // ------------------- int chop_pos_BB2 = ilookup("CHOPPERCSparams","SPEC","pos_CS2"); //int chop_pos_BB2 = 21200; // // SPU RESET // PACS_Spec_SPU_Reset(); delay(1); // // Setup CREs --> Largest Capacitance (No command to the heaters) // string calUname = "CONFCRECuring"; // Calibration Table string calUrow = "PV"; // Row in table = Instrument Configuration double bias_d_blue = dlookup(calUname,calUrow,"bias_d_blue"); double bias_d_red = dlookup(calUname,calUrow,"bias_d_red"); double bias_res_blue = dlookup(calUname,calUrow,"bias_res_blue"); double bias_res_red = dlookup(calUname,calUrow,"bias_res_red"); int ramp_blue = ilookup(calUname,calUrow,"ramp_blue"); int ramp_red = ilookup(calUname,calUrow,"ramp_red"); int capacity_blue = ilookup(calUname,calUrow,"capacity_blue"); int capacity_red = ilookup(calUname,calUrow,"capacity_red"); // CURING PARAMETER int curing_mode = 0; // SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // SPU SETUP (default = slope fitting) // int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = ilookup(calUname,calUrow,"ramp_blue"); // Nb of blue samples per sub-ramp int nb_samp_subramp_red = ilookup(calUname,calUrow,"ramp_red"); // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); // // SEND CHOPPER TO BB2 PACS_Chop_Move_Abs(chop_pos_BB2); delay(1); // // Start Flashers DiagHK // // 1: synch w/ BLUE DET 2: synch w/ RED DET >4: period in ms 0: 1KHz (not to use w/ science) int diag_hk_period = 100; PACS_Spec_FlashHeat_Diaghk_Setup(diag_hk_period); delay(10); // // SWON FLASHERS // PACS_Spec_Flash_SWON(); delay(10); // // Loop on low power regimes // ------------------------- for(int loopin = 1 .. nflash) { PACS_Spec_SPU_Reset(); delay(1); curing_mode = 1; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); delay(1); PACS_Spec_Flash_Setup(blue_flasher_current,red_flasher_current); delay(flash_time); PACS_Spec_Flash_Setup(0,0); curing_mode = 0; SPEC_CRE_Curing_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red,curing_mode); SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(idle_time); } // // SWOF FLASHERS // PACS_Spec_Flash_SWOF(); delay(10); // // Detector stabilisation / cooldown / recovery // -------------------------------------------- delay(final_delay); // // SEND CHOPPER TO DEFAULT PACS_Chop_Move_Abs(0); delay(1); // // RESET DIAGHK // PACS_Diaghk_Reset(); // // RESET SPU // PACS_Spec_SPU_Reset(); delay(1); // // SYNC //= = = sync(); } // File : SPEC_Chopper_fmilt076spec_detsel_llc_ast_V1_OBS.cus // // Purpose : Chopper synchronous operation with detectors in spec // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do OBCP13 with different RIs // // Dependencies : DXS7602. // // Preconditions : PACS switched-on and setup spectroscopy. // // Comments : // // Version : 6.0 // // History : 0.1 26-07-06 creation by HD. script test. // 0.2 27-07-06 HD. with all three RIs. // 0.3 27-07-06 HD. script works // 0.4 16-08-06 HD. Included setup and reset of burst // mode. // 1.0 24-08-06 HD. DXS&LLC, wo BM. // 2.0 24-08-06 HD. script works // 3.0 06-12-06 HD. Renamed file and mode to xxxx_OBS, sets DetSel table // and resets to default at end of procedure.. // 4.0 20-06-07 HD. Prepare Test for FM-ILT3. // 5.0 05-07-07 HD. IST Chopper Day // 6.0 25-mar-2008 VDP Adjusted to match PV phase syntax procedure Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V2 { }{ // Setup the diagnostic HK for chopper SPEC_chop_det_dhk_fmilt076spec_V2_bb(); // Assume SPU is stopped, load needed PACS_Det_Sel("PACSDetSel_7602"); // Set Loss-less compression mode for all the observations // SPU setup int comp_mode_blu = 20; int comp_mode_red = 20; int nb_samp_subramp_blu = 16; int nb_samp_subramp_red = 16; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 1; bool startSPU = true; // CRE setup int ramp_len_red = 16; int ramp_len_blu = 16; double bias_d_red = 0.069; double bias_r_red = 0.01; double bias_d_blu = 0.198; double bias_r_blu = 0.01; int capa_red = 0; int capa_blu = 0; // RI=1/64 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(4,4,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 int nb_up_dn = 50; // Nb of up down up... cycles (P#1) int grat_step_coarse = 0; // Grating coarse movement (P#2) int nb_grat_steps = 1; // Seq P#3 Nb of grating steps int grat_step_up_fine = 0; // Grating fine movement (P#4) int nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position int chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) int nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position int chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) int grat_step_dn_fine = 0; // Grating fine movement (P#9) int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 496000; // Starting grating position int grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression int grat_def = 496000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 4; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,4); SPEC_spu_reset(); // RI=1/32 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(8,8,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 nb_up_dn = 50; // Nb of up down up... cycles (P#1) grat_step_coarse = 0; // Grating coarse movement (P#2) nb_grat_steps = 1; // Seq P#3 Nb of grating steps grat_step_up_fine = 0; // Grating fine movement (P#4) nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) grat_step_dn_fine = 0; // Grating fine movement (P#9) detector = 1; // Synchronize on this detector 1:Blue 2:Red grat_pos = 496000; // Starting grating position grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression grat_def = 496000; // Grating default position chop_def = 0; // Chopped default position grat_def_time = 20000; // Grating time to move to grat_def [msec] nb_rdouts_ramp = 8; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,8); SPEC_spu_reset(); // RI=1/4 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(64,64,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 nb_up_dn = 50; // Nb of up down up... cycles (P#1) grat_step_coarse = 0; // Grating coarse movement (P#2) nb_grat_steps = 1; // Seq P#3 Nb of grating steps grat_step_up_fine = 0; // Grating fine movement (P#4) nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) grat_step_dn_fine = 0; // Grating fine movement (P#9) detector = 1; // Synchronize on this detector 1:Blue 2:Red grat_pos = 496000; // Starting grating position grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression grat_def = 496000; // Grating default position chop_def = 0; // Chopped default position grat_def_time = 20000; // Grating time to move to grat_def [msec] nb_rdouts_ramp = 64; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,64); SPEC_spu_reset(); // Set instrument in default mode // CRE setup ramp_len_red = 16; ramp_len_blu = 16; bias_d_red = 0.069; bias_r_red = 0.01; bias_d_blu = 0.198; bias_r_blu = 0.01; capa_red = 0; capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // SPU default mode comp_mode_blu = 16; comp_mode_red = 16; nb_samp_subramp_blu = 16; nb_samp_subramp_red = 16; nb_raw_spu_blu = 3; nb_raw_spu_red = 3; glitch_det = 1; ramp_fit_alg = 1; startSPU = false; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); //SPU is stopped, load default DetSel Table PACS_Det_Sel("PACSDetSel_10000"); // Move chopper to position 0 PACS_Chopper_mov_abs_fm_bb(0); // Move grating to desired position for this test SPEC_Gra_move_abs_raw(496000); // Wait 40s for grating to move to its default position delay(40); // Stop diagnostic housekeeping PACS_stop_dhk_bb(); } // File : SPEC_Chopper_fmilt076spec_detsel_llc_ast_V1_OBS.cus // // Purpose : Chopper synchronous operation with detectors in spec // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do OBCP13 with different RIs // // Dependencies : DXS7602. // // Preconditions : PACS switched-on and setup spectroscopy. // // Comments : // // Version : 6.0 // // History : 0.1 26-07-06 creation by HD. script test. // 0.2 27-07-06 HD. with all three RIs. // 0.3 27-07-06 HD. script works // 0.4 16-08-06 HD. Included setup and reset of burst // mode. // 1.0 24-08-06 HD. DXS&LLC, wo BM. // 2.0 24-08-06 HD. script works // 3.0 06-12-06 HD. Renamed file and mode to xxxx_OBS, sets DetSel table // and resets to default at end of procedure.. // 4.0 20-06-07 HD. Prepare Test for FM-ILT3. // 5.0 05-07-07 HD. IST Chopper Day // 6.0 25-mar-2008 VDP Adjusted to match PV phase syntax procedure Pacs_Spec_Chopper_fmilt076spec_detsel_llc_ast_V1 { }{ // Setup the diagnostic HK for chopper SPEC_chop_det_dhk_fmilt076spec_V1_bb(); // Assume SPU is stopped, load needed PACS_Det_Sel("PACSDetSel_7602"); // Set Loss-less compression mode for all the observations // SPU setup int comp_mode_blu = 20; int comp_mode_red = 20; int nb_samp_subramp_blu = 16; int nb_samp_subramp_red = 16; int nb_raw_spu_blu = 3; int nb_raw_spu_red = 3; int glitch_det = 1; int ramp_fit_alg = 1; bool startSPU = true; // CRE setup int ramp_len_red = 16; int ramp_len_blu = 16; double bias_d_red = 0.069; double bias_r_red = 0.01; double bias_d_blu = 0.198; double bias_r_blu = 0.01; int capa_red = 0; int capa_blu = 0; // RI=1/64 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(4,4,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 int nb_up_dn = 50; // Nb of up down up... cycles (P#1) int grat_step_coarse = 0; // Grating coarse movement (P#2) int nb_grat_steps = 1; // Seq P#3 Nb of grating steps int grat_step_up_fine = 0; // Grating fine movement (P#4) int nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position int chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) int nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position int chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) int grat_step_dn_fine = 0; // Grating fine movement (P#9) int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 496000; // Starting grating position int grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression int grat_def = 496000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 4; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,4); SPEC_spu_reset(); // RI=1/32 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(8,8,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 nb_up_dn = 50; // Nb of up down up... cycles (P#1) grat_step_coarse = 0; // Grating coarse movement (P#2) nb_grat_steps = 1; // Seq P#3 Nb of grating steps grat_step_up_fine = 0; // Grating fine movement (P#4) nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) grat_step_dn_fine = 0; // Grating fine movement (P#9) detector = 1; // Synchronize on this detector 1:Blue 2:Red grat_pos = 496000; // Starting grating position grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression grat_def = 496000; // Grating default position chop_def = 0; // Chopped default position grat_def_time = 20000; // Grating time to move to grat_def [msec] nb_rdouts_ramp = 8; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,8); SPEC_spu_reset(); // RI=1/4 SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); SPEC_CRE_No_Heater_setup(64,64,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // Setup OBCP13 nb_up_dn = 50; // Nb of up down up... cycles (P#1) grat_step_coarse = 0; // Grating coarse movement (P#2) nb_grat_steps = 1; // Seq P#3 Nb of grating steps grat_step_up_fine = 0; // Grating fine movement (P#4) nb_cycles_grat = 1; // Seq P#5 Nb cycles/grating position chop_pos_CS1 = -21350; // Chopper position for CS1 (P#6) nb_ramps_grat_pos = 8; // Seq P#7 Nb of ramps per grating position chop_pos_CS2 = 21200; // Chopper position for CS2 (P#8) grat_step_dn_fine = 0; // Grating fine movement (P#9) detector = 1; // Synchronize on this detector 1:Blue 2:Red grat_pos = 496000; // Starting grating position grat_time = 40000; // Time for grating to move to start position //int comp_mode_blu = 25; // "Blue" compression //int comp_mode_red = 25; // "Red" compression grat_def = 496000; // Grating default position chop_def = 0; // Chopped default position grat_def_time = 20000; // Grating time to move to grat_def [msec] nb_rdouts_ramp = 64; // Number of readouts per ramp // execute OBCP13 OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_pos,grat_time,comp_mode_blu,comp_mode_red,grat_def,chop_def,grat_def_time,64); SPEC_spu_reset(); // Set instrument in default mode // CRE setup ramp_len_red = 16; ramp_len_blu = 16; bias_d_red = 0.069; bias_r_red = 0.01; bias_d_blu = 0.198; bias_r_blu = 0.01; capa_red = 0; capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // SPU default mode comp_mode_blu = 16; comp_mode_red = 16; nb_samp_subramp_blu = 16; nb_samp_subramp_red = 16; nb_raw_spu_blu = 3; nb_raw_spu_red = 3; glitch_det = 1; ramp_fit_alg = 1; startSPU = false; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); //SPU is stopped, load default DetSel Table PACS_Det_Sel("PACSDetSel_10000"); // Move chopper to position 0 PACS_Chopper_mov_abs_fm_bb(0); // Move grating to desired position for this test SPEC_Gra_move_abs_raw(496000); // Wait 40s for grating to move to its default position delay(40); // Stop diagnostic housekeeping PACS_stop_dhk_bb(); } // $Id$ // Missionphase : PACS PV Phase // File : WriteENDID_ast_OBS.cus// // // Purpose : Configure the chopper servo loop // // Author : MN // CUSification : MN // Arguments : // // Description : Write END ID to system // // Comments : // // Version : 2.0 // History : 1.0 12-nov-2007 initial version // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_WriteENDID_ast { /* Needed variables to call PacsEng_WriteENDID_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_WriteENDID_ast */ }{ // 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(WriteEndID())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // Purpose : Stop SPECtroscopy observations at end of AOT // // TCL author : // TCL file : // CUS author : Diego Cesarsky // Script file : SPEC_aot_epilogue.txt // // Input arguments // Type Name Default Description // // Description : Not much for now (just STOP SPU) // Move grating from wwwhere OBCPs left it to the park // position // // Dependencies : PACS TCs // // Preconditions : // // Comments : Based on V1.3 of TM's tm_spu_setup.tcl. Both // SPUS and SPUL are initialized to same set of parameters // // Version : 0.2 // History : 0.1 13-apr-2006 First creation // 0.2 15-feb-2007 Leave grating at park position procedure SPEC_aot_epilogue_DataRates { int gratFrom = 500000; // Where OBCPs have left the grating int gratTo = 535000; // Grating park position bool verbose = false; }{ // Park the grating SPEC_grat_move(gratFrom,gratTo,verbose); // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // Sync the bus (function duration will get the "true" duration) data_rate(0.0); sync(); // end of procedure } // File : PACS_Spec_CRE_01pF0bias_Setup_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Configure CRE bias, reset interval and capacitor for // testing at room temperature // // Author : H. Feuchtgruber // CUSification : DAC // Comments : Intermediate version // // // Version : 1.0 // History : 1.0 / 16-Nov-2004 Initial version // 1.1 7-mar-2006 SPEC_HEAT_1_C renamed // 1.2 6-apr-2006 DMC v6.0.1 // 1.3 16-oct-2006 As PACS_Spec_CRE_Setup_Warm but with 0.1pF and 0 v bias // procedure PACS_Spec_CRE_01pF0bias_Setup_Warm { }{ // // red_reset integer 64 Enter red reset interval // blue_reset integer 64 Enter blue reset interval // red_bias_d integer 287 Enter BIAS_D for red spectrometer (1V=4095) // red_bias_r integer 0 Enter BIAS_R for red spectrometer (1V=4095) // blue_bias_d integer 860 Enter BIAS_D for blue spectrometer (1V=4095) // blue_bias_r integer 0 Enter BIAS_R for blue spectrometer (1V=4095) // red_capacitor integer 8 Enter Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // blue_capacitor integer 8 Enter Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // heater_blue_1c integer 4095 Enter blue HEATER_1C value (0=0mA, 4095=0.2mA) // heater_blue_2c integer 0 Enter blue HEATER_2C value (0=0mA, 4095=0.2mA) int red_reset = 64; int blue_reset = 64; int red_bias_d = 0; int red_bias_r = 0; int blue_bias_d = 0; int blue_bias_r = 0; int red_capacitor = 0; int blue_capacitor = 0; int heater_blue_1c = 0; int heater_blue_2c = 0; // PC174420 "DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on int blue_cre_ctrl = blue_capacitor + 256 + 128 + 2 + 1; int[] list_int = [32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0,chksum); delay(1); // PC173420 "DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on // set red_cre_ctrl [expr $red_capacitor+256+128+2+1] // set spec_par_r [list {PP095420 32} \ // [list PP096420 $red_reset] \ // [list PP097420 $red_cre_ctrl] \ // [list PP098420 $red_bias_r] \ // [list PP099420 $red_bias_d] {PP100420 0}] // set chksum [getChkSum -d -32 $spec_par_r] // putlog "ChkSum for spec_par_r: $spec_par_r" int red_cre_ctrl = red_capacitor + 256 + 128 + 2 + 1; list_int = [32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0]; chksum = checksum("int",list_int); Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0,chksum); delay(1); // PC094420 "DMC_SET_PAR_BOTH_SPEC" SEND COMPLETE PARAMETERS TABLE TO BOTH DECS // tcsend PC094420 // waittime 0.5 Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC //tcsend PC086420 //waittime 0.5 Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC //tcsend PC093420 //waittime 0.5 Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SET_B_SPE_HEAT_1C(0) // eval tcsend PC087420 [list [list PP073420 $heater_blue_1c]] // waittime 0.5 Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(heater_blue_1c); delay(1); //----------------- // End of Procedure //----------------- } // Missionphase : FM ILT // // Purpose : Switch to chopper open-loop mode // // Author : Markus Nielbock // CUS author : MN // // Description : This building block toggles between settings enabling // and disabling the open-loop mode of chopper movements. // Receiving signals: // ON: switch on open-loop mode // OFF: switch off open-loop mode // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched on and disabled // // Comments : First try of a CUS BB // // Version : 1.0 // // History : 1.0 15-12-06 creation by MN // 1.1 14-feb-2008 DAC Added WriteEndBB // Begin Mode description block PACS_SPEC_Chopper_SetOpenLoop_BB PACS 431 { string onoff = "OFF" in ["ON","OFF"]; }{ // Get BBID from environment and send to DMC WriteBBID($BBID); // IF-statement for switching on if(onoff == "ON") { Pacs_DMC_SET_CHOP_COIL_DRIVE(0x128); } // IF-statement for switching off if(onoff == "OFF") { Pacs_DMC_SET_CHOP_COIL_DRIVE(0x28); } // End of BB WriteEndBB(); } // Missionphase : // // Purpose : Prepare MEC for spectrometer, including filterwheel, // chopper, grating and calibration sources // // Script file : SPEC_dmc_setup.cus // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will switch on and set all required // parameters for // - chopper // - spectrometry filter wheel // - grating, and // - calibration sources. // This script should be executed just after the // switch-on procedure and the bolometer setup // // Dependencies : // // Preconditions : // // Comments : // // Version 0.5 // History // 0.1 16-nov-2006 DAC Based on spec_dmc_setup // 0.5 02-mar-2007 TM update for FM // 0.6 02-mar-2007 BV update chopper configuration to CSLopt3-600 // 0.7 30-mar-2007 TM filter wheel configuration moved to the end // 0.8 30-mar-2007 TM update chopper configuration to "nom_sky" // procedure SPEC_dmc_setup { string spec_fltw_id = "POS A" in ["POS A","POS B"]; // Photometer filter ID int chop_def_pos = 0; // Chopper default position double temp_CS1 = 48.0; // Temperature 55K for the PACS calibration source 1 double temp_CS2 = 58.0; // Temperature 60K for the PACS calibration source 2 }{ //------------------- // CHOPPER // Configure diagnostics HK for chopper // Read out every 5 ms int diag_hk_period_cho = 5; // DMC_CHOP_CTRL_ST 209 // DMC_CHOP_CUR_POS 244 // DMC_CHOP_SETPOIN 245 // DMC_CHOP_TARGET 246 // DMC_CHOP_PID_ERR 247 // DMC_CHOP_PID_ACC 248 // DMC_CHOP_MAX_DIT 249 // DMC_CHOP_OUTPUT 258 // DMC_CHOPPER_TEMP 407 // DMC_CHOP_VA 557 // DMC_CHOP_IA 561 // DMC_CHOP_VB 565 {int}[] parlist_cho = [{209},{244},{245},{246},{247},{248},{249},{258},{407},{557},{561},{565},{0xffff}]; int[] aux_cho = [209,244,245,246,247,248,249,258,407,557,561,565,0xffff]; int check_sum_cho = checksum("int",aux_cho); int diag_hk_length_cho = 13; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_cho,parlist_cho,check_sum_cho); Pacs_DMC_START_DIAG_HK(diag_hk_period_cho); // DMC_WRT_CHOP_CONF_PAR (now modified for 20 parameters) CONF_chopper("CONFChopper","nom_sky"); CHOP_on_off("ON"); Pacs_DMC_MOVE_CHOP_ABS(chop_def_pos); delay(1); // Pacs_DMC_STOP_DIAG_HK(); //------------------------- // PACS CALIBRATION SOURCES CONF_cs("Both"); CS_on_off("CS1","ON"); CS_temp("CS1",temp_CS1); CS_on_off("CS2","ON"); CS_temp("CS2",temp_CS2); // Grating // NOTE: The grating default position is set in CONF_grating int diag_hk_period_grat = 1; // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_GR_IND_SINE 539 // DMC_GR_IND_COS 540 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_GRAT_CTRL_ST 208 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_GRAT_PID_ERR 253 // DMC_GRAT_OUTPUT 452 // DMC_GRAT_IND_READ 512 {int}[] list_tuple = [{539},{540},{256},{257},{556},{564},{560},{567},{208},{250},{251},{252},{253},{452},{512},{0xffff}]; int[] list_int = [539,540,256,257,556,564,560,567,208,250,251,252,253,452,512,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); Pacs_DMC_START_DIAG_HK(diag_hk_period_grat); CONF_grating("CONFGrat","ISTSafe"); // Stop HK Pacs_DMC_STOP_DIAG_HK(); //------------------- // FILTERWHEEL // Configure diagnostics HK for filterwheel // Read out every 5 ms int diag_hk_period_fw = 5; // DMC_WRT_DIAG_HK_LIST // DMC_FW_SPEC_CTRL 210 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FWSP_CUR_POS 255 // DMC_FPU_T_SEN_ST 404 // DMC_FW_SPEC_TEMP 405 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_IMOTA 560 // DMC_FWSPEC_POS_A 555 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTB 567 // DMC_FWSPEC_POS_B 559 {int}[] parlist_fw = [{210},{256},{257},{255},{404},{405},{556},{560},{555},{564},{567},{559},{0xffff}]; int[] aux_fw = [210,256,257,255,404,405,556,560,555,564,567,559,0xffff]; int check_sum_fw = checksum("int",aux_fw); int diag_hk_length_fw = 13; Pacs_DMC_WRT_DIAG_HK_LIST(diag_hk_length_fw,parlist_fw,check_sum_fw); Pacs_DMC_START_DIAG_HK(diag_hk_period_fw); // CONFigure controller CONF_spec_fltw(); // and move SPEC_fltw_move(spec_fltw_id); // Move to demanded position Pacs_DMC_STOP_DIAG_HK(); } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Home Grat // // CUS author : Pierre Royer // // Version : 2.0 // // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Home { /* Needed variables to call PacsEng_Spec_Gra_IST_Home */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Home */ }{ // 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(PACS_Spec_Gra_IST_Home())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Home(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Perform Setup Spectroscopy // // CUS author : TM // Script file : SPEC_setup_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Perform PACS setup for spectroscopy // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // // History : 0.1 TM 10-nov-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // 0.2 17-nov-2005 blue_heater_curr as input argument // 0.3 18-dec-2006 Temporary change for blue<>red // 0.4 19-feb-2007 Back to nominal blue<>red // 0.5 03-Mar-07 Changed defaults for CSs to 48/58 Ohms // 0.6 21-Jun-07 adapted heater current // 1.0 04-mar-2008 translated into PV script // obs PacsEng_Spec_setup { /* Needed variables to call PacsEng_Spec_setup */ string fltPOS = "POS A" in ["POS A","POS B"]; // Filter wheel position double temp_CS1 = 48.0; double temp_CS2 = 58.0; double blu_heater_curr = 0.78; // Heater current [mA] /* End of needed variables for PacsEng_Spec_setup */ }{ // 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(SPEC_setup(fltPOS,temp_CS1,temp_CS2,blu_heater_curr))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_setup(fltPOS,temp_CS1,temp_CS2,blu_heater_curr); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Gra_DEG_MODE_Diaghk_Setup.cus // Missionphase : FM ILT // // Purpose : Switch on diagnostic hk relevant to grating in DEG MODE // // Author : P. Royer // // Arguments : // // Description : Grating diagnostic housekeeping ON (DEG MODE) // : // Comments : // // // Version : 1.0 // History : 1.0 / 07-Jul-2006 creation // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Switch on diagnostic housekeeping relevant to grating // @comment - // ------------------------------ block PACS_Spec_Gra_DEG_MODE_Diaghk_Setup PACS 172 { int diag_hk_period = 5; // 5 msec diag hk period }{ // Register start of BB WriteBBID($BBID); // DMC_WRT_DIAG_HK_LIST // DMC_DATA_LENGTH PP065420 contains the number of desired HK parameters // DMC_4_BYTES_WORDS_DATA PP067420 contains the desired HK parameters' IDs // DMC_CHECKSUM PP066420 // // Max number of requested diag HK parameters = 16 // (including the last one, which is always forced to the same value) // // DMC_GR_IND_SINE 539 // DMC_GR_IND_COS 540 // DMC_FWGRAT_HALLA 256 // DMC_FWGRAT_HALLB 257 // DMC_FW_GR_VMOTA 556 // DMC_FW_GR_VMOTB 564 // DMC_FW_GR_IMOTA 560 // DMC_FW_GR_IMOTB 567 // DMC_GRAT_CTRL_ST 208 // DMC_GRAT_CUR_POS 250 // DMC_GRAT_SETPOIN 251 // DMC_GRAT_TARGET 252 // DMC_GRAT_PID_ERR 253 // DMC_GRAT_OUTPUT 452 // DMC_GRAT_DEG_POS 515 {int}[] list_tuple = [{539},{540},{256},{257},{556},{564},{560},{567},{208},{250},{251},{252},{253},{452},{515},{0xffff}]; int[] list_int = [539,540,256,257,556,564,560,567,208,250,251,252,253,452,515,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // End of procedure //------------------ // Mark End of Block WriteEndBB(); } // Missionphase : FMIST // // Purpose : Disable Grat // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_Disable { }{ Pacs_DMC_DISABLE_GRAT_CONT(); delay(1); } // Missionphase : FM-ILT // // Purpose : Perform Thermal behaviour photometry test // Check before executing: // o TEMP_EV still below 0.3 K? // (cooler recycling has to be finished) // o detector groups off // o CSs have to off and cold // o chopper and filter wheel controller off // o Check that the temperature sensors are on // // Duration: 53 min // // CUS author : TM // Script file : PHOT_thermal_OBS.cus // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.8 // History : 0.1 creation by XXX // 0.2. DAC&PR Added PHOT_change_data_mode // 0.3 09-nov-2006 TM: updated for FM-ILT // 0.4 10-nov-2006 TM: new bias table, low gain // 0.5 10-nov-2006 DAC New CONF_xxx scripts // 0.6 14-nov-2006 TM: update of the bias setting // 0.7 05-mar-2007 TM: diagHk for OBCP, new CONF_chopper // 0.8 07-apr-2007 TM: new CONF_chopper // 0.9 15-jun-2007 TM: new configuration of fltw: PHOT_fltw_conf -> CONF_phot_fltw // procedure PHOT_thermal { }{ // initial wait delay(60); // preparation for PHOT PHOT_dpu_dmc_setup("BOTH Array",4); delay(60); // switch on bolometer groups and autonomy function PHOT_switchon_groups(); delay(300); // set safe polarisations PHOT_set_bias_volt("BOLObias_preILT_standard_low",1); PHOT_set_bias_volt("BOLObias_preILT_standard_low",2); PHOT_set_bias_volt("BOLObias_preILT_standard_low",3); PHOT_set_bias_volt("BOLObias_preILT_standard_low",4); PHOT_set_bias_volt("BOLObias_preILT_standard_low",5); PHOT_set_bias_volt("BOLObias_preILT_standard_low",6); delay(300); // sequencer configuration PHOT_seq_setup(); delay(300); // change data mode to Bolo & HK PHOT_change_data_mode("Bolo_HK"); delay(60); // change sequence mode to Sb-Sref PHOT_change_seq_mode("Sb_Sref"); delay(60); // Set gain LOW PHOT_set_gain("LOW"); delay(60); // configure diagHK and start // configure diag HK for filterwheel, grating, chopper int diag_hk_period = 5; // DMC_CHOP_CUR_POS 244 // DMC_CHOP_SETPOINT 245 // DMC_CHOP_TARGET 246 // DMC_FWGRAT_HALL_A 256 // DMC_FWGRAT_HALL_B 257 // DMC_CHOP_OUTPUT 258 // DMC_FWPH_CUR_POS 260 // DMC_CHOP_IA 561 // DMC_FW_FWPHOT_POS_A 563 // DMC_FW_FWPHOT_POS_B 569 {int}[] list_tuple = [{244},{245},{246},{256},{257},{258},{260},{561},{563},{569},{0xffff}]; int[] list_int = [244,245,246,256,257,258,260,561,563,569,0xffff]; int chksum = checksum("int",list_int); int nbParams = length(list_int); Pacs_DMC_WRT_DIAG_HK_LIST(nbParams,list_tuple,chksum); delay(1); // DMC_START_DIAG_HK // DIAG_HK_PERIOD PP076420 // tcsend PC146420 [list PP076420 $diag_hk_period] // waittime $command_time Pacs_DMC_START_DIAG_HK(diag_hk_period); delay(1); // configure and switch on chopper CONF_chopper("CONFChopper","nom_sky"); CHOP_on_off("ON"); delay(60); // Perform OBCP_chopped_photometry for 3 min (high frequency, large amplitude) OBCP_chopped_photometry(1,-12000,3,12000,12000,450,0,-5000,+5000,0,0,0); delay(60); // configure filter wheel CONF_phot_fltw(); //PHOT_fltw_conf(); delay(60); // move 6 times to both positions for(int imove = 1 .. 6) { PHOT_fltw_move("POS A"); PHOT_fltw_move("POS B"); } delay(60); // stop diag HK again Pacs_DMC_STOP_DIAG_HK(); // configuration of calibration sources and switch on CONF_cs("Both"); CS_on_off("CS1","ON"); CS_on_off("CS2","ON"); delay(60); // CS1 to 48.0 (55K) and CS2 to 58.0 (60K) CS_temp("CS1",48.0); CS_temp("CS2",58.0); delay(2700); // Switch off the CSs CS_on_off("CS1","OFF"); CS_on_off("CS2","OFF"); delay(300); // Switch off chopper and grating controller CHOP_on_off("OFF"); delay(120); // // Reset the biases, disable the AF and switch off the groups PHOT_switchoff_groups(); delay(300); // PHOT_dpu_dmc_reset(); delay(60); // SAFE mode OBCP_SAFE(); //End of procedure } // File : PACS_Chopper_EnDis_Test_NoConf_ast1.cus // Missionphase : SVT / flight // // Purpose : Switch-on/switch-off and enanle/disable test of chopper // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : Flight procedure to verify the stability of the chopper. // Produces diagnostic housekeeping data, enables the // chopper for 1 second, and disables again. // // Comments : Copied from PACS_Chopper_EnDis_Test_ast1_OBS // without the configuration and with MOIS comments // // Version : 1.0 // History : 1.0 17-Oct-2007 BV initial version // // procedure PACS_Chopper_EnDis_Test_NoConf_ast1 { }{ mois_comment("Start of procedure: verify the stability of the PACS chopper during 1 sec"); // Time 1 sec int n = 1; mois_step("Enable diagnostic housekeeping"); // Set diagnostic HK (1 kHz, 4 parameters) PACS_Chopper_EnDis_Test_dhk("ON"); delay(10); // mois_step("Switch on and enable chopper for 1 second"); // Switch on and enable chopper for n seconds, while n is given by the user PACS_Chopper_SWON_SWOF_only("ON"); delay(10); EnDis_chopper("ON"); delay(n); EnDis_chopper("OFF"); delay(10); PACS_Chopper_SWON_SWOF_only("OFF"); delay(10); mois_step("Stop diagnostic housekeeping"); // Stop diagnostic HK PACS_Chopper_EnDis_Test_dhk("OFF"); } // Missionphase : FMIST // // Purpose : Move Grat Abs // // Author : PR // Arguments : // // Version : 1.0 // History : 1.0 29-Jul-2007 PR // procedure PACS_Spec_Gra_IST_Move_Abs { }{ // NEW TARGET POSITION int gratNEW = 500000; int delayTime = 10; // Move Pacs_DMC_MOVE_GRAT_ABS_RAW(gratNEW); delay(delayTime); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Missionphase : PACS FMILT // // Purpose : Configure the spec filter wheel Redundant Cold // // Author : PR // // Arguments : // // Description : // // Comments : // // History : 1.0 04-Jul-2007 Initial version // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // obs PacsEng_CONF_spec_fltw_R { /* No variables to call PacsEng_CONF_spec_fltw_R */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POSB" */ /* End of needed variables for PacsEng_CONF_spec_fltw_R */ }{ // 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_spec_fltw_R())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_spec_fltw_R(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : FMILT // // Purpose : Enable/disable the chopper electronics // Author CUS : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // // Input arguments // Type Name Description // string onoff ON: Enable chopper, OFF: Disable // Description : Enable/disable electronics, controller // // Dependencies : // Comments : // Version : 0.1 10-nov-2006 First creation // History : // : procedure EnDis_chopper { string onoff = "ON" in ["ON","OFF"]; }{ if(onoff == "ON") { //Pacs_DMC_SWON_CHOP_CONT(); Pacs_DMC_ENABLE_CHOP_CONT(); // debug_print("Chopper was enabled"); } // Disable if(onoff == "OFF") { Pacs_DMC_DISABLE_CHOP_CONT(); //Pacs_DMC_SWOF_CHOP_CONT(); // debug_print("Chopper was disabled"); } } // Missionphase : // // Purpose : Read detector selection data from a CAL-U file and send // the required TCs to load the chosen Selection Table // // Author : Diego A. Cesarsky // CUS script : Diego A. Cesarsky // CUS file : PACS_Det_Sel.txt // // Arguments : // string calTableName The DetSel cal table name // // Description : Read a PACS DetSel table and uplink the relevant information. // CAL tables are named PACSDetSel_nnn, where nnn is the // selection table identification. The table is setup as 14 // rows of 24 columns each. Each ROW contains information for // a DXSn telecommand; there are Short and Long SPU rows (SPUS and SPUL) // as well. CUS access a Table by ROW name and, within a // ROW by COLumn name. Hence it is important that the table // conforms to the naming convention used here. Consecutive // ROWs are named: // BoloBlu1S (for Bolometer Blue, 1st quadrant, Short SPU) // BoloBlu1L // BoloBlu2S // BoloBlu2L // --------- // BoloBlu4L // BoloRed1S // BoloRed1L // SpecBlu1S // SpecBlu1L // SpecRed1S // SpecRed1L // Columns are named from COL0 (the one containing the ROW // name) to COL24 // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 21-Jan-2004 Creation by DAC // 0.2 14-nov-2006 Removed duration logic // : procedure PACS_Det_Sel { string calUTable = "PACSDetSel_100"; // U-CAL table name (PACSDet_Sel_nnn) }{ // Useful variables // Array of ROW names string[] rowName = ["BoloBlu1S","BoloBlu1L","BoloBlu2S","BoloBlu2L","BoloBlu3S","BoloBlu3L","BoloBlu4S","BoloBlu4L","BoloRed1S","BoloRed1L","SpecBlu1S","SpecBlu1L","SpecRed1S","SpecRed1L"]; // COLumn names string col = "COL1"; // Contents of each ROW will be copied to int array detSel; create it: int[] detSel = [0]; // Parameters for actual TCs are to be cast as {int} [] arrays. {int}[] params = [{0}]; // DetSel will be indexed by int index = 0; // Auxiliary integer int aux = 0; // Checksum int check_sum = 0; // Use lookup function to read all 24 COLs from each of the 14 ROWs in // calUTable // Read each one of the 14 ROWs for(int row = 0 .. 13) { // Build ROW name string rowRead = rowName[row]; // Now read each of the 24 COLs from the current ROW for(int column = 1 .. 24) { col = "COL" + column; aux = ilookup(calUTable,rowRead,col); // Fill array detSel detSel[column - 1] = aux; // Also fill TC param array params[column - 1] = {aux}; // end COL 1-24 loop } debug_print("Read ROW " + rowRead + "; ID: " + detSel[1]); // Compute the check sum check_sum = checksum("int",detSel); // Send the TC. This part of the script is not nice: get the proper // Pacs telecommand according to ROW) if(rowRead == "BoloBlu1S") { Pacs_SPUS_WRT_DXS1(params,check_sum); } if(rowRead == "BoloBlu1L") { Pacs_SPUL_WRT_DXS1(params,check_sum); } if(rowRead == "BoloBlu2S") { Pacs_SPUS_WRT_DXS2(params,check_sum); } if(rowRead == "BoloBlu2L") { Pacs_SPUL_WRT_DXS2(params,check_sum); } if(rowRead == "BoloBlu3S") { Pacs_SPUS_WRT_DXS3(params,check_sum); } if(rowRead == "BoloBlu3L") { Pacs_SPUL_WRT_DXS3(params,check_sum); } if(rowRead == "BoloBlu4S") { Pacs_SPUS_WRT_DXS4(params,check_sum); } if(rowRead == "BoloBlu4L") { Pacs_SPUL_WRT_DXS4(params,check_sum); } if(rowRead == "BoloRed1S") { Pacs_SPUS_WRT_DXS5(params,check_sum); } if(rowRead == "BoloRed1L") { Pacs_SPUL_WRT_DXS5(params,check_sum); } if(rowRead == "SpecBlu1S") { Pacs_SPUS_WRT_DXS6(params,check_sum); } if(rowRead == "SpecBlu1L") { Pacs_SPUL_WRT_DXS6(params,check_sum); } if(rowRead == "SpecRed1S") { Pacs_SPUS_WRT_DXS7(params,check_sum); } if(rowRead == "SpecRed1L") { Pacs_SPUL_WRT_DXS7(params,check_sum); } } } // CVS comments : $Id: OBCP_chopped_photometry_dither.txt,v 1.4 2007/08/22 10:18:28 dcesarsk Exp $ // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OnBoardControlProcedure to perform // chopped photometry // // OBCP author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : OBCP_chopped_photometry_dither.txt // // Arguments: // Type Name Description // int nb_SRC_REF p01 Number of observations in OBS loop // int chop_pos_SRC p02 Chopper position for SRC // int nb_rdouts_plateau p03 Number of readouts per chopper position // int chop_pos_REF1 p04 Chopper position for BKG1 // int chop_pos_REF2 p05 Chopper position for BKG2 (may be equal to BKG1) // int nb_cycles_obs_cal p06 Number of obs/cal cycles // int nb_CS1_CS2 p07 Number of observations in CAL loop // int chop_pos_CS1 p08 Chopper position for CS1 // int chop_pos_CS2 p09 Ditto for CS2 // int comp_mode_blu Compression mode BLUE // int comp_mode_red Ditto RED // int chop_def Chopper default position // int max_dither Maximum dither amplitude // // Description : This script mimics the OBCP_CHOPPED_PHOTOMETRY // pseudo script, section 3.1.2 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DMC_phot_2_3_chop_dither // WriteBBID // Comments : Based on OBCP_chopped_photometry // // Version : 0.1 2-Nov-2005 Creation by DAC // History : 0.2 21-aug-2007 SRC-3507 Indicate end of BB // int[] block OBCP_chopped_photometry_dither PACS 5 { int nb_SRC_REF = 1; // p01 Number of observations in OBS loop int chop_pos_SRC = 0; // p02 Chopper position for SRCE int nb_rdouts_plateau = 8; // p03 Number of readouts per chopper position int chop_pos_REF1 = -2000; // p04 Chopper position for BKG1 int chop_pos_REF2 = 2000; // p05 Chopper position for BB2 int nb_cycles_obs_cal = 1; // p06 Number of obs/cal cycles int nb_CS1_CS2 = 0; // p07 Number of observations in CAL loop int chop_pos_CS1 = -22680; // p08 Chopper position for CS1 int chop_pos_CS2 = 22680; // p09 Chopper position for CS2 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position int max_dither = 5; // Maximum dither amplitude }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); // string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // debug_print("Bolo sample: " + bol_freq + " " + bol_unit); // debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duration_msec = 0; // OBCP Pseudo Code starts here (accumulate duration_msec [msec] as it goes) // Begin // DEC_WRITE_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) // Here and elsewhere it is assumed that OBCP "internal" TCs take t_cmd // [msec] to be executed duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRITE_MAX_DITHER(max_dither) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRITE_SEQ_BUF(ID, LENGTH, DATA, CHECKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Invoke CUS version of DECMEC sequence above (DMC_PHOT_2_3_CHOP) // (only to compute duration!! Hence use only duration related parameters // in the call). // NOTE: use DMC_phot_2_3_chop since its duration is identical to the // dither version (except for internal CHOP_DITHER) // The DMC is number seq_DMC=2 and lasts seq_time [msec] // Duration "duree1" is an array with five elements int[] duree1 = DMC_phot_2_3_chop(nb_SRC_REF,nb_rdouts_plateau,nb_cycles_obs_cal,nb_CS1_CS2); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // SYNCHRONIZE_ON_DETECTOR(3) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // START_SEQUENCE duration_msec(seq_time) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(seq_time) // Check execution status of the sequence and in case of failure stop OBCP // and issue TM(1,8) + event // MOVE_CHOP_ABSOLUTE(chop_def) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) // Now trigger execution of OBCP // This OBCP is number 5, requires 15 parameters and lasts seq_time [msec] string obcp_ID = "CHOP_PHOT_DITHER"; int obcp_par_nber = 15; int seq_DMC = 2; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_SRC_REF},{4,chop_pos_SRC},{5,nb_rdouts_plateau},{6,chop_pos_REF1},{7,chop_pos_REF2},{8,nb_cycles_obs_cal},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,comp_mode_blu},{13,comp_mode_red},{14,chop_def},{15,max_dither}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Mark end of BB WriteEndBB(); // Ending time // int time_elapsed = time() - time_start; // time_array[0] = time_elapsed; // Return return time_array; } // SpireBbStartObs // // $Id: SpireBbStartObs.txt,v 1.2 2007/10/26 10:19:51 kking Exp $ // // Building Block to configure an engineering observation // // 22 Oct 2007: // Correct parameter used for setting of STEP to 1 // Add delay of 1 sec before setting OBSID to allow time for busconfig to be performed // block SpireBbStartObs SPIRE 2 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Start Obs started"); SpireMsg(2," $Id: SpireBbStartObs.txt,v 1.2 2007/10/26 10:19:51 kking Exp $"); hstr = SpireHexStr($BBID,8); SpireMsg(3," BBID = " + hstr); // // Wait for busconfig to be performed delay(1); // // set OBSID hstr = SpireHexStr($OBSID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + " Cmd: Spire_SET_OBSID_RAW(" + hstr + ")"); Spire_SET_OBSID_RAW($OBSID); // // set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); delay(1); // // set STEP to one tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0001)"); Spire_SET_OBS_STEP_RAW(0x1); delay(1); // // reset DRCU counters tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RESET_DRCU_COUNTERS()"); Spire_RESET_DRCU_COUNTERS(); delay(1); // // set STEP to zero tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x0000)"); Spire_SET_OBS_STEP_RAW(0x0); // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Start Obs ended"); SpireMsg(1," ..Observation Configuration (" + (time() - t) + " secs)"); } command PacsCcuMonitorPeriodDefault HFKACQP1 { } { bus_schedule(SC, 0); } // CVS comments : $Id: PacsSpecSlewCal.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Purpose : Invoke a PACS calibration OBCP during slew to source; // leave PACS ready to start observations once in source // // CUS author : DAC // Script file : PacsSpecSlewCal.txt // // Input arguments // Type Name Description // bool verbose Debug_print or not // {int,int,int,int, // int,int,int,int,int} [] confSPECblu BLUE SPU parameters // {int,int,int,int, // int,int,int,int,int} [] confSPECred RED SPU parameters // {int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int, // int,int,int,int,int}[] confOBCP OBCP parameters // bool doPROLOG Perform/don't AOT prologue // double [] keyWAVE One or several key wavelengths // int filter Where to move FltW (as order) // // Return values // Type Name Description // int[][5] time_array The 5 times (TOT,SRC,REF,CAL,OVR) per key line // // Description : Perform AOT prologue and then OBCP #13. // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 DAC 10-may-2006 New version losely based on old // PacsSpecSlewCal. Implies recasting OBCP13params as // other OBCP CAL-U files // 0.2 30-may-2006 Adapted to SPEC_get_grat_info modified for freq switch // 0.3 1-jun-2006 ORDER 2 and 3 are nolonger simultaneously allowed // Use grating strategy as in OBCP22 and 27: grating remains // where DMC left it (grat_def_time = 0) // 1.0 15-feb-2007 SlewCal is supposed to leave the grating ready to start // observing the 1st "science" line // 16-feb-2007 Error in call to OBCP: grating should remain at // new_grat_def_pos (was grat_park) // 1.1 14-mar-2007 Add extraConf in call to SPEC_get_grat_info // 1.2 8-may-2007 Add orderSel needd by SPEC_get_grat_info // 1.3 10-oct-2007 SCR3632. SPEC_get_grat_info is called with KHI // 1.4 16-Jul-2008 Add dubugging prints (confSPEC) // int[][] procedure PacsSpecSlewCal_DataRates { /* verbose debug print */ bool verbose = false; /* SPEC parameters for BLU and RED */ {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,64,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,64,0,0,0,0,0,0,0}]; /* OBCP parameters */ {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; /* Perform/don't AOT prologue */ bool doPROLOG = true; /* One or several key wavelengths */ double[] keyWAVE = [62.5]; /* Where to leave FltW (as order) */ int filter = 2; /* Where to leave grating at end of CAL */ int frstLstGratPos = 535000; /* User defined grating order */ string orderSel = "order2"; }{ // Array to collect OBCP times per line // NOTE: time variables in units of either number of ramps (SPEC) or // number of readouts (BOLO) or plain seconds. The calling program // must convert, if applicable, this information into actual duration // in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), CAL source, // and overheads (wait for something). Total duration is given by duree_num. // If no error, this duration must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); int[] totalDUREE = [0,0,0,0,0]; int[][] dureeCalKey = [[0,0,0,0,0]]; // Long sequence to "unpack" default values from tuples int capa_blu = confSPECblu[0]{0}; int nb_rdouts_ramp_blu = confSPECblu[0]{1}; int nb_rdouts_subramp_blu = confSPECblu[0]{2}; int comp_mode_blu = confSPECblu[0]{3}; int glitch_det_blu = confSPECblu[0]{4}; int ramp_fit_alg_blu = confSPECblu[0]{5}; int nb_raw_blu = confSPECblu[0]{6}; int bias_r_blu_mV = confSPECblu[0]{7}; int bias_d_blu_mV = confSPECblu[0]{8}; int capa_red = confSPECred[0]{0}; int nb_rdouts_ramp_red = confSPECred[0]{1}; int nb_rdouts_subramp_red = confSPECred[0]{2}; int comp_mode_red = confSPECred[0]{3}; int glitch_det_red = confSPECred[0]{4}; int ramp_fit_alg_red = confSPECred[0]{5}; int nb_raw_red = confSPECred[0]{6}; int bias_r_red_mV = confSPECred[0]{7}; int bias_d_red_mV = confSPECred[0]{8}; int nb_up_down = confOBCP[0]{0}; int grat_step_up = confOBCP[0]{1}; int grat_step_dn = confOBCP[0]{2}; int nb_SRC_OFF = confOBCP[0]{3}; int nb_ramps_plateau = confOBCP[0]{4}; int nb_CS1_CS2 = confOBCP[0]{5}; int nb_grat_step_up = confOBCP[0]{6}; int nb_grat_step_dn = confOBCP[0]{7}; // int grat_start_pos = confOBCP[0]{ 8}; // int grat_start_time = confOBCP[0]{ 9}; // int grat_def_pos = confOBCP[0]{10}; // int grat_def_time = confOBCP[0]{11}; int chop_pos_SRC = confOBCP[0]{12}; int chop_pos_REF1 = confOBCP[0]{13}; int chop_pos_REF2 = confOBCP[0]{14}; int chop_pos_CS1 = confOBCP[0]{15}; int chop_pos_CS2 = confOBCP[0]{16}; int chop_def = confOBCP[0]{17}; int detector = confOBCP[0]{18}; int filterPOS = confOBCP[0]{19}; // Bias voltages (needed by SPEC_aot_prologue) are commanded in (double) volts double bias_r_blu = double(bias_r_blu_mV) / 1000.0; double bias_d_blu = double(bias_d_blu_mV) / 1000.0; double bias_r_red = double(bias_r_red_mV) / 1000.0; double bias_d_red = double(bias_d_red_mV) / 1000.0; if(verbose) { debug_print("confSPEC: capa_blu" + capa_blu); debug_print("confSPEC: nb_rdouts_ramp_blu" + nb_rdouts_ramp_blu); debug_print("confSPEC: nb_rdouts_subramp_blu" + nb_rdouts_subramp_blu); debug_print("confSPEC: comp_mode_blu" + comp_mode_blu); debug_print("confSPEC: glitch_det_blu" + glitch_det_blu); debug_print("confSPEC: ramp_fit_alg_blu" + ramp_fit_alg_blu); debug_print("confSPEC: nb_raw_blu" + nb_raw_blu); debug_print("confSPEC: bias_r_blu_mV" + bias_r_blu_mV); debug_print("confSPEC: bias_d_blu_mV" + bias_d_blu_mV); } // Issue SPEC_aot_prologue if demanded if(doPROLOG) { totalDUREE = SPEC_aot_prologue_DataRates(nb_rdouts_ramp_red,nb_rdouts_ramp_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,comp_mode_blu,comp_mode_red,nb_rdouts_subramp_blu,nb_rdouts_subramp_red,nb_raw_blu,nb_raw_red,glitch_det_red,ramp_fit_alg_red,filter,verbose); } // NOTE: Grating starts at grat_start_pos determined by SPEC_get_grat. At end of // SlewCal grating should park. Park position is generally grat_def_pos: int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // AOT_prologue is supposed to have left grating at park position int grat_def_pos = grat_park; // NOTE for version 1.0 and later. Upon execution of SpecSlew, grating is // indeed where SPEC_orbit_prologue left it (the default park position); // this fact remains unchanged. What is new is that SpecSlew will leave // the grating not at the default park position but already at the // position needed by the 1st line that will be observed. There are two // advantages: // 1- the new logic in the OBCP incurs in less grating movements when // the OBCP is repeated within a NOD or the next raster point, and // 2- the detector will see the illumination corresponding to the line // wavelength before the actual observation starts. // Observe now each key wavelength int nbKEY = length(keyWAVE); {double,int,int,int,int}[] gratTuple = [{0.0,0,0,0,0}]; for(int loopKEY = 0 .. nbKEY - 1) { // We may perform the loop starting with high ORDER int keyWaveLoop1 = nbKEY - 1 - loopKEY; // or not.... keyWaveLoop1 = loopKEY; // // Get grating start position (CAL is performeed with HI resolution) // (frequency switch boolean is set to false) bool switching = false; string extraConf = "normal"; // Seek K rows in CAL-U, i.e. key wavelength parameters gratTuple[keyWaveLoop1] = SPEC_get_grat_info(keyWAVE[keyWaveLoop1],"KHI",switching,extraConf,orderSel,verbose); // Issue now OBCP#13 for each of the given key wavelengths int order = gratTuple[keyWaveLoop1]{1}; int grat_start_pos = gratTuple[keyWaveLoop1]{2}; int nb_grat_steps = gratTuple[keyWaveLoop1]{3}; int grat_step_up_fine = gratTuple[keyWaveLoop1]{4}; int grat_step_dn_fine = -grat_step_up_fine; // Table OBCP13params is indexed by order string key = "" + order; string calU = "OBCP13params"; int nb_up_dn = ilookup(calU,key,"nb_up_down"); int nb_cycles_grat = ilookup(calU,key,"nb_CS1_CS2"); int nb_ramps_grat_pos = ilookup(calU,key,"nb_ramps_plateau"); int grat_step_coarse = 0; // Lookup chopper CS1 and CS2 positions calU = "CHOPPERCSparams"; chop_pos_CS1 = ilookup(calU,"SPEC","pos_CS1"); chop_pos_CS2 = ilookup(calU,"SPEC","pos_CS2"); int nb_rdouts_ramp = nb_rdouts_ramp_red; // Grating logic (OBCP is up/down ==> grating ends where it started) // Leave the grating where it is, i.e. end-of-DMC value int new_grat_def_pos = grat_start_pos; // But the last line should leave grating at frstLstGratPos if(keyWaveLoop1 == nbKEY - 1) { new_grat_def_pos = frstLstGratPos; } // Number of steps to start position for current line int steps_start = grat_def_pos - grat_start_pos; int grat_time = SPEC_grat_time(steps_start); if(verbose) { debug_print("OBCPcal:GratStart from/to: " + grat_def_pos + "/" + grat_start_pos + "; time: " + grat_time); } // int steps_end = grat_start_pos - new_grat_def_pos; int grat_def_time = SPEC_grat_time(steps_end); if(verbose) { debug_print("OBCPcal:GratEnd from/to: " + grat_start_pos + "/" + new_grat_def_pos + "; time: " + grat_def_time); } int[] dureeOBCP = OBCP_chop_grat_scan_cal(nb_up_dn,grat_step_coarse,nb_grat_steps,grat_step_up_fine,nb_cycles_grat,chop_pos_CS1,nb_ramps_grat_pos,chop_pos_CS2,grat_step_dn_fine,detector,grat_start_pos,grat_time,comp_mode_blu,comp_mode_red,new_grat_def_pos,chop_def,grat_def_time,nb_rdouts_ramp); if(verbose) { debug_print("SlewCal performed KeyWave: " + keyWAVE[keyWaveLoop1] + " [mic] requires " + dureeOBCP[0] + " [sec]"); } // Update dureeCalKey dureeCalKey[keyWaveLoop1] = [0,0,0,0,0]; for(int loop1 = 0 .. 4) { dureeCalKey[keyWaveLoop1][loop1] = dureeOBCP[loop1]; } // Prepare the grating to be ready for the next wavelength grat_def_pos = new_grat_def_pos; } // Add after the KeyWaves in dureeCalKey the duration from AOT_prologue dureeCalKey[nbKEY] = [0,0,0,0,0]; dureeCalKey[nbKEY][4] = totalDUREE[4]; if(verbose) { debug_print("End SlewCal with dureeCalKey: " + dureeCalKey); } // Leave bus scheduler in a known state (SP1707) sync(); return dureeCalKey; } // File : PACS_Chopper_EnDis_Test_NoConf_ast300.cus // Missionphase : SVT / flight // // Purpose : Switch-on/switch-off and enanle/disable test of chopper // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : Flight procedure to verify the stability of the chopper. // Produces diagnostic housekeeping data, enables the // chopper for 300 seconds, and disables again. // // Comments : Copied from PACS_Chopper_EnDis_Test_ast300_OBS // without the configuration and with MOIS comments // // Version : 1.0 // History : 1.0 17-Oct-2007 BV initial version // // procedure PACS_Chopper_EnDis_Test_NoConf_ast300 { }{ mois_comment("Start of procedure: verify the stability of the PACS chopper during 300 sec"); // Time 1 sec int n = 300; mois_step("Enable diagnostic housekeeping"); // Set diagnostic HK (1 kHz, 4 parameters) PACS_Chopper_EnDis_Test_dhk("ON"); delay(10); // mois_step("Switch on and enable chopper for 300 seconds"); // Switch on and enable chopper for n seconds, while n is given by the user PACS_Chopper_SWON_SWOF_only("ON"); delay(10); EnDis_chopper("ON"); delay(n); EnDis_chopper("OFF"); delay(10); PACS_Chopper_SWON_SWOF_only("OFF"); delay(10); mois_step("Stop diagnostic housekeeping"); // Stop diagnostic HK PACS_Chopper_EnDis_Test_dhk("OFF"); } // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OnBoardControlProcedure to perform // chopped spectroscopic scans (OBCP #8) // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : OBCP_spec_2_3_chop.txt // // Arguments needed to call OBCP // Type Name Deault Description // int nb_up_down 1 Number of sequences: up down up P#1 // int nb_grat_steps 16 Number of grating steps P#2 // int nb_SRC_OFF 2 Nb cycles grating position P#3 // int chop_pos_REF1 1000 Chopper position 1 P#4 // int nb_ramps_plateau 3 Nb of ramps per chopper plateau P#5 // int chop_pos_REF2 -3000 Chopper position 2 P#6 // int chop_pos_REF3 5000 Chopper position 3 P#7 // int nb_CS1_CS2 1 Nbr cycles on CS P#8 // int chop_pos_CS1 -25000 Chopper position on CS1 P#9 // int chop_pos_CS2 25000 Chopper position on CS2 P#10 // int grat_step_up 133 Grating step P#11 // int grat_step_dn -133 Grating step P#12 // int detector 1 Synchronize on this detector 1:Blue 2:Red // int grat_pos 461000 Starting grating position // int grat_time 40000 Time for grating to move to start position // int comp_mode_blu 16 "Blue" compression // int comp_mode_red 16 "Red" compression // int grat_def 500000 Grating default position // int chop_def 0 Chopper default position // int grat_def_time 20000 Grating time to move to grat_def [msec] // int nb_rdouts_ramp 64 Number of readouts per ramp // // Description : This script mimics the OBCP_GRATING_LINE_SCAN_CHOPPED // pseudo script, section 3.9.1 in PACS-ME-LI-005 // This CUS version computes the duree of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : Calls "two_three_position_chopped_spectroscopy" DEC // MEC sequence 4.2.1, DMC_spec_2_3_chop.txt // Comments : // // Version : 0.1 17-Aug-2004 Creation by DAC // History : // 0.2 16-Sep-2004 OBCP and corresponding DMC files renamed // Block renamed as well // 0.3 18-Oct-2004 Normalized variable names // 0.4 22-Oct-2004 Added "communication jitter" after test on PACS QM // 0.5 12-Nov-2004 Added time_array elements; return duree times in [sec] // 1.0 24-Mar-2005 HF modified debug_print statement // 1.1 11-Apr-2005 DAC Corrected returned time array // 1.2 22-apr-2005 DAC Changed default values to match TM's // Added t_cmd for forgotten DMC command // 1.3 25-apr-2005 DAC Added grat_step_dn to match OBCP description // // int[] block OBCP_spec_2_3_chop PACS 8 { int nb_up_down = 1; // Number of sequences: up down up P#1 int nb_grat_steps = 16; // Number of grating steps P#2 int nb_SRC_OFF = 2; // Nb cycles grating position P#3 int chop_pos_REF1 = 1000; // Chopper position 1 P#4 int nb_ramps_plateau = 3; // Nb of ramps per chopper plateau P#5 int chop_pos_REF2 = -3000; // Chopper position 2 P#6 int chop_pos_REF3 = 5000; // Chopper position 3 P#7 int nb_CS1_CS2 = 1; // Nbr cycles on CS P#8 int chop_pos_CS1 = -25000; // Chopper position on CS1 P#9 int chop_pos_CS2 = 25000; // Chopper position on CS2 P#10 int grat_step_up = 133; // Grating step P#11 int grat_step_dn = -133; // Grating step P#12 int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 461000; // Starting grating position int grat_time = 40000; // Time for grating to move to start position int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopped default position int grat_def_time = 20000; // Grating time to move to grat_def [msec] int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Register with environment WriteBBID($BBID); // Variables for time_array int duree_ramps = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; // debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); // debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // duree of this OBCP (computed and returned in [msec]) int duree_msec = 0; // OBCP pseudo code // OBCP_GRAT_LINE_SCAN_CHOP(seq, seq_time, P#1,&,P#12, // detector, grat_pos, grat_time, // comp_mode_blu, comp_mode_red, // grat_def, chop_def, grat_def_time) // Begin // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_pos) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // (all parameters filled by DPU based on seq parameter) // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, comp_mode_blu, comp_mode_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_time) duree_msec = duree_msec + t_cmd + grat_time; duree_OVR = duree_OVR + t_cmd + grat_time; // DMC_START_SEQUENCE // Call DEC/MEC sequence just to know the execution time int[] duree1 = DMC_spec_2_3_chop(nb_up_down,nb_grat_steps,nb_SRC_OFF,nb_ramps_plateau,nb_CS1_CS2); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; // WAIT (seq_time) duree_msec = duree_msec + t_cmd; duree_msec = duree_msec + seq_time; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT (grat_def_time) duree_msec = duree_msec + t_cmd + grat_def_time; duree_OVR = duree_OVR + t_cmd + grat_def_time; // Issue TM(1,7) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Now trigger execution of OBCP // This OBCP is number, requires 22 parameters and calls DEC/MEC #8 string obcp_ID = "GRAT_LINE_CHOP"; int obcp_par_nb = 22; int seq_DMC = 8; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_SRC_OFF},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,chop_pos_REF3},{10,nb_CS1_CS2},{11,chop_pos_CS1},{12,chop_pos_CS2},{13,grat_step_up},{14,grat_step_dn},{15,detector},{16,grat_pos},{17,grat_time},{18,comp_mode_blu},{19,comp_mode_red},{20,grat_def},{21,chop_def},{22,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // debug_print("OBCP_spec_2_3_chop [sec]: " + time_array); delay(time_array[0]); // Return the array of times return time_array; } // Missionphase : // // Purpose : Loading the sequencer to build up the signal (OBMO) // for normal DDCS mode // // // TCL author : TM // TCL file : tm_phot_sequencer_setup.tcl // CUS author : DAC // Script file : PHOT_seq_setup.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : This script will set the sequencer, which is building // up the final signal and it sets the data mode // to "Bolo & HK". // This script should be executed just after the // switch-on procedure, the BOLC initialisation // and the bias SETTING (polarizer) // The purpose of this scenario is to configure the BOLC // sequencer. // The sequencer will provide clock signals for detector // readout and for BOLC analog synchronous operation // (switching between S and Sref, triggering A to D conversion) // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 13-apr-2005 DAC. Based on TM's V1.0 from 20-apr-2004 // : 0.2 13-apr-2006 TM, updated for new sequencer, cleaning // of commands in the end (2_Load_of_new_sequencer.txt) int[] procedure PHOT_seq_setup { }{ // Define variables to communicate various durations to HSPOT. // NOTE: all time variables in units of number of ramps (SPEC) or // number of readouts (BOLO). The calling program must convert this // count into actual duration in true time units [seconds]. // SRC, REF, CAL, OVR stand for time spent on SRC, REF (on sky), // CAL source, and overheads (wait for something). Total // duration is given by duree_num. If no error, this duration // must be equal to the sum of all others int duree_num = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); //-------------------------------------- // BOLC sequencer initialisation (OBMO) //-------------------------------------- // // PC103420 "DMC_SEND_COMMAND_BOLC" SEND COMMAND TO BOL CONTROLLER // PP071420 "BOLOMETER_COMMAND" // // Sequence of command to load the BOLC programmable sequencer: // The timing is defined according to timing diagram given by P.Agnese // Set_clock_mux stop // P 09 00 00 00 Pacs_BOLC_SET_CLOCK_MUX("STOP"); // Set seq param table 0 time 0 clk 20 // P 0C 00 0014 Pacs_BOLC_FINE_TIME_SETTING(0x14); // Set seq param table 1 time 35 clk 52 // P 0C 01 11B4 Pacs_BOLC_FINE_TIME_SETTING(0x111b4); // Set seq param table 2 time 144 clk 116 // P 0C 02 4874 Pacs_BOLC_FINE_TIME_SETTING(0x24874); // Set seq param table 3 time 153 clk 100 // P 0C 03 4CE4 Pacs_BOLC_FINE_TIME_SETTING(0x34ce4); // Set seq param table 4 time 159 clk 108 // P 0C 04 4FEC Pacs_BOLC_FINE_TIME_SETTING(0x44fec); // Set seq param table 5 time 280 clk 44 // P 0C 05 8C2C Pacs_BOLC_FINE_TIME_SETTING(0x58c2c); // Set seq param table 6 time 290 clk 36 // P 0C 06 9124 Pacs_BOLC_FINE_TIME_SETTING(0x69124); // Set seq param table 7 time 294 clk 52 // P 0C 07 9334 Pacs_BOLC_FINE_TIME_SETTING(0x79334); // Set seq param table 8 time 314 clk 20 // P 0C 08 9B14 Pacs_BOLC_FINE_TIME_SETTING(0x89b14); // Set seq param table 9 time 322 clk 0 // P 0C 09 A100 Pacs_BOLC_FINE_TIME_SETTING(0x9a100); // Set clock mux sequencer // P 09 00 00 01 Pacs_BOLC_SET_CLOCK_MUX("Sequencer"); //----------------- // End of Procedure //----------------- // Time spent int duree_TCs = time() - time_start; duree_OVR = duree_TCs; duree_num = duree_OVR; // Return the array of times int[] time_array = [duree_num,duree_SRC,duree_REF,duree_CAL,duree_OVR]; return time_array; } // File : PACS_Spec_CRE_Setup_Cold.cus // Missionphase : PACS EQM Test // // Purpose : Configure CRE bias, reset interval and capacitor for // testing at room temperature // // Author : H. Feuchtgruber // CUSification : DAC // Comments : Intermediate version // // // Version : 1.5 // History : 1.0 / 16-Nov-2004 Initial version // 1.1 7-mar-2006 SPEC_HEAT_1_C renamed // 1.2 10-apr-2006 Modified heater setting for FM // 1.3 06-nov-2006 HF - Changed bias_r to 82 // 1.4 13-nov-2005 Changed bias_r to 12 // 1.5 8-Apr-2008 HF changed to in-flight default biases procedure PACS_Spec_CRE_Setup_Cold { }{ int red_reset = 64; int blue_reset = 64; int red_bias_d = 123; int red_bias_r = 12; int blue_bias_d = 328; int blue_bias_r = 12; int red_capacitor = 0; int blue_capacitor = 0; int heater_blue = 0; // PC174420 "DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on int blue_cre_ctrl = blue_capacitor + 256 + 128 + 2 + 1; int[] list_int = [32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0,chksum); delay(1); // PC173420 "DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on // set red_cre_ctrl [expr $red_capacitor+256+128+2+1] // set spec_par_r [list {PP095420 32} \ // [list PP096420 $red_reset] \ // [list PP097420 $red_cre_ctrl] \ // [list PP098420 $red_bias_r] \ // [list PP099420 $red_bias_d] {PP100420 0}] // set chksum [getChkSum -d -32 $spec_par_r] // putlog "ChkSum for spec_par_r: $spec_par_r" int red_cre_ctrl = red_capacitor + 256 + 128 + 2 + 1; list_int = [32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0]; chksum = checksum("int",list_int); Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0,chksum); delay(1); // PC094420 "DMC_SET_PAR_BOTH_SPEC" SEND COMPLETE PARAMETERS TABLE TO BOTH DECS // tcsend PC094420 // waittime 0.5 Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC //tcsend PC086420 //waittime 0.5 Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC //tcsend PC093420 //waittime 0.5 Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SET_B_SPE_HEAT_1C(0) // eval tcsend PC087420 [list [list PP073420 $heater_blue]] // waittime 0.5 Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(heater_blue); delay(1); //----------------- // End of Procedure //----------------- } // Missionphase : // // Purpose : Generic PACS spectroscopy AOT setup // // Author : Diego A. Cesarsky, HF // CUS script : Diego A. Cesarsky // CVS file : SPEC_aot_prologue.txt // // Arguments : // type Name DefVal Description // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' length // double bias_d_red 0.07 BIAS_D for red spectro (0-1V) // double bias_r_red 0.011 BIAS_R for red spectro (0-1V) // double bias_d_blu 0.21 BIAS_D for blue spectro (0-1V) // double bias_r_blu 0.011 BIAS_R for blue spectro (0-1V) // int capa_red 8 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 8 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // int comp_mode_blu 16 Compression mode blue channel // int comp_mode_red 16 Compression mode red channel // int nb_samp_subramp_blu 64 Number of blue samples per sub-ramp // int nb_samp_subramp_red 64 Number of red samples per sub-ramp // int nb_raw_spu_blu 1 Number of raw channels transmitted by SPUS // int nb_raw_spu_red 1 Number of raw channels transmitted by SPUL // int glitch_det 1 Glitch detection; 0=on; 1=off // int ramp_fit_alg 1 Ramp fit algorithm [0=LstSq;1=mean value] // int filter 0 Desired FLTW position (0: ignore FLTW) // // // Description : Calls successively: // - SPEC_cre_setup: generic setup of detectors for AOT // - SPEC_spu_setup: generic AOT setup of SPU // - SPEC_fltw_move: Move FWSPEC to default position // - SPEC_MOV_CHOP_and_GRAT: Move chopper and grating to // default position // // Dependencies : SPEC_fltw_move // SPEC_cre_setup // SPEC_spu_setup // SPEC_MOV_CHOP_and_GRAT // // Preconditions : // // Comments : This BB belongs to the 100 series (spectro) // // Version : 0.1 7-Oct-2004 Creation by DAC // History : 0.2 12-Oct-2004 Revised after revision of the used // 1.0 7-jun-2005 Adapted for SPEC_MEC_defalut table giving // filter position as {int} // 1.1 29-aug-2005 Added "whoCalledMe" to SpecSlewCal // 1.2 1-sep-2005 Added verbose // procedures // 0.3 18-Oct-2004 Was SPEC_prologue; normalized variable names // 0.4 22-Oct-2004 Use new SPEC_cre_setup; cre_ctrl default // is for capa_xx = 0, heater no longer handled by SPEC_cre_setup // 1.0 22-Apr-2005 HF introduce mechanisms to default and // removed duplicate stop SPUs // 1.1 10-May-2005 DAC Renamed HF's tables without ".txt" // Removed spurious "delay()" at end of block (each called // module sets it own delay) // 1.2 12-apr-2006 No longer moves FLTW // 1.3 1-jun-2006 Reinstated FLTW using passed value (null means ignore // FLTW logic) // 1.4 6-dec-2006 Adapted for SPEC_fltw_move from ILT // 2.0 23-sep-2008 SCR 4431 Data rate int[] block SPEC_aot_prologue PACS 111 { int ramp_len_red = 64; // Red ramps' length int ramp_len_blu = 64; // Blue ramps' length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.011 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.011 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 8; // Capacitor red (0=100f,4=300f,8=1pf,12=3pF) int capa_blu = 8; // Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 64; // Number of blue samples per sub-ramp int nb_samp_subramp_red = 64; // Number of red samples per sub-ramp int nb_raw_spu_blu = 1; // Number of raw channels transmitted by SPUS int nb_raw_spu_red = 1; // Number of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0:LstSq;1:MeanVal] int filter = 0; // Desired FLTW position (0: ignore filter) bool verbose = true; }{ // Register start of BB WriteBBID($BBID); // Define the elements of time_array int duree_sec = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; int time_start = time(); data_rate(120.0); // Accumulated duree [milliseconds] int duree_msec = 0; // Perform SPEC_cre_setup. // NOTE: capa_xxx is added to cre_ctrl_xx within SPEC_cre_setup int cre_ctrl_red = 386; int cre_ctrl_blu = 386; int duree2 = SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); duree_msec = duree_msec + duree2; if(verbose) { debug_print("duree of SPEC_cre_setup: " + duree2); } // Perform SPEC_spu_setup, starting SPU bool startSPU = true; int duree3 = 0; SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); duree_msec = duree_msec + duree3; // Position filter wheel at desired position // Look up table order <=> telecommand ENG parameter string[] fltPOS = ["N/A","NoFilter","POS B","POS A"]; // Command only for filter 2 or 3 if(filter == 2 || filter == 3) { string fw_posENG = fltPOS[filter]; int duree4 = SPEC_fltw_move(fw_posENG); // WARNING! SPEC_fltw_move returns its duration in [sec] duree_msec = duree_msec + 1000 * duree4; if(verbose) { debug_print("SPEC_aot_prologue turns FLTW to " + fw_posENG); } } // Position chopper and grating at their default positions int chop_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","chopper"); int grat_pos = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); if(verbose) { debug_print("Moving CHOP and GRAT to positions: " + chop_pos + ", " + grat_pos); } int[] duree5 = SPEC_MOV_CHOP_and_GRAT(chop_pos,grat_pos); duree_msec = duree_msec + duree5[0]; // Total time is now computed including TC rate duree_sec = time() - time_start; // All the time spent here is OVR duree_OVR = duree_sec; // Define time_array int[] time_array = [duree_sec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // Report duration if(verbose) { debug_print("+++++ SPEC_aot_prologue: " + time_array); } // Return the array of times //Reset Block ID WriteEndBB(); //Return time_array return time_array; } // Mission phase : ILT at Garching // // Purpose : PCD req.1.1.11 // Low frequency noise measurement for EMT // // Author : Koryo Okumura // // CUS script : procedure Phot_lowFreq_DDCS_EMT // // Argument : // measureTime : response measure time in seconds [3600s = 1hour] // biasFile : Bias table file containing the initial values ["BOLObias_ILT_standard_high"] // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Sequencer is activated // + SPU is ON in a normal downlink // // Description : // Low frequency measurement on one of the CSs // // Dependencies : None // // Comments : // // Version : Fri Mar 30 2007 // 10-apr-2007, OGSE BB1 at 20K // procedure Phot_lowFreq_DDCS_IST { string cs_num = "cs1" in ["cs1","cs2"]; // CS1 or CS2 int measureTime = 3600; // response measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values }{ // int[] cs_pos = [-23382,22347]; int i_cs = 0; if(cs_num == "cs2") { i_cs = 1; } // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sb-Sref (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sb-Sref"); //# P 09 01 00 00 int operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // //*************** // Set gain high //*************** Pacs_BOLC_SET_GAIN("HIGH"); // //******************************* // Select Filter A (110 microns) //******************************* PHOT_fltw_move("POS A"); // //******************** // Let all stabilized //******************** delay(300); // //************************************ // Response measurement during 300 (s) //************************************ TMMarker602(); OBCP_chopped_photometry(0,0,39,0,0,150,1,cs_pos[0],cs_pos[1],0,0,0); TMMarker600(); // //********************************************** // Set the PACS chopper at the central position //********************************************** Pacs_DMC_MOVE_CHOP_ABS(cs_pos[i_cs]); // //******************** // Let all stabilized //******************** delay(300); // //***************************************** // Noise measurement during measureTime (s) //***************************************** TMMarker601(); delay(measureTime); TMMarker600(); // //******************** // Let all stabilized //******************** delay(300); // //************************************ // Response measurement during 300 (s) //************************************ TMMarker602(); OBCP_chopped_photometry(0,0,39,0,0,150,1,cs_pos[0],cs_pos[1],0,0,0); TMMarker600(); // // Stop SPU PHOT_spu_reset(); sync(); } // Missionphase : // // Purpose : Enable/disable the chopper electronics // // Author CUS : Diego A. Cesarsky (diego.cesarsky@mpe.mpg.de) // // Author TCL : N/A // // Original TCL : N/A // // Input arguments // Type Name DefVal Description // string on_off "ON" ON: Enable chopper, OFF: Disable // // Description : // // Dependencies : // // Comments : // // Version : 0.3 // History : 0.1 23-Aug-2004 First creation // 0.2 13-apr-2005 DAC Renamed and modified // Enable_disable_chopper procedure // 0.3 8-mar-2007 Added 10sec delay between SWON and ENABLE // (HD's e-mail) // : // procedure CHOP_on_off { string on_off = "ON" in ["ON","OFF"]; //Enable/Disable chopper }{ if(on_off == "ON") { Pacs_DMC_SWON_CHOP_CONT(); delay(10); Pacs_DMC_ENABLE_CHOP_CONT(); } // Disable if(on_off == "OFF") { Pacs_DMC_DISABLE_CHOP_CONT(); Pacs_DMC_SWOF_CHOP_CONT(); } } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Sequencer_Setup { /* No variables to call PacsEng_Phot_Sequencer_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Sequencer_Setup */ }{ // 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(PACS_Phot_Sequencer_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Sequencer_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Phot_SFT_Cooler.cus // Missionphase : PACS EQM Test // // Purpose : Performing a cooler short functional test in the cold // // Author : T. Mueller // CUSification : DAC // Arguments : none // // Description : Between 2 and 4 Kelvin all thermal switches are open. // Setting of SP_heater_current to 2 mA: "TEMP_SP" increases // and perhaps a very little change on "TEMP_EV". // Setting of HSE_heater current to 0.5 mA: "TEMP_EV_SWITCH" // will increase. // Setting HSP_heater current to 0.5 mA: "TEMP_SP_SWITCH" // will increase. // Resetting of all currents to 0mA: temperatures will decrease. // // Comments : Based on Email by Eric Doumayrou, 18/Nov/2004 // // Version : 1.0 // History : 1.0 / 18-Nov-2004 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 10-apr-2006 Review for FM // 1.3 22-jun-2007 TM: AF21 disabled before running this script and // enable after (+ switches for AF18) // procedure PACS_Phot_SFT_Cooler { }{ //------------------------------- // disable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) //------------------------------- Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","DISABLE"); // enable AF 18 (to check if the current of the sorption pump heater is below 30mA) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP2","ENABLE"); //------------------------------- // Set HK list to PHOT //------------------------------- // DPU_SET_HK_LIST (PHOT HK_PACKT_ID=2; // SPU_ARRAY: 1 for both channels, 2 for blue chan, 3: for red chan) // PC003380 "DPU_SET_HK_LIST" SET THE PREDIFINED LIST OF HK VALUES // FOR THE HK PACKET // PP005380 "HK_PACKT_ID" // PP025380 "SPU_ARRAY" // tcsend PC003380 {PP005380 2} {PP025380 1} // waittime 0.5 Pacs_DPU_SET_HK_LIST("PHOT","BOTH Array"); //---------------------------------------------------------------- // Short function test of cooler between 2 and 4 K environment //---------------------------------------------------------------- // Set SP heater current to to 0.002 amperes (2mA) // P 07 01 00AE // tcsend PC103420 {PP071420 0x070100AE LO}; waittime 0.5 // waittime 120.0 int operand = 0x70100ae; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(120); // Set HSE heater current to to 0.0005 amperes (0.5mA) // P 07 03 04FB // tcsend PC103420 {PP071420 0x070304FB LO}; waittime 0.5 // waittime 120.0 operand = 0x70304fb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(120); // Set HSP heater current to to 0.0005 amperes (0.5mA) // P 07 02 04FB // tcsend PC103420 {PP071420 0x070204FB LO}; waittime 0.5 // waittime 120.0 operand = 0x70204fb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(120); //---------- // Resetting //---------- // Set SP heater current to to 0mA // P 07 01 0000 // tcsend PC103420 {PP071420 0x07010000 LO}; waittime 0.5 // waittime 0.5 operand = 0x7010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set HSE heater current to to 0mA // P 07 03 0000 // tcsend PC103420 {PP071420 0x07030000 LO}; waittime 0.5 // waittime 0.5 operand = 0x7030000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set HSP heater current to to 0mA // P 07 02 0000 // tcsend PC103420 {PP071420 0x07020000 LO}; waittime 0.5 // waittime 0.5 operand = 0x7020000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //-------------------- // disable AF 18 (to check if the current of the sorption pump heater is below 30mA) //-------------------- Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP2","DISABLE"); // enable AF 21 (to check if the absolute value of the HSP current is below 2*10^(-5)A) Pacs_DPU_SET_FUNCT("EVENT_BOL_I_SP1","ENABLE"); //----------------------- // end of procedure //----------------------- sync(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Fil_Diaghk_Setup { /* No variables to call PacsEng_Phot_Fil_Diaghk_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Fil_Diaghk_Setup */ }{ // 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(PACS_Phot_Fil_Diaghk_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Fil_Diaghk_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_Heat_FFT.cus // // Purpose : Heaters Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends 2 current to both heaters // // // Prerequisite : // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 2.0 // History : 1.0 05-Apr-2007 initial version by PR // : 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Heaters Functional Test // @comment - // procedure Pacs_Spec_Heat_FFT { }{ // // SWON the heaters PACS_Spec_Heat_SWON(); // // 2.0mA -> 2.5 mA -> 0.0 mA // PACS_Spec_Heat_Setup(410,410); delay(540); PACS_Spec_Heat_Setup(512,512); delay(540); PACS_Spec_Heat_Setup(0,0); delay(30); // // SWOF the heaters PACS_Spec_Heat_SWOF(); // } // $Id$ // Missionphase : PACS PV Phase // // File : PACS_Chopper_EnDis_Test_ast1_OBS.cus // // // Missionphase : PACS IST Chopper Day // // Purpose : Switch-on/switch-off and enanle/disable test of chopper // // Author : MN/HD // CUSification : MN/HD // Arguments : // // Description : This script allows to insert a duration in seconds during // which the chopper is switched-on and enabled. This is used // to evaluate the // stability of the chopper while selecting various chopper // control parameters. // // Comments : // // Version : 4.0 // History : 1.0 20-Mar-2007 initial version // 2.0 05-Jul-2007 IST Chopper Day // 3.0 12-Nov-2007 edited for SVT/PV conformance // 4.0 04-mar-2008 translated into PV phase script VDP // obs PacsEng_Chopper_EnDis_Test_ast1 { /* Needed variables to call PacsEng_Chopper_EnDis_Test_ast1 */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Chopper_EnDis_Test_ast1 */ }{ // 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(PACS_Chopper_EnDis_Test_NoConf_ast1())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_EnDis_Test_NoConf_ast1(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : // // // // OBCP author : HF // TCL file : N/A // CUS author : DAC // Script file : OBCP_27_grat_line_scan_chopped_2.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : Belongs to Section 3.8: Grating Spectral Line Scan // of PACS-ME-LI-005 // Consists mainly of a sequence with repetitive up- and // down-scans with the grating around a given center position, // while the chopper is operating as well on either two- or // three-positions. This is OBCP 3.8.2, calling DMC sequence // 12 (in 4.2.2) // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 19-apr-2005 DAC // 0.2 22-apr-2005 Rearranged arguments P#1 P#2 etc. // 0.3 25-apr-2005 DAC Use same defaults as TM's scripts // 0.4 27-apr-2005 DAC MIB name is GRAT_SCAN_CHOP2 (not _2) // 0.5 20-sep-2005 Wrong sign for grat_step_dn // 0.6 26-mar-2008 modify BB ID because of duplicate with OBCP_grat_scan_chop_2.txt // int[] block OBCP_grat_line_scan_chop_2 PACS 21 { int nb_up_down = 1; // Nb of "up-down" sequences (P#1); int nb_grat_steps = 20; // Nb of grating steps (P#2) int nb_cycles_grat_pos = 2; // Nb of cycles per grating position (P#3); int chop_pos_REF1 = 1000; // Chopper position 1 (P#4) int nb_ramps_plateau = 3; // Nb of readouts per chopper position (P#5); int chop_pos_REF2 = 3000; // Chopper position 2 (P#6) int nb_CS1_CS2 = 1; // Nb of cycles on the internal CSs (P#7); int chop_pos_CS1 = -25000; // Chopper position on CS1 (P#8) int chop_pos_CS2 = 25000; // Chopper position on CS2 (P#9) int grat_step_up = 1600; // Grating step up (P#10) int grat_step_dn = -1600; // Grating step down (P#11) int detector = 1; // Synchronize on this detector 1:Blue 2:Red int grat_pos = 445000; // Starting grating position int grat_time = 40000; // Grating time to move to start [msec] int comp_mode_blu = 16; // "Blue" compression int comp_mode_red = 16; // "Red" compression int grat_def = 500000; // Grating default position int chop_def = 0; // Chopper default position int grat_def_time = 20000; // Time to come back to default position int nb_rdouts_ramp = 64; // Number of readouts per ramp }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_rdouts = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain some parameters from table PACSparams // Spectro sampling rate (needed to compute ramp duree) double spec_sample = dlookup("PACSparams","spec_sample","freq_time"); string spec_unit = slookup("PACSparams","spec_sample","unit"); double ramp_time = 1000.0 * double(nb_rdouts_ramp) / spec_sample; debug_print("Spectro_sample: " + spec_sample + " " + spec_unit); debug_print("Ramp duree: " + ramp_time + "[msec]"); // Obtain duree of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duree of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duree of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duree_msec = 0; // OBCP Pseudo Code starts here (accumulate duree_msec [msec] as it goes) // Begin // OBCP_GRATING_LINE_SCAN_CHOPPED_2(seq, seq_time, // P#1,&,P#11, detector, grat_def, grat_time, // cmp_par_blue, cmp_par_red, grat_def, chop_def, grat_time) // DMC_WRT_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SET_TIME duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SEQ_BUFFER(ID, LENGTH, DATA, CHECKSUM) ; (all parameters filled // by DPU based on seq parameter) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_SYNCHRONIZE_ON_DET(detector) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_WRT_SPU_TRAN_MODE(ID, 2, cmp_par_blue, cmp_par_red, CHHKSUM) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_time) duree_msec = duree_msec + grat_time; duree_OVR = duree_OVR + grat_time; // DMC_START_SEQUENCE ////////////////////////////////////////////////////////////////////////// // Call DC/MEC code to estimate its duration duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; int[] duree1 = DMC_12_grat_line_scan(nb_up_down,nb_grat_steps,nb_ramps_plateau,nb_CS1_CS2,nb_cycles_grat_pos); // Convert array "duree1" into [msec] int seq_time = iround(double(duree1[0]) * ramp_time) + dmc_margin; duree_SRC = iround(double(duree1[1]) * ramp_time); duree_REF = iround(double(duree1[2]) * ramp_time); duree_CAL = iround(double(duree1[3]) * ramp_time); duree_OVR = duree_OVR + iround(double(duree1[4]) * ramp_time) + dmc_margin; debug_print("Execution time [msec] from DMC: " + seq_time); // duree_msec(seq_time) duree_msec = duree_msec + t_cmd + seq_time; // WAIT(seq_time) ; Check execution status of the sequence and in case of // failure stop OBCP and issue TM(1,8)+event // DMC_MOVE_GRAT_ABS(grat_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DMC_MOVE_CHOP_ABS(chop_def) duree_msec = duree_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(grat_def_time) duree_msec = duree_msec + grat_def_time; duree_OVR = duree_OVR + grat_def_time; // Issue TM(1,7) // End // Now trigger execution of OBCP // This OBCP is number 27, requires 21 parameters and calls DEC/MEC #12 string obcp_ID = "GRAT_SCAN_CHOP2"; int obcp_par_nb = 21; int seq_DMC = 12; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_up_down},{4,nb_grat_steps},{5,nb_cycles_grat_pos},{6,chop_pos_REF1},{7,nb_ramps_plateau},{8,chop_pos_REF2},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,grat_step_up},{13,grat_step_dn},{14,detector},{15,grat_pos},{16,grat_time},{17,comp_mode_blu},{18,comp_mode_red},{19,grat_def},{20,chop_def},{21,grat_def_time}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nb,grp); // Add the "communication jitter" duree_msec = duree_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Define time_array (return to caller) int[] time_array = [duree_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; // and convert from [msec] to [sec] for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } debug_print(obcp_ID + ": " + time_array); delay(time_array[0]); // Return the array of times return time_array; } // Missionphase : FM // // Purpose : Chopper Scan in one waz // // Author : Helmut Dannerbauer // CUS author : HD // // Description : This script has the purpose to be used for a chopper scan both in photometric // and spectrometric mode. The parameters needed are start position, // step length, number of steps and observing time on each position. // // Dependencies : // // Preconditions : PACS switched-on // // Comments : This script is based on the commanding during CQM ILT. // // Version : 3.0 // // History : 1.0 21-07-06 creation by HD. Based on EQM IMT script "Chop_scan" // 3.0 26-07-06 HD. script works. // block PACS_Chopper_one_way_scan_fm_bb PACS 356 { int chop_start_pos = 0; // chopper start position int chop_step_length = 100; // chopper step length int chop_step_number = 10; // chopper step number int chop_obs_time = 5; // observing time on chopper position in seconds }{ // Register start of BB WriteBBID($BBID); //------------------- // Scan //------------------- // Begin with the Scan from chop_start_pos and do chop_step_number times the step of length // chop_step_length and observe obs_time seconds on each position Pacs_DMC_MOVE_CHOP_ABS(chop_start_pos); delay(chop_obs_time); // counter n int n = 1; while(n <= chop_step_number) { Pacs_DMC_MOVE_CHOP_REL(chop_step_length); delay(chop_obs_time); n = n + 1; } // Mark End of Block WriteEndBB(); } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsLineSpec AOT // // CUS author : DAC // // Input arguments: see after module identification // // Return values // {int,int,int} {totalDuration,slewDuration,obsOverPACSandSC} // // Comments : If this file is called PacsLineSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsLineSpec.def // - rename obs module to PacsLineSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false !! // // History: // 25-apr-2007 14.0 For earlier history see v1.37 in CVS // Removed history up to today // 22-may-2007 14.1 SPR-3199 Return only SRC+REF time // 29-may-2007 14.2 SPR-3237 Use map orientation parameter // 11-jun-2007 14.3 Count WAIT=1 for grating in OBCP22 as SRC/REF // 20-sep-2007 14.4 SCR-3552. Correct pattnod with skewCorrec in PACSyzoffsets // 15-oct-2007 15.0 SCR-3691 // Add state=4 (OFF) in the StateMachine logic. Ready to // implement raster with OFF for pointing 21 & 31 // 22-oct-2007 15.1 FreqSwitch only allowed with source="large" // Introduce RAoff DECoff as in PacsRange // 23-oct-2007 15.2 UserNodCycles is now a rasterRepeat factor for // FreqSwitch (it was a cycle repeater) // 16-dec-2007 15.3 SPR-3830 (RAoff,DECoff out of boundaries) // 14-jan-2008 16.0 Use standard names for RA,DEC // 13-may-2008 17.0 SCR-3699 Implemented raoff and decoff refSelected // 13-oct-2008 18.0 implemented Default Line values for HSC deliveries // Default Buggy: need to only take default values if // length(lines) == 0 // {int,int,int} obs PacsLineSpec { /* "lines" is defined as an array; its elements (and hence its dimension) */ /* are provided by HSPOT */ /* {id,redshifted wavelength,repeat factor,line flux,continuum flux, */ /* line width,line flux unit,line width unit} */ {string,double,int,double,double,double,string,string}[] lines = []; //Filled by HSPOT /*------------- following only to use CUS interface -------------------------*/ string[] lineId = ["My lines"]; double[] lWave = [82.0]; // line wavelength in [55.0,210.0] int[] repeatLine = [1]; // repeat line in [0,10] double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lcontFlux = [111.11]; // Continuum flux in [0.0,10000.0] double[] lineWidth = [30.0]; string[] fluxUnit = ["Jy/m2"]; string[] widthUnit = ["kms"]; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order2" in ["order2","order3"]; bool chopNod = true; bool faintLines = true; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 3 in [2,32]; int n = 3 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target bool refSelected = false; double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; int naifid = 0; // RA,DEC or SSO double pointStep = 20.0 in [2.0,480.0]; double lineStep = 20.0 in [2.0,480.0]; string redshiftType = "redshift" in ["redshift","optical"]; double redshiftValue = 0.0; int obsOverhead = 180; // Slew overhead bool verbose = true; }{ //*--------- following only when using CUS interface -------------------*/ int linesIdLength = length(lineId); int linesLength = length(lines); if(linesLength == 0) { for(int lLoop00 = 0 .. linesIdLength - 1) { lines[lLoop00] = {lineId[lLoop00],lWave[lLoop00],repeatLine[lLoop00],lineFlux[lLoop00],lcontFlux[lLoop00],lineWidth[lLoop00],fluxUnit[lLoop00],widthUnit[lLoop00]}; } } //*--------- above only when using CUS interface -------------------*/ // Start of "Pointing" section // // New variable to start at nodded position bool startAtOFF = false; // extraConf: whatever affects PACS default configuration // Currently: the option faintLines calls for an extraConf string extraConf = "normal"; // For bright lines if(!faintLines) { extraConf = "bright"; } // Set messages for HTML format message(""); message(""); // Need switching boolean bool switching = !chopNod; // Switching only allowed with source "large" if(switching && source != "large") { error("Frequency Switch only in mode raster (large source) with OFF"); } // Decode more HSPOT information int nbLines = length(lines); int nbLines1 = nbLines - 1; // Cannot call with empty "lines" if(nbLines == 0) { error("STOP!! There are no spectral lines defined!"); } // No more than 10 lines or repetitions int nbLinesRep = 0; for(int loop00 = 0 .. nbLines - 1) { // Default repetion factor is 1 int repFactor = lines[loop00]{2}; if(repFactor == 0) { repFactor = 1; } nbLinesRep = nbLinesRep + repFactor; } if(verbose) { debug_print("Total lines/repeat: " + nbLinesRep); } if(nbLinesRep > 10) { error("STOP!! The number of lines/repetitions exceeds 10"); } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto) // Pointing mode is undefined. If it remains undefined at the end of // the next tests, then there is a problem with the source definition int pointCase = 0; // FinePointingMode with setup time // POINT source, with and without chopNod if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding)"; if(switching) { userMode = "Point source (frequency switch, no nodding)"; } pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // DITHERED source // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Large source (no nodding)"; pointCase = 31; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); for(int iii = 0 .. nbLines1) { debug_print("MAIN:Id, Wave, repeat, Lflux, Cflux, etc. " + lines[iii]); } } // Define array of wavelengths (will be needed by the SORT procedure) double[] lineWave = [55.0]; // Populate the array of wavelengths for(int loop0 = 0 .. nbLines1) { lineWave[loop0] = lines[loop0]{1}; } // For each line obtain the grating order and the grating position int[] orders = [0]; double[] grat_pos = [0.0]; // Fill the tuple waveTuple {waveLen,order,gratPos,nbStep,gratStep} {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; for(int loop1 = 0 .. nbLines1) { waveTuple[loop1] = SPEC_get_grat_info(lineWave[loop1],"HI",switching,extraConf,orderSel,verbose); // Create vector of intermediate results orders[loop1] = waveTuple[loop1]{1}; grat_pos[loop1] = double(waveTuple[loop1]{2}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbLines1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } // Reject mixed orders if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("L2"); double[] band3 = SPEC_BAND_read("L3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 int filter = 1; // Determine filter based on HSPOT input if(orderSel == "order2") { filter = 2; } if(orderSel == "order3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders); } // Filter below will be set by SPEC_aot_prologue via SlewCal if(verbose) { debug_print("MAIN:The full OBS will be performed with filter " + filter); } // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,grat_pos); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,lineWave); // Recast "lines" and waveTuple according to the ordered grating positions {string,double,int,double,double,double,string,string}[] sortLines = [{"empty",0.0,0,0.0,0.0,0.0,"bla","bla"}]; {double,int,int,int,int}[] sortWaveTuple = [{0.0,0,0,0,0}]; for(int reSORT = 0 .. nbLines1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbLines1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortLines[reSORT] = lines[sortedIndex]; sortWaveTuple[reSORT] = waveTuple[sortedIndex]; if(verbose) { debug_print("Sorted Line: " + sortLines[reSORT]); } } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 chop_pos_CS1 // chop_pos_CS2 chop_def detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC contians: // capa, nb_rdouts_ramp, nb_rdouts_subramp, comp_mode, // glitch_det, ramp_fit_alg, nb_raw, bias_r, bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values string throwUsage = throw; // Frequency switch parameters are as for offraster in PacsRange // (this will set REF1=REF2=CS1 but this is irrelevant for OBCP32) if(switching) { throwUsage = "offraster"; } if(verbose) { debug_print("PacsLine:Use throw: " + throwUsage); } paramsSPECdef = PacsSpecDefaults(throwUsage,extraConf,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module(s) to estimate OBS times as a function of the // input given by the HSPOT user. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} // More info: {nb_nods,nb_up_dn,timeOBS,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("MAIN.confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; // Accumulator total OBS time int totalOBS = 0; // For each demanded wavelength compute minimum duration for(int waveLOOP = 1 .. nbLines) { int waveLOOP1 = waveLOOP - 1; // Different OBCPs if frequency switch or not if(chopNod) { // Here we perform nodding/chopping // SCR-2942: consider case of faintLines = false string forDEBUG = "chop/nod"; paramsSPECext = PacsLineSpecEstimatorOBCP27(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,chopNod,faintLines,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; } else { // Here we perform frequency switching forDEBUG = "freq/switch"; // SPR-2926: Use userNODcycles as overall multiplier for repeatLine // No longer true with raster+OFF; repeat raster instead paramsSPECext = PacsLineSpecEstimatorOBCP32(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; } // Accumulate total OBS time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("MAIN.Obs mode : " + forDEBUG); debug_print("MAIN.Wavelength : " + sortLines[waveLOOP1]{1}); debug_print("MAIN.confOBCP[" + waveLOOP + "]: " + confOBCP[waveLOOP]); debug_print("MAIN.confSPEC[" + waveLOOP + "]: " + confSPECblu[waveLOOP]); } } if(verbose) { debug_print("MAIN.Minimum required time: " + totalOBS + " [sec]"); } if(chopNod) { // Here we perform nodding/chopping nbNods = userNODcycles; if(verbose) { debug_print("MAIN.The PointReq will contain " + nbNods + " nod cycles"); } } else { // Here we perform freq switch nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

      Minimum required OBStime: " + totalOBS + " [sec]

      "; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

      With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

      "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

      Since no NOD was specified the total OBS time is equal" + " to the minimum required time. The time can be changed" + " by changing the line(s) repeat factor

      "; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

      Red channel

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
        "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Number of readouts per ramp: " + confSPECred[0]{1} + "
      • "; lineCnt = lineCnt + 1; int subRamps = confSPECred[0]{1} / confSPECred[0]{2}; msgLine[lineCnt] = "
      • Number of subramps/ramp: " + subRamps + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Fitting algorithm: " + confSPECred[0]{5} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Integration capacitor: " + confSPECred[0]{0} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Blue channel

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
        "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Number of readouts per ramp: " + confSPECblu[0]{1} + "
      • "; lineCnt = lineCnt + 1; subRamps = confSPECblu[0]{1} / confSPECblu[0]{2}; msgLine[lineCnt] = "
      • Number of subramps/ramp: " + subRamps + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Fitting algorithm: " + confSPECblu[0]{5} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Integration capacitor: " + confSPECblu[0]{0} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths // MODIF: this leads to redundancy when Lines are selected both in // the norder+1st order: hence 1KWL per Filter: i.e. in practice 1 // per "blue order double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double[] keyWAVE = PacsLineSpecKeyWaves(sortWaveTuple); // int nbKeyWAVE = length(keyWAVE); == 1 int nbKeyWAVE = 1; // With current versions of CommandOBCP27 and CommandOBCP32, the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:SortWaveTuple: " + sortWaveTuple); debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOT // prologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // CAL for HOLD doAOTprologue = false; int timeHoldCal = duration(PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,0,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during HOLD: " + timeHoldCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration could be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation // Different OBCP for wavelength switch if(!switching) { // Here we perform nodding/chopping int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per pointing; nbNods: " + nbNods); } } else { // Here we perform freq switch timeOBS = duration(PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP32: " + timeOBS + " [sec] per pointing"); } } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbLines per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one will use time during // slew to perform SlewCal. // // The chopper step has been read already (PacsSpecDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table. Read chopper position SRC and // REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("PacsSpecDef: CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; // DAC Test ONLY int thold = timeHoldCal; int nhold = 0; int nload = 0; int tloadslewmin = 0; bool fixed = true; // FinePointingMode with setup time if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode without nodding, section 3.4 ib = "P02_0"; // Nodding is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chopper pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode repeated_raster_with_hold_and_OFF, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int top = 0; if(!switching && pointCase == 21) { raoff = 0.0; decoff = 0.0; } int nrepeat = 1; // If switching for "large" source perform OFF observation if(switching || pointCase == 31) { // Repeat raster according to userNODcycles nrepeat = userNODcycles; k = n * m; top = tp; } int trepeatmin = 0; int tloadmin = 0; nload = 0; // SPR-3237 (map orientation parameter) applies only to raster if(pointCase == 31) { fixed = true; patt = mapRasterAngle; } fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32) { // Raster mode w/nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("++++++++++++++++++++++++ Issue PointRequest now"); debug_print("Return from PointReq: " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); int tNOW = time(); debug_print("=====Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { /// obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { /// obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOFF = nbOFF + 1; // Logic to sum up obsTime /// if (nbOFF == 1) {sumUpObsTime = obsTime;} /// if (nbOFF > 1) {sumUpObsTime = SumFunction(obsTime,sumUpObsTime);} if(verbose) { tNOW = time(); /// debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print("Ending with NbOFF: " + nbOFF); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL lines). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // // and a per wavelength array: // [waveSTART,waveEND,order,gratStep,nbGratStep,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill 1st dimension of infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int wait1 = 1; // but there is no wait in FreqSwitch // Count the WAIT=1 for grating as a useful SRC if(switching) { wait1 = 1; } int nbRampPlateau = confOBCP[1]{4} + wait1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime : " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbLines1) { // for some reason it has to be "initialized" infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the START wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{0} = sortLines[loop3]{1}; // copy the END wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{1} = sortLines[loop3]{1}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortWaveTuple[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortWaveTuple[loop3]{4}; infoArray[1]{1}[loop3]{3} = (confOBCP[loop3 + 1]{2} - confOBCP[loop3 + 1]{1}) / 2; // copy the number of grating steps infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from sumUpObsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Also data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTimeTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of lines observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbLines; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal; // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Fill 3rd dimension of infoArray with global timing and AOT information // timeObsEnd is the total duration of the AOT // Pass details of AOT // We use OBCP27: OBCP_grat_scan_chop2 (unless FreqSwitch) string aotName = "GratScanChop2"; // Special "sky time" for FreqSwitch and SmallSourceDither if(switching) { aotName = "FreqSwitch"; } if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } infoArray[2] = {{aotName,0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // If switching if(switching && source == "Large") { infoArray[1]{0}{0} = "RasterOFF"; } else { if(switching && source == "Point") { infoArray[1]{0}{0} = "Pointed"; } infoArray[2]{0}{5} = userNODcycles; } // Process the information contained in infoArray (pass also sortLines) PacsProcessInfoArrayLine(infoArray,sortLines,confOBCP,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); // Compute the total time SRC + REF int accumSrceRef = 0; for(int loopL = 0 .. nbLines - 1) { // Add up Srce and Ref times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopL]{6} + infoArray[1]{1}[loopL]{7}; } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; // Return demanded tuples return {accumSrceRef,fromPntReq[1],overPACSandSC}; } // CVS comments : $Id: PHOT_aot_prologue.txt,v 1.8 2008/05/06 13:34:53 vanessa Exp $ // Purpose : SetUp of BOLO preceding AOT (but after orbit_prologue) // // CUS author : DAC // Script file : PHOT_aot_prologue.txt // // Input arguments // type name description // // Return values // Type Description // // Description : Conditions and starts SPU // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 18-jan-2006 DAC // 0.2 21-aug-2007 SRC-3507 Indicate end of BB // 1.0 10-oct-2007 Added input variables after SCR-3628 // 2.0 06-may-2008 Added Gain setup: LOW/HIGH gain obs. // 2.1 23-spe-2008 SCR 4431 data_rate int[] block PHOT_aot_prologue PACS 211 { string set_gain = "LOW"; int comp_mode_blu = 0; int comp_mode_red = 0; int nraw_blu = 3; int nraw_red = 3; bool verbose = true; }{ int timeStart = time(); // Register start of BB WriteBBID($BBID); // Define the elements of time_array int duree_sec = 0; int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Setup SPU bool startSPU = true; PHOT_spu_gain_setup(set_gain,comp_mode_blu,comp_mode_red,nraw_blu,nraw_red,startSPU); data_rate(120.0); // Mark end of BB WriteEndBB(); // Synch bus sync(); // Accumulated duree [milliseconds] int duree_msec = 0; duree_sec = time() - timeStart; // Do nothing for time being if(verbose) { debug_print("PHOT_aot_prologue: " + duree_sec + " [sec]"); } return [duree_sec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Flashers Short Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends current to both flashers for short times, the goal is only to see some reaction in the HK // // // Prerequisite : The flashers are SWITCHED ON ALREADY // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 1.0 // History : 1.0 / 08-Jun-2006 initial version by PR // : 1.2 13-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Flash_SFT { /* No need for variables to call PacsEng_Spec_Flash_SFT */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Flash_SFT */ }{ // 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(PACS_Spec_Flash_SFT())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Flash_SFT(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsEng_Phot_spu_reset.txt,v 1.5 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : TM // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // // History : 0.1 22-mar-2006 // 0.2 09-oct-2006, TM // 1.0 04-mar-2008 translated into PV script // obs PacsEng_Phot_spu_reset_l { /* Needed variables to call PacsEng_Phot_spu_reset_l */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_spu_reset_l */ }{ // 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(PHOT_spu_reset())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_spu_reset(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // // Purpose : Start Autonomy Function 14 // // // Author : Helmut Feuchtgruber // // Arguments : None // // Description : Use service 14 and a memory load to disable all HK packets // // Dependencies : none // // Comments : // // Version : 1.0 27-Mar-2007 HF // History : 1.0 27-Mar-2007 initial Version // procedure Disable_HK { }{ // DPU_DISABLE_PACKT_TRAN {int,int,int}[] grp1 = [{3,25,1},{3,25,2},{3,25,3},{3,25,4}]; Pacs_DPU_DISABLE_PACKT_TRAN(4,grp1); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // // Purpose : SFT in Open Loop Mode (cold conditions) // // Author : Markus Nielbock // CUS author : MN // // Description : SFT cold for FM1 chopper in open-loop mode. All 3 coils are // operative. The chopper is commanded between -20 mA and +20mA // in steps of 4 mA. // The first part consists of chopper deflections equivalent to // commanded chopper coil currents between 0 and +/-20 mA, // alternating between positive and negative values. Absolute // position commanding is used. // The second part consists of a ramp of chopper deflections // between -20 and +20 mA, commanded in relative steps of 4 mA. // Finally, the chopper returns to its zero position. // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched off and disabled // Diagnostic HK not running // // Comments : Adapted from PACS_SPEC_Chopper_OpenLoop_MoveAbs_OBS.cus // // Version : 2.0 // // History : 1.0 09-03-07 creation by MN // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // // 2.0 12-03-07 creation by MN // Begin Mode description obs PacsEng_Chopper_SFT_Cold_OpenLoop { }{ // 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(PACS_Chopper_SFT_Cold_OpenLoop())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Chopper_SFT_Cold_OpenLoop(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS file : SPEC_CRE_setup.cus // IMPORTANT NOTE: functionally similar to SPEC_cre_setup; see history // to see new features // Missionphase : FM ILT // // Purpose : Set CRE bias, ramps' length and capacitor values; // Switch on blue heater // // Author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // // Arguments : // Type Name DefVal Description // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' lengthl // double bias_d_red 0 BIAS_D for red spectrometer (1V=4095) // double bias_r_red 0 BIAS_R for red spectrometer (1V=4095) // double bias_d_blu 0 BIAS_D for blue spectrometer (1V=4095) // double bias_r_blu 0 BIAS_R for blue spectrometer (1V=4095) // int capa_red 0 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 0 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // double blue_heat_current 1.5 Heater current [mA] // // // CRE setup according to the DEC/MEC User's Manual // // 1. DMC_SWON_B_DEC to switch on the DEC // 2. Wait 5 seconds to get the 1355 connection between DEC and CPU board // 3. Send the complete set of default parameters. // First send a DMC_WRT_B_SPEC_PAR command with these values // (in hex: 20-8-18C-0-0-EA60-0-0). // 3a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // 4. DMC_SWON_B_SPEC to switch on the detector array // 5. Wait 15 seconds to let the switch on procedure run and all voltages // become stables // 6. Then, to activate the CREs (signal SELECT on the CREs), send the first // 3 parameters, i.e. DMC_WRT_B_SPEC_PAR command with these // values (length: 3, values in hex : 20- 8-18E). // 6a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // Note: with this command, we set bit1 to 1 (activate CRE). Bit0 // has been set to 1 by the DMC_SWON_B_SPEC command but, // bit0 is not commandable through the DMC_WRT_B_SPEC_PAR. // The only way to switch on/off the detector array is to use the // trigger commands. // 7. Then, you should set the bias voltages by writing the first 4 or 5 // parameters of the block. Make sure to copy the latest values you use // for the first 3 parameters. // // Description : Sets CRE parameters (see list of arguments). // User specifies cre_ctrl_xx as: // cre_ctrl: 256 to set "sync width=2" // 128 to set "T sensor on" // 2 to set "select" // 1 power on (not relevant here) // Script adds capa_xx to cre_ctrl_xx // xx_cre_ctrl = capa_xx + cre_ctrl_xx // xx_cre_ctrl gets written to the CRE register // Switch on blue detector heater // Must be called on a stopped SPU. This procedure will // neither stop nor start SPU (call SPEC_spu_reset and // SPEC_spu_setup respectively for that) // // // Dependencies : // // Comments : Based on V1.3 of FGB's fgb_spec_cre_setup.tcl. Major // change is getting ENG values for the bias voltages // // Version : 0.1 7-Oct-2004 Creation by DAC // History : 0.2 12-Oct-2004 Removed "delay" statements // 0.3 18-Oct-2004 Normalized variable names // 0.4 21-Oct-2004 Added cre_ctrl_xx and heater_on // arguments to allow calling by // SPEC_orbit_prologue. // Removed heater commands // 0.5 27-Oct-2004 Put bck delay statement // 1.0 10-Apr-2006 HF, modified for FM // 1.1 16-nov-2006 Reviewed for use in OpDataBase // - removed "duree" computations // - moved "fix" arguments to body // - added heater, write receiver, and synch // commands // procedure SPEC_CRE_setup { int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) double blue_heat_current = 1.5 in [0.0,10.01]; // Current [mAmp] }{ // Red CRE register (capa_red=0) int cre_ctrl_red = 386; // Blue CRE register (capa_blu=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) // Write the blue spectrometer parameters int blu_cre_ctrl = capa_blu + cre_ctrl_blu; // Bias values have been given in ENG units. Have to convert to RAW in // order to compute check-sums int i_blu_bias_r = convert_to_raw("pacs_DMC_BIAS_R",bias_r_blu); int i_blu_bias_d = convert_to_raw("pacs_DMC_BIAS_D",bias_d_blu); int clks_rdout = 32; int simul_reg = 60000; int[] aux = [clks_rdout,ramp_len_blu,blu_cre_ctrl,i_blu_bias_r,i_blu_bias_d,simul_reg]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_B_SPEC_PAR(clks_rdout,ramp_len_blu,blu_cre_ctrl,bias_r_blu,bias_d_blu,simul_reg,check_sum); // Same for RED parameters int red_cre_ctrl = capa_red + cre_ctrl_red; int i_bias_r_red = convert_to_raw("pacs_DMC_BIAS_R",bias_r_red); int i_bias_d_red = convert_to_raw("pacs_DMC_BIAS_D",bias_d_red); aux = [clks_rdout,ramp_len_red,red_cre_ctrl,i_bias_r_red,i_bias_d_red,simul_reg]; check_sum = checksum("int",aux); Pacs_DMC_WRT_R_SPEC_PAR(clks_rdout,ramp_len_red,red_cre_ctrl,bias_r_red,bias_d_red,simul_reg,check_sum); // Send complete parameters table to both DECS Pacs_DMC_SET_PAR_BOTH_SPEC(); // Switchon and set blue detector heater Pacs_DMC_SWON_BD_HEATER(); delay(1); Pacs_DMC_SET_B_SPEC_HEAT_C(blue_heat_current); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); delay(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS {int}[] argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); delay(1); } // CVS comments : $Id: OBCP_chopped_photometry.txt,v 1.6 2007/08/22 10:18:28 dcesarsk Exp $ // Missionphase : PACS AVM ILT Orbit-Operations // // Purpose : OnBoardControlProcedure to perform // chopped photometry // Chopped observations of SRC in the manner: // SRC->REF1->SRC->REF2 // followed by a calibration sequence using the internal // blackbodies // CS1 -> CS2 // User can specify the number of source observing cycles // (nb_SRC_REF), the number of calibration cycles (nb_CS1_CS2) // and how many times the whole sequence shall be repeated // (nb_cycles_obs_cal). // The number of readouts per quiescent chopper position is // the same (nb_rdouts_plateau) within each cycle // // OBCP author : Helmut Feuchtgruber // CUS script : Diego A. Cesarsky // CVS file : OBCP_chopped_photometry.txt from AOT code // // Arguments: // Type Name Description // int nb_SRC_REF p01 Number of observations in OBS loop // int chop_pos_SRC p02 Chopper position for SRC // int nb_rdouts_plateau p03 Number of readouts per chopper position // int chop_pos_REF1 p04 Chopper position for BKG1 // int chop_pos_REF2 p05 Chopper position for BKG2 (may be equal to BKG1) // int nb_cycles_obs_cal p06 Number of obs/cal cycles // int nb_CS1_CS2 p07 Number of observations in CAL loop // int chop_pos_CS1 p08 Chopper position for CS1 // int chop_pos_CS2 p09 Ditto for CS2 // int comp_mode_blu Compression mode BLUE // int comp_mode_red Ditto RED // int chop_def Chopper default position // // // Description : This script mimics the OBCP_CHOPPED_PHOTOMETRY // pseudo script, section 3.1.1 in PACS-ME-LI-005 // This CUS version computes the duration of the // observation, as specified by the input parameters. // It will also send the trigger TC to start the OBCP // // Dependencies : DMC_phot_2_3_chop // WriteBBID // Comments : // // Version : 1.2 21-Jan-2004 Creation by DAC // History : 0.2 23-Jan-2004 Set value for seq_time, removed seq // and seq_time as arguments // : 0.3 08-Aug-2004 Changed variable name as "duration" // is now a reserved name // : 0.4 08-Aug-2004 Rename to block OBCP_etc PACS 4 // 0.5 20-Aug-2004 Use redefined DMC script // 0.6 25-Aug-2004 The BBID is generated and TCed here // 0.7 17-Sep-2004 Use renamed DEC_phot_2_3_chop // 0.8 27-Sep-2004 Use "double" for BOL frequency and associated data // 0.9 7-Oct-2004 Use renamed WriteBBID // 0.91 18-Oct 2004 Normalized variable names // 0.92 9-Nov-2004 DMC now returns [] of times // [duration_rdouts, // duree_SRC, // duree_REF, // duree_CAL, // duree_OVR] // (expressed in nb_of_readouts) // 0.93 10-Dec-2004 True duration must include the fact that // TCs are sent 2 per second, i.e. each TC // takes 1/2 second. Use "time" function to // get actual duration. // obcp_ID is now a string // 1.0 30-Nov-2005 Use computed duration; remove debug_print // 1.1 21-aug-2007 SRC-3507 Indicate end of BB // 1.2 18-feb-2008 DAC Added sync at ebd // int[] block OBCP_chopped_photometry PACS 4 { int nb_SRC_REF = 1; // p01 Number of observations in OBS loop int chop_pos_SRC = 0; // p02 Chopper position for SRCE int nb_rdouts_plateau = 8; // p03 Number of readouts per chopper position int chop_pos_REF1 = -2000; // p04 Chopper position for BKG1 int chop_pos_REF2 = 2000; // p05 Chopper position for BB2 int nb_cycles_obs_cal = 1; // p06 Number of obs/cal cycles int nb_CS1_CS2 = 0; // p07 Number of observations in CAL loop int chop_pos_CS1 = -22680; // p08 Chopper position for CS1 int chop_pos_CS2 = 22680; // p09 Chopper position for CS2 int comp_mode_blu = 0; // Compression mode BLUE channel int comp_mode_red = 0; // Compression mode RED channel int chop_def = 0; // Chopper default position }{ // Starting time int time_start = time(); // Register start of BB WriteBBID($BBID); // Variables that may be used to define various times int duree_SRC = 0; int duree_REF = 0; int duree_CAL = 0; int duree_OVR = 0; // Obtain system parameter from PACSparams // BOL readout frequency [Hz] and readout period [msec] double bol_freq = dlookup("PACSparams","bolo_sample","freq_time"); // string bol_unit = slookup("PACSparams","bolo_sample","unit"); double bol_period = 1000.0 / bol_freq; // debug_print("Bolo sample: " + bol_freq + " " + bol_unit); // debug_print("Bolo period: " + bol_period + "[msec]"); // Obtain duration of an "internal" command [msec] int t_cmd = iceil(dlookup("PACSparams","int_cmd","freq_time")); // Obtain duration of DEC/MEC "communication jitter" [msec] int dmc_margin = iceil(dlookup("PACSparams","dmc_margin","freq_time")); // Obtain duration of OBCP "communication jitter" [msec] int obcp_margin = iceil(dlookup("PACSparams","obcp_margin","freq_time")); // Start tallying the duration of this script [msec] int duration_msec = 0; // OBCP Pseudo Code starts here (accumulate duration_msec [msec] as it goes) // Begin // DEC_WRITE_TIME (DPU_TIME in standard 48 bit format according to PS-ICD) // Here and elsewhere it is assumed that OBCP "internal" TCs take t_cmd // [msec] to be executed duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // SET_TIME duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRITE_SEQ_BUF(ID, LENGTH, DATA, CHECKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Invoke CUS version of DECMEC sequence above (DMC_PHOT_2_3_CHOP) // (only to compute duration!! Hence use only duration related parameters // in the call) // The DMC is number seq_DMC=1 and lasts seq_time [msec] // Duration "duree1" is an array with five elements int[] duree1 = DMC_phot_2_3_chop(nb_SRC_REF,nb_rdouts_plateau,nb_cycles_obs_cal,nb_CS1_CS2); // Convert duration [readouts] into [msec]; add dmc_margin int seq_time = ifloor(double(duree1[0]) * bol_period) + dmc_margin; // Convert other times as well into msec duree_SRC = ifloor(double(duree1[1]) * bol_period); duree_REF = ifloor(double(duree1[2]) * bol_period); duree_CAL = ifloor(double(duree1[3]) * bol_period); duree_OVR = duree_OVR + ifloor(double(duree1[4]) * bol_period) + dmc_margin; // Tally into accumulated duration of OBCP duration_msec = duration_msec + seq_time; // SYNCHRONIZE_ON_DETECTOR(3) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // DEC_WRITE_TRM_CMP(ID, 1, cmp_par, CHHKSUM) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // START_SEQUENCE duration_msec(seq_time) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // WAIT(seq_time) // Check execution status of the sequence and in case of failure stop OBCP // and issue TM(1,8) + event // MOVE_CHOPPER_ABSOLUTE(chop_def) duration_msec = duration_msec + t_cmd; duree_OVR = duree_OVR + t_cmd; // Issue TM(1,7) // Now trigger execution of OBCP // This OBCP is number 4, requires 14 parameters and lasts seq_time [msec] string obcp_ID = "CHOPPED_PHOT"; int obcp_par_nber = 14; int seq_DMC = 1; {int,int}[] grp = [{1,seq_DMC},{2,seq_time},{3,nb_SRC_REF},{4,chop_pos_SRC},{5,nb_rdouts_plateau},{6,chop_pos_REF1},{7,chop_pos_REF2},{8,nb_cycles_obs_cal},{9,nb_CS1_CS2},{10,chop_pos_CS1},{11,chop_pos_CS2},{12,comp_mode_blu},{13,comp_mode_red},{14,chop_def}]; Pacs_DPU_START_OBCP(obcp_ID,obcp_par_nber,grp); // Add the "communication jitter" duration_msec = duration_msec + obcp_margin; duree_OVR = duree_OVR + obcp_margin; // Return total duration [sec] to calling program // Create return time array; convert into [sec] int[] time_array = [duration_msec,duree_SRC,duree_REF,duree_CAL,duree_OVR]; for(int aux = 0 .. 4) { time_array[aux] = Msec2sec(time_array[aux]); } // Set delay() delay(time_array[0]); // Mark end of BB WriteEndBB(); // Sync the bus sync(); // Return OBCP time estimates return time_array; } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Heaters Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends 2 current to both heaters // // // Prerequisite : // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 2.0 // History : 1.0 05-Apr-2007 initial version by PR // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // // ----------------------------------- // @author P. Royer // @date today // @version 1.0 // @purpose Heaters Functional Test // @comment - // obs PacsEng_Spec_Heat_FFT { /* Needed variables to call PacsEng_Spec_Heat_FFT */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Heat_FFT */ }{ // 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(Pacs_Spec_Heat_FFT())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Heat_FFT(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsEng_Spec_CRE_setup.txt,v 1.6 2008/05/28 09:27:05 vanessad Exp $ // Missionphase : PACS PV Phase // // CVS file : SPEC_CRE_setup_OBS.cus// // // Missionphase : // // Purpose : TOPE schedule SPEC_cre_setup // // Author : DAC // // Arguments : // Type Name DefVal Description // int ramp_len_red 64 Red ramps' length // int ramp_len_blu 64 Blue ramps' lengthl // double bias_d_red 0.070 BIAS_D for red spectrometer (1V=4095) // double bias_r_red 0.010 BIAS_R for red spectrometer (1V=4095) // double bias_d_blu 0.210 BIAS_D for blue spectrometer (1V=4095) // double bias_r_blu 0.010 BIAS_R for blue spectrometer (1V=4095) // int capa_red 12 Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // int capa_blu 12 Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // // Version : 1.1 // History : 0.1 17-nov-2006 DAC // 0.2 18-dec-2006 Exchange red/blue detectors // 0.3 19-feb-2007 Exchange red/blue detectors back to nominal // 1.0 04-mar-2008 translated into PV script VDP // 1.1 15-Apr-2008 modified blue_heat_current from 1,5 // to 0.78 mAmp (HF) // obs PacsEng_Spec_CRE_setup_u { /* Needed variables to call PacsEng_Spec_CRE_setup_u */ int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) /* double bias_d_red = 0.21 in [0.0,1.0]; // BIAS_D for red spectro (0-1V)*/ double bias_r_red = 0.01 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) /* double bias_d_blu = 0.07 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V)*/ double bias_r_blu = 0.01 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 12; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 12; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) double blue_heat_current = 0.78 in [0.0,10.01]; // Current [mAmp] /* double blue_heat_current = 0.0 in [0.0,10.01]; // Current [mAmp] */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_CRE_setup_u */ }{ // 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(SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blue_heat_current))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure SPEC_CRE_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu,blue_heat_current); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // - 2-3 position chopping AOT with/without calibration block ~0.50h // (1 filter may be sufficient) // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // TCL author : N/A // TCL file : tN/A // CUS author : TM // Script file : PHOT_chopped_photometry_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 20-apr-2005 DAC // // 0.2 25-apr-2005 DAC Filter back to POS A // 0.3 25-apr-2005 DAC Start/stop SPU // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 1.0 25-mar-2008 VDP translated from IST to PV phase syntax // obs PacsEng_Phot_chopped_photometry { /* Needed variables to call PacsEng_Phot_chopped_photometry */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_chopped_photometry */ }{ // 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(Pacs_Phot_chopped_photometry())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_chopped_photometry(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : CONF_grating_DEGMODE.cus // Missionphase : PACS FM ILT // // Purpose : Prepare grating mechanism for operations in DEGRADED MODE // // Author : P. Royer // // Arguments : // // Description : This script will switch on and set all required parameters // for the grating to be used in OPEN LOOP / DEGRADED MODE // // Comments : // // Version : 1.0 // History : 1.0 / 05-Jul-2006 created from the nominal mode script // 1.1 / 03-Nov-2006 removed movement to 'center' // (position 8192 !=center) // procedure CONF_grating_DEGMODE { }{ // Use HF's approach, where everything is hardcoded // Default parameters : // Rate = 32 (grating speed ~ 1 deg / sec) // Maximum Output Current = 8192 (138.75 mA) // {int}[] parlist = [{32},{8192}]; int[] aux = [32,8192]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_GRAT_DEGMOD_PAR(parlist,check_sum); delay(1); // // SWITCH ON GRATING CONTROLLER // Pacs_DMC_SWON_GRAT_CONT(); delay(1); // // ENTER DEGRADED MODE // Pacs_DMC_ENTER_GRAT_CONT_DEG(0); delay(1); //------------------------- // End of Procedure //------------------------- } //$Id$ // // Purpose : Perform Check for saturation according to TM's input: //- Bolometers: Check for saturation for low-high gain settings at // PACS calibration sources and background level for // both filters // -----> Assume PHOT_setup_OBS has been run before. // (check list should be correct...) // Check before executing: // o is the gain still "high"? // o is the filter position still at "1"? // o is the sequence mode "Sbolo-Sref"? // o is the data mode "Bolo & HK"? // o are the photometry science packets still generated? // // Description: // o move the chopper to various positions, with 2 sec per plateau: // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch to gain "low" (PACS_Phot_Gain_low.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch filter to position "0" (tm_phot_fil_switch.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch to gain "high" (PACS_Phot_Gain_high.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // o switch filter back to position "1" (tm_phot_fil_switch.tcl) // o repeat chopper sequence // CUS script Chop_scan_both_ways <-25000,5000,10,2> --> 48 sec // Scripts: // o PACS_Phot_Gain_low.tcl // o PACS_Phot_Gain_high.tcl // o tm_phot_fil_switch.tcl // o CUS script "Chop_scan_both_ways" // // Expected Results: // o check signal patterns in QLA // o in case of saturation: note the gain-filter-chopper // combinations and avoid these settings later on // // CUS author : DAC // Script file : PHOT_saturation_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 1.0 // History : 0.1 22-apr-2005 DAC // 0.2 25-apr-2005 DAC // 0.3 26-apr-2005 DAC Start/stop SPU // 0.4 20-oct-2005 DAC Added SPEC_Chop_move_abs_raw // 0.5 10-apr-2007 TM updated // 1.0 25-mar-2008 VDP Adjusted to match PV phase syntax // procedure Pacs_Phot_saturation { }{ // // preparation of the bolometers and start of SPU (included in "PhotSetDirectMode") // PHOT_set_gain("LOW"); PhotSetDirectMode(); // PHOT_fltw_move("POS B"); // // o move the chopper to various positions, with 2 sec per plateau: // int nb_up_down = 1; // P#1 number of up-down seqs. int nb_rdouts = 80; // P#2 number of readouts on step int nb_steps_up = 20; // P#3 number of steps up int nb_steps_dn = 20; // P#4 number of steps down int step_up = 2300; // P#5 relative move up int step_dn = -2300; // P#6 relative move down int detector = 4; // Detector to SYNCH on int comp_mode_blu = 0; // "Blue" compression int comp_mode_red = 0; // "Red" compression int chop_start = -23000; // Chopper start position int chop_def = 0; // Chopper default position debug_print("Start OBCP_chop_scan_phot"); OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); delay(2); // PHOT_fltw_move("POS A"); // // o repeat chopper sequence // debug_print("Start OBCP_chop_scan_phot"); OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); delay(2); // // PHOT_fltw_move("POS B"); // // o repeat chopper sequence // debug_print("Start OBCP_chop_scan_phot"); OBCP_chop_scan_phot(nb_up_down,nb_rdouts,nb_steps_up,nb_steps_dn,step_up,step_dn,detector,comp_mode_blu,comp_mode_red,chop_start,chop_def); delay(2); // // Stop SPU // PACS_spu_reset(); // Sync to return real execution time (maybe fractional) sync(); } // File : PACS_GeGa_SFT_Init_Cold.cus // Missionphase : PACS EQM Test // // Purpose : Cold SFT of Ge:Ga detector chain // // Author : H. Feuchtgruber // // Arguments : none // // // Description : This script will switch on and set all required parameters // for a test of the Ge:Ga detector chain at cold conditions // // // Comments : // // Version : 1.0 // History : 1.0 / 16-Nov-2004 initial version // 1.1 7-mar-2006 TeleCommand Pacs_DMC_SET_B_SPEC_HEAT_1_C renamed // TeleCommand Pacs_DMC_SET_B_SPEC_HEAT_2_C renamed // 1.2 24-mar-2006 Large overhaul based on // SetupSpectroscopyWEplusFPUsim.tcl script // 1.3 30-oct-2005 Delay after detector setup 5->8 sec // 1.4 24-nov-2006 modified bias according to LB input // procedure PACS_GeGa_SFT_Init_Cold { }{ debug_print("Start PACS_GeGa_SFT_Init_Cold"); //DPU_SET_HK_LIST (SPEC for both channels) Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); delay(1); // DMC_WRT_BOL_REC_OPT(ID,LENGTH,4,CHKSUM) int[] argum = [4]; {int}[] argTuple = [{4}]; int chksum = checksum("int",argum); Pacs_DMC_WRT_BOL_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_B_DEC_REC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_R_DEC_OPT(ID,LENGTH,4,CHKSUM) argum = [4]; argTuple = [{4}]; chksum = checksum("int",argum); Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,chksum); delay(1); // DMC_WRT_TIMING_FPGA_PAR(ID,LENGTH,16384,40,2,32,0,P//9,CHKSUM) {int}[] list_tuple = [{0x0},{0x0},{0x0},{26},{0x95217cb},{0xb}]; int[] list_int = [0x0,0x0,0x0,26,0x95217cb,0xb]; chksum = checksum("int",list_int); Pacs_DMC_WRT_TIMING_FPGA_PAR(list_tuple,chksum); delay(1); // DMC_SET_TIMING_FPGA_PAR Pacs_DMC_SET_TIMING_FPGA_PAR(); message("Default spectroscopy timing parameters set!"); // ======== Initial detector setup ==================== // DMC_SWON_B_DEC SWITCH ON THE BLUE DEC POWER Pacs_DMC_SWON_B_DEC(); delay(8); // DMC_SWON_R_DEC" SWITCH ON RED DEC POWER Pacs_DMC_SWON_R_DEC(); delay(8); // Wait after DEC switch-on delay(5); debug_print("DECs are on !"); // Now define the startup Ge:Ga detector setup int read_per_ramp_b = 8; int cre_ctrl_b = 396; int bias_r_b = 0; int bias_d_b = 0; int read_per_ramp_r = 8; int cre_ctrl_r = 396; int bias_r_r = 0; int bias_d_r = 0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SWON_B_SPEC" SWITCH ON BLUE SPECTROMETER ARRAY POWER Pacs_DMC_SWON_B_SPEC(); delay(1); // PC091420 "DMC_SWON_R_SPEC" SWITCH ON RED SPECTROMETER ARRAY POWER Pacs_DMC_SWON_R_SPEC(); delay(1); debug_print("SPECs are on !"); // Wait for CRE HW sequence to finish delay(15); // now select the CREs cre_ctrl_b = 398; cre_ctrl_r = 398; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // Now define the actual Ge:Ga detector setup read_per_ramp_b = 64; cre_ctrl_b = 398; bias_r_b = 41; bias_d_b = 4; read_per_ramp_r = 64; cre_ctrl_r = 398; bias_r_r = 41; bias_d_r = 4; double heater_blue = 0.0; // DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,read_per_ramp_b,cre_ctrl_b,bias_r_b,bias_d_b,60000,chksum); delay(1); // DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS list_int = [32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000]; chksum = checksum("int",list_int); // Use the RAW version of the TC not to bother with ENG conversions Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,read_per_ramp_r,cre_ctrl_r,bias_r_r,bias_d_r,60000,chksum); delay(1); // DMC-SET-PARAM-BOTH-SPEC SET TIMING PARAMTERS FOR BOTH SPEC ARRAYs Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // DMC_SWON_BD_HEATER Pacs_DMC_SWON_BD_HEATER(); delay(1); // DMC_SET_B_SPEC_HEAT_C Pacs_DMC_SET_B_SPEC_HEAT_C(heater_blue); delay(1); debug_print("Detectors are up and running at default settings!"); // DMC_SYNCHRONIZE_ON_DET(1) Pacs_DMC_SYNCHRONIZE_ON_DET(1); delay(1); // DMC_WRT_B_DEC_REC_OPT" WRITE THE BLUE DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_B_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_WRT_R_DEC_REC_OPT" WRITE THE RED DEC RECEIVER OPTIONS argTuple = [{0}]; Pacs_DMC_WRT_R_DEC_REC_OPT(argTuple,0x84c0); delay(1); // DMC_VAL_SCI_DATA_BOTH" VALIDATE SCIENCE DATA FROM BOTH CHANNELS Pacs_DMC_VAL_SCI_DATA_BOTH(); delay(1); // # ==== End of detector setup ============== } // Missionphase : EQM IMT // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. // // Dependencies : // // Preconditions : PACS switched-on and chopper enabled. // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : 1.0 13-04-05 creation by HD // //1.1 19-sep-2006 DAC Add duration !=0 // 2.0 07-02-2008 VDP added WriteEndBB for PV phase // block Chop_mov_abs PACS 321 { int chop_abs_pos = 0; // chopper absolute position }{ // Register start of BB WriteBBID($BBID); //// delay(1); Pacs_DMC_MOVE_CHOP_ABS(chop_abs_pos); // Reset Block ID WriteEndBB(); } // Missionphase : FM // // Purpose : Stop diagnostic housekeeping // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for stopping the diagnostic housekeeping // is called. // // Dependencies : // // Preconditions : PACS switched-on, and diagnostic housekeeping is started. // // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 1.0 // // History : 1.0 21-07-06 creation by HD // block PACS_stop_dhk_bb PACS 354 { }{ // Register start of BB WriteBBID($BBID); // Stop diagnostic HK Pacs_DMC_STOP_DIAG_HK(); // Mark End of Block WriteEndBB(); } // $Id: SpireParallelCoolerRecycle.txt,v 1.1 2008/02/06 14:59:25 dcesarsk Exp $ // // Missionphase : FM RMS // // Purpose : Pacs/Spire cooler recycling as an OBS // // Author : Diego A. Cesarsky, Ken King // // Arguments : None // // Description : Merge of Spire's and PACS cooler recycling scripts // // Dependencies : // // Comments : Spire should be in the REDY mode before execution of this // observation // Version : 0.1 // History : 0.1 22-oct-2007 DAC // : 0.2 6-feb-2008 DAC Start PACS recycling 30 min after SPIRE // Renamed SpireParallelCoolerRecycle.txt procedure SpireParallelCoolerRecycle { }{ // Start observation SpireBbStartObs(); int t0 = time(); // // execute 1st part of Spire's recycle mois_comment("Procedure to recycle SPIRE/PACS Sorption Coolers"); int howLongSpire = SpirePacsBbCoolerRecycle(); mois_comment("SPIRE Cooler Recycle Procedure Started"); // Wait 30 minutes before starting PACS delay(1800); // Now start PACS cooler procedure mois_comment("PACS Cooler Recycle Procedure Started"); //DAC 27/06/08 PACS_BOLO_cool_recycle(); BOLO_cool_recycle(0,0); // End Spire's procedure // Set MODE to REDY mois_comment("Set the SPIRE mode to REDY"); SpireSetObsMode("REDY"); // completion string tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Cooler Recycle ended"); SpireMsg(1," ..Cooler Recycle (" + (time() - t0) + " seconds)"); // end observation SpireBbEndObs(); } // File : PACS_Spec_Curing_OBS.cus // // Purpose : Flasher curing : short flashes with dead times -> Temp & signal evolutions // Third part of the Flashers Performance check (curing schemes) // // Author : P. Royer // // Arguments : // // Prerequisite : Flashers on // // Description : Check scheme of flasher curing : short flashes with dead times // : // Comments : // // // Version : 2.1 // History : 1.0 / 09-Jun-2006 initial version by PR // 1.1 / 06-Apr-2007 Updated chop_pos_BB -> FMILT BB2 // 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 / 01-Jul-2008 introduced CRE Setup & corresponding CALU // // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Flasher curing : short flashes with dead times -> Temp & signal evolutions // @comment - // procedure Pacs_Spec_Curing { int blue_flasher_current = 205; //1mA int red_flasher_current = 205; //1mA int nflash = 3; int flash_time = 20; int idle_time = 30; }{ // // Internal parameters // ------------------- int chop_pos_BB2 = 21200; // // Setup CREs --> Largest Capacitance // string calUname = "CONFCRECuring"; // Calibration Table string calUrow = "PV"; // Row in table = Instrument Configuration double bias_d_blue = dlookup(calUname,calUrow,"bias_d_blue"); double bias_d_red = dlookup(calUname,calUrow,"bias_d_red"); double bias_res_blue = dlookup(calUname,calUrow,"bias_res_blue"); double bias_res_red = dlookup(calUname,calUrow,"bias_res_red"); int ramp_blue = ilookup(calUname,calUrow,"ramp_blue"); int ramp_red = ilookup(calUname,calUrow,"ramp_red"); int capacity_blue = ilookup(calUname,calUrow,"capacity_blue"); int capacity_red = ilookup(calUname,calUrow,"capacity_red"); // SPEC_CRE_No_Heater_setup(ramp_red,ramp_blue,bias_d_red,bias_res_red,bias_d_blue,bias_res_blue,capacity_blue,capacity_red); // // SPU SETUP // int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(5); // // SEND CHOPPER TO BB2 PACS_Chop_Move_Abs(chop_pos_BB2); delay(1); // // SWON FLASHERS // PACS_Spec_Flash_SWON(); delay(10); // // Loop on low power regimes // ------------------------- for(int loopin = 1 .. nflash) { PACS_Spec_Flash_Setup(blue_flasher_current,red_flasher_current); delay(flash_time); PACS_Spec_Flash_Setup(0,0); delay(idle_time); } // // SWOF FLASHERS // PACS_Spec_Flash_SWOF(); delay(10); // // Detector stabilisation / cooldown / recovery // -------------------------------------------- delay(1200); // // SEND CHOPPER TO DEFAULT PACS_Chop_Move_Abs(0); delay(1); // // // SPU RESET // PACS_Spec_SPU_Reset(); delay(1); // } // $Id:$ // Purpose : Set the temperatures of CS1 and CS2 // // CUS author : K. Okumura // // Input arguments: // temp_CS1 : Temperature of CS1 // temp_CS2 : Temperature of CS1 // tStabili : Stanilisation time after the temperatures are set // // Return values // N/A // // Comments : // // History: // 0.1 18-jul-2008 First version // obs PacsEng_setCSsTemp { double temp_CS1 = 48.0; // CS1 temperature in kelvins double temp_CS2 = 58.0; // CS1 temperature in kelvins int tStabili = 1800; // CSs stabilisation time in seconds }{ bool execute = true; // Initial hold int tih = imax(1,duration(WriteOBSID($OBSID))); // Final hold int tfh = imax(1,duration(WriteEndID())) + tStabili; // Duration of "stable" pointing int tp = duration(CS_temp("CS1",temp_CS1)); tp = tp + duration(CS_temp("CS2",temp_CS2)); tp = imax(1,tp); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 2) { // Obtain and set OBSID WriteOBSID($OBSID); data_rate(120.0); } if(state[0] == 3) { // Call the PHOT setup script CS_temp("CS1",temp_CS1); CS_temp("CS2",temp_CS2); } if(state[0] == 5) { // Wait for CS to stabilize delay(tStabili); // Reset OBSID and BBID data_rate(0.0); WriteEndID(); } } } // Script : PACS_Chopper_uk_move_21000_NoConf_ast.cus // Missionphase : SVT / Flight // // Purpose : Move chopper to absolute position // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for move chopper to absolute position // is called. Go to chopper position +-21000 with plateau time // of 2 sec and chop cycles of 10. // // Dependencies : // // Preconditions : PACS switched on and Chopper switched on. // // Comments : This script is based on PACS_Chopper_uk_move_21000_ast_OBS, // but without configuration and with mois comments // // Version : 1.0 // // History : 1.0 17-10-2007 BV First version // procedure PACS_Chopper_uk_move_21000_NoConf_ast { }{ mois_comment("Perform rectangular chopping with step 21000"); // int chop_pos = 21000; // chopper position int cycle = 10; // give cycle # int plateau_time = 2; // select plateau time in sec // Start Diag. HK mois_step("Start Diagnostic housekeeping"); SPEC_Chopper_dhk_5hk_1khz_bb(); mois_step("Enable chopper controller"); // Enable Chopper Controller EnDis_chopper("ON"); delay(5); mois_step("Perform rectangular chopping"); // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); // do observations int i = 1; while(i <= cycle) { PACS_Chopper_mov_abs_fm_bb(chop_pos); delay(plateau_time); PACS_Chopper_mov_abs_fm_bb(-chop_pos); delay(plateau_time); i = i + 1; } // move chopper to zero PACS_Chopper_mov_abs_fm_bb(0); delay(1); mois_step("Disable chopper"); // Disable Chopper Controller EnDis_chopper("OFF"); delay(5); mois_step("Disable diagnostic housekeeping"); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // Purpose : Set PACS in burst mode // Author : T.Mueller, H. Feuchtgruber // CUSification : DAC // Version : 1.0 // History : 1.0 / 16-Nov-2004 initial version // procedure PACS_Burstmode_Setup { }{ // PC009380 "DPU_SET_BUS_LIST" SWITCH THE DPU FROM NOMINAL TO BURST MODE // AND VICEVERSA // PP006380 "ENABLE_DISABLE" // tcsend PC009380 {PP006380 1} // Switch CDMU to Burst profile Pacs_DPU_SET_BUS_LIST("ENABLE"); delay(1); } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : Pierre Royer // // Description : Set/resets OBSID, calls associated procedure // The procedure // DISABLES THE GRATING CONTROLLER // WRITES THE GRATING CONTROLLER PARAMETERS // ENABLES THE GRATING CONTROLLER // // Dependencies : see associated procedure // // Preconditions : GRATING CONTROLLER SWON // // Comments : // // Version : 2.0 // // History : 1.0 29-Jul-2007 Creation // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Set_Ctrl_Par { /* Needed variables to call PacsEng_Spec_Gra_IST_Set_Ctrl_Par */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Set_Ctrl_Par */ }{ // 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(PACS_Spec_Gra_IST_Set_Ctrl_Par())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Set_Ctrl_Par(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : // Purpose : Stop SPECtroscopy observations at end of AOT // // TCL author : // TCL file : // CUS author : Diego Cesarsky // Script file : SPEC_aot_epilogue.txt // // Input arguments // Type Name Default Description // // Description : Not much for now (just STOP SPU) // Move grating from wwwhere OBCPs left it to the park // position // // Dependencies : PACS TCs // // Preconditions : // // Comments : Based on V1.3 of TM's tm_spu_setup.tcl. Both // SPUS and SPUL are initialized to same set of parameters // // Version : 1,0 // History : 0.1 13-apr-2006 First creation // 0.2 15-feb-2007 Leave grating at park position // 1.0 23-sep-2008 SCR 4431 data_rate procedure SPEC_aot_epilogue { int gratFrom = 500000; // Where OBCPs have left the grating int gratTo = 535000; // Grating park position bool verbose = false; }{ // Park the grating SPEC_grat_move(gratFrom,gratTo,verbose); // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); data_rate(0.0); // Sync the bus (function duration will get the "true" duration) sync(); // end of procedure } // $Id$ // Missionphase : PACS PV Phase // // Purpose : Flashers Short Functional Test // // Author : P. Royer // // Arguments : // // Description : Sends current to both flashers for short times, the goal is only to see some reaction in the HK // // // Prerequisite : The flashers are SWITCHED ON ALREADY // The correct HK & Diaghk lists are already set & acquired // // Comments : // // // Version : 1.0 // : 1.2 13-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Spec_Flash_SFT_Warm { /* No need for variables to call PacsEng_Spec_Flash_SFT_Warm */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Flash_SFT_Warm */ }{ // 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(PACS_Spec_Flash_SFT_Warm())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Flash_SFT_Warm(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // CVS comments : $Id: PacsLineSpecEstimatorOBCP27.txt,v 1.16 2007/04/25 15:14:04 dcesarsk Exp $ // Script file : PacsLineSpecEstimatorOBCP27_PV.txt // Purpose : Estimate several PACS parameters for each spectral // line specified by the HSPOT user // // CUS author : DAC // // Input arguments // type name Description // tuple lines spectral line info from HSPOT // tuple waveTuple grating info associated to "lines" // tuple paramsSPECdef confSPECblu & confSPECred & confOBCP // bool noddingSel nodding demanded? // // Return values // Type Description // tuple Derived values for paramsSPECdef // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 22-may-2008 DAC Based on PacsLineSpecEstimatorOBCP27 // - reads OBCP27params_PV // - ignores userREPfactor (read CAL file) // 0.2 15-jul-2008 DAC No longer ignore repFACTOR // {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsLineSpecEstimatorOBCP27_PV { {string,double,int,double,double,double,string,string} lines = {"NONE",60.2,0,0.0,0.0,0.0,"bla","bla"}; // linesTuple HSPOT {double,int,int,int,int} waveTuple = {0.0,0,0,0,0}; // waveTuple {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; // Default values bool noddingSel = false; // Nodding requested? bool faintLines = true; // Fast OBCP if false bool verbose = false; // print debug information }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confSPECblu = clone(paramsSPECdef{0}); {int,int,int,int,int,int,int,int,int} confSPECred = clone(paramsSPECdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsSPECdef{2}); //////////////// Logic to obtain desired OBS time /////////////////////////// // // ORDER of the current line int order = waveTuple{1}; double waveLEN = waveTuple{0}; // User desired repetition factor for current line int userREPfactor = lines{2}; // Get the "quantum" OBS time for the current order. U-CAL time doubles if // nodding is allowed int nodFactor = 1; if(noddingSel) { nodFactor = 2; int nb_nods = 1; } else { nb_nods = 0; } // Grating info pertaining to the current wavelength is in waveTuple int nb_grat_step_up = waveTuple{3}; int nb_grat_step_dn = waveTuple{3}; int grat_step_up = waveTuple{4}; int grat_step_dn = -grat_step_up; int grat_start_pos = waveTuple{2}; // Get "duration related" parameters from OBCP27params U-CAL table string calNAME = "OBCP27params_PV"; // The acces key is the grating order string key = "" + order; // There is a row per order; it lists main OBCP parameters // int nb_up_down = ilookup(calNAME,key,"nb_up_down"); int nb_up_down = userREPfactor; int nb_SRC_OFF = ilookup(calNAME,key,"nb_SRC_OFF"); int nb_ramps_plateau = ilookup(calNAME,key,"nb_ramps_plateau"); int nb_CS1_CS2 = ilookup(calNAME,key,"nb_CS1_CS2"); // Estimate the OBS time for this rangeInfo; estimation is for ONE nod only. int nb_rdouts_ramp = confSPECred{1}; int[] dureeOBCP27 = PacsDureeOBCP27(nb_up_down,nb_grat_step_up,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_OFF,nb_rdouts_ramp); // Use SRC/REF time alone (used to be total duration) int quantumOBStime = nodFactor * (dureeOBCP27[1] + dureeOBCP27[2]); // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

      Estimated SRC+REF time: " + quantumOBStime + " [sec] for " + waveLEN + " [µm] with line repeated " + userREPfactor + " time(s)

      "; lineCnt = lineCnt + 1; // This is complete fantasy; just to check the code //============== React on LINE/CONT fluxes ======================== // Line and continuum flux from HSPOT double lineFLUX = lines{3}; double contFLUX = lines{4}; // Low flux use large integrating capacitor int capa_red = 0; int capa_blu = 0; /// if (lineFLUX <= 400.0) /// { /// capa_red = 4; /// capa_blu = 8; /// } /// if (lineFLUX <= 100.0) /// { /// capa_red = 12; /// capa_blu = 4; /// } // Pack information into proper tuples confOBCP{0} = nb_up_down; confOBCP{1} = grat_step_up; confOBCP{2} = grat_step_dn; confOBCP{3} = nb_SRC_OFF; confOBCP{4} = nb_ramps_plateau; confOBCP{5} = nb_CS1_CS2; confOBCP{6} = nb_grat_step_up; confOBCP{7} = nb_grat_step_dn; confOBCP{8} = grat_start_pos; // confOBCP { 9} = grat_start_time ; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {15} = chop_pos_CS1 ; // confOBCP {16} = chop_pos_CS2 ; // confOBCP {17} = chop_def ; confOBCP{19} = order; confSPECred{0} = capa_red; // confSPECred{ 1} = nb_rdouts_ramp_red; // confSPECred{ 2} = nb_rdouts_subramp_red; int comp_mode_red = 16; confSPECred{3} = comp_mode_red; // confSPECred{ 4} = glitch_det_red; // confSPECred{ 5} = ramp_fit_alg_red; // confSPECred{ 6 = nb_raw_red; // confSPECred{ 7} = bias_r_red; // confSPECred{ 8} = bias_d_red; confSPECblu{0} = capa_blu; // confSPECblu{ 1} = nb_rdouts_ramp_blu; // confSPECblu{ 2} = nb_rdouts_subramp_blu; int comp_mode_blu = 16; confSPECblu{3} = comp_mode_blu; // confSPECblu{ 4} = glitch_det_blu; // confSPECblu{ 5} = ramp_fit_alg_blu; // confSPECblu{ 6 = nb_raw_blu; // confSPECblu{ 7} = bias_r_blu; // confSPECblu{ 8} = bias_d_blu; // Pass messages to user string msgLabel = "Observing time for " + lines{0}; PacsMessageCenter(msgLabel,lineCnt,msgLine); // Debug info if(verbose) { debug_print("LineEstimatorOBCP27 duration: " + quantumOBStime); } int aux3 = 0; return {confSPECblu,confSPECred,confOBCP,{nb_nods,nb_up_down,quantumOBStime,aux3}}; } // File : PACS_Phot_Fil_nturns.cus // Missionphase : PACS EQM Test // // Purpose : Position sequence test of photometer filterwheel // // Author : BV, modifications by TM // CUSification : DAC // Arguments : // // Description : Moves the Photometer filter wheel times // to position 2 and back to position 1 using absolute position // commands. // // Comments : Prerequisite : spec_mec_setup has been executed // // Version : 1.6 // History : 1.0 / 25-Nov-2003 initial version by BV // 1.1 / 05-Jan-2004 Changed step strategy // 1.2 / 13-Jan-2004 Taken out relative commands // 1.3 / 31-May-2004 Positions cfr DMC UM 2.8 // 1.4 / 07-Jul-2004 changed for phot filter wheel // 1.5 / 11-Aug-2004 addition of time_on_fw_pos // 1.6 / 17-Nov-2004 modified for "non-interactive" EQM test procedure PACS_Phot_Fil_nturns { int num_turns = 3; // Number of full turns int backward_toA = 0; // direction of FW rotation towards POS A : 0 forward; 1 backward int backward_toB = 0; // direction of FW rotation towards POS B : 0 forward; 1 backward }{ // fw_start integer 1 Enter initial filter wheel position (0=A; 1=B) // time_on_fw_pos integer 20 Enter time spent on each FW stop position (sec) int fw_start = 1; int time_on_fw_pos = 20; string[] fltPOS = ["POS A","POS B"]; // Default time for one 'standard' command execution (sec) // set command_time 0.5 // Minimum time between two filter wheel movements (sec) int slew_time = 15; backward_toA = 2 * backward_toA; backward_toB = 2 * backward_toB; int[] backward = [backward_toA,backward_toB]; int movepar = 0; // SWON FW CONTROLLER Pacs_DMC_SWON_FW_PHOTO(); delay(1); // Go to start position Pacs_DMC_MOVE_PHOT_FW_LOC_RAW(fw_start); delay(slew_time); // Move num_turns to position 0 and back to position 1 using absolute // location commands for(int loop0 = 1 .. num_turns) { int i = (fw_start + 1) % 2; movepar = i + backward[i]; Pacs_DMC_MOVE_PHOT_FW_LOC_RAW(movepar); delay(slew_time); delay(time_on_fw_pos); i = (fw_start + 2) % 2; movepar = i + backward[i]; Pacs_DMC_MOVE_PHOT_FW_LOC_RAW(movepar); delay(slew_time); delay(time_on_fw_pos); } //------------------ // End of procedure //------------------ } // Missionphase : EQM IMT // // Purpose : Open Launch Lock // // Author : Helmut Feuchtgruber // CUS script : HF // CVS file : OpenLLock.txt // // Arguments : none // // Description : // // Dependencies : // // Preconditions : PACS is on or in the equivalent of SAFE mode // // Comments : At the end PACS will still be in SPEC HK mode // // Version : 1.0 24-Mar-2004 Creation by HF // // History : 1.1 29-Mar-2005 DAC. Corrected "BOTH Array" in DPU_SET_HK_LIST // 1.2 11-Apr-2006 HF, adapted unlock parameter to DMC SUM V4.0 // 1.3 12-Apr-2006 HF, adapted unlock to degraded modes // : int procedure OpenLLock { int unlock_mode = 40; // use motors: 8=motor 1, 32 =motor 2, 40 = both motors }{ // Tally total duration [milliseconds] int duration_msec = 0; // Set HK list Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); // Switch on grating controller Pacs_DMC_SWON_GRAT_CONT(); // Unlock the grating launch lock, with parameter 0x28 Pacs_DMC_UNLOCK_GRAT(unlock_mode); delay(10); duration_msec = duration_msec + 10000; // Switch off grating controller Pacs_DMC_SWOF_GRAT_CONT(); delay(4); // go back to non prime HK list Pacs_DPU_SET_HK_LIST("NO_PRIME","BOTH Array"); return duration_msec; } // SpirePacsBbParallelConfig // // $Id: SpirePacsBbParallelConfig.txt,v 1.1 2006/10/11 10:23:39 kking Exp $ // // Building Block to configure the instrument for Parallel mode operation // // The complete instrument setup operation is divided into two parts: // Configuration: actions that can be executed during the slew to the start // position of the S/C pointing mode. // Initialisation: actions that must be carried out at the S/C intial pointing // position before any observational operations are executed. // // This building Block implements the first part of the setup // block SpirePacsBbParallelConfig SPIRE 8336 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Parallel Configuration started"); SpireMsg(2," $Id: SpirePacsBbParallelConfig.txt,v 1.1 2006/10/11 10:23:39 kking Exp $"); // // ..... configuration ..... // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // Set Mode to Parallel tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_MODE_RAW(0x0500)"); Spire_SET_OBS_MODE_RAW(0x500); // // Move BSM to HOLD int bsmHoldChopPosn = ilookup("BSM.txt","Hold","ChopPosn"); int bsmHoldJiggPosn = ilookup("BSM.txt","Hold","JiggPosn"); SpireBsmMove(bsmHoldChopPosn,bsmHoldJiggPosn); // // Time synchronisation tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_RESET_DRCU_COUNTERS_RAW()"); Spire_RESET_DRCU_COUNTERS_RAW(); // // Garbage Collection tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_COLLECT_GARBAGE_RAW()"); // Spire_COLLECT_GARBAGE_RAW(); // // ..... completion ..... // delay(2); // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB Parallel Configuration ended"); SpireMsg(1," ..Parallel Configuration (" + (time() - t) + " seconds)"); } // // $Id$ // Missionphase : PACS FM IST SOVT2 & PV Phase // // // Purpose : Schedule the associated CUS procedure // // CUS author : PR // // Input arguments // type name description // // Return values // Type Name Description // // Description : PACS Spectrometer FoV Scan on the cryo cover // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 1.0 // History : 1.0 22-Oct-2008 PR // obs PacsCal_Spec_Dark_SOVT2 { /* Needed variables to call PacsCal_Spec_FoV_Scan */ int obs_time = 540; // Observing time per CS/FW/Grating setting int chop_time = 180; // Chopper plateau [sec] during CS temp rise time (0 = no chopping) /* POINTING PARAMETERS */ int naifid = 0; // 0 = Non Solar System source, >0 if fast tracking is required (Solar System sources) double yoffset = 0.0; // yoffset [arcsec] double zoffset = 0.0; // xoffset [arcsec] double ra = 0.0; // RA double dec = 0.0; // DEC /* End of needed variables for PacsEng_Spec_FoV_Scan */ }{ // 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)); int tslewmin = 0; // 3. Final hold // Declare OBS finished during final hold int tfh = duration(WriteEndID()); // 4. Duration of "stable" pointing int tp = imax(1,duration(PACS_Spec_Dark_SOVT2(obs_time,chop_time))); if(tp < 10) { error("The dwell time cannot be smaller than 10 sec, adjust parameters"); } // //Use SPECTRO virtual aperture string ib = "P02_0"; //Issue PointReq int[] ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); debug_print("ts: " + ts); // }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Dark_SOVT2(obs_time,chop_time); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } //$Id$ // Purpose : Short performance test of Chopper in IMT // // Author : Helmut Dannerbauer // CUS author : HD // // Description : We do rectangular chopping for four frequencies with OBCP27 and its // corresponding DMC-sequence 12. // // Dependencies : // // Preconditions : PACS switched-on and setup spectroscopy // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 2.0 // // History : 1.0 04-04-07 HD. IST tuned. // : 2.0 25-mar-2008 VDP Adjusted to match PV phase syntax // 2.1 08-Apr-08 HF adapted biases to in-flight defaults procedure Pacs_Spec_Chopper_imt504 { }{ // Start chopper diagnostic housekeeping SPEC_Chopper_dhk_imt_bb(); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // Setup CRE and set to rpr32 int ramp_len_red = 32; int ramp_len_blu = 32; double bias_d_red = 0.03; double bias_r_red = 0.01; double bias_d_blu = 0.08; double bias_r_blu = 0.01; int capa_red = 0; int capa_blu = 0; SPEC_CRE_No_Heater_setup(ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // setup the parameters for rectangular chopping with OBCP27 int nb_up_down_27 = 1; int nb_grat_steps_27 = 1; int nb_cycles_grat_def_27 = 10; int chop_pos_REF1_27 = -12386; int nb_ramps_plateau_27 = 4; int chop_pos_REF2_27 = 12047; int nb_CS1_CS2_27 = 10; int chop_pos_CS1_27 = -21350; int chop_pos_CS2_27 = 21200; int grat_step_up_27 = 0; int grat_step_dn_27 = 0; int detector_27 = 1; int grat_pos_27 = 496000; int grat_time_27 = 40000; int comp_mode_blu_27 = 16; int comp_mode_red_27 = 16; int grat_def_27 = 496000; int chop_def_27 = 0; int grat_def_time_27 = 40000; int nb_rdouts_ramp_27 = 32; // Execute OBCP27 with rpr 32 and 3 ramps per chopper:1 Hz SPEC_CRE_No_Heater_setup(32,32,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,3,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,32); // Execute OBCP27 with rpr 32 and 1 ramps per chopper:2 Hz OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,1,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,32); // Execute OBCP27 with rpr 16 and 1 ramps per chopper:4 Hz SPEC_CRE_No_Heater_setup(16,16,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); OBCP_grat_line_scan_chop_2(nb_up_down_27,nb_grat_steps_27,nb_cycles_grat_def_27,chop_pos_REF1_27,1,chop_pos_REF2_27,nb_CS1_CS2_27,chop_pos_CS1_27,chop_pos_CS2_27,grat_step_up_27,grat_step_dn_27,detector_27,grat_pos_27,grat_time_27,comp_mode_blu_27,comp_mode_red_27,grat_def_27,chop_def_27,grat_def_time_27,16); // Move chopper to default position PACS_Chopper_mov_abs_fm_bb(0); // CRE setup to default values SPEC_CRE_No_Heater_setup(64,64,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,12,12); // Stop diagnostic housekeeping PACS_stop_dhk_fm_bb(); } // File : PACS_Phot_Warm_Startinputsignal.txt // Missionphase : PACS FM Test // // Purpose : BOLC starting the input signal (based on PhFPU UM // and email by KO 20060808) // // Author : T. Mueller // CUSification : DAC, TM, KO // Arguments : none // // // Description : // // Comments : Coded based on PhFPU UM and Email from KO, August 8, 2006 // // Version : 2.1 // History : 1.0 / 02-Jul-2004 initial version by TM // 1.1 7-mar-2006 SEND_COMMAND_TO_BOLC renamed // 1.2 13-apr-2006 TM: modifications: now 3 loops over // all groups, followed by 3 loops over each group // individually; test duration: // 1.3 10-Aug-2006 TM: update for FM, including // a group-by-group element, duration 309 sec // 1.4 10-Aug-2006 TM: sequencer taken out again // (to be configured with PACS_Phot_Warm_Loadseq_OBS) // 1.5 01-Sep-2006 TM: update after BOLC-acceptance // test at MPE, bugs with "delay(5)" removed // 1.6 09-Oct-2006 OK: TMMarkers and an extra delay(30) added // 1.7 17-Oct-2006 TM: delays are enlarged // 1.8 17-oct-2006 TM: 12 sec delay after seq mode change // 1.9 26-oct-2006 TM: setting of Bolo&HK data mode has been // moved to the sequencer configuration // 2.0 08-Nov-2006 TM: SPU stop/start introduced, changed wait times // 2.1 13-Nov-2006 TM: wait time of 3 sec after GND-BU // procedure PACS_Phot_Warm_Startinputsignal { }{ // --------------------------------------------- // PhFPU UM, draft 5: // Functional tests at 300K // --------------------------------------------- // --------------------------------------------- // Set data mode Bolo & HK //# P 09 02 00 01 int operand = 0x9020001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Reset bias all groups //# P 00 00 00 00 operand = 0x0; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Validate TM recording //# S 09 delay(20); // Set all groups bol bias 22 (VDD-PROT-BU) ON (1) //# P 00 16 0001 operand = 0x160001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 21 (VDD-PROT-CL) ON (1) //# P 00 15 0001 operand = 0x150001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 23 (GND-BU) ON (1) //# P 00 17 0001 operand = 0x170001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(3); // Set all groups bol bias 05 (VCH) to 0.00000000 Volt (0) //# P 00 05 0000 operand = 0x50000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 19 (VGL-BU) to 3.00000000 Volt (2455) //# P 00 13 0997 operand = 0x130997; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 18 (VDL-BU) to 4.20000000 Volt (3436) //# P 00 12 0D6C operand = 0x120d6c; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 17 (VSS-BU) to 1.00000000 Volt (819) //# P 00 11 0333 operand = 0x110333; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // BU level test starts here // --------------------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); TMMarker601(); // --------------------------------------------- // Set seq mode Sref only // --------------------------------------------- //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Set all groups bol bias 15 (VGG) to 0.00000000 Volt (1) //# P 00 0F 0001 operand = 0xf0001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set gain low //# P 08 00 00 01 operand = 0x8000001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 1.20000000 Volt (982) //# P 00 14 03D6 operand = 0x1403d6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 1.20000000 Volt (981) //# P 00 10 03D5 operand = 0x1003d5; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // output should be around 30000 ADU // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.22000000 Volt (998) //# P 00 10 03E6 operand = 0x1003e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.24000000 Volt (1014) //# P 00 10 03F6 operand = 0x1003f6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 16 (VDD) to 1.26000000 Volt (1030) //# P 00 10 0406 operand = 0x100406; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.22000000 Volt (998) //# P 00 14 03E6 operand = 0x1403e6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.24000000 Volt (1014) //# P 00 14 03F6 operand = 0x1403f6; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 20 (VH_BLIND) to 1.26000000 Volt (1031) //# P 00 14 0407 operand = 0x140407; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // --------------------------------------------- // BU level test is now complete // --------------------------------------------- // Block the CL MOS to make it work with the BU in "PEL commute" mode // --------------------------------------------- // Set all groups bol bias 15 (VGG) to 1.90000000 Volt (1556) //# P 00 0F 0614 operand = 0xf0614; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 16 (VDD) to 2.60000000 Volt (2126) //# P 00 10 084E operand = 0x10084e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 08 (VGL) to 3.00000000 Volt (3448) //# P 00 08 0D78 operand = 0x80d78; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 06 (VDL) to 3.00000000 Volt (3447) //# P 00 06 0D77 operand = 0x60d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 07 (VSS) to 0.70000000 Volt (804) //# P 00 07 0324 operand = 0x70324; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // VRL test starts here TMMarker601(); // --------------------------------------------- // Set all groups bol bias 11 (VDECX-H) to 0.00000000 Volt (0) //# P 00 0B 0000 operand = 0xb0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 1.50000000 Volt (1724) //# P 00 09 06BC operand = 0x906bc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 1.50000000 Volt (1724) //# P 00 0A 06BC operand = 0xa06bc; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 14 (VSMS-L) to 3.00000000 Volt (3447) //# P 00 0E 0D77 operand = 0xe0d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 13 (VSMS-H) to 0.00000000 Volt (0) //# P 00 0D 0000 operand = 0xd0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 15 (VGG) to 1.80000000 Volt (1474) //# P 00 0F 05C2 operand = 0xf05c2; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // CL current (I_VSS_BU) should be between 0.5 microA et 2 microA TMMarker601(); // --------------------------------------------- // Set all groups bol bias 20 (VH_BLIND) to 1.80000000 Volt (1473) //# P 00 14 05C1 operand = 0x1405c1; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 00 03 0159 operand = 0x30159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.40000000 Volt (459) //# P 00 03 01CB operand = 0x301cb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 00 03 023E operand = 0x3023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.40000000 Volt (459) //# P 00 03 01CB operand = 0x301cb; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 00 03 0159 operand = 0x30159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // --------------------------------------------- // VRL test for all groups is complete // --------------------------------------------- // // --------------------------------------------- // VRL test group by group // --------------------------------------------- // group 1 TMMarker602(); // --------------------------------------------- // Set group 1 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 01 03 0159 operand = 0x1030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 1 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 01 03 023E operand = 0x103023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 1 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 01 03 0159 operand = 0x1030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 2 TMMarker602(); // --------------------------------------------- // Set group 2 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 02 03 0159 operand = 0x2030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 2 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 02 03 023E operand = 0x203023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 2 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 02 03 0159 operand = 0x2030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 3 TMMarker602(); // --------------------------------------------- // Set group 3 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 03 03 0159 operand = 0x3030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 3 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 03 03 023E operand = 0x303023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 3 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 03 03 0159 operand = 0x3030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 4 TMMarker602(); // --------------------------------------------- // Set group 4 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 04 03 0159 operand = 0x4030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 4 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 04 03 023E operand = 0x403023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 4 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 04 03 0159 operand = 0x4030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 5 TMMarker602(); // --------------------------------------------- // Set group 5 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 05 03 0159 operand = 0x5030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 5 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 05 03 023E operand = 0x503023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 5 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 05 03 0159 operand = 0x5030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // group 6 TMMarker602(); // --------------------------------------------- // Set group 6 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 06 03 0159 operand = 0x6030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 6 bol bias 03 (VRL) to 0.50000000 Volt (574) //# P 06 03 023E operand = 0x603023e; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // Set group 6 bol bias 03 (VRL) to 0.30000000 Volt (345) //# P 06 03 0159 operand = 0x6030159; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(10); // --------------------------------------------- // VRL test group by group is complete TMMarker600(); // --------------------------------------------- // --------------------------------------------- // // Set all groups bol bias 09 (CKRLH) to 0.00000000 Volt (0) //# P 00 09 0000 operand = 0x90000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 10 (CKRLL) to 0.00000000 Volt (0) //# P 00 0A 0000 operand = 0xa0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 11 (VDECX-H) to 2.00000000 Volt (2298) //# P 00 0B 08FA operand = 0xb08fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 12 (VDECX-L) to 2.00000000 Volt (2298) //# P 00 0C 08FA operand = 0xc08fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 04 (VINJ) to 3.00000000 Volt (3447) //# P 00 04 0D77 operand = 0x40d77; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 20 (VH_BLIND) to 1.15000000 Volt (941) //# P 00 14 03AD operand = 0x1403ad; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set gain high //# P 08 00 00 00 operand = 0x8000000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); TMMarker601(); // Set all groups bol bias 01 (VH) to 0.10000000 Volt (115) //# P 00 01 0073 operand = 0x10073; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 02 (VL) to -0.10000000 Volt (277) //# P 00 02 0115 operand = 0x20115; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 01 (VH) to 0.00000000 Volt (0) //# P 00 01 0000 operand = 0x10000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //# S 01 001388 // Set all groups bol bias 02 (VL) to 0.00000000 Volt (0) //# P 00 02 0000 operand = 0x20000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Wait 10000 ms delay(10); //--------------------------------- // Extra wait 30000 ms for a noise check TMMarker603(); delay(30); TMMarker601(); //--------------------------------- //# S 01 001388 // Set all groups bol bias 12 (VDECX-L) to 0.00000000 Volt (0) //# P 00 0C 0000 operand = 0xc0000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Set all groups bol bias 09 (CKRLH) to 2.00000000 Volt (2298) //# P 00 09 08FA operand = 0x908fa; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sb only //# P 09 01 00 02 operand = 0x9010002; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); //--------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sref only //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 //--------------------------------- // Stop SPU PACS_Phot_SPU_Reset(); delay(1); //--------------------------------- // Set seq mode Sb-Sref //# P 09 01 00 00 operand = 0x9010000; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // --------------------------------------------- // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // --------------------------------------------- // Wait 30000 ms delay(30); //# S 01 001388 // Stop telemetry recording TM //# S 08 // --------------------------------------------- //----------------- // End of Procedure //----------------- } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Reduced NEP measurements for the new sequencer test // Search for the optimum bias with 11 values // using the high gain // // Author : Koryo Okumura // // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Instrument is in safe mode // // Description : OBS script of PHOT_redArray_direct_IST // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_oldSeq_IST(1) // // Version : 1.0 // History : 0.1 Fri Oct 05 12:17:10 CEST 2007 // : 1.0 translated into PV script VDP // obs PacsEng_Phot_redArray_direct_IST { /* Needed variables to call PacsEng_Phot_redArray_direct_IST */ int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_redArray_direct_IST */ }{ // 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(PHOT_redArray_direct_IST(response_measure_time,noise_measure_time,biasFile))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_redArray_direct_IST(response_measure_time,noise_measure_time,biasFile); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id: PacsCal_Phot_PSF_FieldDistort.txt,v 1.2 2008/11/12 11:40:20 vanessad Exp $ // Missionphase : PACS PV Phase // // Purpose : Template for a PHOT AOT with chopped nodding in raster // OBCP used: OBCP_chopped_photometry (OBCP#3) // Calls nodding_raster_pointing (3.6 in Point document) // Author : DAC // // Arguments : See input list below // // Prerequisite : PACS is PHOT ready (PHOT_orbit_prologue), SPU is stopped // and ready to be (re)configured. // // Description : Uses OBCP3 // Comments : // // Version : 0.1 // History : 0.1 18-feb-2008 DAC // 0.2 19-feb-2008 - Use PacsPhotSlewCal // - Read more input parameters // 1.0 21-oct-2008 - VDP - PSF for DL // modify pointingRequests: // Flexible = raster_nodding pointing // tripleChop = nodding only // 1.1 22-oct-2008 included scanmap @fixed chopped position // 1.2 03-nov-2008 added staring raster obs PacsCal_Phot_PSF_FieldDistort { /* Needed variables to call PHOT_NodRaster */ string fltPOS = "POS A" in ["POS A","POS B"]; // Fltw position string psfMeth = "flexible" in ["flexible","tripleChop","fieldDist_scan","fieldDist_rast"]; // Field distortion measure method /* string filter = "blue1" in ["blue1","blue2"]; */ string gain = "LOW" in ["LOW","HIGH"]; // BOLC gain int nrepeat = 1; /* */ /* OBCP related parameters */ /* */ /* PHOT compression modes */ /* 0x00 BOL0: Default */ /* 0x01 BOL1: Double Compression */ /* 0x02 BOL2: Half Compression */ /* 0x04 BOL4: Lossless Compression */ /* 0x07 BOL7: Transparent */ /* 0x09 BOL9: Buffer Transmission */ int comp_mode_blu = 0x0; // blue Compression mode int comp_mode_red = 0x0; // red Compression mode int nraw_blu = 3; // Number of blue raw pixels int nraw_red = 3; // Number of red raw pixels int nb_SRC_REF = 2; // Nb of SRC-REF1-SRC-REF2 cycles int nb_rd_plateau = 31; // Nb rdouts/plateau (4*nn - 1) int nb_cycles_obs_cal = 1; // Outermost CS-SRC DMC loop int nb_CS1_CS2 = 0; // Loop on CSs /* Pointing parameters */ /* The ofssets are passed directly to the PointReq. Unless changed the */ /* telecope boresight will fall in between SRC and REF */ double ra = 0.0; // RA (returned by xHPOT pop-up window) double dec = 0.0; // DEC (ditto) double yoffset = 0.0; // yoffset [arcsec] used as is in PntReq double zoffset = 0.0; // zoffset [arcsec] used as is in PntReq int naifid = 0; // (Source type: > 0 for Solar System source (N/A for tripleChop method) /* Raster parameters */ int m = 2 in [2,100]; // Number of raster points (flexible) int n = 1 in [1,100]; // Number of raster lines (flexible) double d1 = 2.0 in [2.0,480.0]; // Raster point step [arcsec] (flexible) double d2 = 2.0 in [2.0,480.0]; // Raster line separation [arcsec] (flexible) bool fixed = false; // Raster in S/C (false) or SKY coordinates double nodthrow = 30.0 in [2.0,960.0]; // Nod throw [arcsec] double chopthrow = 30.0; // Chop throw [arcsec] int chop_pos = 664; // chopper fixed position (ONLY fieldDist_xxx method) /* scan line */ string mapScanSpeed = "high" in ["high","medium","low"]; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanConstrFrom = 0.0 in [0.0,360.0]; double mapScanConstrTo = 0.0 in [0.0,360.0]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool mapScanHomCoverage = true; bool mapScanSquare = false; /* or staring raster */ double dwellTime = 10.0; // dwell time for staring raster (sec) /* end */ double patt = 0.0; // Raster pattern orientation double pattnod = 270.0; // Nodding orientation (def: along y-axis) int nnod = 1; // Number of Aa aA ... nods bool startAtB = false; // enabled: start at off-nod B position /* NOTE: raster size shall not be larger than 14880x14880 arcsec */ /* Overall "verbosity" */ bool verbose = true; }{ string filter = "blue1"; if(fltPOS == "POS B") { filter = "blue2"; } int mapRasterNumCycles = nrepeat; // Useful variables // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // Compute duration of tasks to be performed during slew to source // Set OBSID int timeOBSID = duration(WriteOBSID($OBSID)); // Condition BOLC to gain setting. This may change the data rate but SPU // is still stopped and a proper comp_mode may be defined // Can I set the gain directly (Thomas says "yes") int timeGAIN = duration(PHOT_set_gain(gain)); // Use PacsPhotSlewCal from AOT code. Define three input tuples // SPU-like parameters {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,comp_mode_blu,0,nraw_blu,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,comp_mode_red,0,nraw_red,0,0,0,0,0}]; // OBCP-like values (none is used since SlewCal takes them from OBCP$params) {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Perform the calibration block now bool doProlog = true; int timeCAL = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter)); // // Before dealing with the OBCP, obtain the chopper position for CS1 & CS2 // (likely not to be used here, but just for completeness) int chop_pos_CS1 = ilookup("CHOPPERCSparams","PHOT","pos_CS1"); int chop_pos_CS2 = ilookup("CHOPPERCSparams","PHOT","pos_CS2"); if(psfMeth == "flexible") { // The chopper moves from -chopthrow/2 to +chopthrow/2 [arcsec] double auxSRC = -chopthrow / 2.0; double auxREF = +chopthrow / 2.0; int chop_pos_SRC = PacsReadChopSky("PHOT_CHOP_sky",auxSRC); int chop_pos_REF = PacsReadChopSky("PHOT_CHOP_sky",auxREF); } else { if(psfMeth == "tripleChop") { auxSRC = 0.0; double auxREF1 = -chopthrow / 2.0; double auxREF2 = +chopthrow / 2.0; chop_pos_SRC = PacsReadChopSky("PHOT_CHOP_sky",auxSRC); int chop_pos_REF1 = PacsReadChopSky("PHOT_CHOP_sky",auxREF1); int chop_pos_REF2 = PacsReadChopSky("PHOT_CHOP_sky",auxREF2); } } // Report settings if verbose if(verbose) { if(psfMeth == "flexible") { debug_print("+++CHOPPER, SRC: " + auxSRC + " [arcsec] -> " + chop_pos_SRC + " [ENG]"); debug_print("+++CHOPPER, REF: " + auxREF + " [arcsec] -> " + chop_pos_REF + " [ENG]"); } else { if(psfMeth == "tripleChop") { debug_print("+++CHOPPER, SRC: " + auxSRC + " [arcsec] -> " + chop_pos_SRC + " [ENG]"); debug_print("+++CHOPPER, REF1: " + auxREF1 + " [arcsec] -> " + chop_pos_REF1 + " [ENG]"); debug_print("+++CHOPPER, REF2: " + auxREF2 + " [arcsec] -> " + chop_pos_REF2 + " [ENG]"); } } } // Default position for chopper if(psfMeth == "fieldDist_scan" || psfMeth == "fieldDist_rast") { int chop_def = chop_pos; int tChop_set = imax(1,duration(PHOT_dmc_setup(fltPOS,chop_def,48.0,58.0))); } else { chop_def = ilookup("SPEC_MEC_Defaults","Photometry","chopper"); tChop_set = 0; } if(psfMeth == "tripleChop") { // Duration of OBCP to be performed ON and NOD int tp = duration(OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def)); } else { if(psfMeth == "flexible") { tp = duration(OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def)); } } if(psfMeth == "fieldDist_scan" || psfMeth == "fieldDist_rast") { if(psfMeth == "fieldDist_scan") { // Estimate how long OBCP7 has to run to cover a scan leg // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec double rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } double timeLEG = mapScanLegLength * 60.0 / rate; } else { if(psfMeth == "fieldDist_rast") { timeLEG = dwellTime; } } // Duration of OBCP7 // For one readout int nb_SRC = 1; int timeOBS1 = duration(OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red)); // For 20 readouts nb_SRC = 20; int timeOBS2 = duration(OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 19.0; debug_print("tututu 195"); double offset = double(timeOBS1) - slope; // Compute nb_SRC so that OBCP runs during the whole scan leg nb_SRC = iceil((timeLEG - offset) / slope); if(verbose) { debug_print("Duration scan leg: " + timeLEG); debug_print("Needed nb_SRC to fill scan leg: " + nb_SRC); } tp = duration(OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red)); } if(verbose) { debug_print("Duration of OBCP " + tp + " [sec]"); } // tp cannot be shorted than 10 sec if(tp < 10) { error("The OBCP cannot be shorter than 10 sec; adjust your OBCP parameters"); } int timeEpilogue = duration(WriteEndID()); // // Several arguments needed for "nodding_raster_pointing" // //Execute the pointing request bool execute = true; //Minimum slew time int tslewmin = timeOBSID + timeGAIN + timeCAL + tChop_set; if(verbose) { debug_print("+++SlewMinTime is " + tslewmin + " [sec]"); } // Pointing requests //Initial hold int tih = 0; //Final hold int tfh = timeEpilogue; //Use PHOT virtual aperture string ib = "P01_0"; //Issue PointReq // Still undefined pointing variables // Number of points/scan lines before going to OFF int k = 0; // Number of nods/raster/scan before performing a hold int nhold = 0; // Duration of a hold operation int thold = 0; // Time spent at OFF int top = 0; // Coordinates of OFF position double raoff = 0.0; double decoff = 0.0; // Repetitions of pattern // The minimum duration of return slew between repetitions int trepeatmin = 0; // Minimum duration of a "load" operation int tloadmin = 0; // Number of slews before starting a "load" slew int nload = 0; // Issue de PointReq int tpa = tp; int tpb = tp; debug_print("tp = tpa = tpb: " + tp); if(psfMeth == "tripleChop") { int[] ts = nodding_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnod,chopthrow,tpa,tpb,tloadmin,nload,thold,nhold,startAtB); debug_print("truple zut"); } if(psfMeth == "flexible") { ts = nodding_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodthrow,nnod,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); debug_print("ZUT!!"); } if(psfMeth == "fieldDist_scan") { // line_scan_pointing. Keep (most of) JBr's variable names tslewmin = timeOBSID + timeCAL + timeGAIN + tChop_set; // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } // Case of homogeneous coverage double pi = 3.1415926535; // degrees to radians double dtor = 0.0; double rtod = 0.0; double halfDiag = 0.0; double halfDiagAngle = 0.0; dtor = 2.0 * pi / 360.0; rtod = 1.0 / dtor; halfDiag = sqrt(boloSSize * boloSSize + boloLSize * boloLSize) / 2.0; halfDiagAngle = atan(boloSSize / boloLSize) * rtod; // Add further constraint from RV (SPR-2889) // Add SPR-2699 further logic: mapScanAngleRef overrides ScanHom and ScanSquare if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { mapScanHomCoverage = false; mapScanSquare = false; } // Could simplify logic after SPR-2699 (mapScanHomCoverage cannot be true // unless inst or i+c have been specified) if(mapScanHomCoverage == true && (mapScanAngleRef == "inst" || mapScanAngleRef == "i+c")) { mapScanCrossScan = halfDiag * (abs(sin(dtor * (mapScanAngle + 90.0 - halfDiagAngle))) + abs(cos(dtor * (90.0 - halfDiagAngle - mapScanAngle + 90.0)))); if(verbose) { debug_print("New mapScancCross: " + mapScanCrossScan); } } // Case of square map request if(mapScanSquare == true && mapScanHomCoverage == true) { mapScanNumLegs = iceil(60.0 * (mapScanLegLength / mapScanCrossScan)); if(verbose) { debug_print("New mapScanNumLegs: " + mapScanNumLegs); } } ib = "P01_0"; tih = 0; tfh = timeEpilogue; patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeCAL; if(verbose) { debug_print("Map reference: " + mapScanAngleRef + "=" + fixed); } ts = line_scan_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,thold,nhold,nrepeat); //Info from API (nomenclature from Jon Br) int tobs = ts[0]; int tslew = ts[1]; int tacc = ts[2]; int tdec = ts[3]; int tl = ts[4]; int tll = ts[5]; int trep = ts[6]; if(verbose) { debug_print("##### line_scan_with_hold"); } if(verbose) { debug_print("##### rate: " + rate + " arcsec/sec"); } // Here we record how long it takes to scan a line [sec] int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; } if(psfMeth == "fieldDist_rast") { tslewmin = timeOBSID + timeCAL + timeGAIN + tChop_set; ib = "P01_0"; tih = 0; tfh = timeEpilogue; //thold = timeCAL; ts = basic_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,k,top,raoff,decoff); } }{ int[] state = [0]; while(state[0] >= 0) { state = next_state(); if(state[0] == 1) { int tNOW = time(); if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID, move filter, set gain, perform prologue WriteOBSID($OBSID); data_rate(120.0); PHOT_set_gain(gain); PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,filter); if(psfMeth == "fieldDist_scan" || psfMeth == "fieldDist_rast") { PHOT_dmc_setup(fltPOS,chop_def,48.0,58.0); debug_print("we are setting the chopper at:" + chop_pos); } tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } else { if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } // Call the OBCP with the known parameters if(psfMeth == "flexible") { OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); } else { if(psfMeth == "tripleChop") { OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); } else { if(psfMeth == "fieldDist_rast") { OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red); } } } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } else { if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } else { if(state[0] == 7) { tNOW = time(); if(verbose) { debug_print("NOD starts at " + tNOW); } // Call the OBCP with the same parameters as for POINT if(psfMeth == "flexible") { OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF,chop_pos_REF,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); } else { if(psfMeth == "tripleChop") { OBCP_chopped_photometry(nb_SRC_REF,chop_pos_SRC,nb_rd_plateau,chop_pos_REF1,chop_pos_REF2,nb_cycles_obs_cal,nb_CS1_CS2,chop_pos_CS1,chop_pos_CS2,comp_mode_blu,comp_mode_red,chop_def); } else { if(psfMeth == "fieldDist_rast") { OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red); } } } tNOW = time(); if(verbose) { debug_print("NOD ends at " + tNOW); } } else { if(state[0] == 8) { tNOW = time(); if(verbose) { debug_print("Scan starts at " + tNOW); } // Call the OBCP with the same parameters as for POINT OBCP_phot_staring(nb_SRC,comp_mode_blu,comp_mode_red); tNOW = time(); if(verbose) { debug_print("Scan ends at " + tNOW); } } } } } } } } // Missionphase : FM // // Purpose : Setup diagnostic housekeeping for the FM // chopper tests. // // Author : Helmut Dannerbauer // CUS author : HD // // Description : Set up 12 housekeeping parameter for diagnostic housekeeping // of the chopper during the chopper full functional test. // // Dependencies : // // Preconditions : PACS switched-on, setup spectroscopy and SPEC_Chop_fft_eqmimt_obs // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 3.0 // // History : 1.0 21-07-06 creation by HD. Based on EQM IMT scripts. // 2.0 24-07-06 HD. test this script. // 3.0 24-07-06 HD. script works. block PHOT_Chopper_dhk_imt_bb PACS 478 { }{ // Register start of BB WriteBBID($BBID); //-------------------------------------------- // Setup and start diagnostic HK for Chopper //-------------------------------------------- int chop_diag_hk_length = 13; {int}[] parlist = [{209},{244},{245},{246},{247},{248},{249},{258},{407},{557},{561},{565},{0xffff}]; int[] aux = [209,244,245,246,247,248,249,258,407,557,561,565,0xffff]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_DIAG_HK_LIST(chop_diag_hk_length,parlist,check_sum); int diag_hk_period = 4; // Synchronize diagnostic HK on blue spectrometer readouts Pacs_DMC_START_DIAG_HK(diag_hk_period); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // File : CONF_chopper_ast_OBS.cus // // Version : 0.1 // // Missionphase : PACS IST Chopper Day // // Purpose : Configure the chopper servo loop // // Author : DAC/MN/HD // CUSification : DAC/MN/HD // Arguments : // string calUfile CAL-U file // string calUcol Column identifier // // // Description : Read servo loop parameters off a CALU table; a set // of parameters is arranged as a column; different // columns list different sets. Must specify the CALU // file name and the column identification string. // Example: CONF_chopper ("CONFChopper","nom_sky") // // Comments : // // Version : 0.4 // History : 0.1 7-dec-2006 Initial version // : 0.2 11-jun-2007 version for new elliptical filter (MN) // : 0.3 05-jul-2007 IST Chopper Day // : 0.4 12-nov-2007 edited for SVT/PV conformance // : 0.5 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_CONF_chopper_ast { /* Needed variables to call PacsEng_CONF_chopper_ast */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_CONF_chopper_ast */ }{ // string calUfile CAL-U file // string calUcol Column identifier // file name and the column identification string. string fileU = "CONFChopper_ast"; string calUcol = "nom_ast"; // 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_chopper_ast(fileU,calUcol))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure CONF_chopper_ast(fileU,calUcol); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // File : PACS_Spec_CRE_1pF0bias_Setup_Warm.cus // Missionphase : PACS EQM Test // // Purpose : Configure CRE bias, reset interval and capacitor for // testing at room temperature // // Author : H. Feuchtgruber // CUSification : DAC // Comments : Intermediate version // // // Version : 1.0 // History : 1.0 / 16-Nov-2004 Initial version // 1.1 7-mar-2006 SPEC_HEAT_1_C renamed // 1.2 6-apr-2006 DMC v6.0.1 // 1.3 16-oct-2006 As PACS_Spec_CRE_Setup_Warm but with 0.1pF and 0 v bias // procedure PACS_Spec_CRE_1pF0bias_Setup_Warm { }{ // // red_reset integer 64 Enter red reset interval // blue_reset integer 64 Enter blue reset interval // red_bias_d integer 287 Enter BIAS_D for red spectrometer (1V=4095) // red_bias_r integer 0 Enter BIAS_R for red spectrometer (1V=4095) // blue_bias_d integer 860 Enter BIAS_D for blue spectrometer (1V=4095) // blue_bias_r integer 0 Enter BIAS_R for blue spectrometer (1V=4095) // red_capacitor integer 8 Enter Capacitor red (0=100f,4=300f,8=1pf,12=3pF) // blue_capacitor integer 8 Enter Capacitor blue (0=100f,4=300f,8=1pf,12=3pF) // heater_blue_1c integer 4095 Enter blue HEATER_1C value (0=0mA, 4095=0.2mA) // heater_blue_2c integer 0 Enter blue HEATER_2C value (0=0mA, 4095=0.2mA) int red_reset = 64; int blue_reset = 64; int red_bias_d = 0; int red_bias_r = 0; int blue_bias_d = 0; int blue_bias_r = 0; int red_capacitor = 12; int blue_capacitor = 12; int heater_blue_1c = 0; int heater_blue_2c = 0; // PC174420 "DMC_WRT_B_SPEC_PAR" WRITE THE BLUE SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on int blue_cre_ctrl = blue_capacitor + 256 + 128 + 2 + 1; int[] list_int = [32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0]; int chksum = checksum("int",list_int); Pacs_DMC_WRT_B_SPEC_PAR_RAW(32,blue_reset,blue_cre_ctrl,blue_bias_r,blue_bias_d,0,chksum); delay(1); // PC173420 "DMC_WRT_R_SPEC_PAR" WRITE THE RED SPECTROMETER PARAMETERS // Fixed GroupSize: 1, repetition: 8 // PP067420 "DMC_4_BYTES_WORDS_DATA" // PP066420 "DMC_CHECKSUM" // cre_ctrl: 256=sync width=2, 128=T sensor on, 2=select, 1=power on // set red_cre_ctrl [expr $red_capacitor+256+128+2+1] // set spec_par_r [list {PP095420 32} \ // [list PP096420 $red_reset] \ // [list PP097420 $red_cre_ctrl] \ // [list PP098420 $red_bias_r] \ // [list PP099420 $red_bias_d] {PP100420 0}] // set chksum [getChkSum -d -32 $spec_par_r] // putlog "ChkSum for spec_par_r: $spec_par_r" int red_cre_ctrl = red_capacitor + 256 + 128 + 2 + 1; list_int = [32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0]; chksum = checksum("int",list_int); Pacs_DMC_WRT_R_SPEC_PAR_RAW(32,red_reset,red_cre_ctrl,red_bias_r,red_bias_d,0,chksum); delay(1); // PC094420 "DMC_SET_PAR_BOTH_SPEC" SEND COMPLETE PARAMETERS TABLE TO BOTH DECS // tcsend PC094420 // waittime 0.5 Pacs_DMC_SET_PAR_BOTH_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_B_SPEC" SEND COMPLETE PARAMETERS TABLE TO Blue DEC //tcsend PC086420 //waittime 0.5 Pacs_DMC_SET_PAR_B_SPEC(); delay(1); // PC094420 "DMC_SET_PAR_R_SPEC" SEND COMPLETE PARAMETERS TABLE TO Red DEC //tcsend PC093420 //waittime 0.5 Pacs_DMC_SET_PAR_R_SPEC(); delay(1); // DMC_SET_B_SPE_HEAT_1C(0) // eval tcsend PC087420 [list [list PP073420 $heater_blue_1c]] // waittime 0.5 Pacs_DMC_SET_B_SPEC_HEAT_C_RAW(heater_blue_1c); delay(1); //----------------- // End of Procedure //----------------- } // Missionphase : FM ILT // // Purpose : SFT in Open Loop Mode (cold conditions) // // Author : Markus Nielbock // CUS author : MN // // Description : SFT cold for FM1 chopper in open-loop mode. All 3 coils are // operative. The chopper is commanded between -20 mA and +20mA // in steps of 4 mA. // The first part consists of chopper deflections equivalent to // commanded chopper coil currents between 0 and +/-20 mA, // alternating between positive and negative values. Absolute // position commanding is used. // The second part consists of a ramp of chopper deflections // between -20 and +20 mA, commanded in relative steps of 4 mA. // Finally, the chopper returns to its zero position. // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched off and disabled // Diagnostic HK not running // // Comments : Adapted from PACS_SPEC_Chopper_OpenLoop_MoveAbs_OBS.cus // // Version : 1.0 // // History : 1.0 12-10-2007 - BV: extracted procedure from observation by MN and added mois comments // procedure PACS_Chopper_SFT_Cold_OpenLoop { }{ mois_comment("Start of procedure - PACS short functional test chopper - cold conditions, open loop"); mois_step("Start diagnostic HK"); // Start diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("ON"); delay(5); mois_step("Set default spectroscopy timing parameters"); // Set default spectroscopy timing parameters SPEC_Chopper_SynchBlue(); mois_step("Set Chopper Controller Parameters: CONFChopper -> SFTcold"); // Set Chopper Controller Parameters: CONFChopper -> SFTcold CONF_chopper("CONFChopper","SFTcold"); delay(2); mois_step("Switch on chopper"); // Switch on chopper PACS_Chopper_SWON_SWOF_only("ON"); delay(10); mois_step("Set open-loop mode and enable chopper"); // Set open-loop mode and enable chopper PACS_SPEC_Chopper_SetOpenLoop_BB("ON"); delay(1); EnDis_chopper("ON"); delay(10); // Translate mA into ROU // The conversion factor is in fact 130, but we use 133 in order to be able // to compare the measurement with previous ones, where the same value was // assumed. // chopper maximal deflection in mA double chop_max_ma = 20.0; // chopper movement step size in mA double chop_step_ma = 4.0; // chopper timescale in seconds allowing for initial // oscillation damping in open-loop mode int chop_damptime = 15; double chop_max_rou = chop_max_ma * 32767.0 / 133.0; double chop_step_rou = chop_step_ma * 32767.0 / 133.0; int ichop_max_rou = iround(chop_max_rou); int ichop_step_rou = iround(chop_step_rou); // Create table of chopper positions for absolute movement // Starting position (integer) int ichop_pos = 0; // Array of chopper positions sequence 1 int[] chop_steps = []; // Running variable int i = 0; chop_steps[i] = ichop_pos; i = i + 1; ichop_pos = ichop_pos + ichop_step_rou; while(ichop_pos <= ichop_max_rou) { chop_steps[i] = ichop_pos; i = i + 1; chop_steps[i] = -ichop_pos; i = i + 1; ichop_pos = ichop_pos + ichop_step_rou; } int len = length(chop_steps); //Length of array mois_step("First sequence: alternating chopper movement"); // First sequence: alternating chopper movement for(int s1 = 0 .. len - 1) { PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(chop_steps[s1]); delay(chop_damptime); } // End of first sequence // Move chopper to zero position PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(0); delay(chop_damptime); mois_step("Second sequence: alternating chopper movement, repeated once -> k loop"); // Second sequence: alternating chopper movement, repeated once -> k loop PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(-5 * ichop_step_rou); delay(chop_damptime); for(int s2 = 1 .. 10) { PACS_SPEC_Chopper_OpenLoop_MoveRel_BB(ichop_step_rou); delay(chop_damptime); } // End of second sequence // Move chopper to zero position PACS_SPEC_Chopper_OpenLoop_MoveAbs_BB(0); delay(chop_damptime); mois_step("Disable chopper and switch off open-loop mode"); // Disable chopper and switch off open-loop mode EnDis_chopper("OFF"); PACS_SPEC_Chopper_SetOpenLoop_BB("OFF"); delay(10); // Switch off chopper PACS_Chopper_SWON_SWOF_only("OFF"); delay(5); mois_step("Set Chopper Controller Parameters: CONFChopper -> nom_sky"); // Set Chopper Controller Parameters: CONFChopper -> nom_sky CONF_chopper("CONFChopper","nom_sky"); delay(2); mois_step("Stop diagnostic HK"); // Stop diagnostic HK PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB("OFF"); } // CVS file : CONF_spec_fltw_R_Warm.txt // Missionphase : FMILT_3 & Later // // Purpose : CONFigure the spectro filter wheel for Redundant Warm // // Description : // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.1 // History : 1.0 4-Jul-2007 PR creation // : procedure CONF_spec_fltw_R_Warm { }{ string calUname = "CONFFWSPEC"; // FWSPEC CALIBRATION TABLE string calUrow = "FMILT_WR"; // INSTRUMENT VERSION int rate = ilookup(calUname,calUrow,"Rate"); int current = ilookup(calUname,calUrow,"Drive_current"); int threshold_A = ilookup(calUname,calUrow,"Threshold_A"); int threshold_B = ilookup(calUname,calUrow,"Threshold_B"); int status_A = ilookup(calUname,calUrow,"Status_A"); int status_B = ilookup(calUname,calUrow,"Status_B"); {int}[] parlist = [{rate},{current},{threshold_A},{threshold_B},{status_A},{status_B}]; int[] aux = [rate,current,threshold_A,threshold_B,status_A,status_B]; int check_sum = checksum("int",aux); Pacs_DMC_WRT_FWSPEC_CONF_PAR(parlist,check_sum); } // Mission phase : ILT at Garching // // Purpose : // Reduced NEP measurements for the new sequencer test // // Author : Koryo Okumura // // CUS script : procedure PHOT_redArray_alternatePolarisation_direct_IST // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // int lowFreq_noise_time = 1800; // long noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // // Description : // + First, all 24 biases are set group by group // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set PACS chopper on CS1 to measure the noise // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_newSeq_IST(1) // // Version : Thu Oct 04 20:34:35 CEST 2007 // procedure PHOT_redArray_alternatePolarisation_direct_IST { int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds int lowFreq_noise_time = 1800; // long noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values }{ int operand = 0; int posCS1 = -21500; int posCS2 = 21500; //********************************* // Apply the new sequencer setting //********************************* // PACS_Phot_Sequencer_SetupNew(); // //******************************* // Select Filter A (110 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper at the central position //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(0); // //********************************************************************** // Response Measurement // Expected fluxes : 1.7 and 2.0pW on the blue // and 5.3 and 6.2pW on the red //********************************************************************** // TMMarker600(); //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); // // //************************************************************************ // Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //***************************** // Set the PACS chopper on CS1 //***************************** // Pacs_DMC_MOVE_CHOP_ABS(posCS1); // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); // // //************************************************************************ // Longer Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for lowFreq_noise_time seconds TMMarker603(); delay(lowFreq_noise_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for lowFreq_noise_time seconds TMMarker603(); delay(lowFreq_noise_time); TMMarker600(); // //********************************* // Apply the old sequencer setting //********************************* // PACS_Phot_Sequencer_Setup(); // } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //- Test of internal calibration recipes including different chopper // frequencies photometry including time constants for flux changes // (just between the 2 CSs) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // // // TCL author : TM // TCL file : TM // CUS author : TM // Script file : PHOT_timeconst_fluxchange_OBS.txt // // Input arguments // type name description // // Return values // Type Name Default Description // // Dependencies : // // Preconditions : BOLO_recycle and PHOT_setup have been executed // // Comments : // // Version : 1.0 // History : 0.1 27-apr-2005 DAC // 0.4 26-apr-2005 DAC Use PACS_spu_reset // 0.5 4-nov-2005 DAC Added 1 sec to the wait after DMC load (from 2 to 3 sec) // 0.6 11-apr-2007 update by TM (OBCPs, 40Hz, ....) // 1.0 25-mar-2008 VDP Translated from IST to PV phase syntax // obs PacsEng_Phot_timeconst_fluxchange { /* Needed variables to call PacsEng_Phot_timeconst_fluxchange */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_timeconst_fluxchange */ }{ // 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(Pacs_Phot_timeconst_fluxchange())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Phot_timeconst_fluxchange(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Move Grat Abs // // CUS author : Pierre Royer // // // Version : 2.0 // History : 1.0 29-Jul-2007 // History : 2.0 04-mar-2008 Converted into PV script by VDP // // obs PacsEng_Spec_Gra_IST_Enable { /* Needed variables to call PacsEng_Spec_Gra_IST_Enable */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Enable */ }{ // 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(PACS_Spec_Gra_IST_Enable())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Spec_Gra_IST_Enable(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } ///////////////////////////////////////////////////////////////////////////// /// $Id ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsLineSpec_PV AOT // // CUS author : DAC // // Input arguments: see after module identification // // Return values // {int,int,int} {totalDuration,slewDuration,obsOverPACSandSC} // // Comments : If this file is called PacsLineSpecObs.def, it is the // CUSGUI version. To use with HSPOT: // - copy and rename PacsLineSpec.def // - rename obs module to PacsLineSpec // - remove extra code for CUSGUI // - do not forget to set verbose = false !! // // History: // 25-apr-2007 14.0 For earlier history see v1.37 in CVS // Removed history up to today // 22-may-2007 14.1 SPR-3199 Return only SRC+REF time // 29-may-2007 14.2 SPR-3237 Use map orientation parameter // 11-jun-2007 14.3 Count WAIT=1 for grating in OBCP22 as SRC/REF // 20-sep-2007 14.4 SCR-3552. Correct pattnod with skewCorrec in PACSyzoffsets // 15-oct-2007 15.0 SCR-3691 // Add state=4 (OFF) in the StateMachine logic. Ready to // implement raster with OFF for pointing 21 & 31 // 22-oct-2007 15.1 FreqSwitch only allowed with source="large" // Introduce RAoff DECoff as in PacsRange // 23-oct-2007 15.2 UserNodCycles is now a rasterRepeat factor for // FreqSwitch (it was a cycle repeater) // 16-dec-2007 15.3 SPR-3830 (RAoff,DECoff out of boundaries) // 14-jan-2008 16.0 Use standard names for RA,DEC // 13-may-2008 17.0 SCR-3699 Implemented raoff and decoff refSelected // 17-nov-2008 18.0 SCR 5473 Removed redshift parameters: taken into account by HSpot // add nb_grat_steps // modify grat_step into grat_step_size for clarity // 18-nov-2008 19.0 SCR 5473 "switch_dither_step_size" added (RV) // {int,int,int} obs PacsCal_PacsLineSpec_PV { /* "lines" is defined as an array; its elements (and hence its dimension) */ /* are provided by HSPOT */ /* {id,redshifted wavelength,repeat factor,line flux,continuum flux, */ /* line width,line flux unit,line width unit} */ {string,double,int,double,double,double,string,string}[] lines = []; //Filled by HSPOT /*------------- following only to use CUS interface -------------------------*/ string[] lineId = ["My lines"]; double[] lWave = [82.0]; // line wavelength in [55.0,210.0] int[] repeatLine = [1]; // repeat line in [0,10] double[] lineFlux = [111.0]; // Line Flux in [0.0,10000.0] double[] lcontFlux = [111.11]; // Continuum flux in [0.0,10000.0] double[] lineWidth = [30.0]; string[] fluxUnit = ["Jy/m2"]; string[] widthUnit = ["kms"]; /*------------- above only to use CUS interface -------------------------*/ int userNODcycles = 1 in [1,100]; string orderSel = "order2" in ["order2","order3"]; bool useScanParam = false; // Overwrite cal-u values for the scan parameters int nb_SRC_OFF = 1; // scan parameter: chop cycles per grating position int nb_ramps_plateau = 2; // scan parameter: ramps per chopper plateau int grat_step_size = 1200; // scan parameter: grating step size int nb_grat_steps = 148; // scan parameter: nb of grating steps bool useCalblockParam = false; // overwrite cal-u values for the calibration block parameters int nload = 0; // cal block : repeat calibration block every n nod / raster slews int cb_nb_grat_step = 16; // cal block : number of grating steps around key wavelength int cb_grat_step_size = 168; // cal block : grating step size int cb_nb_up_down = 1; // cal block : number of up/down repetitions int cb_nb_ramps_plateau = 2; // cal block : number of ramps per chopper plateau int cb_nbRdoutRamp = 64; // cal block: readouts per ramp bool useDetParam = false; // overwrite cal-u values for the detector settings int capaBlue = 0; // detector setting: capacitance blue in [0,8,4,12] int capaRed = 0; // detector setting: capacitance red in [0,8,4,12] int det_nbRdoutRamp = 64; // detector setting: readouts per ramp int nb_rdouts_subramp = 16; // detector setting: number of readouts per subramp string reduction_mode = "ramp average" in ["ramp average","ramp fitting"]; // detector setting: spu reduction mode bool useWaveSwitchParam = false; // overwrite cal-u values for wavelength switching int switch_nb_ramps = 1; // wave switching: number of ramps per grating position int switch_nb_cycles = 5; // wave switching: number of on-off line cycle repetitions int switch_ditherCount = 7; // wave switching: number of grating dither steps int switch_dither_step_size = 300; // wave switching: dithering step size int switch_jumpsize = -3200; // wave switching: number of grating steps to jump off the line bool chopNod = true; bool faintLines = true; double chopAvoidFrom = 0.0 in [0.0,360.0]; double chopAvoidTo = 0.0 in [0.0,360.0]; string throw = "large" in ["large","medium","small"]; string source = "point" in ["point","dithered","large","large_b"]; double mapRasterAngle = 0.0 in [0.0,360.0]; int m = 3 in [2,32]; int n = 3 in [1,32]; double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target bool refSelected = false; double raoff = 0.0 in [0.0,360.0]; double decoff = 0.0 in [-90.0,90.0]; int naifid = 0; // RA,DEC or SSO double pointStep = 20.0 in [2.0,480.0]; double lineStep = 20.0 in [2.0,480.0]; int knod = 1; // knod in [1,m*n] int obsOverhead = 180; // Slew overhead bool startAtOFF = false; bool verbose = true; }{ //*--------- following only when using CUS interface -------------------*/ int linesIdLength = length(lineId); int linesLength = length(lines); if(linesLength == 0) { for(int lLoop00 = 0 .. linesIdLength - 1) { lines[lLoop00] = {lineId[lLoop00],lWave[lLoop00],repeatLine[lLoop00],lineFlux[lLoop00],lcontFlux[lLoop00],lineWidth[lLoop00],fluxUnit[lLoop00],widthUnit[lLoop00]}; } } //*--------- above only when using CUS interface -------------------*/ //*-----------------------------------------------------------------*/ // Start of "Pointing" section // // extraConf: whatever affects PACS default configuration // Currently: the option faintLines calls for an extraConf string extraConf = "normal"; // For bright lines if(!faintLines) { extraConf = "bright"; } // Set messages for HTML format message(""); message(""); // Need switching boolean bool switching = !chopNod; // Switching only allowed with source "large" if(switching && source != "large") { if(switching && source != "large_b") { error("Frequency Switch only in mode raster (large source) with OFF"); } } // Decode more HSPOT information int nbLines = length(lines); int nbLines1 = nbLines - 1; // Cannot call with empty "lines" if(nbLines == 0) { error("STOP!! There are no spectral lines defined!"); } // No more than 10 lines or repetitions int nbLinesRep = 0; for(int loop00 = 0 .. nbLines - 1) { // Default repetion factor is 1 int repFactor = lines[loop00]{2}; if(repFactor == 0) { repFactor = 1; } nbLinesRep = nbLinesRep + repFactor; } if(verbose) { debug_print("Total lines/repeat: " + nbLinesRep); } if(nbLinesRep > 10) { error("STOP!! The number of lines/repetitions exceeds 10"); } // Establish now the applicable Pointing Mode (use same pointCase convention // used in PacsPhoto) // Pointing mode is undefined. If it remains undefined at the end of // the next tests, then there is a problem with the source definition int pointCase = 0; // FinePointingMode with setup time // POINT source, with and without chopNod if(source == "point") { // For completiness define a 1x1 raster m = 1; n = 1; // without nodding if(!chopNod) { string pointMode = "fine_pointing"; string userMode = "Point source (no nodding)"; if(switching) { userMode = "Point source (frequency switch, no nodding)"; } pointCase = 11; string yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "composite_nodding"; userMode = "Point source (nodding)"; pointCase = 12; yzoffsetROW = "S" + pointCase; } } // DITHERED source // For source "dithered" use predetermined raster parameters if(source == "dithered") { m = ilookup("SMALL_SRC_params","SPEC","mRast"); n = ilookup("SMALL_SRC_params","SPEC","nRast"); pointStep = dlookup("SMALL_SRC_params","SPEC","pointStep"); lineStep = dlookup("SMALL_SRC_params","SPEC","lineStep"); // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Small source (no nodding)"; pointCase = 21; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Small source (nodding)"; pointCase = 22; yzoffsetROW = "S" + pointCase; } } // For source "large" user given raster parameters if(source == "large") { // Raster mode without noding if(!chopNod) { pointMode = "repeated_raster_with_hold"; userMode = "Large source (no nodding)"; pointCase = 31; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_in_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } if(source == "large_b") { // Raster mode without noding if(!chopNod) { pointMode = "raster_pointing"; userMode = "Large source (raster w/OFF, no nodding)"; pointCase = 31; yzoffsetROW = "S" + pointCase; } else { // with nodding pointMode = "nodding_of_raster"; userMode = "Large source (nodding)"; pointCase = 32; yzoffsetROW = "S" + pointCase; } } // For symmetrical chopping, virtual apertures are dependent on the chopper // throw. Add this information to the CALU key entry yzoffsetROW = throw + "" + yzoffsetROW; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); debug_print(" PointCase ID: " + pointCase); debug_print(" PointMode : " + pointMode); debug_print(" CALU entry : " + yzoffsetROW); debug_print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); for(int iii = 0 .. nbLines1) { debug_print("MAIN:Id, Wave, repeat, Lflux, Cflux, etc. " + lines[iii]); } } // Define array of wavelengths (will be needed by the SORT procedure) double[] lineWave = [55.0]; // Populate the array of wavelengths for(int loop0 = 0 .. nbLines1) { lineWave[loop0] = lines[loop0]{1}; } // For each line obtain the grating order and the grating position int[] orders = [0]; double[] grat_pos = [0.0]; // Fill the tuple waveTuple {waveLen,order,gratPos,nbStep,gratStep} {double,int,int,int,int}[] waveTuple = [{0.0,0,0,0,0}]; for(int loop1 = 0 .. nbLines1) { waveTuple[loop1] = SPEC_get_grat_info(lineWave[loop1],"HI",switching,extraConf,orderSel,verbose); // Create vector of intermediate results orders[loop1] = waveTuple[loop1]{1}; grat_pos[loop1] = double(waveTuple[loop1]{2}); } // To reject forbidden order combination, count how many orders int nORDER1 = 0; int nORDER2 = 0; int nORDER3 = 0; for(int loop2 = 0 .. nbLines1) { if(orders[loop2] == 1) { nORDER1 = nORDER1 + 1; } if(orders[loop2] == 2) { nORDER2 = nORDER2 + 1; } if(orders[loop2] == 3) { nORDER3 = nORDER3 + 1; } } // Reject mixed orders if(nORDER2 != 0 && nORDER3 != 0) { // Report band limits double[] band2 = SPEC_BAND_read("L2"); double[] band3 = SPEC_BAND_read("L3"); error("Combination of 2nd (" + band2[0] + "-" + band2[1] + " mic) and 3rd (" + band3[0] + "-" + band3[1] + " mic) grating orders is not allowed"); } // Reject lines not belonging to authorized order if(nORDER2 != 0 && orderSel == "order3") { error("You have chosen " + orderSel + " but have specified one/several order2 lines"); } if(nORDER3 != 0 && orderSel == "order2") { error("You have chosen " + orderSel + " but have specified one/several order3 lines"); } // Determine the filter needed with given lines // No filter needed, i.e. ORDER=1 int filter = 1; // Determine filter based on HSPOT input if(orderSel == "order2") { filter = 2; } if(orderSel == "order3") { filter = 3; } if(verbose) { debug_print("ORDER array: " + orders); } // Filter below will be set by SPEC_aot_prologue via SlewCal if(verbose) { debug_print("MAIN:The full OBS will be performed with filter " + filter); } // Sort grat_pos from smallest to largest int[] sortIndex = SortProc(verbose,grat_pos); // Sort by wavelengths (from blue to red) // int sortIndex = SortProc(verbose,lineWave); // Recast "lines" and waveTuple according to the ordered grating positions {string,double,int,double,double,double,string,string}[] sortLines = [{"empty",0.0,0,0.0,0.0,0.0,"bla","bla"}]; {double,int,int,int,int}[] sortWaveTuple = [{0.0,0,0,0,0}]; for(int reSORT = 0 .. nbLines1) { // Reversed sort // No reverse SORT (start observations with filter A) // int revSORT = nbLines1 - reSORT; int revSORT = reSORT; int sortedIndex = sortIndex[revSORT]; sortLines[reSORT] = lines[sortedIndex]; sortWaveTuple[reSORT] = waveTuple[sortedIndex]; if(verbose) { debug_print("Sorted Line: " + sortLines[reSORT]); } } // The tuple arrays confOBCP, confSPECred, and confSPECblu play a major // role. They contain the parameters related to commanding different PACS // subsystems. They are susceptible of changing with the observing conditions. // Hence, they have to be watched for changes since these imply sending one or // more TCs (usually invoking a building block) // Define confOBCP array // confOBCP{0 -> 19} contains: // nb_up_down grat_step_up grat_step_dn nb_SRC_OFF // nb_ramps_plateau nb_CS1_CS2 nb_grat_step_up nb_grat_step_dn // grat_start_pos grat_start_time grat_def_pos grat_def_time // chop_pos_SRC chop_pos_REF1 chop_pos_REF2 chop_pos_CS1 // chop_pos_CS2 chop_def detector order {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confSPECblu and confSPECred // confSPEC contians: // capa, nb_rdouts_ramp, nb_rdouts_subramp, comp_mode, // glitch_det, ramp_fit_alg, nb_raw, bias_r, bias_d {int,int,int,int,int,int,int,int,int}[] confSPECblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confSPECred = [{0,0,0,0,0,0,0,0,0}]; // Estimator module returns {confSPECblu,confSPECred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {clone(confSPECblu[0]),clone(confSPECred[0]),clone(confOBCP[0])}; // Obtain default values string throwUsage = throw; // Frequency switch parameters are as for offraster in PacsRange // (this will set REF1=REF2=CS1 but this is irrelevant for OBCP32) if(switching) { throwUsage = "offraster"; } if(verbose) { debug_print("PacsLine:Use throw: " + throwUsage); } paramsSPECdef = PacsSpecDefaults(throwUsage,extraConf,verbose); confSPECblu[0] = paramsSPECdef{0}; confSPECred[0] = paramsSPECdef{1}; confOBCP[0] = paramsSPECdef{2}; // Here comes the module(s) to estimate OBS times as a function of the // input given by the HSPOT user. //Define tuple to contain the "variable" parameters {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPEC = clone(paramsSPECdef); // paramsSPECext (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,nb_up_dn,aux1,aux2} // More info: {nb_nods,nb_up_dn,timeOBS,aux2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsSPECext = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for each wavelength. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("MAIN.confOBCP[0]: " + confOBCP[0]); } int nbNods = 0; // Accumulator total OBS time int totalOBS = 0; // For each demanded wavelength compute minimum duration for(int waveLOOP = 1 .. nbLines) { int waveLOOP1 = waveLOOP - 1; // Different OBCPs if frequency switch or not if(chopNod) { // Here we perform nodding/chopping // SCR-2942: consider case of faintLines = false string forDEBUG = "chop/nod"; paramsSPECext = PacsLineSpecEstimatorOBCP27(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,chopNod,faintLines,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; } else { // Here we perform frequency switching forDEBUG = "freq/switch"; // SPR-2926: Use userNODcycles as overall multiplier for repeatLine // No longer true with raster+OFF; repeat raster instead paramsSPECext = PacsLineSpecEstimatorOBCP32(sortLines[waveLOOP1],sortWaveTuple[waveLOOP1],paramsSPEC,verbose); // Copy estimates to respective tuples confSPECblu[waveLOOP] = paramsSPECext{0}; confSPECred[waveLOOP] = paramsSPECext{1}; confOBCP[waveLOOP] = paramsSPECext{2}; if(useWaveSwitchParam) { confOBCP[waveLOOP]{4} = switch_nb_ramps; confOBCP[waveLOOP]{0} = userNODcycles * switch_nb_cycles; confOBCP[waveLOOP]{6} = switch_ditherCount; confOBCP[waveLOOP]{7} = switch_ditherCount; confOBCP[waveLOOP]{1} = switch_jumpsize; confOBCP[waveLOOP]{2} = switch_jumpsize; confOBCP[waveLOOP]{9} = switch_dither_step_size; } } if(useScanParam) { confOBCP[waveLOOP]{1} = grat_step_size; confOBCP[waveLOOP]{2} = grat_step_size; confOBCP[waveLOOP]{6} = nb_grat_steps; confOBCP[waveLOOP]{7} = nb_grat_steps; confOBCP[waveLOOP]{3} = nb_SRC_OFF; confOBCP[waveLOOP]{4} = nb_ramps_plateau; } if(useCalblockParam) { confOBCP[waveLOOP]{0} = cb_nb_up_down; confOBCP[waveLOOP]{1} = cb_grat_step_size; confOBCP[waveLOOP]{2} = cb_grat_step_size; confOBCP[waveLOOP]{4} = cb_nb_ramps_plateau; confOBCP[waveLOOP]{6} = cb_nb_grat_step; confOBCP[waveLOOP]{7} = cb_nb_grat_step; confSPECblu[waveLOOP]{1} = cb_nbRdoutRamp; confSPECred[waveLOOP]{1} = cb_nbRdoutRamp; } if(useDetParam) { confSPECred[waveLOOP]{0} = capaRed; confSPECblu[waveLOOP]{0} = capaBlue; confSPECblu[waveLOOP]{1} = det_nbRdoutRamp; confSPECred[waveLOOP]{1} = det_nbRdoutRamp; confSPECred[waveLOOP]{2} = nb_rdouts_subramp; confSPECblu[waveLOOP]{2} = nb_rdouts_subramp; if(reduction_mode == "ramp average") { confSPECblu[waveLOOP]{5} = 1; confSPECred[waveLOOP]{5} = 1; } else { if(reduction_mode == "ramp fitting") { confSPECred[waveLOOP]{5} = 0; confSPECblu[waveLOOP]{5} = 0; } } } // Accumulate total OBS time totalOBS = totalOBS + paramsSPECext{3}{2}; if(verbose) { debug_print("MAIN.Obs mode : " + forDEBUG); debug_print("MAIN.Wavelength : " + sortLines[waveLOOP1]{1}); debug_print("MAIN.confOBCP[" + waveLOOP + "]: " + confOBCP[waveLOOP]); debug_print("MAIN.confSPEC[" + waveLOOP + "]: " + confSPECblu[waveLOOP]); } } if(verbose) { debug_print("MAIN.Minimum required time: " + totalOBS + " [sec]"); } if(chopNod) { // Here we perform nodding/chopping nbNods = userNODcycles; if(verbose) { debug_print("MAIN.The PointReq will contain " + nbNods + " nod cycles"); } } else { // Here we perform freq switch nbNods = 0; } // Inform user string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "

      Minimum required OBStime: " + totalOBS + " [sec]

      "; lineCnt = lineCnt + 1; int nodTotal = nbNods * totalOBS; if(chopNod) { msgLine[lineCnt] = "

      With the specified NOD count, " + nbNods + ", the total OBS time amounts to " + nodTotal + "[sec]

      "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

      Since no NOD was specified the total OBS time is equal" + " to the minimum required time. The time can be changed" + " by changing the line(s) repeat factor

      "; lineCnt = lineCnt + 1; } PacsMessageCenter("Accumulated SRC+REF time estimation",lineCnt,msgLine); // Messages on general Detector/SPU parameters lineCnt = 0; msgLine[lineCnt] = "

      Red channel

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
        "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Number of readouts per ramp: " + confSPECred[0]{1} + "
      • "; lineCnt = lineCnt + 1; int subRamps = confSPECred[0]{1} / confSPECred[0]{2}; msgLine[lineCnt] = "
      • Number of subramps/ramp: " + subRamps + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Fitting algorithm: " + confSPECred[0]{5} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Integration capacitor: " + confSPECred[0]{0} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Blue channel

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
        "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Number of readouts per ramp: " + confSPECblu[0]{1} + "
      • "; lineCnt = lineCnt + 1; subRamps = confSPECblu[0]{1} / confSPECblu[0]{2}; msgLine[lineCnt] = "
      • Number of subramps/ramp: " + subRamps + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Fitting algorithm: " + confSPECblu[0]{5} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Integration capacitor: " + confSPECblu[0]{0} + "
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      "; lineCnt = lineCnt + 1; PacsMessageCenter("Selected PACS setup parameters",lineCnt,msgLine); ////////////////////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source // First operation is to set the OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsSpecSlewCal to perform AOT prologue and CAL during // slew to source. Establish an array of key wavelengths, one per order, // commensurate with user given wavelengths // MODIF: this leads to redundancy when Lines are selected both in // the norder+1st order: hence 1KWL per Filter: i.e. in practice 1 // per "blue order double keyWL = PacsSpecKeyWaves(orderSel); double[] keyWAVE = [keyWL]; // double[] keyWAVE = PacsLineSpecKeyWaves(sortWaveTuple); // int nbKeyWAVE = length(keyWAVE); == 1 int nbKeyWAVE = 1; // With current versions of CommandOBCP27 and CommandOBCP32, the grating is // supposed to be left by SlewCal at the position needed for the 1st line // The OBCPs will leave the grating at that same position int frstLstGratPos = confOBCP[1]{8}; if(verbose) { debug_print("MAIN:SortWaveTuple: " + sortWaveTuple); debug_print("MAIN:keyWAVES " + keyWAVE); debug_print("MAIN:SlewCal should leave grating at: " + frstLstGratPos); } // Time needed to perform these activities during slew (includes AOT // prologue) bool doAOTprologue = true; int timeSlewCal = duration(PacsSpecSlewCal(verbose,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,filter,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during slew: " + timeSlewCal); } // CAL for HOLD doAOTprologue = false; int timeHoldCal = duration(PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,doAOTprologue,keyWAVE,0,frstLstGratPos,orderSel)); if(verbose) { debug_print("&&&&&&&&&&&&&&& CAL time during HOLD: " + timeHoldCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsSpecCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsSpecCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // IMPORTANT NOTE: the duration could be different for the first cycle through // all wavelengths than for the following ones owing to differing initial state. // However, all steps have been taken so that PACS starts the actual observation // in the same state as it would be left at the end of any wavelength cycle // Duration of any nod leg or staring observation // Different OBCP for wavelength switch if(!switching) { // Here we perform nodding/chopping int timeOBS = duration(PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP27: " + timeOBS + " [sec] per pointing; nbNods: " + nbNods); } } else { // Here we perform freq switch timeOBS = duration(PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,verbose)); if(verbose) { debug_print("Duration OBCP32: " + timeOBS + " [sec] per pointing"); } } // Get duration of module to close AOT operations // This includes parking the grating // Park position int grat_park = ilookup("SPEC_MEC_Defaults","Spectroscopy","grating"); // The grating was left by OBCPs at frstLstGratPos int timeEpilogue = duration(SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose)); // WriteEndID will be the last TC; get its duration int timeEndID = duration(WriteEndID()); // Summary of relevant data collected so far // timeSlewCal: duration of the leading CAL, including AOT_prologue // timeOBS : duration of a single pointed OBS // nb_nods : number of nods for staring mode or per raster position // chopNod : invoke nodding or not (nb_nods = 0 is equivalent to no nod) // m, n : raster nb_points/line, nbLines per RREQ // pointStep,lineStep: more raster parameters // ra,dec: more pointing parameters // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Ready to issue a FinePointing mode with/without nodding or // a RasterReq with/without nodding. Either one will use time during // slew to perform SlewCal. // // The chopper step has been read already (PacsSpecDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table. Read chopper position SRC and // REF1 [arcsec] double chopAngleSrc = dlookup("SPEC_CHOP_params",throw,"SRC"); double chopAngleRef = dlookup("SPEC_CHOP_params",throw,"REF1"); // The total nodThrow = chopperTotalThrow double nodThrow = abs(chopAngleSrc - chopAngleRef); if(verbose) { debug_print("PacsSpecDef: CHOP/NOD params SRC/REF/NOD: " + chopAngleSrc + "/" + chopAngleRef + "/" + nodThrow); } // Issue pointing request (when possible use JBr's variable names for clarity) // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // Virtual aperture string ib = "P02_0"; // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("#### Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("#### skewCorrec : " + skewCorrec); } int tslewmin = timeSetOBSID + timeSlewCal; int tinithold = 0; int tfinalhold = timeEndID + timeEpilogue; int tp = timeOBS; double patt = 0.0; double pattnod = 270.0 + skewCorrec; int k = 0; // DAC Test ONLY int thold = timeHoldCal; int nhold = 0; nload = 0; int tloadslewmin = 0; bool fixed = true; // FinePointingMode with setup time if(pointCase == 11) { // FinePointingMode without nodding int[] fromPntReq = basic_fine_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,yoffset,zoffset,tp); } if(pointCase == 12) { // FinePointingMode without nodding, section 3.4 ib = "P02_0"; // Nodding is specified wrt spacecraft fixed = false; // Nodding is along y axis, opposite chopper pattnod = 270.0 + skewCorrec; fromPntReq = nodding_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nbNods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); } if(pointCase == 21 || pointCase == 31) { // RasterMode repeated_raster_with_hold_and_OFF, section 3.5 ib = "P02_0"; // Raster in instrument coordinates fixed = false; double d1 = pointStep; double d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; k = 0; int top = 0; if(!switching && pointCase == 21) { raoff = 0.0; decoff = 0.0; } int nrepeat = 1; // If switching for "large" source perform OFF observation if(switching || pointCase == 31) { // Repeat raster according to userNODcycles nrepeat = userNODcycles; k = n * m; top = tp; } int trepeatmin = 0; int tloadmin = 0; nload = 0; // SPR-3237 (map orientation parameter) applies only to raster if(pointCase == 31) { fixed = true; patt = mapRasterAngle; } fromPntReq = raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); } if(pointCase == 22 || pointCase == 32 && source != "large_b") { // Raster mode w/nodding, section 3.6 ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; k = 0; nrepeat = 1; // New arguments for pointing request; will be dealt with next iteration top = 0; raoff = 0.0; decoff = 0.0; trepeatmin = 0; tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nbNods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); } if(pointCase == 32 && source == "large_b") { // Nodding of Raster, section 3.6 debug_print("toto"); ib = "P02_0"; // Raster in instrument coordinates fixed = false; // Convert pixel into arcsec NOTE: ALREADY in [arcsec] d1 = pointStep; d2 = lineStep; // Some variables already defined above (may need different values!) tinithold = 0; tfinalhold = timeEndID + timeEpilogue; patt = 0.0; // Nod parallel to y axis, opposite chopper pattnod = 270.0 + skewCorrec; // k = m * n; int ncycles = userNODcycles; nrepeat = 1; tloadmin = 0; fromPntReq = nodding_of_raster_pointing(true,tslewmin,tinithold,tfinalhold,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,pattnod,nodThrow,ncycles,knod,nrepeat,tloadmin,nload); } // Parameters returned by PointReq if(verbose) { debug_print("++++++++++++++++++++++++ Issue PointRequest now"); debug_print("Return from PointReq: " + fromPntReq); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; ///////////////////////// end of "timing" section ////////////////////////// }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); int tNOW = time(); debug_print("=====Issued PointReq Time_now: " + tNOW); } // Issue TCs int[] stateVar = [0]; int nbOBS = 0; int nbOFF = 0; while(stateVar[0] >= 0) { stateVar = next_state(); if(stateVar[0] == 1) { if(verbose) { tNOW = time(); debug_print("=== SLEW starts at: " + tNOW); } // Write OBSID (logical part of SlewCal) WriteOBSID($OBSID); int[][] calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,true,keyWAVE,filter,frstLstGratPos,orderSel); // Define accumulated Cal time int[][] sumUpCalTime = calTime; if(verbose) { tNOW = time(); debug_print("=== SLEW ends at: " + tNOW); debug_print(" SumUpCalTime: " + sumUpCalTime); } } else { if(stateVar[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { int[][] obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { int[][] sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== POINT ends at: " + tNOW); } } else { if(stateVar[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // Regular OBCP or frequency switched OBCP? if(!switching) { /// obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); } else { /// obsTime = PacsSpecCommandOBCP32(confSPECblu,confSPECred,confOBCP,false); } nbOFF = nbOFF + 1; // Logic to sum up obsTime /// if (nbOFF == 1) {sumUpObsTime = obsTime;} /// if (nbOFF > 1) {sumUpObsTime = SumFunction(obsTime,sumUpObsTime);} if(verbose) { tNOW = time(); /// debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== OFF ends at: " + tNOW); } } else { if(stateVar[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } obsTime = PacsSpecCommandOBCP27(confSPECblu,confSPECred,confOBCP,false); nbOBS = nbOBS + 1; // Logic to sum up obsTime if(nbOBS == 1) { sumUpObsTime = obsTime; } if(nbOBS > 1) { sumUpObsTime = SumFunction(obsTime,sumUpObsTime); } if(verbose) { tNOW = time(); debug_print(" SumUpObsTime: " + sumUpObsTime); debug_print("=== NOD ends at: " + tNOW); } } else { if(stateVar[0] == 6) { if(verbose) { tNOW = time(); debug_print("=== HOLD starts at: " + tNOW); } calTime = PacsSpecSlewCal(false,confSPECblu,confSPECred,confOBCP,false,keyWAVE,filter,frstLstGratPos,orderSel); sumUpCalTime = SumFunction(calTime,sumUpCalTime); if(verbose) { tNOW = time(); debug_print(" SumUpCalTime: " + sumUpCalTime); debug_print("=== HOLD ends at: " + tNOW); } } else { if(stateVar[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } SPEC_aot_epilogue(frstLstGratPos,grat_park,verbose); WriteEndID(); tNOW = time(); if(verbose) { debug_print("=== FinalHOLD ends at: " + tNOW); } } else { if(stateVar[0] == -1) { if(verbose) { tNOW = time(); debug_print("=== AOT ends at: " + tNOW); } } } } } } } } } int timeObsEnd = time(); if(verbose) { debug_print("OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print("Ending with NbOFF: " + nbOFF); } // The original concept of returning durations did not take into // account the bandwidth of the TC bus (2 TCs/sec). The "real" // duration is given by the result from the "duration()" function. Hence // the true total duration of the SlewCal phase is given by /// calTime[0] = timeSlewCal; // as a result, the overheads are now /// calTime[4] = calTime[0]-(calTime[1]+calTime[2]+calTime[3]); if(verbose) { debug_print("Slew & HOLD Cal return: " + sumUpCalTime); } // The same holds true for the OBCP27 phase. However, I cannot make the // break-down by wavelength (the OBCP27 duration is given for ALL lines). // We may add up the SRC, CAL, and OVR components of OBCP27 duration. For // this we need a tuple so we can add the wavelength and other relevant // information to the (per wave) duration arrays. // // infoArray[] contains a "fixed" global information part // infoArray[0]: {Slew, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[1]: {Point, intTime,TotDur,nbRanges,nnods,m*n} // infoArray[2]: {AOTinfo,intTime,TotDur,nbRanges,nnods,m*n} // // and a per wavelength array: // [waveSTART,waveEND,order,gratStep,nbGratStep,TOT,SRC,REF,CAL,OVR] // TotDur as given by duration(); TOT,SRC,REF,CAL,OVR are also in [sec] {{string,double,int,int,int,int},{double,double,int,int,int,int,int,int,int,int}[]}[] infoArray = [{{"",0.0,0,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}]; // Fill 1st dimension of infoArray with data from SlewCal // Instead of using timeSlewCal, use tslew time returned by PointReq // infoArray[0] = {{"SlewCal",0.0,timeSlewCal,0,0,0},[{0.,0.,0,0,0,0,0,0,0,0}]}; infoArray[0] = {{"SlewCal",0.0,tslew,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Compute integration time per chopper plateau // intTime = nbRamps/plateau x nbRdouts/ramp x sampleInterval // Sampling frequency double specSample = dlookup("PACSparams","spec_sample","freq_time"); // Number of readouts per ramp int nbRdoutRamp = confSPECblu[1]{1}; // NOTE: WAIT=1 are now counted as useful ramps; hence int wait1 = 1; // but there is no wait in FreqSwitch // Count the WAIT=1 for grating as a useful SRC if(switching) { wait1 = 1; } int nbRampPlateau = confOBCP[1]{4} + wait1; // double intTime = double(nbRampPlateau * nbRdoutRamp) / specSample; if(verbose) { debug_print("MAIN:AOT : " + userMode); debug_print("MAIN:Rdouts/ramp : " + nbRdoutRamp); debug_print("MAIN:Ramps/plateau: " + nbRampPlateau); debug_print("MAIN:IntTime : " + intTime); } // Replace timeOBS (per raster and per nod) with tobs from PntReq (matching // change in PacsProcessInfoArray) // infoArray[1] = {{userMode,intTime,timeOBS,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; infoArray[1] = {{userMode,intTime,tobs,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; for(int loop3 = 0 .. nbLines1) { // for some reason it has to be "initialized" infoArray[1]{1}[loop3] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the START wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{0} = sortLines[loop3]{1}; // copy the END wavelength (for LINE START = END = line wave) infoArray[1]{1}[loop3]{1} = sortLines[loop3]{1}; // copy the grating order infoArray[1]{1}[loop3]{2} = sortWaveTuple[loop3]{1}; // copy the grating step infoArray[1]{1}[loop3]{3} = sortWaveTuple[loop3]{4}; infoArray[1]{1}[loop3]{3} = (confOBCP[loop3 + 1]{2} - confOBCP[loop3 + 1]{1}) / 2; // copy the number of grating steps infoArray[1]{1}[loop3]{4} = confOBCP[loop3 + 1]{6}; // copy other data from sumUpObsTime infoArray[1]{1}[loop3]{5} = sumUpObsTime[loop3][0]; infoArray[1]{1}[loop3]{6} = sumUpObsTime[loop3][1]; infoArray[1]{1}[loop3]{7} = sumUpObsTime[loop3][2]; infoArray[1]{1}[loop3]{8} = sumUpObsTime[loop3][3]; infoArray[1]{1}[loop3]{9} = sumUpObsTime[loop3][4]; } // Also data from SlewCal to infoArray for(int loop4 = 0 .. nbKeyWAVE - 1) { // for some reason it has to be "initialized" infoArray[0]{1}[loop4] = {0.0,0.0,0,0,0,0,0,0,0,0}; // copy the wavelength infoArray[0]{1}[loop4]{0} = keyWAVE[loop4]; // copy other data from sumUpCalTimeTime infoArray[0]{1}[loop4]{5} = sumUpCalTime[loop4][0]; infoArray[0]{1}[loop4]{6} = sumUpCalTime[loop4][1]; infoArray[0]{1}[loop4]{7} = sumUpCalTime[loop4][2]; infoArray[0]{1}[loop4]{8} = sumUpCalTime[loop4][3]; infoArray[0]{1}[loop4]{9} = sumUpCalTime[loop4][4]; } // Further update of infoArray: add information from AOT_prologue infoArray[0]{1}[nbKeyWAVE] = {0.0,0.0,0,0,0,0,0,0,0,0}; // Copy OVR and TOT times infoArray[0]{1}[nbKeyWAVE]{9} = calTime[nbKeyWAVE][4]; infoArray[0]{1}[nbKeyWAVE]{5} = calTime[nbKeyWAVE][4]; // Copy the number of lines observed and the number of key waves used infoArray[0]{0}{3} = nbKeyWAVE; infoArray[1]{0}{3} = nbLines; // Copy the number of nod cycles and the number of raster points visited infoArray[1]{0}{4} = nbNods; infoArray[1]{0}{5} = m * n; // The duration of the OBS phase is given by timeObsEnd - timeSlewCal // Now get it from PntReq: timeObsPhase == tobs // int timeObsPhase = timeObsEnd - timeSlewCal; // Slew time during the OBS phase is then given by int timeSlewObs = tobs - nbOBS * timeOBS; if(verbose) { debug_print("CalSlew phase lasted [sec]: " + timeSlewCal); debug_print("The OBS phase lasted [sec]: " + tobs); debug_print("Total slew during OBS [sec]: " + timeSlewObs); } // Fill 3rd dimension of infoArray with global timing and AOT information // timeObsEnd is the total duration of the AOT // Pass details of AOT // We use OBCP27: OBCP_grat_scan_chop2 (unless FreqSwitch) string aotName = "GratScanChop2"; // Special "sky time" for FreqSwitch and SmallSourceDither if(switching) { aotName = "FreqSwitch"; } if(source == "dithered") { infoArray[1]{0}{0} = "SmSrcDither"; } infoArray[2] = {{aotName,0.0,timeObsEnd,0,0,0},[{0.0,0.0,0,0,0,0,0,0,0,0}]}; // Use available entries to convey m,n, and nbNods infoArray[2]{0}{3} = m; infoArray[2]{0}{4} = n; // PointSources are also seen with composite_nodding if(pointMode == "fine_pointing" || pointMode == "composite_nodding") { infoArray[2]{0}{3} = 1; infoArray[2]{0}{4} = 1; } infoArray[2]{0}{5} = nbNods; // If switching if(switching && source == "Large") { infoArray[1]{0}{0} = "RasterOFF"; } else { if(switching && source == "Point") { infoArray[1]{0}{0} = "Pointed"; } infoArray[2]{0}{5} = userNODcycles; } // Process the information contained in infoArray (pass also sortLines) PacsProcessInfoArrayLine(infoArray,sortLines,confOBCP,obsOverhead,nbOBS,nbOFF,verbose); // Close messages for HTML format message(""); message(""); // Compute the total time SRC + REF int accumSrceRef = 0; for(int loopL = 0 .. nbLines - 1) { // Add up Srce and Ref times (SRC + REF) accumSrceRef = accumSrceRef + infoArray[1]{1}[loopL]{6} + infoArray[1]{1}[loopL]{7}; } // Compute overheads as total "sky" time minus SRC+REF time int overPACSandSC = fromPntReq[0] - accumSrceRef; // Return demanded tuples return {accumSrceRef,fromPntReq[1],overPACSandSC}; } // Missionphase : FM // // Purpose : Stop diagnostic housekeeping // // Author : Helmut Dannerbauer // CUS author : HD // // Description : The instrumental command for stopping the diagnostic housekeeping // is called. // // Dependencies : // // Preconditions : PACS switched-on, and diagnostic housekeeping is started. // // // Comments : This script is based on the commanding during the CQM ILT. // // Version : 3.1 // // History : 1.0 21-07-06 creation by HD // 2.0 24-07-06 HD. test this script. // 3.0 24-07-06 HD. script works. // 3.1 21-jan-2008 DAC Added WriteEndBB block PACS_stop_dhk_fm_bb PACS 357 { }{ // Register start of BB WriteBBID($BBID); // Stop diagnostic HK Pacs_DMC_STOP_DIAG_HK(); // End of BB WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : TM // // Input arguments // type name description // // Return values // Type Name Description // // Description : Switch on groups // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 08-nov-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Switchon { /* No variables to call PacsEng_Phot_Switchon */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Switchon */ }{ // 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(PACS_Phot_Switchon())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Switchon(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : FM ILT // // Purpose : Switch on/off diagnostic HK // // Author : Markus Nielbock // CUS author : MN // // Description : This building block switches on/off diagnaostic HK. // Receiving signals: // ON: switch on diagnostic HK // OFF: switch off diagnostic HK // // Dependencies : // // Preconditions : PACS switched-on, chopper is switched on // // Comments : // // Version : 1.2 // // History : 1.0 15-12-06 creation by MN // : 1.1 03-01-07 modified HK list (MN) // : 1.2 08-03-07 modified HK list (MN) // Begin Mode description block PACS_SPEC_Chopper_OpenLoop_MoveAbs_dHK_BB PACS 430 { string onoff = "OFF" in ["ON","OFF"]; }{ // For housekeeping using the chopper in open-loop mode, we need the // following parameters: // 242 DMC_IRS_CNT // 244 DMC_CHOP_CUR_POS // 245 DMC_CHOP_SETPOIN // 258 DMC_CHOP_OUTPUT // 561 DMC_CHOP_IA // Get BBID from environment int myBBID = $BBID; // Send BBID to DMC WriteBBID(myBBID); // IF-statement for switching on if(onoff == "ON") { // Readout period set to 1kHz int diag_hk_period = 0; // Create list of HK parameters {int}[] parlist = [{242},{244},{245},{258},{561},{0xffff}]; int hk_len = length(parlist); // Calculate check sum int[] aux = [242,244,245,258,561,0xffff]; int check_sum = checksum("int",aux); // Write HK parameters and start HK debug_print("Starting chopper diagnostics with " + hk_len + " parameters:"); Pacs_DMC_WRT_DIAG_HK_LIST(hk_len,parlist,check_sum); Pacs_DMC_START_DIAG_HK(diag_hk_period); } // End IF // IF-statement for switching off if(onoff == "OFF") { debug_print("Stopping diagnostic HK"); Pacs_DMC_STOP_DIAG_HK(); } // End IF // Mark End of Block WriteEndBB(); } // // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // Version : 2.0 // History : 0.1 22-mar-2006 // History : 2.0 04-mar-2008 Converted into PV script by VDP // obs PacsEng_Phot_Fil_nturns { /* Needed variables to call PacsEng_Phot_Fil_nturns */ int num_turns = 3; // Number of full turns int backward_toA = 0; // direction of FW rotation towards POS A : 0 forward; 1 backward int backward_toB = 0; // direction of FW rotation towards POS B : 0 forward; 1 backward /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Fil_nturns */ }{ // 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(PACS_Phot_Fil_nturns(num_turns,backward_toA,backward_toB))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Fil_nturns(num_turns,backward_toA,backward_toB); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } ///////////////////////////////////////////////////////////////////////////// /// $Id$ ///////////////////////////////////////////////////////////////////////////// // Purpose : Main module for PacsPhoto AOT // CUS author : DAC // Script file : PacsCal_PacsPhotoDAC.txt // Return values // Description : // This AOT has to cater to three different source morphologies: // "point", "small", and "large". Each mode requires its own pointing modes. // Available pointing modes (reference is to JBr's document): // NOTE: All modes include operations during SLEW and operations at end of OBS. // NOTE: Updated based on e-mail from MS dated 3-Dec-2005 (denoted UPDATE) // NOTE: Updated after Saclay meeting // ==== "point" // no nodding 2.1 fine_pointing // nodding (includes "hold" periods) 3.4 nodding_pointing // UPDATE: Nodding is always needed ==> eliminate fine_pointing // // ==== "small" // (raster dimensions and steps TBD; expect 2x2 or 3x3) // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding always used ==> nodding_in_raster // // ==== "large" // Can be RASTER or SCAN (freeze mode is based upon a SCANning PointMode) // RASTER // no nodding ("hold" periods and repetition) 2.13 repeated_raster_with_hold // nodding ("hold" periods and no repetition) 2.12 nodding_in_raster // UPDATE: Nodding not used ==> raster_pointing // // SCAN // There is no nodding and no chopping. "Hold" periods are allowed (mode 2.14) // Leg length is restricted to 20 degrees. // // Dependencies : // // Preconditions : // // Comments : Almost identical to PacsPhoto. Maid differences: // - accept (from XHspot) the following variables: // - nholdIN User defined "nhold", overrides CAL values // - confphotoparams Non-standard CONF_PHOTOparams CAL file // - obcpparams Non standard OBCP3params (point source) or // OBCP4params (small source) CAL files // - Calls two PV dedicated AOT scripts (search _PV in code). // These scripts accept confphotoparams and obcpparams // // History : 0.1 19-may-2008 DAC PV version based on PacsPhoto.def // - Added name of OBCP3params and CONF_PHOT_params files as // input parameters. Activated "nhold" logic // 0.2 20-may-2008 DAC // - Mostly editorial changes (useful for the AOT version // as well) // 0.3 21-may-2008 DAC // - Make nhold an input variable, ignore values in CAL files // (not for the AOT version, where "nhold" in CAL files // seems more adequate) // 0.4 18-jul-2008 DAC // - Add OFF option to the SCAN mode // - Remove unused mapScanConstrXX // - Remove unused chopAvoidXX // - Remove unused mapRasterConstrXX // - Prompt user for // - raoff, decoff (needed for OFF) // - gain (in CONF_PHOT_params) // - comp_mode (in CONF_PHOT_params) // - nb_main_loops (in OBCP3params,OBCP4params) // - nb_rdouts_plateau (in OBCP3params, OBCP4params) // - max_dither (in OBCP3params) // - nhold (in OBCP3params,OBCP4params) // - nb_SRC_REF (in OBCP4params) // - nb_CS1_CS2 (in OBCP4params) // - kOFF user defined OFF repetition // All user defined variables will overwrite values obtained // from the associated CAL-U tables. Code *may* anounce // such and such value but the actual numerical value will // be the one given by the user. // 0.5 9-oct-2008 DAC Use line_scan_with_off_pointing to allow OFF positions // {int,int,int,double,{string,double,double,double,double,double,double}[]} obs PacsCal_PacsPhotoDAC { string blue = "blue1" in ["blue1","blue2"]; int repFactor = 1 in [1,1500]; // Repeat factor: i.e. nb of nods or rasters string source = "point" in ["point","small","largeRaster","largeScan","none"]; // Source size/Obs type string mapScanSpeed = "high" in ["high","medium","low"]; // Scan rate double mapScanLegLength = 30.0 in [1.0,1200.0]; //Scan leg [arcmin] int mapScanNumLegs = 2 in [1,1500]; //Number of scan legs string mapScanAngleRef = "inst" in ["sky","inst","i+c","s+c"]; double mapScanAngle = 0.0 in [0.0,360.0]; double mapScanCrossScan = 2.0 in [2.0,480.0]; // Scan separation [arcsec] bool mapScanHomCoverage = true; bool mapScanSquare = false; double pointStep = 2.0 in [2.0,480.0]; double lineStep = 2.0 in [2.0,480.0]; string mapRasterAngleRef = "inst" in ["inst","i+c"]; int m = 2 in [2,100]; int n = 1 in [1,100]; bool dither = false; int naifid = 0; //RA,DEC or SSO double fluxPntBlu = 116.0 in [0.0,2.0E7]; // Flux density in blue band mJy double fluxPntRed = 150.0 in [0.0,2.0E7]; // Flux density in red band mJy double fluxExtBlu = 116.0 in [0.0,2.0E7]; // Flux in blue band MJy/sr double fluxExtRed = 40.0 in [0.0,2.0E7]; // Flux in red band MJy/sr int obsOverhead = 180; // Slew overhead /* Block of new user prompted variables */ int gain_red = 1 in [0,1]; //Gain: 0:HI, 1:LO int gain_blu = 1 in [0,1]; //Gain: 0:HI, 1:LO int comp_mode_red = 0; //Compression algorithm (red channel) int comp_mode_blu = 0; //Compression algorithm (blue channel) int nb_main_loops = 1; //Outermost counter in OBCP3 int nb_rdouts_plateau = 15; //NbRDouts/plateau (must be 4*n-1) int max_dither = 1060; //Dithering for OBCP3 int nhold = 0; //How often perform a CAL observations int kOFF = 0; //How often perform the OFF observation int nb_SRC_REF = 38; //Nb of SRC/REF chopper cycles int nb_CS1_CS2 = 0; //Number of CS1/CS2 chopper cycles double ra = 0.0 in [0.0,360.0]; // RA of Target double dec = 0.0 in [-90.0,90.0]; // DEC of Target double raoff = 0.0; //Where OFF will be performed double decoff = 0.0; //Where OFF will be performed bool refSelected = false; // OFF position needed /* End block of new user prompted variables */ /* End of input section */ }{ // Begin "pointing" section // Overall "verbosity" bool verbose = true; // New nodding_pointing variable bool startAtOFF = false; // Conversion to deprecated variables bool noddingSel = true; if(source == "largeRaster") { string largeOptions = "raster"; bool mapRasterSel = true; noddingSel = false; } if(source == "largeScan") { largeOptions = "scan"; mapRasterSel = false; noddingSel = false; } int mapRasterNumCycles = repFactor; // Useful variables // Bolo size: Short Size, i.e. 32 pixels and Long Size [arcsec] double boloSSize = 1.75 * 60.0; double boloLSize = 3.5 * 60.0; double boloArea = boloSSize * boloLSize; // // Set messages for HTML format message(""); message(""); // Pointing mode has not been established yet int pointCase = 0; // Determine the pointing mode if(source == "point") { // Variable needed to obtain choper throw from CAl-U string srcID = "pointSRC"; // Just for completiness, define a 1x1 raster m = 1; n = 1; // Fine pointing without nodding is disallowed (pointCase remain null) if(!noddingSel) { string pointMode = "basic_fine_pointing"; string shortDesc = "Point source (no nodding)"; // not allowed pointCase = 11; } else { pointMode = "nodding_pointing"; shortDesc = "Point source (nodding and chopping)"; pointCase = 12; string yzoffsetROW = "P" + pointCase; } } if(source == "small") { srcID = "smallSRC"; // Obtain the size of the raster from CAL-U "SMALL_SRC_params" m = ilookup("SMALL_SRC_params","PHOT","mRast"); n = ilookup("SMALL_SRC_params","PHOT","nRast"); pointStep = dlookup("SMALL_SRC_params","PHOT","pointStep"); lineStep = dlookup("SMALL_SRC_params","PHOT","lineStep"); if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = " Small source (no nodding)"; // not allowed // pointCase = 21; } else { pointMode = "nodding_raster_pointing"; shortDesc = "Small source (nodding and chopping)"; pointCase = 22; yzoffsetROW = "P" + pointCase; } } // Large source in Raster Mode if(source == "largeRaster") { srcID = "largeSRC"; if(!noddingSel) { pointMode = "raster_pointing"; shortDesc = "Large source, raster mode (chopping and no nodding)"; pointCase = 31; yzoffsetROW = "P" + pointCase; } else { pointMode = "nodding_in_raster"; shortDesc = "Large source, raster mode (chopping and nodding)"; // not allowed // pointCase = 32; } } // Large source in Scan Mode if(source == "largeScan") { srcID = "largeSRC"; pointMode = "line_scan_pointing"; shortDesc = "Large source, line scan mode (no chopping)"; // For consistency m = 1; n = mapScanNumLegs; pointCase = 33; yzoffsetROW = "P" + pointCase; } // If pointCase is still 0, then something went wrong with the PointMode logic... if(pointCase == 0) { error("NODDING is incompatible with source: " + source); } // The pointing mode has been established. Continue with other input data // from HSPOT if(verbose) { debug_print("================> PointMode: " + pointMode); } // // confPHOT arrays (red and blu) compared to confSPEC // PHOT name SPEC name // confPHOTred{ 0} gain capa_red; // confPHOTred{ 1} N/A nb_rdouts_ramp_red; // confPHOTred{ 2} N/A nb_rdouts_subramp_red; // confPHOTred{ 3} same comp_mode_red; // confPHOTred{ 4} same glitch_det_red; // confPHOTred{ 5} ?? ramp_fit_alg_red; // confPHOTred{ 6 ?? nb_raw_red; // confPHOTred{ 7} N/A bias_r_red; // confPHOTred{ 8} N/A bias_d_red; // // Define confOBCP array. // NOTE: the conf arrays are inherited from PacsSpec, where the [0] element // represented the default values, and the [n] element represented values // to be used with the n-th wavelength. Here - PHOT - [0] still represents // the default values and [1] values corresponding to the chosen filter. // Could even use [1] and [2] for blue1 and blue2.... but will not! {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}[] confOBCP = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]; // Define confPHOTblu and confPHOTred {int,int,int,int,int,int,int,int,int}[] confPHOTblu = [{0,0,0,0,0,0,0,0,0}]; {int,int,int,int,int,int,int,int,int}[] confPHOTred = [{0,0,0,0,0,0,0,0,0}]; // Define paramsPHOT, a "tuple of tuples" // Estimator module returns {confPHOTblu,confPHOTred,confOBCP} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsPHOT = {clone(confPHOTblu[0]),clone(confPHOTred[0]),clone(confOBCP[0])}; // including a new section for Low Gain implementation SCR4196 bool isBrightPacs = false; string calUFile = "isBrightPacsTrigger"; // section defining triggering Fluxes (to be read in CALU table) double fluxPntRedTriggerLowGain = dlookup(calUFile,"Red","fluxPntTrigger"); if(blue == "blue1") { double fluxPntBluTriggerLowGain = dlookup(calUFile,"Blue","fluxPntTrigger"); } else { if(blue == "blue2") { fluxPntBluTriggerLowGain = dlookup(calUFile,"Green","fluxPntTrigger"); } } double fluxExtRedTriggerLowGain = dlookup(calUFile,"Red","fluxExtTrigger"); if(blue == "blue1") { double fluxExtBluTriggerLowGain = dlookup(calUFile,"Blue","fluxExtTrigger"); } else { if(blue == "blue2") { fluxExtBluTriggerLowGain = dlookup(calUFile,"Green","fluxExtTrigger"); } } // section test if(fluxPntRedTriggerLowGain <= fluxPntRed || fluxPntBluTriggerLowGain <= fluxPntBlu || fluxExtRedTriggerLowGain <= fluxExtRed || fluxExtBluTriggerLowGain <= fluxExtBlu) { isBrightPacs = true; } // Obtain default values for "Prime" mode paramsPHOT = PacsPhotDefaults(srcID,"Prime",isBrightPacs,verbose); // Array [0] of paramsPHOT contains the default values; array [1] // will contain the values based on HSPOT input. Array [1] is a copy of [0]; // only elements depending on HSPOT will be updated // Copy default values to individual "conf" tuples confPHOTblu[0] = paramsPHOT{0}; confPHOTred[0] = paramsPHOT{1}; confOBCP[0] = paramsPHOT{2}; // Intercept confPHOT and confOBCP with user given parameters // GAIN confPHOTblu[0]{0} = gain_blu; confPHOTred[0]{0} = gain_red; // Compression mode confPHOTblu[0]{3} = comp_mode_blu; confPHOTred[0]{3} = comp_mode_red; // There is no useful confOBCP in PhotDefaults // Now comes the module to estimate PACS parameters as a function of the // exposure time given by the user. // paramsPHOText (for extended) includes possible Pointing info (for // instance nb_nods). // Current "ext" contains: {nb_nods,repeat_factor,nhold,dummy2} {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} paramsPHOText = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0}}; // Establish observing conditions for given HSPOT input. Estimate algorithm // also needs to know if nodding is allowed or not if(verbose) { debug_print("++Photo: confOBCP[0]: " + confOBCP[0]); } paramsPHOText = PacsPhotEstimatorOBCPn(pointCase,blue,repFactor,paramsPHOT,noddingSel,dither,verbose); // Copy estimates to respective tuples confPHOTblu[1] = paramsPHOText{0}; confPHOTred[1] = paramsPHOText{1}; confOBCP[1] = paramsPHOText{2}; int nb_nods = paramsPHOText{3}{0}; int repeat_factor = paramsPHOText{3}{1}; // nhold is user defined // int nhold = paramsPHOText{3}{2}; // Intercept confOBCP with user given values confOBCP[1]{0} = nb_main_loops; confOBCP[1]{1} = max_dither; if(!dither) { confOBCP[1]{1} = 0; } confOBCP[1]{2} = 1; confOBCP[1]{3} = nb_SRC_REF; confOBCP[1]{4} = nb_rdouts_plateau; confOBCP[1]{5} = nb_CS1_CS2; /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// // Start computations for the "pre-calibration" cycle. This cycle to be // performed during the slew to the source. // We have to collect the duration of all TCs that will be released after the // PointingRequest // First TC is associated with setting OBSID int timeSetOBSID = duration(WriteOBSID($OBSID)); // Will call PacsPhotSlewCal to perform AOT prologue and CAL during // slew (with prologue): bool doProlog = true; int timeSlewCalProlog = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCalProlog: " + timeSlewCalProlog); } // Cal during "hold" cycles" (no prologue) doProlog = false; int timeSlewCal = duration(PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue)); if(verbose) { debug_print("Duration of SlewCal: " + timeSlewCal); } // Compute now the time needed to perform a single pointed OBS, i.e. a // single nod visit. // // Call PacsPhotCommand with all obtained parameters to get the // duration of observation (needed to issue Pointing Requests) // PacsPhotCommand generates all the TCs needed to perform either a // Staring observation or any leg of a Raster observation. // Duration of any nod leg or staring observation // Use OBCP3 for point source // Use OBCP4 for all others, except scan mode if(pointCase == 11 || pointCase == 12) { int timeOBS = duration(PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP3: " + timeOBS); } } if(pointCase == 22 || pointCase == 31) { timeOBS = duration(PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); if(verbose) { debug_print("TimeOBS OBCP4: " + timeOBS); } } if(pointCase == 33) { // Estimate how long OBCP7 has to run to cover a scan leg // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec double rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } double timeLEG = mapScanLegLength * 60.0 / rate; // Duration of OBCP7 // For one readout int nb_SRC = 1; confOBCP[1]{3} = nb_SRC; int timeOBS1 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // For 40 readouts nb_SRC = 40; confOBCP[1]{3} = nb_SRC; int timeOBS2 = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); // Slope per unit nb_SRC_REF, offset double slope = double(timeOBS2 - timeOBS1) / 39.0; double offset = double(timeOBS1) - slope; // Compute nb_SRC so that OBCP runs during the whole scan leg nb_SRC = iceil((timeLEG - offset) / slope); if(verbose) { debug_print("Duration scan leg: " + timeLEG); debug_print("Needed nb_SRC to fill scan leg: " + nb_SRC); } confOBCP[1]{3} = nb_SRC; timeOBS = duration(PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose)); } if(verbose) { debug_print("confOBCP[1]: " + confOBCP[1]); debug_print("==> Duration OBCP: " + timeOBS + " [sec] per nod; pointCase: " + pointCase); } // Finally deal with PHOT_aot_epilogue and WriteEndID int timeEpilogue = duration(PHOT_aot_epilogue()); int timeEndID = duration(WriteEndID()); timeEpilogue = timeEpilogue + timeEndID; if(verbose) { debug_print("Duration aot_epilogue: " + timeEpilogue); } // We have all elements to issue a Pointing Request and generate TCs // - duration of SlewCAL // - duration of OBS (one pointing) // - nb of nods or nb of raster points // - nhold // Define variables used to collect return values from PointReq // (Jon Brumfit's nomenclature) int tobs = 0; int tslew = 0; int tss = 0; int tload = 0; int tpp = 0; int tll = 0; int tnod = 0; int tsop = 0; int trep = 0; int tacc = 0; int tdec = 0; int tl = 0; int tlh = 0; // The nodding step has been estimated already (PacsPhotDefaults). However, // there are no provisions to carry that information here. Easiest is to // read again the relevant CAL-U table // Read nod amplitude [arcsec] double nodThrow = dlookup("PHOT_CHOP_params",srcID,"NOD"); max_dither = confOBCP[1]{1}; if(verbose) { debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("TimeSlewCal : " + timeSlewCal); debug_print("TimeOBS : " + timeOBS); debug_print("m/n : " + m + "/" + n); debug_print("nb_nods/repeat_factor/nhold: " + nb_nods + "/" + repeat_factor + "/" + nhold); debug_print("NOD amplitude for " + srcID + ": " + nodThrow + " [arcsec]"); int chpSRC = confOBCP[1]{12}; int chpREF1 = confOBCP[1]{13}; int chpREF2 = confOBCP[1]{14}; debug_print("#### CHOP SRC/REF1/REF2: " + chpSRC + "/" + chpREF1 + "/" + chpREF2); debug_print("CHOP dither: " + max_dither); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); debug_print("++++++++++++++++++++++++++++++++++++++++++++++"); } // Issue pointing request // Virtual aperture // Get x, y offsets and skewCorrec from the offset CALU file string offsetCALU = "PACSyzoffsets"; double yoffset = dlookup(offsetCALU,yzoffsetROW,"yoffset"); double zoffset = dlookup(offsetCALU,yzoffsetROW,"zoffset"); double skewCorrec = dlookup(offsetCALU,yzoffsetROW,"skewCorrec"); if(verbose) { debug_print("##Y/Z offsets: " + yoffset + "/" + zoffset); debug_print("##skewCorrec : " + skewCorrec); } // SCAN/RASTER orientation for "scan map" and "chopped raster" // RASTER defines mapRasterAngleRef = "inst" in ["inst", "i+c"]; // SCAN defines mapScanAngleRef = "sky" in ["sky", "inst", "s+c", "i+c"]; // By default S/C moves in instrument coordinates bool useINST = true; if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { useINST = false; } // Act according to pointCase // POINT source, i.e. 3.4 nodding_pointing if(pointCase == 12) { // Issue pointing request (when possible use JBr's variable names for clarity) // SlewCal during slew string ib = "P01_0"; int tslewmin = timeSetOBSID + timeSlewCalProlog; int tih = 0; int tfh = timeEpilogue; bool fixed = false; double pattnod = 0.0 + skewCorrec; int nnods = nb_nods; int tp = timeOBS; int tloadslewmin = 0; int nload = 0; int thold = timeSlewCal; // int nhold Already defined // Do not start at nod position startAtOFF = false; int[] fromPntReq = nodding_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,pattnod,yoffset,zoffset,nnods,nodThrow,tp,tp,tloadslewmin,nload,thold,nhold,startAtOFF); if(verbose) { debug_print("##### nodding_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tss = fromPntReq[2]; tload = fromPntReq[3]; } // SMALL source or LARGE raster with nodding if(pointCase == 22 || pointCase == 32) { // "nodding_raster_pointing" (3.6 in Pointing document) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; double patt = 0.0; // Chopper moves along -Y-axis pattnod = 270.0 + skewCorrec; // Chop nodThrow was already established // nodThrow = From CAL-U table // For small source there is no OFF int k = 0; fixed = false; int nrepeat = repeat_factor; double d1 = pointStep; double d2 = lineStep; thold = timeSlewCal; tp = timeOBS; nnods = nb_nods; // New arguments for pointing request; will be dealt with next iteration int top = 0; nrepeat = repeat_factor; int trepeatmin = 0; int tloadmin = 0; nload = 0; fromPntReq = nodding_raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,thold,nhold,pattnod,nodThrow,nnods,k,top,raoff,decoff,nrepeat,trepeatmin,tloadmin,nload); if(verbose) { debug_print("##### nodding_in_raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tss = fromPntReq[3]; tll = fromPntReq[4]; tnod = fromPntReq[5]; tload = fromPntReq[6]; tsop = fromPntReq[7]; trep = fromPntReq[8]; } // SMALL or LARGE source with no nodding if(pointCase == 21 || pointCase == 31) { // For large source user given OFF frequency if(pointCase == 31) { k = kOFF; } // raster_pointing (mode 3.5) ib = "P01_0"; tslewmin = timeSetOBSID + timeSlewCalProlog; tih = 0; tfh = timeEpilogue; // Perform raster in instrument coordinates fixed = false; //SPR-2431 Raster lines along y-axis patt = 90.0; d1 = pointStep; d2 = lineStep; tp = timeOBS; nrepeat = repeat_factor; thold = timeSlewCal; //DAC From CAL file nhold = 0; // If no OFF requested set top to zero; else equal to current OBCP if(kOFF == 0) { top = 0; } else { top = tp; } fromPntReq = raster_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,nrepeat,thold,nhold,k,top,raoff,decoff); if(verbose) { debug_print("##### raster_pointing"); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tpp = fromPntReq[2]; tll = fromPntReq[3]; trep = fromPntReq[4]; tsop = fromPntReq[5]; } if(pointCase == 33) { // line_scan_pointing. Keep (most of) JBr's variable names tslewmin = timeSetOBSID + timeSlewCalProlog; // Scan speed (CAL-U FILE in new version??). Default is "low": 10 arcsec/sec rate = 10.0; if(mapScanSpeed == "medium") { rate = 20.0; } if(mapScanSpeed == "high") { rate = 60.0; } // Case of homogeneous coverage double pi = 3.1415926535; // degrees to radians double dtor = 0.0; double rtod = 0.0; double halfDiag = 0.0; double halfDiagAngle = 0.0; dtor = 2.0 * pi / 360.0; rtod = 1.0 / dtor; halfDiag = sqrt(boloSSize * boloSSize + boloLSize * boloLSize) / 2.0; halfDiagAngle = atan(boloSSize / boloLSize) * rtod; // Add further constraint from RV (SPR-2889) // Add SPR-2699 further logic: mapScanAngleRef overrides ScanHom and ScanSquare if(mapScanAngleRef == "sky" || mapScanAngleRef == "s+c") { mapScanHomCoverage = false; mapScanSquare = false; } // Could simplify logic after SPR-2699 (mapScanHomCoverage cannot be true // unless inst or i+c have been specified) if(mapScanHomCoverage == true && (mapScanAngleRef == "inst" || mapScanAngleRef == "i+c")) { mapScanCrossScan = halfDiag * (abs(sin(dtor * (mapScanAngle + 90.0 - halfDiagAngle))) + abs(cos(dtor * (90.0 - halfDiagAngle - mapScanAngle + 90.0)))); if(verbose) { debug_print("New mapScancCross: " + mapScanCrossScan); } } // Case of square map request if(mapScanSquare == true && mapScanHomCoverage == true) { mapScanNumLegs = iceil(60.0 * (mapScanLegLength / mapScanCrossScan)); if(verbose) { debug_print("New mapScanNumLegs: " + mapScanNumLegs); } } ib = "P01_0"; tih = 0; tfh = timeEpilogue; // Use instrument coordinates unless HSPOT says otherwise fixed = false; if(useINST == false) { fixed = true; } patt = mapScanAngle; n = mapScanNumLegs; d1 = 60.0 * mapScanLegLength; d2 = mapScanCrossScan; thold = timeSlewCal; nrepeat = repFactor; if(verbose) { debug_print("Map reference: " + mapScanAngleRef + "=" + fixed); } // Major change: Use scan with off. It is not possible not to have an OFF or else use a different // pointing request // Perform OBCP7 during OFF // If no OFF requested use original pointing request if(kOFF == 0) { fromPntReq = line_scan_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,thold,nhold,nrepeat); } else { top = timeOBS; k = kOFF; tloadmin = 0; nload = 0; // In this pointing, nhold is bound by nrepeat if(nhold > nrepeat) { nhold = nrepeat; } fromPntReq = line_scan_with_off_pointing(true,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,n,d1,d2,rate,k,top,raoff,decoff,nrepeat,thold,nhold,tloadmin,nload); } //Info from API (nomenclature from Jon Br) tobs = fromPntReq[0]; tslew = fromPntReq[1]; tacc = fromPntReq[2]; tdec = fromPntReq[3]; tl = fromPntReq[4]; tll = fromPntReq[5]; trep = fromPntReq[6]; if(verbose) { debug_print("##### line_scan_with_off_and_hold"); } if(verbose) { debug_print("##### rate: " + rate + " arcsec/sec"); } // Here we calculate how long it takes to scan a line [sec] // int scanTime = iceil(d1/rate); // The "consistent" way of doing this is to rely on PntReq information int scanTime = tl; // Gather the overheads int scanOVER = tacc + tdec; } if(verbose) { debug_print("PointReq: " + fromPntReq + " for pointCase: " + pointCase); debug_print("PointMode: " + pointMode); } // End of "pointing" section }{ ///////////////////////// start of "commanding" section ////////////////////// if(verbose) { debug_print("++++++++++++++++++++++++ Start Command Section"); debug_print("++++++++++++++++++++++++ with PointMode " + pointMode); debug_print("++++++++++++++++++++++++ State Machine"); } // Initialize some "global" variables int totalOBStime = 0; int totalOBSover = 0; int totalCALtime = 0; int totalCALover = 0; int nbSCANlegs = 0; // Issue TCs int[] state = [0]; int nbOBS = 0; while(state[0] >= 0) { state = next_state(); //// STATE = SLEW if(state[0] == 1) { if(verbose) { int tNOW = time(); debug_print("=== SLEW/CAL starts at: " + tNOW); } // Set OBSID WriteOBSID($OBSID); doProlog = true; int[] calTime = PacsPhotSlewCal(verbose,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { tNOW = time(); debug_print("=== SLEW/CAL ends at: " + tNOW); debug_print(" TotalCalTime: " + totalCALtime); } } else { //// STATE = INIT_HOLD if(state[0] == 2) { if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD starts at: " + tNOW); } if(verbose) { tNOW = time(); debug_print("=== INIT_HOLD ends at: " + tNOW); } } else { //// STATE = POINT if(state[0] == 3) { if(verbose) { tNOW = time(); debug_print("=== POINT starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping int[] obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("POINT: POINTobs: " + nbOBS); tNOW = time(); debug_print("=== POINT ends at: " + tNOW); } } else { //// STATE = CAL_HOLD if(state[0] == 6) { doProlog = false; if(verbose) { tNOW = time(); debug_print("=== CAL-HOLD starts at: " + tNOW); } calTime = PacsPhotSlewCal(false,confPHOTblu,confPHOTred,confOBCP,doProlog,blue); totalCALtime = totalCALtime + calTime[3]; totalCALover = totalCALover + calTime[0]; if(verbose) { debug_print("Accumulated CALtime: " + totalCALtime); tNOW = time(); debug_print("=== CAL-HOLD ends at: " + tNOW); } } else { //// STATE = NOD if(state[0] == 7) { if(verbose) { tNOW = time(); debug_print("=== NOD starts at: " + tNOW); } if(pointCase == 12) { // Observation includes chopping obsTime = PacsPhotCommandOBCP3(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } else { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } totalOBStime = totalOBStime + obsTime[1] + obsTime[2]; totalOBSover = totalOBSover + obsTime[0]; nbOBS = nbOBS + 1; if(verbose) { debug_print("NOD: NODobs: " + nbOBS); tNOW = time(); debug_print("=== NOD ends at: " + tNOW); } } else { //// STATE = LINE if(state[0] == 8) { if(verbose) { tNOW = time(); debug_print("=== SCAN starts at: " + tNOW); } obsTime = PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); totalOBStime = totalOBStime + scanTime; totalOBSover = totalOBSover + scanTime + scanOVER; nbSCANlegs = nbSCANlegs + 1; if(verbose) { debug_print(" TotalOBSTime: " + totalOBStime); debug_print(" Total w/over: " + totalOBSover); tNOW = time(); debug_print("=== SCAN leg " + nbSCANlegs + " ends at: " + tNOW); } } else { /// STATE = OFF if(state[0] == 4) { if(verbose) { tNOW = time(); debug_print("=== OFF starts at: " + tNOW); } // If raster, repeat OBCP4 if(pointCase == 31) { // Observation does includes chopping obsTime = PacsPhotCommandOBCP4(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } // If scan, repeat OBCP7 if(pointCase == 33) { // Observation does includes chopping obsTime = PacsPhotCommandOBCP7(confPHOTblu[1],confPHOTred[1],confOBCP[1],verbose); } if(verbose) { tNOW = time(); debug_print("=== OFF ends at: " + tNOW); } } else { //// STATE = FINAL_HOLD if(state[0] == 5) { if(verbose) { tNOW = time(); debug_print("=== FinalHOLD starts at: " + tNOW); } PHOT_aot_epilogue(); WriteEndID(); if(verbose) { tNOW = time(); debug_print("=== FinalHOLD ends at: " + tNOW); } } else { //// STATE = END if(state[0] == -1) { tNOW = time(); if(verbose) { debug_print("=== END state; time now: " + tNOW); } } } } } } } } } } } int timeObsEnd = time(); int overOBS = totalOBSover - totalOBStime; int overCAL = totalCALover - totalCALtime; if(verbose) { debug_print("+++ OBS ends at " + timeObsEnd + "; NbOBS: " + nbOBS); debug_print(" totalOBStime :" + totalOBStime); debug_print(" totalOBSover :" + overOBS); debug_print(" totalCALtime :" + totalCALtime); debug_print(" totalCALover :" + overCAL); } // Time considerations // The "science" part of the observations lasts tobs seconds (tobs from // PointReq[0]) // Time on source is totalOBStime. Hence int instrumentAndObservationOverhead = tobs - totalOBStime; // Begin "calculation" and report section string[] msgLine = [" "]; int lineCnt = 0; msgLine[lineCnt] = "ObsMode: " + shortDesc + ""; lineCnt = lineCnt + 1; // More pointing information if(pointCase == 12) { msgLine[lineCnt] = "

      Chopper throw: " + nodThrow + " [arcsec]

      "; lineCnt = lineCnt + 1; double mapArea = boloArea; msgLine[lineCnt] = "

      PHOTO footprint: " + dformat(boloLSize,2) + " x " + dformat(boloSSize,2) + " [arcsec]

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      PHOTO area: " + dformat(mapArea,0) + " [arcsec2]

      "; lineCnt = lineCnt + 1; } if(pointCase == 21 || pointCase == 31 || pointCase == 22) { msgLine[lineCnt] = "

      Raster points/lines: " + m + "/" + n + "

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Step size: " + d1 + " x " + d2 + " [arcsec]

      "; lineCnt = lineCnt + 1; // Mapped region double sizeL = boloLSize + double(m - 1) * d1; double sizeS = boloSSize + double(n - 1) * d2; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

      PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

      "; lineCnt = lineCnt + 1; } if(pointCase == 33) { msgLine[lineCnt] = "

      ScanLeg: " + d1 + " [arcsec]; number of legs: " + n + "; leg separation: " + dformat(d2,1) + " [arcsec], scan speed: " + dformat(rate,2) + " [arcsec/sec]

      "; lineCnt = lineCnt + 1; // For the mapped area assume that we scan along the Large side of bolo // Size along scan line sizeL = d1 + boloSSize; // Size covered by successive legs sizeS = boloLSize + double(n - 1) * d2; msgLine[lineCnt] = "

      PHOTO observed size: " + dformat(sizeL,2) + " x " + dformat(sizeS,2) + " [arcsec]

      "; lineCnt = lineCnt + 1; mapArea = sizeL * sizeS; msgLine[lineCnt] = "

      PHOTO observed area: " + dformat(mapArea,0) + " [arcsec2]

      "; lineCnt = lineCnt + 1; } // Nodding pattern msgLine[lineCnt] = "

      Nod pattern (as applicable)

      "; lineCnt = lineCnt + 1; if(nb_nods == 0) { if(pointCase != 33) { msgLine[lineCnt] = " No nodding, S/C stays at nominal position<"; } else { msgLine[lineCnt] = " No nodding, S/C is in line scan mode<"; } lineCnt = lineCnt + 1; } if(nb_nods == 1) { msgLine[lineCnt] = " A->B "; lineCnt = lineCnt + 1; } if(nb_nods == 2) { msgLine[lineCnt] = " A->B B->A "; lineCnt = lineCnt + 1; } if(nb_nods > 2) { int aux1 = nb_nods - 2; msgLine[lineCnt] = " A->B B->A and " + aux1 + " more A->B or B->A leg(s) "; lineCnt = lineCnt + 1; } // Add dithering bla-bla msgLine[lineCnt] = "

      Dithering information

      "; lineCnt = lineCnt + 1; if(dither && pointCase == 12) { int half_dither = max_dither / 2; msgLine[lineCnt] = "

      Three position spatial dithering performed with the chopper (" + max_dither + " and " + half_dither + " chopper engineering units)

      "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

      Dithering information is not applicable.

      "; lineCnt = lineCnt + 1; } msgLine[lineCnt] = "

      Duration information

      "; lineCnt = lineCnt + 1; tNOW = time(); msgLine[lineCnt] = "

      AOT duration (w/overheads): " + tNOW + " [sec]

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      (AOT duration comprises 'on-sky' plus setup and CAL during slew)

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Breakdown of AOT duration:

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • On-sky time (w/overheads): " + tobs + " [sec]
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • (actual on-sky time: " + totalOBStime + " [sec])
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • Setup and CAL during slew (w/overheads): " + tslew + " [sec]
      • "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "
      • (actual calibration time: " + totalCALtime + " [sec])
      "; lineCnt = lineCnt + 1; // The charged obsOverhead is the MAX between tslew, nominalOverhead if(tslew > obsOverhead) { obsOverhead = tslew; } int tcharged = tobs + obsOverhead; msgLine[lineCnt] = "

      AOT cost (includes time to slew to source): " + tobs + " + " + obsOverhead + " = " + tcharged + " [sec]

      "; lineCnt = lineCnt + 1; // On-SRC time calculations start here // Uses new algorithm: on-SRC = totalOBStime*boloArea/mapArea // OBS times above is for all pointings. For a raster, have to divide // by number of raster positions, i.e. m*n if(pointCase != 33) { // If steps are smaller than boloXSize, same sky will be seen several times // Compute Short and Long dimension number of sightings (assume source is // placed to maximize number of sightings, i.e. at the proper edge of bolo) // NOTE: exchanged pointStep and lineStep as suggested by Roland V. int nbShort = iceil(boloSSize / lineStep); // Cannot be larger than m if(nbShort > m) { nbShort = m; } int nbLong = iceil(boloLSize / pointStep); // Cannot be larger than n if(nbLong > n) { nbLong = n; } if(verbose) { debug_print("nbShort/nbLong: " + nbShort + "/" + nbLong); } // Time per raster point double auxTIMEold = double(totalOBStime * nbShort * nbLong) / double(m * n); double auxTIME = double(totalOBStime) * boloArea / mapArea; // Small source is a special case where by design the SRC is always in view if(pointCase == 22) { auxTIME = auxTIMEold; } } else { // elementary integration time [sec] will be computed as "transit" time // of the source across the BOLO detector // Case of scan leg size smaller than boloSize double sizeAux = boloSSize; if(d1 <= boloSSize) { sizeAux = d1; } // Assume source is 1st seen on row=1; each successive scan may see again // the same sky region if mapScanCrossScan is smaller than bolo width. // The number of times the same sky is scanned again: if(mapScanCrossScan != 0.0) { int nbCross = iceil(boloLSize / mapScanCrossScan); if(verbose) { debug_print("nbCross: " + nbCross); } } else { nbCross = repFactor; } // nbCross cannot be larger than mapScanNumLegs if(nbCross > mapScanNumLegs) { nbCross = mapScanNumLegs; } if(verbose) { debug_print("nbCross: " + nbCross); } // The "crossing time" double crossTime = sizeAux / rate; if(verbose) { debug_print("crossTime: " + crossTime); } // AuxTime is "crossing time" * number of crossings * repFactor auxTIMEold = double(repFactor * nbCross) * crossTime; auxTIME = double(totalOBStime) * boloArea / mapArea; } if(verbose) { debug_print("AuxTIMEold: " + auxTIMEold + " [sec]"); debug_print("AuxTIME : " + auxTIME + " [sec]"); } // Pass the pointing mode to RMS (may need it for SRC,REF considerations) double[] pixRMS = PacsPhotNoiseRMS(pointCase,blue,auxTIME); msgLine[lineCnt] = "

      Sensitivity information

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Effective on-sky time (one spatial resolution element) : " + dformat(auxTIME,1) + " [sec]

      "; lineCnt = lineCnt + 1; // Point source or extended source if(pointCase == 11 || pointCase == 12) { msgLine[lineCnt] = "

      Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]

      "; lineCnt = lineCnt + 1; } else { msgLine[lineCnt] = "

      Point RMS (red): " + dformat(pixRMS[0],1) + " [mJy]; extended RMS " + dformat(pixRMS[2],2) + " [MJy/sr]

      "; lineCnt = lineCnt + 1; msgLine[lineCnt] = "

      Point RMS (blu): " + dformat(pixRMS[1],1) + " [mJy]; extended RMS " + dformat(pixRMS[3],2) + " [MJy/sr]

      "; lineCnt = lineCnt + 1; } PacsMessageCenter("PACS Photometer AOT",lineCnt,msgLine); // Close messages for HTML format message(""); message(""); // Everything below is new request from RV. Use variable names consistent // with input variables in PacsPhoto.def // Return demanded tuples // ID for band blue1 string bandBlue = "60-85"; if(blue == "blue2") { bandBlue = "85-130"; } double pntRMSBlue = pixRMS[1]; // Watch out for infinite division!! // Better watch out for silly limits (SPR-2627) if(pntRMSBlue > 0.0010) { double pntSNBlu = fluxPntBlu / pntRMSBlue; } else { pntSNBlu = 0.0; } string bandRed = "130-210"; double pntRMSRed = pixRMS[0]; if(pntRMSRed > 0.0010) { double pntSNRed = fluxPntRed / pntRMSRed; } else { pntSNRed = 0.0; } double extRMSBlue = pixRMS[3]; // Watch out for infinite division!! if(extRMSBlue > 0.0010) { double extSNBlu = fluxExtBlu / extRMSBlue; } else { extSNBlu = 0.0; } double extRMSRed = pixRMS[2]; if(extRMSRed > 0.0010) { double extSNRed = fluxExtRed / extRMSRed; } else { extSNRed = 0.0; } {string,double,double,double,double,double,double}[] noiseSummary = [{bandBlue,fluxPntBlu,pntSNBlu,pntRMSBlue,fluxExtBlu,extSNBlu,extRMSBlue},{bandRed,fluxPntRed,pntSNRed,pntRMSRed,fluxExtRed,extSNRed,extRMSRed}]; if(verbose) { debug_print("NoiseSumm: " + noiseSummary); debug_print("OBStime/CALtime/Overhead/chopthrow: " + totalOBStime + "/" + totalCALtime + "/" + instrumentAndObservationOverhead + "/" + nodThrow); } // return {totalOBStime,totalCALtime,instrumentAndObservationOverhead, return {totalOBStime,fromPntReq[1],instrumentAndObservationOverhead,nodThrow,noiseSummary}; } // $Id: SPEC_spu_setup.txt,v 1.6 2007/08/09 15:40:11 dcesarsk Exp $ // // Missionphase : PACS ILT // // Purpose : Condition SPU for SPECtroscopy observations // // TCL author : Thomas Mueller // TCL file : tm_spec_spu_setup.tcl, version 1.3 // SetupSpectroscopyWEplusFPUsim.tcl v2.8 // CUS author : Diego Cesarsky // Script file : SPEC_spu_setup.txt // // Input arguments // Type Name Default Description // int comp_mode_blu 16 Compression mode Default=16; double=17; // lossless=20; transp=23; 4sec reset=24; // buffer_mode=25, noise=33 // int comp_mode_red 16 As above for RED // int nb_samp_subramp_blu 64 Number of samples per sub-ramp // (>=4 and <= readouts per ramp) // int nb_samp_subramp_red 64 As above for RED // int spu_nraw_blu 3 Number of raw channels transmitted by SPU // int spu_nraw_red 3 As above for RED // int glitch_det 1 Glitch detection; 0=on; 1=off // int ramp_fit_alg 1 Ramp fit algorithm: 0=LstSq fit,1=mean value // bool startSPU true Start SPU after setting values // // Description : Sets values for compression mode, // threshold values (glitch, chopper, grating), raw // channel transmission, sub-ramp and detector // constants, load DPU time and restart SPU. Script // sets its own delays [sec] and returns the total // duration in milliseconds. This version addresses // BLU and RED; could make a BLU only and RED only version // // Dependencies : PACS TCs // // Preconditions : // // Comments : Based on V1.3 of TM's tm_spu_setup.tcl. Both // SPUS and SPUL are initialized to same set of parameters // // Version 1.0 // History : 0.1 13-Aug-2004 First creation // 0.2 8-Oct-2004 Added separate variables for SPUL and // SPUS. Return duration. // Editorial changes (DAC) // 0.3 12-Oct-2004 Reviewed after simplification of // SPEC_spu_reset. Remove // redundant/useless TCs. Removed "delay" // statements // 0.4 13-Oct-2004 Error in Pacs_SPUx_RAW_CHAN_TRAN_MODE: // second parameter should be spuX_nraw. // Added boolean START to be able to use // this procedure in SPEC_orbit_prologue // which DOES NOT start the SPU // 0.5 21-Oct-2004 Moved xx_RAW_CHAN_TRAN_MODE below // WRT_DET_CST_SPEC to follow HF's setup script // 0.6 18-Mar-2005 Redone to follow line by line TM's script, // Added several comments // 0.7 10-Apr-2006 Parameter set has been changed for // Pacs_SPUL_WRT_DET_CST_SPEC and (RV) // Pacs_SPUS_WRT_DET_CST_SPEC commands (comply w/SPU HLSW v12.1) // "spu_par" has been changed, new parameters have been added: // - "reor", Reordering algorithm // - "llcs", Lossless compression algorith // - "ords", Range for the PACS codec // Changes based on SetupSpectroscopyWEplusFPUsim.tcl v2.8 // 0.8 3-jul-2006 Remove duration references // 0.9 9-aug-2006 update of WRT_DET_CST_SPEC // 0.91 29-aug-2006 TM: update of WRT_DET_CST_SPEC (SPU OBSW V12.8), new default values // 0.92 06-dec-2006 TM: update of WRT_DET_CST_SPEC (SPU OBSW V12.8.1), new default values // 1.0 28-mar-2007 DAC Update for SPU V13.x // procedure SPEC_spu_setup { int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel int nb_samp_subramp_blu = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] }{ // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // Set the SPU compression modes // (TC arguments are defined as type {int}[], cf. definition of // Pacs_DMC_WRT_SPU_TRAN_MODE; hence define comp_par accordingly) {int}[] comp_par = [{comp_mode_blu},{comp_mode_red}]; // The "checksum" function needs an array as argument, hence use elements // of comp_par cast as an array: int[] aux = [comp_mode_blu,comp_mode_red]; int check_sum = checksum("int",aux); // Issue the TC Pacs_DMC_WRT_SPU_TRAN_MODE(comp_par,check_sum); // Setting of start index of raw channels for SPUS and SPUL string spus_obs_mode = "SPEC"; string spul_obs_mode = "SPEC"; int spus_startraw = 1; int spul_startraw = 1; Pacs_SPUS_RAW_CHAN_TRAN_MODE(spus_obs_mode,nb_raw_spu_blu,spus_startraw); Pacs_SPUL_RAW_CHAN_TRAN_MODE(spul_obs_mode,nb_raw_spu_red,spul_startraw); // Spectro "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in spectroscopy int tfs = 1000; // Threshold for chopper position deviation in spectroscopy int tcs = 100; // Threshold for grating deviation int tgd = 100; // Readouts per SubRamp readback int rsrr = nb_samp_subramp_blu; // Glitch detection for spectroscopy int gdfs = glitch_det; // Ramp fitting algorithm int rfal = ramp_fit_alg; // Sorting algorithm int soal = 4; // lossless compression algorithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; //Logic to optimize fitting if(ramp_fit_alg == 1) { soal = 5; lcal = 4; } // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Spectro "Ottensamer" block ("L" SPU) ppf = 0; ppp = 0; tfs = 1000; tcs = 100; tgd = 100; rsrr = nb_samp_subramp_red; gdfs = glitch_det; rfal = ramp_fit_alg; soal = 4; lcal = 0; pcod = 3; //Logic to optimize fitting if(ramp_fit_alg == 1) { soal = 5; lcal = 4; } // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfs,tcs,tgd,rsrr,gdfs,rfal,soal,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_SPEC(spu_par,check_sum); delay(1); // Send time stamps // DMC_WRT_TIME: Write the time sent by the DPU into the DMC buffer // (No action on this one?) // DPU sends the time to DEC/MEC Pacs_DPU_SEND_TIME(); // DMC_SET_TIME: Set the time previously written by the write time command Pacs_DMC_SET_TIME(); // Start reduction/compression if commanded to do so if(startSPU) { Pacs_SPUS_START_REDUCT_COMPR(); Pacs_SPUL_START_REDUCT_COMPR(); } sync(); } // Missionphase : FM ILT // // Purpose : Homes the grating and performs moves to Min->Max->Min positions // // Author : Pierre Royer // CUS script : PR // CVS file : // // Arguments : homing_mode : 0 for homing on low grating values (ENG -> "POSITIVE") // 1 for homing on high grating values (ENG -> "NEGATIVE") // Description : // // Dependencies : // // Preconditions : PACS is switched on // The grating controller is SWON and ENABLED // (e.g. SetupSpectroscopyEQMIMT takes care for it) // // Comments : The grating health check only makes sense with high frequency diag HK // // Version : 1.0 // // History : 1.0 14-Jun-2006 Creation, based on SPEC_Gra_Healthcheck // block PACS_Spec_Gra_Healthcheck_BB PACS 175 { string homing_mode = "POSITIVE"; // HOMING_MODE : 0 for "POSITIVE" (homing at low grating positions), 1 for 'NEGATIVE" }{ // Register start of BB WriteBBID($BBID); // HOME_GRATING (everything initialized already => DMC_HOME_GRATING used directly) Pacs_DMC_HOME_GRAT(homing_mode); delay(70); // MOVE_GRATING ~center -> Min -> Max -> Min -> ~center Pacs_DMC_MOVE_GRAT_ABS_RAW(500000); delay(5); Pacs_DMC_MOVE_GRAT_ABS_RAW(115000); delay(25); Pacs_DMC_MOVE_GRAT_ABS_RAW(990000); delay(49); Pacs_DMC_MOVE_GRAT_ABS_RAW(115000); delay(49); Pacs_DMC_MOVE_GRAT_ABS_RAW(500000); delay(25); } // CVS comments : $Id: PacsRangeSpecEstimatorOBCP27.txt,v 1.1 2008/05/26 15:12:49 vanessad Exp $ // Missionphase : Operations // // Purpose : Estimate several PACS parameters for each spectral // range specified by the HSPOT user // // CUS author : DAC // Script file : PacsRangeSpecEstimatorOBCP27.txt // // Input arguments // type name Description // // Return values // Type Description // tuple {confSPECblu,confSPECred,confOBCP,{extension}} // // Description : // // Dependencies : // // Preconditions : // // Comments : // // History : 0.1 21-jun-2005 DAC Based on PacsLineSpecEstimator // 1.0 15-sep-2005 Adapted for "OBS" CUS scripts // 1.1 16-sep-2005 Added gratSTEP to rangeInfo, moved "density" and "grating" // to PacsRangeSpecCheckFillRange // 2.0 11-oct-2005 Added userOBStime logic // 2.1 13-oct-2005 Amended noddingSel logic // 2.2 17-oct-2005 Amended nb_nods logic (see PacsLineSpecEstimatorOBCP27) // 2.3 24-oct-2005 Add HTML tags // 2.4 11-apr-2006 Defined comp_mode_xxx here since != for SPEC and PHOT // 2.5 12-may-2006 Added logic for negative step_size; return quantumOBS in // hitherto unused return auxiliar // 2.6 22-jun-2006 "ranges" now contains lineWidth // 3.0 17-jan-2007 "Improved" messages // 3.1 14-feb-2007 Return quantumOBS based only on SRC+REF // 4.0 2-mar-2007 Amended for raster w/OFF. Raster w/OFF is performed when // noddingSel = false. The OBCP parameters are the same as // with/nodding; only the chopper position changes: SRC and CS1 // 5.0 15-apr-2007 Define ranges as created by HSPOT // 5.1 4-may-2007 Added faint_lines // 5.2 22-aug-2007 Implemented SCR-3513 (velocity range) // Exchanged vred and vblu // 5.3 17-oct-2007 SCR-3663 "Do not allow less than 16 grating steps" {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int},{int,int,int,int}} procedure PacsRangeSpecEstimatorOBCP27 { /* rangeSPOT from HSPOT (but already sorted */ {string,double,double,int,double,double,double,string,string,double} rangeSPOT = {"",0.0,0.0,0,0.0,0.0,0.0,"","",0.0}; /* rangeInfo tuple derived from HSPOT */ {string,int,int,int,int,double,double} rangeInfo = {"NONE",0,0,0,0,0.0,0.0}; /* union of SPECconf and OBCPconf */ {{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int},{int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int}} paramsSPECdef = {{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; /* nodding yes/no needed to double/not OBCP duration */ bool noddingSel = false; /* good old verbose */ bool verbose = true; // Print bla-bla }{ // Define local copy of confXXX tuples {int,int,int,int,int,int,int,int,int} confSPECblu = clone(paramsSPECdef{0}); {int,int,int,int,int,int,int,int,int} confSPECred = clone(paramsSPECdef{1}); {int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int} confOBCP = clone(paramsSPECdef{2}); // Gather information pertaining to the current range int order = rangeInfo{1}; int grat_start_pos = rangeInfo{2}; int grat_stop_pos = rangeInfo{3}; int grat_step_up = rangeInfo{4}; // Use different CAL files if RANGE or SED bool sedOBS = false; if(rangeInfo{0} == "SED") { sedOBS = true; } // Compute number of steps to go from grat_start_pos to grat_stop_pos stepping // by "grat_step_up" steps double aux_step = double(grat_stop_pos - grat_start_pos) / double(grat_step_up); int nb_grat_step_up = iround(abs(aux_step)); // step_size may be negative... if(grat_stop_pos < grat_start_pos) { grat_step_up = -grat_step_up; } if(verbose) { debug_print("OBCP27: order/startGRAT/stopGRAT/stepGRAT/nbSTEP " + order + "/" + grat_start_pos + "/" + grat_stop_pos + "/" + grat_step_up + "/" + nb_grat_step_up); } // SCR-3663 Do not allow less than 16 steps if(nb_grat_step_up < 16) { error("Input range results in only " + nb_grat_step_up + " grating steps; minimum number of steps is 16. Increase range"); } // Update corresponding elements of confOBCP int nb_grat_step_dn = nb_grat_step_up; int grat_step_dn = -grat_step_up; // Get "duration related" parameters from OBCP27params U-CAL table string calNAME = "OBCP27params"; // The acces key is the grating order (times 10 for SED mode!) string key = "" + order; // SED rows are (completely arbitrarily!) called 20 and 30 if(sedOBS) { key = "" + 10 * order; } // There is a row per order; it lists main OBCP parameters // int nb_up_down = ilookup(calNAME,key,"nb_up_down"); // User desired repeat factor for current line replaces nb_up_down int nb_up_down = rangeSPOT{3}; // Don't allow null number of repetitions if(nb_up_down == 0) { nb_up_down = 1; } int nb_SRC_OFF = ilookup(calNAME,key,"nb_SRC_OFF"); int nb_ramps_plateau = ilookup(calNAME,key,"nb_ramps_plateau"); int nb_CS1_CS2 = ilookup(calNAME,key,"nb_CS1_CS2"); // Need nb_rdouts (different according to faintLines) int nb_rdouts = confSPECblu{1}; // Estimate the OBS time for this rangeInfo int[] dureeOBCP27 = PacsDureeOBCP27(nb_up_down,nb_grat_step_up,nb_ramps_plateau,nb_CS1_CS2,nb_SRC_OFF,nb_rdouts); if(verbose) { debug_print("++Duration DMC: " + dureeOBCP27); } // Return SRC+REF (used to be total duration) int quantumOBStime = dureeOBCP27[1] + dureeOBCP27[2]; // Get the "quantum" OBS time for the current order. OBCP duration doubles if // nodding is allowed int nodFactor = 1; int nb_nods = 1; if(noddingSel) { nodFactor = 2; } else { nb_nods = 0; } quantumOBStime = nodFactor * quantumOBStime; // Inform user string[] msgLine = [" "]; int lineCnt = 0; if(noddingSel) { msgLine[lineCnt] = "

      Estimated SRC+REF time: " + quantumOBStime + " [sec] for " + rangeSPOT{1} + "/" + rangeSPOT{2} + " [µm] range repeated " + nb_up_down + " time(s)

      "; } else { msgLine[lineCnt] = "

      Estimated SRC+CalSrce time: " + quantumOBStime + " [sec] for " + rangeSPOT{1} + "-" + rangeSPOT{2} + " [µm] range repeated " + nb_up_down + " time(s)

      "; } if(verbose) { debug_print("OBCP27: SRC+REF minimum " + quantumOBStime + " [sec] for " + rangeSPOT{1} + " - " + rangeSPOT{2} + " [µm] range with " + nb_up_down + " repetition(s)"); } lineCnt = lineCnt + 1; // Alessandra SRC-3513 would come here. Compute velocity range with respect // to WaveRef line (last entry in rangeSPOT) // Light speed km/sec double clight = 300000.0; // Just in case WaveRef is null if(abs(rangeSPOT{9}) > 1.0E-4) { // Velocity at each end-of-range double vblu = clight * (rangeSPOT{1} - rangeSPOT{9}) / rangeSPOT{9}; double vred = clight * (rangeSPOT{2} - rangeSPOT{9}) / rangeSPOT{9}; if(verbose) { debug_print("OBCP27: RANGE VELOCITY: " + dformat(vblu,1) + "/" + dformat(vred,1)); } msgLine[lineCnt] = "

      Velocity range from WaveRef = " + dformat(rangeSPOT{9},2) + " [µm]; blue/red: " + dformat(vblu,1) + "/" + dformat(vred,1) + " km/sec

      "; lineCnt = lineCnt + 1; } // Some more Pointing parameters (auxN just in case I need more...) int aux2 = 0; int aux3 = 0; // Pack information into proper tuples confOBCP{0} = nb_up_down; confOBCP{1} = grat_step_up; confOBCP{2} = grat_step_dn; confOBCP{3} = nb_SRC_OFF; confOBCP{4} = nb_ramps_plateau; confOBCP{5} = nb_CS1_CS2; confOBCP{6} = nb_grat_step_up; confOBCP{7} = nb_grat_step_dn; confOBCP{8} = grat_start_pos; // confOBCP { 9} = grat_start_time ; // confOBCP {10} = grat_def_pos ; // confOBCP {11} = grat_def_time ; // confOBCP {12} = chop_pos_SRC ; // confOBCP {13} = chop_pos_REF1 ; // confOBCP {14} = chop_pos_REF2 ; // confOBCP {15} = chop_pos_CS1 ; // confOBCP {16} = chop_pos_CS2 ; // confOBCP {17} = chop_def ; confOBCP{19} = order; // confSPECred{ 0} = capa_red; // confSPECred{ 1} = nb_rdouts; // confSPECred{ 2} = nb_rdouts_subramp_red; int comp_mode_red = 16; confSPECred{3} = comp_mode_red; // confSPECred{ 4} = glitch_det_red; // confSPECred{ 5} = ramp_fit_alg_red; // confSPECred{ 6 = nb_raw_red; // confSPECred{ 7} = bias_r_red; // confSPECred{ 8} = bias_d_red; // confSPECblu{ 0} = capa_blu; // confSPECblu{ 1} = nb_rdouts; // confSPECblu{ 2} = nb_rdouts_subramp_blu; int comp_mode_blu = 16; confSPECblu{3} = comp_mode_blu; // confSPECblu{ 4} = glitch_det_blu; // confSPECblu{ 5} = ramp_fit_alg_blu; // confSPECblu{ 6 = nb_raw_blu; // confSPECblu{ 7} = bias_r_blu; // confSPECblu{ 8} = bias_d_blu; // Pass messages to user string msgLabel = "Observing time for " + rangeSPOT{0}; PacsMessageCenter(msgLabel,lineCnt,msgLine); // Debug info if(verbose) { debug_print("RangeEstimatorOBCP27 duration: " + quantumOBStime); } return {confSPECblu,confSPECred,confOBCP,{nb_nods,nb_up_down,quantumOBStime,aux3}}; } // $Id$ // Missionphase : PACS PV Phase // // // // // Purpose : Check the Amplitude of the Grating inductosyn by running a loop over it // // CUS author : PR // // Input arguments none // type name description // // Preconditions : PACS in SAFE MODE, or Spectroscopy Mode // In any case, Controller of the Calibration Sources MUST BE OFF // // Comments : // // Version : 2.0 // History : 1.0 12-Jul-2007 PR // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // // obs PacsEng_Spec_Gra_IST_Ampl { /* Needed variables to call PacsEng_Spec_Gra_IST_Ampl */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Gra_IST_Ampl */ }{ // 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(Pacs_Spec_Gra_IST_Ampl())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Gra_IST_Ampl(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : PV Phase // // Purpose : PCD req.1.1.1bis for the PV Phase // Measure the responsivity with a 8x4 raster on a point source (not SSO): // Noise is measured after the 8x4 raster at the off pointing position during "timeOFF". // // Author : Koryo Okumura // // Version : Thu Jul 24 20:07:29 CEST 2008 // // CUS script : obs PacsCal_Phot_highGainBiasDirect_Fix // // Argument : // string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration // double ra = 70.7235; // RA 4h42m53.64s // double dec = 36.1148; // Dec +36d06m53.4s // double raoff = 70.82; // OFF position RA coordinaten // double decoff = 36.21; // OFF position Dec coordinate // int measure_time = 120; // measure time in seconds // int timeOFF = 480; // time of noise measurement in seconds on the OFF position // string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values // string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values // string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks // int nLoops1 = 30; // number of CSs cycles during slew // int nLoops5 = 30; // number of CSs cycles during final hold // int readouts_plateau = 16; // number of readouts per chopper plateau // string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE // string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE // bool chop = true; // Chopping within FOV during the raster // bool verbose = true; // // Check before executing : // + Cooler is recycled // + BOLC is ON // + PHOT_orbit_prologue is executed (then more than the minimum requirement below is fullfilled): // - Bolometers are biased // - Sequencer is activated // // Description : PacsCal script of Phot_highGainBiasDirect // init + During the slew, CSs are measured through 2 filters // + Set a filter corresponding to the given seqNum // + Set the biases group by group // if no_chop // + Set the chopper on the optical center // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x9 raster measurement // if chop // + 4 basic biases (VH, VL, VRL, VH-BLIND) are set group by group corresponding to the given seqNum // + Do a 4x8 raster with chopped measurement // + After the raster, noise measurement during 4xmeasure_time // then + After the raster, CSs and sky are measured through 2 filters // stop + The biases are set following a given bias table // // Dependencies : Commissioning and PV data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_PVph_highGainBias(1) // obs PacsCal_Phot_highGainBiasDirect_Fix { string select = "ginit" in ["ginit","g1_0","g1_3","g1_6","g1_7","g1_8","g1_9","g2_0","g2_1","g2_2","g2_3","g2_4","g2_5","g2_6","g2_7","g2_8","g2_9","g3_0","g3_1","g3_3","g3_5","binit","b1_0","b1_3","b1_6","b1_7","b1_8","b1_9","b2_0","b2_1","b2_2","b2_3","b2_4","b2_5","b2_6","b2_7","b2_8","b2_9","b3_0","b3_1","b3_3","b3_5","final"]; // Sequence number to define a configuration double ra = 70.7235; // RA 4h42m53.64s double dec = 36.1148; // Dec +36d06m53.4s double raoff = 70.82; // OFF position RA coordinaten double decoff = 36.21; // OFF position Dec coordinate int measure_time = 120; // measure time in seconds per pointing int timeOFF = 480; // time of noise measurement in seconds on the OFF position string startBiasTable = "BOLObias_standard_high"; // Bias table containing the initial values string endBiasTable = "BOLObias_standard_high"; // Bias table containing the final values string calBiasTable = "BOLObias_standard_low"; // Bias table used during calibration blocks int nLoops1 = 30; // number of CSs cycles during slew int nLoops5 = 30; // number of CSs cycles during final hold int readouts_plateau = 16; // number of readouts per chopper plateau string calGain = "LOW" in ["NO_CHANGE","LOW","HIGH"]; // Gain of calibration blocks, the same as OBS if NO_CHANGE string calMode = "DIRECT" in ["NO_CHANGE","DIRECT","DDCS"]; // Mode of calibration blocks, the same as OBS if NO_CHANGE bool chop = true; // Chopping within FOV during the raster bool verbose = true; }{ bool execute = true; int nRdts = readouts_plateau - 1; int timeOBSID = imax(1,duration(WriteOBSID($OBSID))); int timeEndID = imax(1,duration(WriteEndID())); int timeChgBias = duration(PHOT_change_biases(endBiasTable,calMode,calGain)); int timeCal3CPR1 = duration(Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); int tNewSetup = duration(Phot_highGainBiasDirect(select,startBiasTable,endBiasTable)); int tslewmin = 0; int tih = 0; int tfh = 0; // Use PHOTOMETER virtual aperture string ib = "P01_0"; // SSO tracking object number int naifid = 0; // yoffset [arcsec] double yoffset = 0.0; // zoffset [arcsec] double zoffset = 0.0; // Duration of "stable" pointing in seconds int tp = 0; //Issue PointReq int[] ts = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Several arguments needed for "basic_fine_pointing" // time to set OBSID and biases then PacsPhotSlewCal // Minimum slew time if(select == "final") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT","HIGH")); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,"DIRECT",calGain)); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,"HIGH")); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { timeChgBias = duration(PHOT_change_biases(calBiasTable,calMode,calGain)); } } tslewmin = timeOBSID + timeChgBias + timeCal3CPR1 + tNewSetup; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = 0; // Final hold tfh = timeEndID; // Duration of "stable" pointing in seconds tp = 1; //Issue PointReq ts = basic_fine_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,yoffset,zoffset,tp); } else { // Several arguments needed for "basic_raster_pointing" // time to set and reset BBID int timeBBID = imax(1,duration(TMMarker601()) + duration(TMMarker600())); // time to set OBSID and biases then PacsPhotSlewCal int timeCal3CPR5 = duration(Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false)); // Minimum slew time tslewmin = timeOBSID + timeChgBias + timeCal3CPR1; if(verbose) { debug_print("Tslewmin: " + tslewmin); } // Initial hold tih = tNewSetup; // Final hold tfh = timeChgBias + timeCal3CPR5 + timeEndID; // Fixed in the sky coordinates bool fixed = false; // Orientation angle (degrees) double patt = 0.0; // Number of pointings in a leg int m = 8; // Number of legs int n = 4; // Angular distance (arcsec) between 2 pointings double d1 = 26.0; // Angular distance (arcsec) between 2 legs double d2 = 26.5; // Duration of "stable" pointing in seconds if(chop) { int nLoops = measure_time * 40 / (2 * readouts_plateau); tp = duration(OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,644)); // Positive pointing offset for chopping to get negative chopper position offset yoffset = 105.0; } else { tp = measure_time; } // Go to OFF position every k pointings (not relevant with SSO tracking) int k = m * n; // time in seconds on the OFF position (not relevant with SSO tracking) int top = timeOFF + timeBBID; //Issue PointReq ts = basic_raster_pointing(execute,tslewmin,tih,tfh,ib,naifid,ra,dec,fixed,patt,yoffset,zoffset,m,n,d1,d2,tp,k,top,raoff,decoff); } }{ int tNOW = time(); int[] state = [0]; if(select == "ginit" || select == "binit" || select == "final") { // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU if(select == "final") { PHOT_change_biases(calBiasTable,calMode,calGain); } else { if(calMode == "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT","HIGH"); } if(calMode == "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,"DIRECT",calGain); } if(calMode != "NO_CHANGE" && calGain == "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,"HIGH"); } if(calMode != "NO_CHANGE" && calGain != "NO_CHANGE") { PHOT_change_biases(calBiasTable,calMode,calGain); } } //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); //************************************ // Call the Phot_highGainBiasDirect //************************************ Phot_highGainBiasDirect(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } else { int finalChop = 0; // Start the sequence while(state[0] >= 0) { state = next_state(); tNOW = time(); if(state[0] == 1) { if(verbose) { debug_print("SLEW starts at " + tNOW); } // Set OBSID WriteOBSID($OBSID); data_rate(120.0); // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops1,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); tNOW = time(); if(verbose) { debug_print("SLEW ends at " + tNOW); } } if(state[0] == 2) { tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD starts at " + tNOW); } //************************************ // Call the Phot_highGainBiasDirect //************************************ Phot_highGainBiasDirect(select,startBiasTable,endBiasTable); tNOW = time(); if(verbose) { debug_print("INITIAL_HOLD ends at " + tNOW); } } if(state[0] == 3) { tNOW = time(); if(verbose) { debug_print("POINT starts at " + tNOW); } if(chop) { //********************************* // 2 positions chopping in the FOV //********************************* OBCP_chopped_photometry(0,0,nRdts,0,0,nLoops,1,-6578,7756,0,0,-6578); } tNOW = time(); if(verbose) { debug_print("POINT ends at " + tNOW); } } if(state[0] == 4) { tNOW = time(); if(verbose) { debug_print("OFF pointing starts at " + tNOW); } //******************************** // OFF position noise measurement //******************************** TMMarker601(); delay(timeOFF); TMMarker600(); tNOW = time(); if(verbose) { debug_print("OFF pointing ends at " + tNOW); } } if(state[0] == 5) { tNOW = time(); if(verbose) { debug_print("FINAL_HOLD starts at " + tNOW); } // Set biases and start SPU PHOT_change_biases(calBiasTable,calMode,calGain); //*************************************************** // 3 chopper positions measurement through 2 filters //*************************************************** Pacs_OBCP_chopped_photometry2(nLoops5,664,nRdts,-21350,21200,1,0,0,0,0,0,644,"blue70um",false,"LOW",3,3,false); // Write EndID data_rate(0.0); WriteEndID(); tNOW = time(); if(verbose) { debug_print("FINAL_HOLD ends at " + tNOW); } } } } } // $Id$ // Missionphase : PACS PV Phase // // // // Purpose : EMC preparation // // // // TCL author : HF // TCL file : // CUS author : HF // Script file : SPEC_Prepare_EMC.txt // // Input arguments none // type name description // // Return values // Type Name Default Description // // Description : Sets chopper, grating and the SPU // // // // // Dependencies : // // Preconditions : PACS must be on and configured for spectroscopy // // // Comments : // // Version : 2.0 // History : 1.0 29-Mar-2005 creation by HF // 2.0 25-mar-2008 VDP Translated from IST to PV phase syntax // // obs PacsEng_Spec_Prepare_EMC { /* Needed variables to call PacsEng_Spec_Prepare_EMC */ int comp_mode_blu = 16; // Compression mode blue channel int comp_mode_red = 16; // Compression mode red channel 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 nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 0; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] int chop_pos = -21350; // Chopper position int grat_pos = 500000; // Grating position /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Spec_Prepare_EMC */ }{ // 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(Pacs_Spec_Prepare_EMC(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU,chop_pos,grat_pos))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure Pacs_Spec_Prepare_EMC(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU,chop_pos,grat_pos); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_DPU_DMC_Setup { /* No variables to call PacsEng_Phot_DPU_DMC_Setup */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_DPU_DMC_Setup */ }{ // 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(PACS_Phot_DPU_DMC_Setup())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_DPU_DMC_Setup(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_GeGa_SFT_Init_Cold { /* No variables to call PacsEng_GeGa_SFT_Init_Cold */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_GeGa_SFT_Init_Cold */ }{ // 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(PACS_GeGa_SFT_Init_Cold())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_GeGa_SFT_Init_Cold(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : EQM IMT // // Purpose : Close Launch Lock // // Author : Helmut Feuchtgruber // CUS script : HF // CVS file : CloseLLock.txt // // Arguments : none // // Description : // // Dependencies : // // Preconditions : PACS is on or in the equivalent of SAFE mode // // Comments : At the end PACS will still be in No Prime HK mode // // Version : 1.0 30-Mar-2005 Creation by HF // 1.1 11-Apr-2006 HF, adapted to FM DMC User Manual // 1.2 12-Apr-2006 HF, include degraded mode operations // 1.3 12-Apr-2007 HF, ise standard CONF_grating procedure // History : // : int procedure CloseLLock { int lock_mode = 18; // use motors: 2=motor 1, 16 =motor 2, 18 = both motors }{ // Tally total duration [milliseconds] int duration_msec = 0; // Set HK list Pacs_DPU_SET_HK_LIST("SPEC","BOTH Array"); // Synchronize on Det otherwise homing will not work Pacs_DMC_SYNCHRONIZE_ON_DET_RAW(4); // configure the grating CONF_grating("CONFGrat","FMILT"); // Move the grating to a central position Pacs_DMC_MOVE_GRAT_ABS(496000); // Disable the grating controller Pacs_DMC_DISABLE_GRAT_CONT(); delay(2); // Unlock the grating launch lock Pacs_DMC_LOCK_GRAT(lock_mode); delay(12); duration_msec = duration_msec + 12000; // Switch off grating controller Pacs_DMC_SWOF_GRAT_CONT(); // Set HK list Pacs_DPU_SET_HK_LIST("NO_PRIME","BOTH Array"); sync(); return duration_msec; } // $Id$ // Missionphase : PACS PV Phase // // // Purpose : Reduced NEP measurements for the new sequencer test // Search for the optimum bias with 11 values // using the high gain // // Author : Koryo Okumura // // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // + Instrument is in safe mode // // Description : OBS script of PHOT_redArray_DDCS_IST // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_oldSeq_IST(0) // // Version : 1.0 // History : 0.1 Fri Oct 05 12:00:34 CEST 2007 // : 1.0 translated into PV script VDP // obs PacsEng_Phot_redArray_DDCS_IST { /* Needed variables to call PacsEng_Phot_redArray_DDCS_IST */ int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_redArray_DDCS_IST */ }{ // 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(PHOT_redArray_DDCS_IST(response_measure_time,noise_measure_time,biasFile))); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PHOT_redArray_DDCS_IST(response_measure_time,noise_measure_time,biasFile); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Missionphase : CQM // // Purpose : CONFigure the servo grating loop using parameters read from // a CAL-U file // // Author : Diego A. Cesarsky / Pierre Royer // CUS script : Diego A. Cesarsky / Pierre Royer // // Arguments : This version reads the ROW calUrow of the -calUname CAL-U file // string calUname Name of the CAL-U table // string calUrow Name of the ROW containing the desired controler params // // Description : Reads grating controler parameters from a named row (viz. // IMTwarm, IMTcold, ORBpv1, etc.) of a CAL-U table (default is "GRATconfig"), // // Dependencies : // // Preconditions : // // Comments : // // Version : 0.2 // History : 0.1 26-Jan-2006 Creation by DAC // 0.2 12-Jun-2006 Read Rows instead of columns // 0.3 13-jun-2006 Renamed CALU table // : block PACS_Spec_Gra_Conf_Calu PACS 171 { string calUname = "CONFGrat"; string calUrow = "DMCUM"; }{ // Read the demanded column of the given table. // Rows 0 to 8 int word0 = ilookup(calUname,calUrow,"Kp"); int word1 = ilookup(calUname,calUrow,"Ki"); int word2 = ilookup(calUname,calUrow,"Kd"); int word3 = ilookup(calUname,calUrow,"Kf"); int word4 = ilookup(calUname,calUrow,"Rate"); int word5 = ilookup(calUname,calUrow,"AccLimit"); int word6 = ilookup(calUname,calUrow,"OutputLimit"); int word7 = ilookup(calUname,calUrow,"Scaling"); int word8 = ilookup(calUname,calUrow,"ErrorLimit"); // Create the parameter list tuple {int}[] params = [{word0},{word1},{word2},{word3},{word4},{word5},{word6},{word7},{word8}]; // Create the array for the checksum function int[] aux = [word0,word1,word2,word3,word4,word5,word6,word7,word8]; int chksum = checksum("int",aux); // Send the TC Pacs_DMC_WRT_GRAT_CONF_PAR(params,chksum); delay(1); // Mark End of Block WriteEndBB(); } // $Id$ // Missionphase : PACS PV Phase // // // Version : 0.1 // // Purpose : Schedule the associated CUS procedure // // CUS author : DAC // // Input arguments // type name description // // Return values // Type Name Description // // Description : Set/resets OBSID, calls associated procedure // // Dependencies : see associated procedure // // Preconditions : see associated procedure // // Comments : // // History : 0.1 22-mar-2006 // History : 0.1 11-feb-2008 Converted into Eng OBS by VDP // obs PacsEng_Phot_Cold_Startinputsignal { /* No variables to call PacsEng_Phot_Cold_Startinputsignal */ /* string fltPOS = "POS A"; //Filter wheel position 0="POS A", 1="POS B" */ /* End of needed variables for PacsEng_Phot_Cold_Startinputsignal */ }{ // 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(PACS_Phot_Cold_Startinputsignal())); // Issue PointReq int[] ts = no_pointing(execute,tih,tfh,tp); }{ // 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); data_rate(120.0); } if(state[0] == 3) { // Call the required procedure PACS_Phot_Cold_Startinputsignal(); } if(state[0] == 5) { // Declare end of OBS data_rate(0.0); WriteEndID(); } } // End of observation } // Mission phase : ILT at Garching // // Purpose : // Reduced NEP measurements for the new sequencer test // // Author : Koryo Okumura // // CUS script : procedure PHOT_redArray_direct_IST // // Argument : // int response_measure_time = 60; // response measure time in seconds // int noise_measure_time = 120; // noise measure time in seconds // string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values // // Check before executing : // + Cooler is recycled // + BOLC is ON // // Description : // + First, all 24 biases are set group by group // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // + Set PACS chopper on CS1 to measure the noise // + Loop over 11 sets of 4 baisc biases (VH, VL, VRL, VH-BLIND) are set group by group // // Dependencies : ILT data at low gain of PCD req.1.1.1 // // Comments : generated by IA script : cus_oldSeq_IST(1) // // Version : Thu Oct 04 20:19:05 CEST 2007 // procedure PHOT_redArray_direct_IST { int response_measure_time = 60; // response measure time in seconds int noise_measure_time = 120; // noise measure time in seconds string biasFile = "BOLObias_ILT_2pW_nominal_high"; // Bias table file containing the initial values }{ int operand = 0; int posCS1 = -21500; int posCS2 = 21500; //********************************* // Apply the old sequencer setting //********************************* // PACS_Phot_Sequencer_Setup(); // //******************************* // Select Filter A (110 microns) //******************************* // PHOT_fltw_move("POS A"); // //*********************************************** //*********************************************** // // Bias setting of the detectors // //*********************************************** //*********************************************** // PHOT_set_bias_volt(biasFile,1); PHOT_set_bias_volt(biasFile,2); PHOT_set_bias_volt(biasFile,3); PHOT_set_bias_volt(biasFile,4); PHOT_set_bias_volt(biasFile,5); PHOT_set_bias_volt(biasFile,6); // //******************************************************** // Sequence mode : blocking on VDEC_X for the direct mode //******************************************************** // // Set all groups bol bias 09 (CKRLH) to 0.0 volt (0) Pacs_DMC_SEND_COMMAND_BOLC(0x90000); // Set all groups bol bias 12 (VDECX-L) to 2.0 volt (2298) Pacs_DMC_SEND_COMMAND_BOLC(0xc08fa); // //************************** // Sequence mode : Sref_only //************************** // // Stop SPU PACS_Phot_SPU_Reset(); delay(1); // Set seq mode Sref_only (hexadecimal value to avoid the commanding confusion) //Pacs_BOLC_SET_SEQ_MODE("Sref_only"); //# P 09 01 00 01 operand = 0x9010001; Pacs_DMC_SEND_COMMAND_BOLC(operand); delay(1); // Start SPU with default photometry mode PACS_Phot_SPU_Setup(); delay(1); // Set gain high Pacs_BOLC_SET_GAIN("HIGH"); // //********************************************** // Set the PACS chopper at the central position //********************************************** // Pacs_DMC_MOVE_CHOP_ABS(0); // //********************************************************************** // Response Measurement // Expected fluxes : 1.7 and 2.0pW on the blue // and 5.3 and 6.2pW on the red //********************************************************************** // TMMarker600(); //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for response_measure_time (s) with 0.5 Hz chopper TMMarker601(); OBCP_chopped_photometry(0,0,39,0,0,response_measure_time / 2,1,posCS1,posCS2,0,0,0); TMMarker600(); // // //************************************************************************ // Noise Measurement // Expected fluxes : 1.7pW on the blue and 5.3pW on the red detector //************************************************************************ // //***************************** // Set the PACS chopper on CS1 //***************************** // Pacs_DMC_MOVE_CHOP_ABS(posCS1); // //*********************************************************** // Bias 1 (Vh-Vl)blue = 1.0 Volts, (Vh-Vl)red = 1.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G1(0.99); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.2875928897414196 Volts Pacs_BOLC_SET_VRL_G1(0.2875928897414196); // Set group 1 bol bias 20 (VH_BLIND) to 1.78435816010763 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.78435816010763); // Set group 2 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G2(0.99); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.2976890643549285 Volts Pacs_BOLC_SET_VRL_G2(0.2976890643549285); // Set group 2 bol bias 20 (VH_BLIND) to 1.7946385038224304 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.7946385038224304); // Set group 3 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G3(0.99); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.2921869021406959 Volts Pacs_BOLC_SET_VRL_G3(0.2921869021406959); // Set group 3 bol bias 20 (VH_BLIND) to 1.8111181679623898 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.8111181679623898); // Set group 4 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G4(0.99); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.2833032550752384 Volts Pacs_BOLC_SET_VRL_G4(0.2833032550752384); // Set group 4 bol bias 20 (VH_BLIND) to 1.8038951101792082 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.8038951101792082); // Set group 5 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G5(0.99); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.3346340277410602 Volts Pacs_BOLC_SET_VRL_G5(0.3346340277410602); // Set group 5 bol bias 20 (VH_BLIND) to 1.8466792279676985 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8466792279676985); // Set group 6 bol bias 01 (VH) to 0.99 Volts Pacs_BOLC_SET_VH_G6(0.99); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.32636237036822335 Volts Pacs_BOLC_SET_VRL_G6(0.32636237036822335); // Set group 6 bol bias 20 (VH_BLIND) to 1.8367532617835844 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8367532617835844); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 2 (Vh-Vl)blue = 1.2 Volts, (Vh-Vl)red = 1.2 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G1(1.19); // Set group 1 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G1(-0.01); // Set group 1 bol bias 03 (VRL) to 0.3577080013822565 Volts Pacs_BOLC_SET_VRL_G1(0.3577080013822565); // Set group 1 bol bias 20 (VH_BLIND) to 1.9420622421434064 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9420622421434064); // Set group 2 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G2(1.19); // Set group 2 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G2(-0.01); // Set group 2 bol bias 03 (VRL) to 0.36696811904468774 Volts Pacs_BOLC_SET_VRL_G2(0.36696811904468774); // Set group 2 bol bias 20 (VH_BLIND) to 1.9515329512935697 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9515329512935697); // Set group 3 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G3(1.19); // Set group 3 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G3(-0.01); // Set group 3 bol bias 03 (VRL) to 0.3640303856110917 Volts Pacs_BOLC_SET_VRL_G3(0.3640303856110917); // Set group 3 bol bias 20 (VH_BLIND) to 1.9482056457093682 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9482056457093682); // Set group 4 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G4(1.19); // Set group 4 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G4(-0.01); // Set group 4 bol bias 03 (VRL) to 0.3523579205628669 Volts Pacs_BOLC_SET_VRL_G4(0.3523579205628669); // Set group 4 bol bias 20 (VH_BLIND) to 1.9603646239045185 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9603646239045185); // Set group 5 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G5(1.19); // Set group 5 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G5(-0.01); // Set group 5 bol bias 03 (VRL) to 0.4064368830411808 Volts Pacs_BOLC_SET_VRL_G5(0.4064368830411808); // Set group 5 bol bias 20 (VH_BLIND) to 1.8950576820742784 Volts Pacs_BOLC_SET_VH_BLIND_G5(1.8950576820742784); // Set group 6 bol bias 01 (VH) to 1.19 Volts Pacs_BOLC_SET_VH_G6(1.19); // Set group 6 bol bias 02 (VL) to -0.01 Volts Pacs_BOLC_SET_VL_G6(-0.01); // Set group 6 bol bias 03 (VRL) to 0.39643145192214363 Volts Pacs_BOLC_SET_VRL_G6(0.39643145192214363); // Set group 6 bol bias 20 (VH_BLIND) to 1.8837201139355604 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.8837201139355604); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 3 (Vh-Vl)blue = 1.4 Volts, (Vh-Vl)red = 1.4 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.3525857926230986 Volts Pacs_BOLC_SET_VH_G1(1.3525857926230986); // Set group 1 bol bias 02 (VL) to -0.047414207376901184 Volts Pacs_BOLC_SET_VL_G1(-0.047414207376901184); // Set group 1 bol bias 03 (VRL) to 0.3926244201072773 Volts Pacs_BOLC_SET_VRL_G1(0.3926244201072773); // Set group 1 bol bias 20 (VH_BLIND) to 1.976547929868054 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.976547929868054); // Set group 2 bol bias 01 (VH) to 1.3374255283716547 Volts Pacs_BOLC_SET_VH_G2(1.3374255283716547); // Set group 2 bol bias 02 (VL) to -0.06257447162834509 Volts Pacs_BOLC_SET_VL_G2(-0.06257447162834509); // Set group 2 bol bias 03 (VRL) to 0.38802799053825054 Volts Pacs_BOLC_SET_VRL_G2(0.38802799053825054); // Set group 2 bol bias 20 (VH_BLIND) to 1.9723540060682856 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9723540060682856); // Set group 3 bol bias 01 (VH) to 1.341267296137658 Volts Pacs_BOLC_SET_VH_G3(1.341267296137658); // Set group 3 bol bias 02 (VL) to -0.058732703862341994 Volts Pacs_BOLC_SET_VL_G3(-0.058732703862341994); // Set group 3 bol bias 03 (VRL) to 0.38970189090896923 Volts Pacs_BOLC_SET_VRL_G3(0.38970189090896923); // Set group 3 bol bias 20 (VH_BLIND) to 1.9735810667835696 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9735810667835696); // Set group 4 bol bias 01 (VH) to 1.352746675150765 Volts Pacs_BOLC_SET_VH_G4(1.352746675150765); // Set group 4 bol bias 02 (VL) to -0.04725332484923491 Volts Pacs_BOLC_SET_VL_G4(-0.04725332484923491); // Set group 4 bol bias 03 (VRL) to 0.3856108728986011 Volts Pacs_BOLC_SET_VRL_G4(0.3856108728986011); // Set group 4 bol bias 20 (VH_BLIND) to 1.9932003720526934 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9932003720526934); // Set group 5 bol bias 01 (VH) to 1.320583197395035 Volts Pacs_BOLC_SET_VH_G5(1.320583197395035); // Set group 5 bol bias 02 (VL) to -0.07941680260496485 Volts Pacs_BOLC_SET_VL_G5(-0.07941680260496485); // Set group 5 bol bias 03 (VRL) to 0.4116095244710064 Volts Pacs_BOLC_SET_VRL_G5(0.4116095244710064); // Set group 5 bol bias 20 (VH_BLIND) to 2.055742088043621 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055742088043621); // Set group 6 bol bias 01 (VH) to 1.3562697990163495 Volts Pacs_BOLC_SET_VH_G6(1.3562697990163495); // Set group 6 bol bias 02 (VL) to -0.04373020098365052 Volts Pacs_BOLC_SET_VL_G6(-0.04373020098365052); // Set group 6 bol bias 03 (VRL) to 0.43594530124025854 Volts Pacs_BOLC_SET_VRL_G6(0.43594530124025854); // Set group 6 bol bias 20 (VH_BLIND) to 2.011921670046162 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.011921670046162); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 4 (Vh-Vl)blue = 1.6 Volts, (Vh-Vl)red = 1.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.4783736198117614 Volts Pacs_BOLC_SET_VH_G1(1.4783736198117614); // Set group 1 bol bias 02 (VL) to -0.12162638018823857 Volts Pacs_BOLC_SET_VL_G1(-0.12162638018823857); // Set group 1 bol bias 03 (VRL) to 0.392515090355521 Volts Pacs_BOLC_SET_VRL_G1(0.392515090355521); // Set group 1 bol bias 20 (VH_BLIND) to 1.9764399412468519 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9764399412468519); // Set group 2 bol bias 01 (VH) to 1.4615686869832905 Volts Pacs_BOLC_SET_VH_G2(1.4615686869832905); // Set group 2 bol bias 02 (VL) to -0.13843131301670974 Volts Pacs_BOLC_SET_VL_G2(-0.13843131301670974); // Set group 2 bol bias 03 (VRL) to 0.3878839845398352 Volts Pacs_BOLC_SET_VRL_G2(0.3878839845398352); // Set group 2 bol bias 20 (VH_BLIND) to 1.9722117106846373 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9722117106846373); // Set group 3 bol bias 01 (VH) to 1.4655563032867613 Volts Pacs_BOLC_SET_VH_G3(1.4655563032867613); // Set group 3 bol bias 02 (VL) to -0.13444369671323875 Volts Pacs_BOLC_SET_VL_G3(-0.13444369671323875); // Set group 3 bol bias 03 (VRL) to 0.38996914633068824 Volts Pacs_BOLC_SET_VRL_G3(0.38996914633068824); // Set group 3 bol bias 20 (VH_BLIND) to 1.9738455591218464 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9738455591218464); // Set group 4 bol bias 01 (VH) to 1.4803815567917744 Volts Pacs_BOLC_SET_VH_G4(1.4803815567917744); // Set group 4 bol bias 02 (VL) to -0.11961844320822568 Volts Pacs_BOLC_SET_VL_G4(-0.11961844320822568); // Set group 4 bol bias 03 (VRL) to 0.3860593630979322 Volts Pacs_BOLC_SET_VRL_G4(0.3860593630979322); // Set group 4 bol bias 20 (VH_BLIND) to 1.9936441996882226 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9936441996882226); // Set group 5 bol bias 01 (VH) to 1.3828510880972673 Volts Pacs_BOLC_SET_VH_G5(1.3828510880972673); // Set group 5 bol bias 02 (VL) to -0.11714891190273273 Volts Pacs_BOLC_SET_VL_G5(-0.11714891190273273); // Set group 5 bol bias 03 (VRL) to 0.4109562973201683 Volts Pacs_BOLC_SET_VRL_G5(0.4109562973201683); // Set group 5 bol bias 20 (VH_BLIND) to 2.055094312734005 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.055094312734005); // Set group 6 bol bias 01 (VH) to 1.4187389541758537 Volts Pacs_BOLC_SET_VH_G6(1.4187389541758537); // Set group 6 bol bias 02 (VL) to -0.08126104582414631 Volts Pacs_BOLC_SET_VL_G6(-0.08126104582414631); // Set group 6 bol bias 03 (VRL) to 0.4349651037009118 Volts Pacs_BOLC_SET_VRL_G6(0.4349651037009118); // Set group 6 bol bias 20 (VH_BLIND) to 2.0109400872654906 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0109400872654906); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 5 (Vh-Vl)blue = 1.7 Volts, (Vh-Vl)red = 1.6 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.542293926761549 Volts Pacs_BOLC_SET_VH_G1(1.542293926761549); // Set group 1 bol bias 02 (VL) to -0.15770607323845098 Volts Pacs_BOLC_SET_VL_G1(-0.15770607323845098); // Set group 1 bol bias 03 (VRL) to 0.3926294451860477 Volts Pacs_BOLC_SET_VRL_G1(0.3926294451860477); // Set group 1 bol bias 20 (VH_BLIND) to 1.9765528932845227 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9765528932845227); // Set group 2 bol bias 01 (VH) to 1.5247596019367946 Volts Pacs_BOLC_SET_VH_G2(1.5247596019367946); // Set group 2 bol bias 02 (VL) to -0.17524039806320546 Volts Pacs_BOLC_SET_VL_G2(-0.17524039806320546); // Set group 2 bol bias 03 (VRL) to 0.3878550325870832 Volts Pacs_BOLC_SET_VRL_G2(0.3878550325870832); // Set group 2 bol bias 20 (VH_BLIND) to 1.9721831025166574 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9721831025166574); // Set group 3 bol bias 01 (VH) to 1.5286400044176514 Volts Pacs_BOLC_SET_VH_G3(1.5286400044176514); // Set group 3 bol bias 02 (VL) to -0.1713599955823485 Volts Pacs_BOLC_SET_VL_G3(-0.1713599955823485); // Set group 3 bol bias 03 (VRL) to 0.3901485670988867 Volts Pacs_BOLC_SET_VRL_G3(0.3901485670988867); // Set group 3 bol bias 20 (VH_BLIND) to 1.9740231261405279 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9740231261405279); // Set group 4 bol bias 01 (VH) to 1.5451742923820575 Volts Pacs_BOLC_SET_VH_G4(1.5451742923820575); // Set group 4 bol bias 02 (VL) to -0.15482570761794245 Volts Pacs_BOLC_SET_VL_G4(-0.15482570761794245); // Set group 4 bol bias 03 (VRL) to 0.3871858356177216 Volts Pacs_BOLC_SET_VRL_G4(0.3871858356177216); // Set group 4 bol bias 20 (VH_BLIND) to 1.9947589297629622 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9947589297629622); // Set group 5 bol bias 01 (VH) to 1.4463934011524333 Volts Pacs_BOLC_SET_VH_G5(1.4463934011524333); // Set group 5 bol bias 02 (VL) to -0.15360659884756683 Volts Pacs_BOLC_SET_VL_G5(-0.15360659884756683); // Set group 5 bol bias 03 (VRL) to 0.4101701125060366 Volts Pacs_BOLC_SET_VRL_G5(0.4101701125060366); // Set group 5 bol bias 20 (VH_BLIND) to 2.054314719447538 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.054314719447538); // Set group 6 bol bias 01 (VH) to 1.4826068632993925 Volts Pacs_BOLC_SET_VH_G6(1.4826068632993925); // Set group 6 bol bias 02 (VL) to -0.11739313670060761 Volts Pacs_BOLC_SET_VL_G6(-0.11739313670060761); // Set group 6 bol bias 03 (VRL) to 0.4338779750444286 Volts Pacs_BOLC_SET_VRL_G6(0.4338779750444286); // Set group 6 bol bias 20 (VH_BLIND) to 2.009851264439135 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.009851264439135); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 6 (Vh-Vl)blue = 1.8 Volts, (Vh-Vl)red = 1.8 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.60690529764583 Volts Pacs_BOLC_SET_VH_G1(1.60690529764583); // Set group 1 bol bias 02 (VL) to -0.19309470235416992 Volts Pacs_BOLC_SET_VL_G1(-0.19309470235416992); // Set group 1 bol bias 03 (VRL) to 0.39257168553053945 Volts Pacs_BOLC_SET_VRL_G1(0.39257168553053945); // Set group 1 bol bias 20 (VH_BLIND) to 1.9987180645064364 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9987180645064364); // Set group 2 bol bias 01 (VH) to 1.5888225493633414 Volts Pacs_BOLC_SET_VH_G2(1.5888225493633414); // Set group 2 bol bias 02 (VL) to -0.2111774506366586 Volts Pacs_BOLC_SET_VL_G2(-0.2111774506366586); // Set group 2 bol bias 03 (VRL) to 0.387719891228717 Volts Pacs_BOLC_SET_VRL_G2(0.387719891228717); // Set group 2 bol bias 20 (VH_BLIND) to 1.9720495652990864 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9720495652990864); // Set group 3 bol bias 01 (VH) to 1.5926816774791708 Volts Pacs_BOLC_SET_VH_G3(1.5926816774791708); // Set group 3 bol bias 02 (VL) to -0.20731832252082927 Volts Pacs_BOLC_SET_VL_G3(-0.20731832252082927); // Set group 3 bol bias 03 (VRL) to 0.39036266684895493 Volts Pacs_BOLC_SET_VRL_G3(0.39036266684895493); // Set group 3 bol bias 20 (VH_BLIND) to 1.974235015140725 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.974235015140725); // Set group 4 bol bias 01 (VH) to 1.6103713769916332 Volts Pacs_BOLC_SET_VH_G4(1.6103713769916332); // Set group 4 bol bias 02 (VL) to -0.1896286230083667 Volts Pacs_BOLC_SET_VL_G4(-0.1896286230083667); // Set group 4 bol bias 03 (VRL) to 0.38763171869999546 Volts Pacs_BOLC_SET_VRL_G4(0.38763171869999546); // Set group 4 bol bias 20 (VH_BLIND) to 1.9952001524800798 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.9952001524800798); // Set group 5 bol bias 01 (VH) to 1.575230733402161 Volts Pacs_BOLC_SET_VH_G5(1.575230733402161); // Set group 5 bol bias 02 (VL) to -0.22476926659783908 Volts Pacs_BOLC_SET_VL_G5(-0.22476926659783908); // Set group 5 bol bias 03 (VRL) to 0.40838061675412257 Volts Pacs_BOLC_SET_VRL_G5(0.40838061675412257); // Set group 5 bol bias 20 (VH_BLIND) to 2.052540349440553 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.052540349440553); // Set group 6 bol bias 01 (VH) to 1.6128643450774607 Volts Pacs_BOLC_SET_VH_G6(1.6128643450774607); // Set group 6 bol bias 02 (VL) to -0.1871356549225394 Volts Pacs_BOLC_SET_VL_G6(-0.1871356549225394); // Set group 6 bol bias 03 (VRL) to 0.4319097861053989 Volts Pacs_BOLC_SET_VRL_G6(0.4319097861053989); // Set group 6 bol bias 20 (VH_BLIND) to 2.007881605555887 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.007881605555887); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 7 (Vh-Vl)blue = 2.0 Volts, (Vh-Vl)red = 1.9 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.739376176417995 Volts Pacs_BOLC_SET_VH_G1(1.739376176417995); // Set group 1 bol bias 02 (VL) to -0.2606238235820051 Volts Pacs_BOLC_SET_VL_G1(-0.2606238235820051); // Set group 1 bol bias 03 (VRL) to 0.3921536831520859 Volts Pacs_BOLC_SET_VRL_G1(0.3921536831520859); // Set group 1 bol bias 20 (VH_BLIND) to 1.9760829613086472 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9760829613086472); // Set group 2 bol bias 01 (VH) to 1.719809813472755 Volts Pacs_BOLC_SET_VH_G2(1.719809813472755); // Set group 2 bol bias 02 (VL) to -0.28019018652724503 Volts Pacs_BOLC_SET_VL_G2(-0.28019018652724503); // Set group 2 bol bias 03 (VRL) to 0.38744168454874117 Volts Pacs_BOLC_SET_VRL_G2(0.38744168454874117); // Set group 2 bol bias 20 (VH_BLIND) to 1.9717746579976725 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9717746579976725); // Set group 3 bol bias 01 (VH) to 1.7343527587435847 Volts Pacs_BOLC_SET_VH_G3(1.7343527587435847); // Set group 3 bol bias 02 (VL) to -0.2656472412564153 Volts Pacs_BOLC_SET_VL_G3(-0.2656472412564153); // Set group 3 bol bias 03 (VRL) to 0.4017790445564455 Volts Pacs_BOLC_SET_VRL_G3(0.4017790445564455); // Set group 3 bol bias 20 (VH_BLIND) to 1.9855314406558735 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9855314406558735); // Set group 4 bol bias 01 (VH) to 1.7440573141484068 Volts Pacs_BOLC_SET_VH_G4(1.7440573141484068); // Set group 4 bol bias 02 (VL) to -0.2559426858515932 Volts Pacs_BOLC_SET_VL_G4(-0.2559426858515932); // Set group 4 bol bias 03 (VRL) to 0.38894738596666634 Volts Pacs_BOLC_SET_VRL_G4(0.38894738596666634); // Set group 4 bol bias 20 (VH_BLIND) to 1.996502027278406 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.996502027278406); // Set group 5 bol bias 01 (VH) to 1.6403549621270441 Volts Pacs_BOLC_SET_VH_G5(1.6403549621270441); // Set group 5 bol bias 02 (VL) to -0.25964503787295584 Volts Pacs_BOLC_SET_VL_G5(-0.25964503787295584); // Set group 5 bol bias 03 (VRL) to 0.4071234038646236 Volts Pacs_BOLC_SET_VRL_G5(0.4071234038646236); // Set group 5 bol bias 20 (VH_BLIND) to 2.051293864758269 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.051293864758269); // Set group 6 bol bias 01 (VH) to 1.6787311020540112 Volts Pacs_BOLC_SET_VH_G6(1.6787311020540112); // Set group 6 bol bias 02 (VL) to -0.22126889794598872 Volts Pacs_BOLC_SET_VL_G6(-0.22126889794598872); // Set group 6 bol bias 03 (VRL) to 0.4305158637367362 Volts Pacs_BOLC_SET_VRL_G6(0.4305158637367362); // Set group 6 bol bias 20 (VH_BLIND) to 2.0064867220677454 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.0064867220677454); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 8 (Vh-Vl)blue = 2.3 Volts, (Vh-Vl)red = 2.0 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 1.9636608873020274 Volts Pacs_BOLC_SET_VH_G1(1.9636608873020274); // Set group 1 bol bias 02 (VL) to -0.3363391126979725 Volts Pacs_BOLC_SET_VL_G1(-0.3363391126979725); // Set group 1 bol bias 03 (VRL) to 0.40278769107629514 Volts Pacs_BOLC_SET_VRL_G1(0.40278769107629514); // Set group 1 bol bias 20 (VH_BLIND) to 1.9865763456310306 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9865763456310306); // Set group 2 bol bias 01 (VH) to 1.927696912686972 Volts Pacs_BOLC_SET_VH_G2(1.927696912686972); // Set group 2 bol bias 02 (VL) to -0.37230308731302775 Volts Pacs_BOLC_SET_VL_G2(-0.37230308731302775); // Set group 2 bol bias 03 (VRL) to 0.3858403551587576 Volts Pacs_BOLC_SET_VRL_G2(0.3858403551587576); // Set group 2 bol bias 20 (VH_BLIND) to 1.9924144642105024 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9924144642105024); // Set group 3 bol bias 01 (VH) to 1.9431226670014545 Volts Pacs_BOLC_SET_VH_G3(1.9431226670014545); // Set group 3 bol bias 02 (VL) to -0.35687733299854535 Volts Pacs_BOLC_SET_VL_G3(-0.35687733299854535); // Set group 3 bol bias 03 (VRL) to 0.4024839037666154 Volts Pacs_BOLC_SET_VRL_G3(0.4024839037666154); // Set group 3 bol bias 20 (VH_BLIND) to 1.9862268670149914 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9862268670149914); // Set group 4 bol bias 01 (VH) to 1.9579270398291708 Volts Pacs_BOLC_SET_VH_G4(1.9579270398291708); // Set group 4 bol bias 02 (VL) to -0.3420729601708289 Volts Pacs_BOLC_SET_VL_G4(-0.3420729601708289); // Set group 4 bol bias 03 (VRL) to 0.3906771012878555 Volts Pacs_BOLC_SET_VRL_G4(0.3906771012878555); // Set group 4 bol bias 20 (VH_BLIND) to 1.99821351608857 Volts Pacs_BOLC_SET_VH_BLIND_G4(1.99821351608857); // Set group 5 bol bias 01 (VH) to 1.7079035410760286 Volts Pacs_BOLC_SET_VH_G5(1.7079035410760286); // Set group 5 bol bias 02 (VL) to -0.29209645892397146 Volts Pacs_BOLC_SET_VL_G5(-0.29209645892397146); // Set group 5 bol bias 03 (VRL) to 0.405804322083024 Volts Pacs_BOLC_SET_VRL_G5(0.405804322083024); // Set group 5 bol bias 20 (VH_BLIND) to 2.0499861292550787 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.0499861292550787); // Set group 6 bol bias 01 (VH) to 1.7476622867412348 Volts Pacs_BOLC_SET_VH_G6(1.7476622867412348); // Set group 6 bol bias 02 (VL) to -0.2523377132587652 Volts Pacs_BOLC_SET_VL_G6(-0.2523377132587652); // Set group 6 bol bias 03 (VRL) to 0.429562228366719 Volts Pacs_BOLC_SET_VRL_G6(0.429562228366719); // Set group 6 bol bias 20 (VH_BLIND) to 2.005532468489443 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.005532468489443); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 9 (Vh-Vl)blue = 2.6 Volts, (Vh-Vl)red = 2.1 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.2151628880310112 Volts Pacs_BOLC_SET_VH_G1(2.2151628880310112); // Set group 1 bol bias 02 (VL) to -0.3848371119689889 Volts Pacs_BOLC_SET_VL_G1(-0.3848371119689889); // Set group 1 bol bias 03 (VRL) to 0.41342338183313837 Volts Pacs_BOLC_SET_VRL_G1(0.41342338183313837); // Set group 1 bol bias 20 (VH_BLIND) to 2.0193446104924915 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.0193446104924915); // Set group 2 bol bias 01 (VH) to 2.1588489399994213 Volts Pacs_BOLC_SET_VH_G2(2.1588489399994213); // Set group 2 bol bias 02 (VL) to -0.4411510600005787 Volts Pacs_BOLC_SET_VL_G2(-0.4411510600005787); // Set group 2 bol bias 03 (VRL) to 0.3838811209851186 Volts Pacs_BOLC_SET_VRL_G2(0.3838811209851186); // Set group 2 bol bias 20 (VH_BLIND) to 1.9682559687629309 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9682559687629309); // Set group 3 bol bias 01 (VH) to 2.1867239063317037 Volts Pacs_BOLC_SET_VH_G3(2.1867239063317037); // Set group 3 bol bias 02 (VL) to -0.4132760936682966 Volts Pacs_BOLC_SET_VL_G3(-0.4132760936682966); // Set group 3 bol bias 03 (VRL) to 0.4136603871411812 Volts Pacs_BOLC_SET_VRL_G3(0.4136603871411812); // Set group 3 bol bias 20 (VH_BLIND) to 1.9973179392427267 Volts Pacs_BOLC_SET_VH_BLIND_G3(1.9973179392427267); // Set group 4 bol bias 01 (VH) to 2.20827452044462 Volts Pacs_BOLC_SET_VH_G4(2.20827452044462); // Set group 4 bol bias 02 (VL) to -0.39172547955538 Volts Pacs_BOLC_SET_VL_G4(-0.39172547955538); // Set group 4 bol bias 03 (VRL) to 0.4039414339062088 Volts Pacs_BOLC_SET_VRL_G4(0.4039414339062088); // Set group 4 bol bias 20 (VH_BLIND) to 2.011301244644244 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.011301244644244); // Set group 5 bol bias 01 (VH) to 1.7875017871866707 Volts Pacs_BOLC_SET_VH_G5(1.7875017871866707); // Set group 5 bol bias 02 (VL) to -0.31249821281332946 Volts Pacs_BOLC_SET_VL_G5(-0.31249821281332946); // Set group 5 bol bias 03 (VRL) to 0.41576367399178094 Volts Pacs_BOLC_SET_VRL_G5(0.41576367399178094); // Set group 5 bol bias 20 (VH_BLIND) to 2.037668873916454 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.037668873916454); // Set group 6 bol bias 01 (VH) to 1.8172008318899895 Volts Pacs_BOLC_SET_VH_G6(1.8172008318899895); // Set group 6 bol bias 02 (VL) to -0.2827991681100106 Volts Pacs_BOLC_SET_VL_G6(-0.2827991681100106); // Set group 6 bol bias 03 (VRL) to 0.42845474144203777 Volts Pacs_BOLC_SET_VRL_G6(0.42845474144203777); // Set group 6 bol bias 20 (VH_BLIND) to 2.004424303719793 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.004424303719793); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 10 (Vh-Vl)blue = 2.9 Volts, (Vh-Vl)red = 2.3 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.517666343337925 Volts Pacs_BOLC_SET_VH_G1(2.517666343337925); // Set group 1 bol bias 02 (VL) to -0.382333656662075 Volts Pacs_BOLC_SET_VL_G1(-0.382333656662075); // Set group 1 bol bias 03 (VRL) to 0.4351367995957048 Volts Pacs_BOLC_SET_VRL_G1(0.4351367995957048); // Set group 1 bol bias 20 (VH_BLIND) to 1.9965703186107444 Volts Pacs_BOLC_SET_VH_BLIND_G1(1.9965703186107444); // Set group 2 bol bias 01 (VH) to 2.4353683146246183 Volts Pacs_BOLC_SET_VH_G2(2.4353683146246183); // Set group 2 bol bias 02 (VL) to -0.4646316853753816 Volts Pacs_BOLC_SET_VL_G2(-0.4646316853753816); // Set group 2 bol bias 03 (VRL) to 0.39230855172448975 Volts Pacs_BOLC_SET_VRL_G2(0.39230855172448975); // Set group 2 bol bias 20 (VH_BLIND) to 1.9765832317921543 Volts Pacs_BOLC_SET_VH_BLIND_G2(1.9765832317921543); // Set group 3 bol bias 01 (VH) to 2.4565430314555052 Volts Pacs_BOLC_SET_VH_G3(2.4565430314555052); // Set group 3 bol bias 02 (VL) to -0.4434569685444947 Volts Pacs_BOLC_SET_VL_G3(-0.4434569685444947); // Set group 3 bol bias 03 (VRL) to 0.4116559215687209 Volts Pacs_BOLC_SET_VRL_G3(0.4116559215687209); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175436768747823 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175436768747823); // Set group 4 bol bias 01 (VH) to 2.4726040303622487 Volts Pacs_BOLC_SET_VH_G4(2.4726040303622487); // Set group 4 bol bias 02 (VL) to -0.4273959696377513 Volts Pacs_BOLC_SET_VL_G4(-0.4273959696377513); // Set group 4 bol bias 03 (VRL) to 0.3940712295914811 Volts Pacs_BOLC_SET_VRL_G4(0.3940712295914811); // Set group 4 bol bias 20 (VH_BLIND) to 2.023793793137234 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.023793793137234); // Set group 5 bol bias 01 (VH) to 1.9226793871045598 Volts Pacs_BOLC_SET_VH_G5(1.9226793871045598); // Set group 5 bol bias 02 (VL) to -0.37732061289544 Volts Pacs_BOLC_SET_VL_G5(-0.37732061289544); // Set group 5 bol bias 03 (VRL) to 0.40093587460771146 Volts Pacs_BOLC_SET_VRL_G5(0.40093587460771146); // Set group 5 bol bias 20 (VH_BLIND) to 2.022938134951507 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.022938134951507); // Set group 6 bol bias 01 (VH) to 1.9672658597937258 Volts Pacs_BOLC_SET_VH_G6(1.9672658597937258); // Set group 6 bol bias 02 (VL) to -0.332734140206274 Volts Pacs_BOLC_SET_VL_G6(-0.332734140206274); // Set group 6 bol bias 03 (VRL) to 0.4263945599495246 Volts Pacs_BOLC_SET_VRL_G6(0.4263945599495246); // Set group 6 bol bias 20 (VH_BLIND) to 2.002362975913312 Volts Pacs_BOLC_SET_VH_BLIND_G6(2.002362975913312); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); //*********************************************************** // Bias 11 (Vh-Vl)blue = 3.2 Volts, (Vh-Vl)red = 2.5 Volts //*********************************************************** // Set group 1 bol bias 01 (VH) to 2.847199981495237 Volts Pacs_BOLC_SET_VH_G1(2.847199981495237); // Set group 1 bol bias 02 (VL) to -0.3528000185047631 Volts Pacs_BOLC_SET_VL_G1(-0.3528000185047631); // Set group 1 bol bias 03 (VRL) to 0.4347941377293029 Volts Pacs_BOLC_SET_VRL_G1(0.4347941377293029); // Set group 1 bol bias 20 (VH_BLIND) to 2.018449774761696 Volts Pacs_BOLC_SET_VH_BLIND_G1(2.018449774761696); // Set group 2 bol bias 01 (VH) to 2.7602559944480873 Volts Pacs_BOLC_SET_VH_G2(2.7602559944480873); // Set group 2 bol bias 02 (VL) to -0.43974400555191273 Volts Pacs_BOLC_SET_VL_G2(-0.43974400555191273); // Set group 2 bol bias 03 (VRL) to 0.4036708891743245 Volts Pacs_BOLC_SET_VRL_G2(0.4036708891743245); // Set group 2 bol bias 20 (VH_BLIND) to 2.0099936291338243 Volts Pacs_BOLC_SET_VH_BLIND_G2(2.0099936291338243); // Set group 3 bol bias 01 (VH) to 2.805732095961401 Volts Pacs_BOLC_SET_VH_G3(2.805732095961401); // Set group 3 bol bias 02 (VL) to -0.3942679040385992 Volts Pacs_BOLC_SET_VL_G3(-0.3942679040385992); // Set group 3 bol bias 03 (VRL) to 0.4339248022480186 Volts Pacs_BOLC_SET_VRL_G3(0.4339248022480186); // Set group 3 bol bias 20 (VH_BLIND) to 2.0175166229478236 Volts Pacs_BOLC_SET_VH_BLIND_G3(2.0175166229478236); // Set group 4 bol bias 01 (VH) to 2.8132260321912117 Volts Pacs_BOLC_SET_VH_G4(2.8132260321912117); // Set group 4 bol bias 02 (VL) to -0.3867739678087883 Volts Pacs_BOLC_SET_VL_G4(-0.3867739678087883); // Set group 4 bol bias 03 (VRL) to 0.4141623922109569 Volts Pacs_BOLC_SET_VRL_G4(0.4141623922109569); // Set group 4 bol bias 20 (VH_BLIND) to 2.0213933637092976 Volts Pacs_BOLC_SET_VH_BLIND_G4(2.0213933637092976); // Set group 5 bol bias 01 (VH) to 2.1145200531318697 Volts Pacs_BOLC_SET_VH_G5(2.1145200531318697); // Set group 5 bol bias 02 (VL) to -0.38547994686813014 Volts Pacs_BOLC_SET_VL_G5(-0.38547994686813014); // Set group 5 bol bias 03 (VRL) to 0.4292977832137159 Volts Pacs_BOLC_SET_VRL_G5(0.4292977832137159); // Set group 5 bol bias 20 (VH_BLIND) to 2.006817368773259 Volts Pacs_BOLC_SET_VH_BLIND_G5(2.006817368773259); // Set group 6 bol bias 01 (VH) to 2.1293608950052523 Volts Pacs_BOLC_SET_VH_G6(2.1293608950052523); // Set group 6 bol bias 02 (VL) to -0.3706391049947475 Volts Pacs_BOLC_SET_VL_G6(-0.3706391049947475); // Set group 6 bol bias 03 (VRL) to 0.4231555942593115 Volts Pacs_BOLC_SET_VRL_G6(0.4231555942593115); // Set group 6 bol bias 20 (VH_BLIND) to 1.9769002872568586 Volts Pacs_BOLC_SET_VH_BLIND_G6(1.9769002872568586); // Wait for 120 s for stabilization delay(120); // Measurement for noise_measure_time seconds TMMarker602(); delay(noise_measure_time); TMMarker600(); } // File : PACS_Spec_Curing_OBS.cus // Missionphase : PACS FM ILT tests // // Purpose : Buffer Transmission mode staring measurement for the spectrometer // // Author : P. Royer // // Arguments : CRE setup arguments, grating & fw positions, staring time // // Prerequisite : configuration of all mechanisms (spec_aot_prologue or spec_orbit_prologue) // // Dependencies : SPEC_cre_setup // SPEC_spu_setup // SPEC_spu_reset // SPEC_fltw_move // OBCP_SAFE // // Description : CRE setup (parametrized) // SPU setup (Buffer transmission mode) // Position chopper (BB2), FW & Grating (parametrized) // staring // spu_reset // OBCP_SAFE() // // Comments : Makes use of atomic commands for mechanisms // Returns the instrument to SAFE_MODE // // Version : 1.1 // History : 1.0 / 12-Mar-2008 initial version by PR // 1.1 / 03-Jul-2008 removed call to SAFE MODE OBCP in the end // // ----------------------------------- // @author P. Royer // @date today // @version 1.1 // @purpose Buffer transmission mode obs, with fixed grating // @comment - // procedure PACS_Spec_BufferTransmission_Stare { int ramp_len_red = 64; // Red ramps length int ramp_len_blu = 64; // Blue ramps length double bias_d_red = 0.07 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_d_blu = 0.21 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) int capa_red = 8; // Capacitor red (0=0.1pF,8=0.2pF,4=0.4pF,12=1pF) int capa_blu = 8; // Capacitor blue (0=0.1pF,8=0.2pF,4=0.4pF,12=1pF) int grat_pos = 500000; // Grating position during the observation (fixed) string filter_pos = "POS B" in ["POS A","POS B"]; // FW position during the observation (fixed) int chop_pos = 21200; // Chopper Position (default 21200 = CS2) int stare_time = 7200; // Idle time in buffer transmission mode }{ // Internal parameters // ------------------- //int chop_pos_BB1 = -21350; //int chop_pos_BB2 = 21200; double bias_r_red = 0.011; // in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_r_blu = 0.011; // in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) // // CRE SETUP // NOTE: capa_xxx is added to cre_ctrl_xx within SPEC_cre_setup // int cre_ctrl_red = 386; int cre_ctrl_blu = 386; SPEC_cre_setup(cre_ctrl_red,cre_ctrl_blu,ramp_len_red,ramp_len_blu,bias_d_red,bias_r_red,bias_d_blu,bias_r_blu,capa_red,capa_blu); // // DPU SETUP -> BURST MODE // Pacs_DPU_SET_BUS_LIST("ENABLE"); // // SPU SETUP // int comp_mode_blu = 0x19; // Compression mode blue channel: BUFFER TRANSMISSION int comp_mode_red = 0x19; // Compression mode red channel: BUFFER TRANSMISSION int nb_samp_subramp_blu = 16; // Nb of blue samples per sub-ramp int nb_samp_subramp_red = 16; // Nb of red samples per sub-ramp int nb_raw_spu_blu = 3; // Nb of raw channels transmitted by SPUS int nb_raw_spu_red = 3; // Nb of raw channels transmitted by SPUL int glitch_det = 1; // Glitch detection; 0=on; 1=off int ramp_fit_alg = 1; // Ramp fit algorithm [0=LstSq;1=mean value] bool startSPU = true; // Start SPU or not [true,false] SPEC_spu_setup(comp_mode_blu,comp_mode_red,nb_samp_subramp_blu,nb_samp_subramp_red,nb_raw_spu_blu,nb_raw_spu_red,glitch_det,ramp_fit_alg,startSPU); delay(5); // // MECHANISMS // // CHOPPER -> BB1 //PACS_Chop_Move_Abs(chop_pos_BB1); Pacs_DMC_MOVE_CHOP_ABS_RAW(chop_pos); delay(1); // GRATING & FW // move FW first because it demands to disable the grating -> grating might move freely SPEC_fltw_move(filter_pos); // Contains its own delay Pacs_DMC_MOVE_GRAT_ABS_RAW(grat_pos); delay(15); // // ACTUAL OBSERVING/STARING TIME // delay(stare_time); // // CHOPPER -> DEFAULT //PACS_Chop_Move_Abs(0); Pacs_DMC_MOVE_CHOP_ABS_RAW(664); delay(1); // // SPU RESET // PACS_Spec_SPU_Reset(); delay(1); // // DPU SETUP -> CANCEL BURST MODE // Pacs_DPU_SET_BUS_LIST("DISABLE"); // // CRE SETTINGS WERE CHANGED -> PACS TO SAFE MODE FOR SECURITY // OBCP_SAFE(); // // SYNC //= = = sync(); } // Missionphase : AOT validation // // Purpose : Setup SPU for photometry data flow // // Author : VDP / Bart Vandenbussche // // Arguments : // // Description : Configures photometry compression /reduction mode and (optionally) starts // reduction/compression and GAIN // // Dependencies : // // Comments : // // Version : 1.0 // // History : 1.0 created from PHOT_spu_setup // needed to set Gain for LowGain obs // implementation: SCR4196 i.e. gain and bit rounding // compression mode etc.. // int procedure PHOT_spu_gain_setup { string set_gain = "LOW" in ["HIGH","LOW"]; // Gain Blue settings: default = LOW int comp_mode_blu = 0; // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int comp_mode_red = 0; // Compression blue: default=0, double=1, half=2, lossless=4, transp=7, buffer=9 int nraw_blu = 3; // Number of raw channels transmitted in the blue SPU int nraw_red = 3; // Number of raw channels transmitted in the red SPU bool startSPU = true; // Start SPU or not [true,false] }{ // Duration accumulator (accumulated time expressed in milliseconds) // (no longer used) if(set_gain == "LOW") { int spr1 = 0; } else { spr1 = 2; } int duration_msec = 0; // Stop the Long and Short SPUs Pacs_SPUS_STOP_REDUCT_COMPR(); Pacs_SPUL_STOP_REDUCT_COMPR(); // Set gain Pacs_BOLC_SET_GAIN(set_gain); // Set the SPU compression modes int[] aux = [comp_mode_blu,comp_mode_red]; int check_sum = checksum("int",aux); // Issue the TC {int}[] comp_par = Array2grp_1(aux); Pacs_DMC_WRT_SPU_TRAN_MODE(comp_par,check_sum); // Setting of start index of raw channels for SPUS and SPUL string spus_obs_mode = "PHOT"; string spul_obs_mode = "PHOT"; int spus_startraw = 1; int spul_startraw = 1; Pacs_SPUS_RAW_CHAN_TRAN_MODE(spus_obs_mode,nraw_blu,spus_startraw); Pacs_SPUL_RAW_CHAN_TRAN_MODE(spul_obs_mode,nraw_red,spul_startraw); // Photo "Ottensamer" block ("S" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) int ppf = 0; // PPP: Pre-Processing Parameter int ppp = 0; // Threshold for glitch detection in photometry int tfp = 1000; // Threshold for chopper position deviation in photometry int tcp = 100; // Glitch detection for photometry (1: no glitch detection) int gdfp = 1; // Override samples to average int navg = 0; // resolution reduction parameter 2 RND!!! // int spr1 = 0; defined as function of the set_gain value // resolution reduction parameter 3 int spr2 = 0; // Lossless scheme int scm = 1; // lossless compression algoithm (0,1,2,3,4) int lcal = 0; // PACS Codec Order (3,4) int pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax {int}[] spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUS_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // Photo "Ottensamer" block ("L" SPU) // PPF: Pre-Processing Flag (0: no PP, 1: addition, 2: subtraction, // 3: multiplication, 4: division) ppf = 0; // PPP: Pre-Processing Parameter ppp = 0; // Threshold for glitch detection in photometry tfp = 1000; // Threshold for chopper position deviation in photometry tcp = 100; // Glitch detection for photometry (1: no glitch detection) gdfp = 1; // Override samples to average navg = 0; // resolution reduction parameter 2 // spr1 = 0; defined as function of the set_gain value // resolution reduction parameter 3 spr2 = 0; // Lossless compression scheme scm = 1; // lossless compression algoithm (0,1,2,3,4) lcal = 0; // PACS Codec Order (3,4) pcod = 3; // Spare elements: 13 spare element; hardcoded as 0,0,... in operand // Create operand aux = [ppf,ppp,tfp,tcp,gdfp,navg,spr1,spr2,scm,lcal,pcod,0,0,0,0,0,0,0,0,0,0,0,0,0]; check_sum = checksum("int",aux); // Convert to grp_1 syntax spu_par = Array2grp_1(aux); // Issue TC Pacs_SPUL_WRT_DET_CST_PHOT(spu_par,check_sum); delay(1); // Send time stamps // DMC_WRT_TIME: Write the time sent by the DPU into the DMC buffer // (No action on this one?) // DPU sends the time to DEC/MEC Pacs_DPU_SEND_TIME(); // DMC_SET_TIME: Set the time previously written by the write time command Pacs_DMC_SET_TIME(); // Start reduction/compression if commanded to do so if(startSPU) { Pacs_SPUS_START_REDUCT_COMPR(); Pacs_SPUL_START_REDUCT_COMPR(); } return duration_msec; } // SpireBbPOF5Init // // $Id: SpireBbPOF5Init.txt,v 1.1 2006/08/10 09:38:58 kking Exp $ // // Building Block to initialise the instrument for POF5 (scan map) operation // // The complete instrument setup operation is divided into two parts: // Configuration: actions that can be executed during the slew to the start // position of the S/C pointing mode. // Initialisation: actions that must be carried out at the S/C intial pointing // position before any observational operations are executed. // // This building Block implements the second part of the setup // // block SpireBbPOF5Init SPIRE 8273 { }{ int t = time(); string hstr = ""; // hex string string tstr = ""; // time string // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Initialisation started"); SpireMsg(2," $Id: SpireBbPOF5Init.txt,v 1.1 2006/08/10 09:38:58 kking Exp $"); // // ..... configuration ..... // int cmd = 0x0; // // Set BBID hstr = SpireHexStr($BBID,8); tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_BBID_RAW(" + hstr + ")"); Spire_SET_BBID_RAW($BBID); // // set STEP to On Target tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_SET_OBS_STEP_RAW(0x8000)"); Spire_SET_OBS_STEP_RAW(0x8000); // // set detector offsets // set DCU data mode to Auto Offset cmd = 0x843c0010; SpireSendDrcuCmd(cmd,0); // start auto offset generation cmd = 0x843e0001; SpireSendDrcuCmd(cmd,0); delay(15); // // dump detector offsets // stop auto offset generation cmd = 0x843e0000; SpireSendDrcuCmd(cmd,0); // set DCU data mode to get offset data cmd = 0x843c0018; SpireSendDrcuCmd(cmd,0); // start offset data dump cmd = 0x843e0001; SpireSendDrcuCmd(cmd,0); delay(5); // stop offset data dump cmd = 0x843e0000; SpireSendDrcuCmd(cmd,0); // // flush data tstr = SpireTimeStr(time()); SpireMsg(5," " + tstr + "Cmd: Spire_FLUSH_FIFO_RAW(0x1000)"); Spire_FLUSH_FIFO_RAW(0x1000); delay(2); // // ..... completion ..... // tstr = SpireTimeStr(time()); SpireMsg(2," " + tstr + ": BB POF5 Initialisation ended"); SpireMsg(1," ..POF5 Initialisation (" + (time() - t) + " seconds)"); }