Date: Wed, 7 Dec 2011 18:33:05 -0500 (EST)
From: Jun-Hui Zhao 
To: Glen Petitpas 
Subject: Re: SMA Miriad beta 1.4.1 for SMA data with ad hoc correlator modes

Hi Glen,
     That was a bug. Can you try it again?
     Please let me know if the problem persists.
     Jun-Hui

On Wed, 7 Dec 2011, Jun-Hui Zhao wrote:

> Hi Glen,
>     Thanks.
>     I will look into the problem and will let you know
> as soon as I fix it.
>     Jun-Hui
>
>
> On Tue, 6 Dec 2011, Glen Petitpas wrote:
>
> >
> >
> > Hi Jun-Hui
> >
> > Thanks for making these modifications. The new "options=if1" is a much
> > nicer way to specify the upper and lower 2GHz.
> >
> > I was trying to run it on last nights data (111206_10:24:13) and I got the
> > following error:
> >
> > ------------------
> > rtdchilo2:gpetitpa[quickLook] 701 % loadnewmiriad
> > MIRIAD version <<<<<<< VERSION: beta 1.4.1. 2011-12-05 for handling SMA
> > 4GHz and 2GHz mode data. >>>>>>>  [CVS] loaded from
> > MIR=/sma/local/miriad_cvs
> >    Optimized for telescope=sma
> >
> > ... used smafix to to tsys correction...
> >
> >
> > rtdchilo2:gpetitpa[quickLook] 706 % smauvplt
> > vis=111206_10:24:13_rxl.usb.tsys axis=time,phase options=if1,corrupt
> > device=1/xs nxy=2,2 dotsize=6
> > SmaUvPlt: version 2.2 05-Dec-2011
> > ### Warning [smauvplt]:  options=if1 => to use the 1st IF data.
> > Will plot unflagged data
> >
> > ### Fatal Error [smauvplt]:  Too many windows
> > rtdchilo2:gpetitpa[quickLook] 707 %
> > --------------------
> >
> > I have not had time to dig into the details yet, but I thought I'd let
> > you know
> > sooner rather than later. I will try to take a look at the detailed header
> > information tomorrow to see if there is an obvious reason why this is
> > happening.
> >
> > Cheers
> > Glen
> >
> >
> > 111206_10:24:13/
> > Jun-Hui Zhao wrote:
> > > Dear Dr Ken Young,
> > >      We also wondered why the SMA spectral chunk data still contain bad
> > > data points after operation for nearly 10 years. We haven't seen such a
> > > problem for a quite while (many years).
> > >      Good news is that c1 (continuum data from online) seems to be normal
> > > (no contamination!), see c1raw_pha.ps (raw data), and c1_pha.ps (rejected
> > > bad correlations)
> > >      However, when plotting the raw data averaged from the spectral chunks
> > > of IF2 in USB, we do see the phase zero problems, see if2raw_pha.ps. After
> > > rejecting the corrupted correlations, the remaining data appear to be
> > > normal, see if2_pha.ps.
> > >      IF1 data of USB appears to be normal, see if1_pha.ps and if2_pha.ps.
> > >      We were not able to plot the spectrum from the raw data. The bad
> > > correlations did break the Miriad spectrum graphic tool. However, we found
> > > that the SMA chunks s26 and s27 in USB as well as s23 and s22 in LSB
> > > data contain corrupted correlations.
> > > data contain corrupted correlations.
> > >      Hope our analysis with Miriad is useful to you.
> > >      Jun-Hui Zhao
> > >
> > > Enc.
> > >     Here are the usages for producing the plots used here with Miriad
> > > (beta 1.4.1). Someone can repeat our analysis.
> > >
> > > set outf=111108_09
> > > #plot the phase from the raw data (directly from SMALOD output)
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=c1raw_pha.ps/cps nxy=3,7 \
> > >      options='ch0',corrupt
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=if1raw_pha.ps/cps nxy=3,7 \
> > >      options='if1',corrupt
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=if2raw_pha.ps/cps nxy=3,7 \
> > >      options='if2',corrupt
> > >
> > > #plot the phase from the data after the bad correlations are rejected
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=c1_pha.ps/cps nxy=3,7 \
> > >      options='ch0'
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=if1_pha.ps/cps nxy=3,7 \
> > >      options='if1'
> > > smauvplt vis=${outf}_rx0.usb   \
> > >      axis=time,pha device=if2_pha.ps/cps nxy=3,7 \
> > >      options='if2'
> > >
> > > Attached the six postscript files produced from this analysis.
> > >
> > >
> > >
> > >
> > > On Tue, 6 Dec 2011, Ken Young wrote:
> > >
> > >> On Tue, 6 Dec 2011, Jun-Hui Zhao wrote:
> > >>> Hi Glen,
> > >>>    We have investigated one (111108_09:56:47) of the three
> > >>> problematic data files that you reported recently. There
> > >>> appear to be two problems:
> > >>> 1) The total number of chunks used is less than 49; for
> > >>>    the zero-channel data chunks, no information on the frequency
> > >>>    header is provided in the SMA online data.
> > >>> 2) The data appear to be contaminated by some corrupted correlations
> > >>>    (produced many continnum channels with zero phase).
> > >> This is quite odd.   MIR does not see *any* continuum data points that
> > >> have exactly 0 phase.   Not even in the data that was flagged bad.
> > >> I have attached four files to this message (all gzip'd to save space).
> > >> The files contain the continuum phase value for every point in the
> > >> 111108_09:56:47 data set.   The ones named {x}SB_Original.gz contain the
> > >> original continuum channel phase points.   The ones named {x}SB_Rebuilt
> > >> contain the phase values after the continuum channel was rebuilt from the
> > >> spectral bands using UTI_AVGBAND.   The columns in each file are
> > >> scan number, baseline and continuum phase.
> > >>
> > >> Taco
> > >>