From ungerechts@iram.es Thu Nov 15 17:40:32 2001 Date: Thu, 15 Nov 2001 17:08:28 +0100 From: Hans Ungerechts To: Walter Brunswig , Albrecht Sievers Subject: CCS NCS ODP processOTF -- see attachment -- Hans Ungerechts, IRAM, Avd. Div. Pastora 7NC, E-18012 Granada, Spain phone: 958-805468 fax: 958-222363 mailto:ungerechts@iram.es phone: 958-482002 fax: 958-481148 (at the 30M telescope) [ Part 2: "Attached Text" ] Q: -- Albrecht -- please check -- Walter: other variables / standard parameters? -- Albrecht, Walter: I would like to have more data to test the scripts, in particular: 4MHz (I don't have any) OTFMAPs that end with OTF subscan (no REF at end) OTFMAPS with 3 or more OTF subscans between REFs - HU ================================== Online Data Processing: processOTF ================================== Requirements: ============= Before a spectral-line on-the-fly (OTF) scan a valid CAL COLD must have been taken. This CAL COLD scan will be used to calibrate the OTF scan. During a standard OTF scan: 1 the first subscan is taken on an off-source reference position (REF). 2 one or several OTF subscans are taken. 3 normally another subscan is taken at a reference position. Optionally: continue with step 2. Normally the last subscan is a REF; but in general the sequence can also end with an OTF subscan. The processing of spectral-line on-the-fly observations shall: after the first subscan (REF): do nothing after an OTF subscan that is not the last subscan: do nothing after the n-th REF subscan (n > 1): process all OTF subscans taken between the (n-1)-th and n-th REF subscan, using both the (n-1)-th and the n-th REF subscan. at the end of the OTF scan, if the last subscan was not a REF: process all OTF subscans taken since the last REF subscan, using (only) the last REF subscan. after any group of OTF subscans has been procesed: generate plots (TBD) Notes: ------ Only "standard" OTF scans in the sense explained above shall be processed correctly by ODP. ODP requires that REF and OTF data are taken in the same scan. Desiderata for future iterations: --------------------------------- Support frequency-switched OTF. Could consider using CAL COLD scans taken after the OTF scan and processing of non-standard OTF scans. Design: ======= after the n-th REF subscan (n>1): --------------------------------- otfcal is called with: 1 a pre-script that assigns the approprate values to the following required SIC GLOBAL variables (all integers) odp#backendCode ! backend 2 3 4 (5) or 7 odp#calScan ! CAL scan number odp#flyScan ! OTF scan number odp#refSubscan1 ! REF subscan before OTF subscans odp#flySubscanList[1] ! OTF subscan ... ! more OTF subscans (otional) odp#refSubscan2 ! REF subscan after OTF 2 a script that processes the OTF data as explained in the requirements/specifications and according to the values of the variables listed above. 3 a "post"-script. unused. at the end of the OTF scan, if the last subscan was not a REF: -------------------------------------------------------------- otfcal is called as above, except that: 1 odp#refSubscan2 = 0 ! must be set to 0 (zero) generate plots (TBD) -------------------- Implementation: =============== "odp#prescriptOTF.otf" ---------------------- Template script showing how to assign values to the required variables. In this template the values are taken from the SIC parameters &1 to &9; in a real case they should be set directly. Up to 99 OTF subscans can be specified: odp#flySubscanList[1] = i ... odp#flySubscanList[99] = j "odp#processOTF.otf" -------------------- Process the OTF subscans as explained above: For each OTF subscan in odp#flySubscanList (for each element of odp#flySubscanList that is > 0) the scripts odp#prescript1OTF.otf and odp#process1OTF.otf are called. Scripts, Used Scripts, and Helper Scripts: ----------------------------------------- odp#defineOTF.otf ensures the correct definition of the SIC GLOBAL variables odp#examineOTF.otf makes a neat list of the SIC GLOBAL variables and their values odp#plot1OTF.class (pre-prototype, unused) makes a plot odp#prescript1OTF.otf sets values for processing of 1 OTF subscan odp#prescriptOTF.otf sets values for processing of OTF subscans from one CRO cycle odp#process1OTF.otf processes 1 OTF subscan the maximum number of OTF "dumps" is set to 1999 in this script; maybe this should be determined by another variable ... NOTE: THIS IS THE (ONLY) SCRIPT THAT DOES "REAL WORK". SHOULD BE CHECKED AND TESTED ON MORE DATA. odp#processOTF.otf organizes processing of OTF subscans fromone CRO cycle Implementation Notes: --------------------- These scripts assume that a SIC logical "ODP:" is defined pointing to the directory containing the scripts. All names of these scripts, as well as the GLOBAL SIC variables they use, start with the string "odp#". Some overhead could be avoided by processing the CAL in odp#processOTF.otf. In the current version the CAL is processed in odp#process1OTF.otf for each OTF subscan (and each backend). For development and test purposes this has the advantage that all the "real work" is encapsulated in one script. Note: ----- The prototypes of these scripts are on mrt-ux1 in: /users/astro/ungerech/ncs30m/onlineDataProcessing