========================================================================= CONTINUUM DATA REDUCTION IN THE GBT IDL ANALYSIS PACKAGE T. M. Bania June 2004 v3.0 July 2004 v3.1 ========================================================================= * V3.1 adds continuum analysis capability to v2.1. So many things needed to be tweaked that another version was spawned. V3.1 works only for GBT DCR data written by SDFITS. * Continuum procedures work on the basic {gbt_data} array so this structure needs to be defined before trying to analyze continuum data. * V3.1 allows one to switch between spectral line and continuum data within an IDL session. This makes it different, and more powerful, than UniPOPS. The switching commands are: LINE : Switch to spectral LINE mode. All graphics procedures write to LINE graphics screen. CONT : Switch to CONTinuum mode. All graphics procedures write to CONT graphics screen. To define the continuum window use CGBT_WIN Currently this is done at startup via STARTUP.IDL.V3.1 * For the GBT DCR backend, SDFITS v1.1 writes a FITS file for *every* DCR data dump. Typically this is every 0.1 second. (!) Presumably this is because the slewing GBT is pointed at a different position every dump. Each SDFITS header has positional information for azimuth, elevation, R.A., and Dec. It has the sequence number of the data acquisition procedure as well as the total number of steps in the procedure. What it does not have is any information about the NUMBER of FITS files associated with any given procedure, nor the NOMINAL POSITION OF, say, the source one is PEAKing on.... This needs to be changed. In fact, for the un-as-yet addressed issue of map data in this package, one needs to have a map origin position passed by SDFITS and defined in the {gbt_data} structure. Since the DCR data stream can have lots of different types of continuum procedures in it, e.g. PEAKS for pointing, FOCUS for (guess what?), etc., this means that the data stream is comprised of data units of varying, and, at first, UNKNOWN lengths (here 'length' means the number of SDFITS data files per DCR data unit). * V3.0 at present handles only fixed length continuum data units. So one must choose at the outset what that is to be. For example, one can choose to analyze all the PEAK data. One must set the system variable !c_pts which is the number of data (continuum intensity for a DCR dump) points per DCR data unit. E.g., the number of points in a continuum PEAK observation. But to do this means one must know what this value is.... * V3.1 has the following procedures to help discover the nature of the SDFITS data file: @KONDAR is a *script* that reads the SDFITS file into a *local* structure array, sdf[]. It also packs the first !data_points*16 DCR intensity data into buffers 0 to 15 so that you can look at it via a combination of SHOW and COPY,buffer#,0 commands. ...................................................................................... CONTINFO,sdfits_file_name Scans SDFITS continuum data file and determines the number of continuum data points per record. Prompts for filename if none is input. Uses changes in scan number, polarization, scan type, and sequence number to flag new data records. Note that different continuum observing procedures, e.g. PEAK, FOCUS, etc. will have different numbers of data points. Example output: Scanning SDFITS data file ==> /data02/idl/data/Feb04.cal.dcr.fits /data02/idl/data/Feb04.cal.dcr.fits Contains 64640 records REC# SCAN OBJECT POL RA DEC AZ EL SEQ TYPE #_DATA_PTS 0 1 0110+5632 LCP 01 10 17.2 +56 24 10.0 323.7 64.5 1 Peak: 0 299 1 0110+5632 RCP 01 10 17.2 +56 24 10.0 323.7 64.5 1 Peak: 299 598 2 0110+5632 LCP 01 11 37.4 +56 40 34.2 324.4 64.4 2 Peak: 299 897 2 0110+5632 RCP 01 11 37.4 +56 40 34.2 324.4 64.4 2 Peak: 299 1196 3 0110+5632 LCP 01 09 56.2 +56 38 0.6 323.8 64.2 3 Peak: 299 1495 3 0110+5632 RCP 01 09 56.2 +56 38 0.6 323.8 64.2 3 Peak: 299 1794 4 0110+5632 LCP 01 11 58.1 +56 26 53.4 323.7 64.4 4 Peak: 299 2093 4 0110+5632 RCP 01 11 58.1 +56 26 53.4 323.7 64.4 4 Peak: 299 2392 5 0110+5632 LCP 01 10 58.1 +56 32 14.2 323.3 64.0 1 Focus 299 2992 5 0110+5632 RCP 01 10 58.1 +56 32 14.2 323.3 64.0 1 Focus 600 3592 15 0110+5632 LCP 01 10 48.6 +56 22 35.8 315.7 53.8 1 Peak: 600 3891 15 0110+5632 RCP 01 10 48.6 +56 22 35.8 315.7 53.8 1 Peak: 299 4190 15 0110+5632 LCP 01 10 48.6 +56 22 35.8 315.7 53.8 1 Peak: 299 4489 15 0110+5632 RCP 01 10 48.6 +56 22 35.8 315.7 53.8 1 Peak: 299 ...................................................................................... CONDAR,sdfits_file_name Reads SDFITS DCR continuum data file and uses changes in parameters to parse data into discrete continuum data records. Prompts for filename if none is input. Example output: Contents of SDFITS continuum data file: /data02/idl/data/Feb04.cal.dcr.fits REC# SCAN OBJECT RA DEC AZ EL SEQ TYPE #_DATA_PTS 0 1 0110+5632 01 10 17.2 +56 24 10.0 323.7 64.5 1 Peak: scn= 1 seq= 1 LCP -> 299 pts scn= 1 seq= 1 RCP -> 299 pts 598 2 0110+5632 01 11 37.4 +56 40 34.2 324.4 64.4 2 Peak: scn= 2 seq= 2 LCP -> 299 pts scn= 2 seq= 2 RCP -> 299 pts 1196 3 0110+5632 01 09 56.2 +56 38 0.6 323.8 64.2 3 Peak: scn= 3 seq= 3 LCP -> 299 pts ...................................................................................... * Now that we know the number of data points per continuum data unit we can choose which type of continuum data to process and set !c_pts. At present this is done manually and by hardwiring the procedure MAKE_CDATA with the data type. MAKE_CDATA,sdfits_input_file,{gbt_data}_output file Creates CONTINUUM data file using the {gbt_data} format INPUT data is from SDFITS filled data file !kon counts number of data records currently in file OUTPUT data is {gbt_data} format to specified file which must then be attached via ATTACH command Prompts for input if file names are not supplied. Procedure packs lots of information into the gbt.data variable: intensities -> gbt.data[0:!c_pts-1] azimuth posn's -> gbt.data[!c_pts:2*!c_pts-1] elevation posn's -> gbt.data[2*!c_pts:3*!c_pts-1] R.A. posn's -> gbt.data[3*!c_pts:4*!c_pts-1] Dec posn's -> gbt.data[4*!c_pts:5*!c_pts-1] * Using the same {gbt_data} format for both LINE and CONTINUUM data means that we can use all the I/O utilities that have already been developed. This is why we can analyze both spectral line and continuum data. * Example ATTACH,1,'/data02/idl/data/LFeb04.gbt' <--- attach {gbt_data} line data to ONLINE file ATTACH,2,'/data02/idl/data/CFeb04.gbt' <--- attach {gbt_data} continuum data to OFFLINE file CONT <-- switch to CONTinuum mode OFFLINE <-- choose OFFLINE file to search for data GET,57 <-- get record 57 from the OFFLINE file AZXX <-- set the x-axis to Azimuth positions SHOW <-- display the continuum intensities as a function of Azimuth on the continuum graphics screen. 1. Possile continuum choices for x-axis are: CHAN channels AZXX Azimuth in arcseconds ELXX Elevation in arcseconds RAXX Right Ascension in arcseconds DECX Declination in arcseconds 2. For any given continuum record *all* x-axis choices are possible. But not all choices are meaningful ones. 3. I have normalized these axis positions by subtracting the average position in the record from the position itself. To me this is more meaningful, especially at present since SDFITS does NOT pass the nominal position of the source. (!) LINE <-- switch to LINE mode ONLINE <-- attach {gbt_data} spectral line data to ONLINE file GET,1122 <-- get spectrum at record 1122 in ONLINE file CHAN <-- set the x-axis to channels FREEXY <-- allow axis to autoscale SHOW <-- display the spectrum on the spectral line graphics screen ======================================================================================== N.B. As with the spectral line portion of this package, all the numerical routines, e.g. baselines, gaussians, etc. work for CHANnel mode and very poorly, if at all for other modes. I have yet to have the focussed time to track this down successfully...