Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LinuxPops Spectral Focus

Spectral Focus

Spectral line focusing has been on our wish list of features for many years. Due to the lack of strong continuum sources at mm wavelengths, operators of forced to forgo any focus checks when the planets are not available. Add to the lack of sources, the rather large Sun avoidance zone, at the SMT, and there are times of the year where we are lucky to have more than 1 source to focus on. These leaves the operator no choice but to guess on the appropriate focus settings during various hourly changes.

For years, Spectral line pointing has been the main means of pointing for the SMT, again do to the utter lack of good continuum source at λ < 1 mm. The current procedure for Spec-5 pointing is to take a series of 5 scans, each at the various offset positions (North, South, Center, East & West) and have dataserv piece it all together to form a 5-point. I have never liked this method, and vowed not to repeat that mistake in implementing spec-focusing.

At present, the only way to analyze a spec focus is using Linuxpops. The internal procedure, sfocus accepts a scan number and fits Gaussian curve to the sums of each separate spectral feature.

Synopsis

Linuxpops(H0) >>
Linuxpops(H0) >> sfocus /h
Analyze a Spectral Line Focus
Mode: SPEC
Usage: sfocus scan.xx [options]
where: 'scan' is the scan number of the first focus position; include fractional part
options are:
/t send results to MONITOR
/p print the intermediate plots and save in .png format
/h help
See Also: spec5
See Variables: sf_fitcenter, sf_start, sf_end, sf_bchans, sf_fitmhz
Linuxpops(H0) >>

Setup

There is now a new Rambo screen under the Spectra tab call Spectral Line BSP Focusing. It is shown with typical parameters already set.

Rambo-SFocus-Screen.png
Figure 1: Rambo Spectral Line Focus Screen

As can be seen in the configuration screen, we will be doing a single scan consisting of a 9 point focus each taking approximately 40 seconds for a total scan time of 6 minutes. Future updates will a have fields for F0 and F-Step values.

As far as the cactus control system is concerned, it's just another BSP scan. The only difference is that the exec task will flag the header variable openpar[5] with the value of 5555.5, before sending it off to the spectral-line system's comm task.

The spectral line task control, which sequences all observations, will notice that the openpar[5] header variable is set to the magic value, and move the focus between the various positions once every OFF-ON-ON-OFF BSP movements. The scan proceeds normally otherwise. Also, the bandpass-Q display will only update, during the scan, at the and of each OFF-ON-ON-OFF sets.

The spectral line process rtdata, which has the job of assembling finished scans into usable observations, also notices the magic value in openpar[5] and treats the data differently. Rather then adding up all the ON's and all the OFF's and doing the usual math to calibrate the data before writing to disk, rtdata separates each focus position's set of OFF-ON-ON-OFF, sums the two ON's, sums the two OFF's , calibrated the individual set and saves them into separate arrays called: sfoc_data[]. It does this for each enabled backend. See Figure 8, for a graphical representation of this.

Much like an OTF scan which contains multiple spectral line TP bandpasses in each observation, a spec-focus contains, in this case, 9 individual fully calibrated spectra.

Figure 2 shows well behaved resulting data as it appears on disks.

sfocus_data.4977.05.png
Figure 2: (9) individual spectra written to disk as a single scan. NOTE: The Freq Offset and Channel numbers are bogus for this case.

Analysis

To analyze Spectral Focus you simply type:

Linuxpops(H0) >>
Linuxpops(H0) >> sfocus 4977.05
Linuxpops(H0) >> # Processing Line BSP, Scan 4977.05
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # Using Line Width: 20.000000
Linuxpops(H0) >> # specFocusOne(): noint = 256, nfoc = 9, expectedPos = 128, delta = 20
Linuxpops(H0) >> # Baseline Regions: [ 0] 1 40
Linuxpops(H0) >> # [ 1] 216 296
Linuxpops(H0) >> # [ 2] 472 552
Linuxpops(H0) >> # [ 3] 728 808
Linuxpops(H0) >> # [ 4] 984 1064
Linuxpops(H0) >> # [ 5] 1240 1320
Linuxpops(H0) >> # [ 6] 1496 1576
Linuxpops(H0) >> # [ 7] 1752 1832
Linuxpops(H0) >> # [ 8] 2008 2088
Linuxpops(H0) >> # [ 9] 2264 2303
Linuxpops(H0) >> # Processing Line BSP, Scan 4977.05
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # graceFit(): Using nfit = 1
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # Removing Computed Baseline from: H0
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # [ 1]: 0.950000 2.425356
Linuxpops(H0) >> # [ 2]: 1.280000 3.881585
Linuxpops(H0) >> # [ 3]: 1.610000 4.416025
Linuxpops(H0) >> # [ 4]: 1.940000 4.879087
Linuxpops(H0) >> # [ 5]: 2.270000 4.568319
Linuxpops(H0) >> # [ 6]: 2.600000 3.798655
Linuxpops(H0) >> # [ 7]: 2.930000 2.300432
Linuxpops(H0) >> # [ 8]: 3.260000 1.320527
Linuxpops(H0) >> # Fitting a 8 Point Gauss to Peak: 4.879087, @ 1.940000, HP = 1.980000
Linuxpops(H0) >> # Gaussian Peak: 4.93 K
Linuxpops(H0) >> # Gaussian Center: 1.92
Linuxpops(H0) >> # Gaussian FWHM: 2.00 mm
Linuxpops(H0) >> # plotGauss(): Enter
Linuxpops(H0) >> # Processing Line BSP, Scan 4977.06
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # Using User supplied Line Width: 20.000000
Linuxpops(H0) >> # specFocusOne(): noint = 256, nfoc = 9, expectedPos = 128, delta = 20
Linuxpops(H0) >> # Baseline Regions: [ 0] 1 40
Linuxpops(H0) >> # [ 1] 216 296
Linuxpops(H0) >> # [ 2] 472 552
Linuxpops(H0) >> # [ 3] 728 808
Linuxpops(H0) >> # [ 4] 984 1064
Linuxpops(H0) >> # [ 5] 1240 1320
Linuxpops(H0) >> # [ 6] 1496 1576
Linuxpops(H0) >> # [ 7] 1752 1832
Linuxpops(H0) >> # [ 8] 2008 2088
Linuxpops(H0) >> # [ 9] 2264 2303
Linuxpops(H0) >> # Processing Line BSP, Scan 4977.06
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # graceFit(): Using nfit = 1
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # Removing Computed Baseline from: H0
Linuxpops(H0) >> # Displaying Plot: H0
Linuxpops(H0) >> # [ 1]: 0.950000 2.523752
Linuxpops(H0) >> # [ 2]: 1.280000 3.908030
Linuxpops(H0) >> # [ 3]: 1.610000 4.415029
Linuxpops(H0) >> # [ 4]: 1.940000 4.766983
Linuxpops(H0) >> # [ 5]: 2.270000 4.354479
Linuxpops(H0) >> # [ 6]: 2.600000 3.431516
Linuxpops(H0) >> # [ 7]: 2.930000 1.962648
Linuxpops(H0) >> # [ 8]: 3.260000 1.120785
Linuxpops(H0) >> # Fitting a 8 Point Gauss to Peak: 4.766983, @ 1.940000, HP = 1.980000
Linuxpops(H0) >> # Gaussian Peak: 4.82 K
Linuxpops(H0) >> # Gaussian Center: 1.86
Linuxpops(H0) >> # Gaussian FWHM: 1.95 mm
Linuxpops(H0) >> # plotGauss(): Enter
Linuxpops(H0) >> # Results: DISPLAY FIT_AX01 1.918999 FIT_AX02 1.864707 FIT_AX0AVG 1.891853
Linuxpops(H0) >>

So, this procedure:

    Fetched the first scan
    Computed (9) proper baseline regions
    Displayed the scan
    Removed (9) separate linear baselines
    Re-plotted the scan
    Made a .png file of the raw data
    Summed up and averaged the total area under +/- 20 channels from center for each of (9) spectra
    Fit a Gaussian Curve to those (9) sums
    Plotted the Gaussian results
    Made a .png printout of the Gaussian plot
    Repeated the entire process for the second IF
    Printed out a recap. (Had the user passed the /t flag, the procedure would have sent the results to MONITOR)

Results

Figure 3 shows the results of the first IF.

sfocus_gauss.4977.05.png
Figure 3: (9) Point Gaussian Results for IF #1

Control

Behavior of Linuxpops execution of sfocus can be controlled using several variables.

Linuxpops(H0) >>
Linuxpops(H0) >> dlist /k sf_
Defined Dynamic Variables
E: sf_fitcenter: (int) 0 User setable chan # of spectral line center if not in center
E: sf_start: (int) 0 User selectable starting sample for Spectral Line Focus
E: sf_end: (int) 0 User selectable Ending sample for Spectral Line Focus
E: sf_bchans: (int) 0 User supplied number of baseline channels to use on the ends
E: sf_fitmhz: (double) 0.0000e+00 User defined Width of Spectral Focus/Five-pt fitting (MHz)
Linuxpops(H0) >>

Normally sfocus defaults to the center 40 channels for determining the 'sum under the curve' calculation, but the user can set sf_fitcenter to a different channel number if the emission line is off-center.

Set sf_fitmhz to the width of the expected emission otherwise +/- 20 channels is used.

Set sf_start or sf_end to the beginning or ending 'valid' spectra if there are problems with the ends of the data. (Note: the spectra are numbered 0 - 8 in the above examples)

Set sf_bchans to the number of beginning and ending channels to use for baseline removal; otherwise 40 is the default.